Slide 1

Slide 1 text

Leveraging Prompt Engineering for Effective OpenAPI Descriptions of APIs 1

Slide 2

Slide 2 text

codecentric AG Hoher Wall 15 44137 Dortmund Telefon: +49 (0) 151. 10 86 70 74 Daniel Kocot Head of API Experience & Operations AsyncAPI Ambassador [email protected] www.codecentric.de Innovative - Trustful - Competent - Pragmatic 2

Slide 3

Slide 3 text

API (Description) Lifecycle 3

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

Focus on lifecycle steps

Slide 6

Slide 6 text

6 Understanding the needs • API providers supported by API enablement teams need a deeper ramp-up in terms of design thinking methodologies. • So far, we rely on the use of personas to better understand the consumer base of the API. Based on the consumers, we can draw conclusions about their requirements. • In order to be able to look at these inferences in a meaningful way, the idea of the empathy map will be introduced. To further sharpen the results, the What- How-Why methodology will also be used. In the end, all this leads to a customer journey map. • With the help of AI, in particular ChatGPT, all results can be summarised in a mind map for a better overview.

Slide 7

Slide 7 text

Prompting… 7

Slide 8

Slide 8 text

Prompting… 8 • Create a developer persona with main technical skills are Java and OpenAPI.

Slide 9

Slide 9 text

Prompting… 9 • Create an empathy map for Alex Morgan.

Slide 10

Slide 10 text

Prompting… 10 • Please use What-How-Why methology with Alex Morgan.

Slide 11

Slide 11 text

Prompting… 11 • Gather all those informations above into a customer journey map.

Slide 12

Slide 12 text

12 First draft of an API • When we develop a first draft of an API design, it always seems more important to write down the description directly using a specific definition language. • Instead, it is better to rely on a Domain Specific Language (DSL) that describes the models and a corresponding interface either based on a natural language or through paradigms and concepts of a programming language. • This leads to a corresponding trained large language model being able to fully support this process step.

Slide 13

Slide 13 text

Prompting… 13

Slide 14

Slide 14 text

Prompting… 14 • Using Copilot for Visual Studio • Describe an API via the chat or as comment in the code • Create a new product OpenAPI definition using problem+json for errors and HAL+json for the data. • Hopefully Copilot is able bring up the right data the right time • In Enterprise context it could be very helpful to create an LLM of existing API definitions

Slide 15

Slide 15 text

15 Review the API • Here is an idea from @apihandyman to record the results of a validation as a basis for a possible review in an Excel table. • In order to draw conclusions about how APIs are designed within the organisation. • With regard to the evaluations, an AI could be used to provide a corresponding statement about the quality of the design of an API.

Slide 16

Slide 16 text

Prompting… 16

Slide 17

Slide 17 text

Prompting… 17 • Review the API definition. • Receving a protocol of • General Observations • Endpoint-specific Observations • Recommendations • Having a LLM on your own will be of good value for the organisation as a whole.

Slide 18

Slide 18 text

18 Implement the API • With AI in combination with a portal or marketplace, among other things, we can make it clear to developers at an early stage which framework is suitable for their respective use case based on the description. • AI also reacts on the basis of data. • Once the framework or technology has been selected, the development process can be supported and driven forward with the help of Github Copilot.

Slide 19

Slide 19 text

Prompting… 19

Slide 20

Slide 20 text

Prompting… 20 • For this chatting with Copilot brings up the next steps to go depending on your framework decision.

Slide 21

Slide 21 text

21 Test the API • For testing an API or the service, we can use AI in the sense of ChatGPT. • The test cases are created based on the respective definition and can be provided in different formats.

Slide 22

Slide 22 text

Prompting… 22

Slide 23

Slide 23 text

Prompting… 23 • Generate test cases.

Slide 24

Slide 24 text

Prompting… 24 • Generate Gherkin specifications from test cases above.

Slide 25

Slide 25 text

25 codecentric AG | Hochstraße 11 | 42697 Solingen Creating the digital future together. Thank you!