Christopher Walles

OpenAPI meets OpenAI

What if your OpenAPI spec could write its own backend? Learn a reliable process to generate fully functional code using LLMs, moving beyond simple server stubs.

OpenAPI meets OpenAI
#1about 5 minutes

Using OpenAPI specifications for automated code generation

The OpenAPI specification provides a language-agnostic way to describe REST APIs, which serves as documentation and enables automated generation of client libraries and server stubs.

#2about 5 minutes

Generating functional backend code with LLMs

Large language models can extend OpenAPI's code generation capabilities beyond simple stubs to create functional backend code, particularly for database-centric operations.

#3about 6 minutes

Structuring a Spring backend for code generation

The code generation process targets a specific Spring framework architecture, breaking the problem down into generating controllers, repositories, entities, and schema classes.

#4about 7 minutes

Crafting prompts to generate schemas and entities

A structured four-part prompt including task, rules, input, and context is used to reliably generate schema classes and database entities from the OpenAPI specification.

#5about 4 minutes

Generating controllers and repositories from the spec

By providing the LLM with the operation specification and previously generated classes as context, it can generate complete controller endpoints and database repositories.

#6about 3 minutes

Reviewing the limitations of this AI-driven approach

While the generated code is reliable for database-centric tasks, limitations include placing logic in controllers, lacking authorization, and the inherent incompleteness of the OpenAPI spec.

Related jobs
Jobs that call for the skills explored in this talk.

Featured Partners

Related Articles

View all articles
CH
Chris Heilmann
With AIs wide open - WeAreDevelopers at All Things Open 2025
Last week our VP of Developer Relations, Chris Heilmann, flew to Raleigh, North Carolina to present at All Things Open . An excellent event he had spoken at a few times in the past and this being the “Lucky 13” edition, he didn’t hesitate to come and...
With AIs wide open - WeAreDevelopers at All Things Open 2025
EM
Eli McGarvie
16 Ways Developers Can Use ChatGPT-4 and GPT-4o
ChatGPT has been busy getting new designations. If you’ve been scrolling on 𝕏 over the last week, then you’ve seen the ChatGPT-4o announcement and probably thought of Joaquin Phoenix’s virtual girlfriend on Her.Beyond the references to flicks, the la...
16 Ways Developers Can Use ChatGPT-4 and GPT-4o
DC
Daniel Cranney
Stephan Gillich - Bringing AI Everywhere
In the ever-evolving world of technology, AI continues to be the frontier for innovation and transformation. Stephan Gillich, from the AI Center of Excellence at Intel, dove into the subject in a recent session titled "Bringing AI Everywhere," sheddi...
Stephan Gillich - Bringing AI Everywhere

From learning to earning

Jobs that call for the skills explored in this talk.

Generative AI Developer

Generative AI Developer

University of the Arts, London
Sleaford, United Kingdom

£34-41K
Python
PyTorch
TensorFlow