API-driven development places the API specification at the heart of the development lifecycle, ensuring teams clearly define and understand inputs, outputs and business logic before writing a single line of code. By adopting a spec-first approach and AI tools such as ChatGPT and Github Copilot, development becomes more predictable, consistent with company standards and easier to maintain.
Generating a Spec-First OpenAPI 3.0 Schema with ChatGPT Projects
To kick off a new feature set, I turned to ChatGPT Projects to draft an initial OpenAPI 3.0 schema template. I provided best practice documentation, and a concise project description, and a strong prompt covering:
- Organisation API best practices and naming standards
- Error codes and authentication requirements
- Resource name and relationships
- Required request and response fields
ChatGPT generated a comprehensive YAML schema within minutes. Rather than accepting it verbatim, I iteratively refined prompts alongside our solution designers to align the document with business needs and internal standards. For example, enforcing pagination conventions and standardising field naming. The result was a validated API specification that all stakeholders and developers could reference, avoiding downstream misinterpretation during implementation.
Scaffolding Code with GitHub Enterprise Copilot
Armed with our approved schema, I moved to the PERN stack (PostgreSQL, Express, React, Node.js). I uploaded both the OpenAPI file and our internal “API Schema and Best Practices” guide to GitHub. Copilot was then instructed, via inline comments, to always consult these sources when generating code.
Within moments, Copilot produced fully formed route definitions, draft controller stubs, and model templates. Each snippet adhered to our company’s linting rules and made use of shared helper functions (e.g. request validators and error handlers). Rather than hand-coding boilerplate, my focus shifted to refining business logic and edge-case handling.
Quality-of-Life Improvements
This combination of tools yielded several immediate benefits:
- Fewer typos and inconsistencies: AI-generated code always matched the schema’s field names and types, reducing simple mistakes.
- Enforced compliance: By embedding best-practices documentation alongside the schema, Copilot suggested patterns that aligned with our security and performance standards.
- Reusable abstractions: Common functionality, such as input sanitisation and pagination, was automatically implemented as helper functions, decreasing duplicated code.
- Rapid iteration: From initial schema draft to first working endpoints took under an hour, compared to an afternoon of handcrafting before.
- Unblocking development: A pre-approved schema enables a team to work on different parts of a project concurrently, such as the frontend and backend, accelerating the overall development process.
From Concept to Production in Record Time
Rather than wrestling with unknowns at the code level, we now start every feature of our API-driven products by nailing down the OpenAPI spec. Once stakeholders sign off, ChatGPT Projects and Copilot handle the heavy lifting of generating templates and boilerplate. This workflow transforms development into three streamlined phases:
- Concept & Design: Define the API specification in OpenAPI 3.0.
- Scaffolding: Use AI to generate routes, controllers and models.
- Customisation: Focus on business logic, performance tuning and integration tests.
By pushing the spec to the forefront, we ensure alignment between designers, backend developers and front-end teams. And by automating routine code generation, our senior engineers are freed to tackle the most complex challenges.
Looking Ahead
While the tools continue to evolve, our core approach remains clear: define the specification first, then use AI-driven assistance to translate that specification into production-ready code. This methodology has already slashed our feature-delivery timelines and elevated code quality across multiple services. As we expand our micro-product suite, ChatGPT Projects and GitHub Enterprise Copilot will remain indispensable partners in delivering robust, standards-compliant APIs at speed.

This post was written by Kannen Joshi, one of our Consultants & DevOps Engineers at Cloud Elemental, as part of our ongoing series exploring how AI is transforming the way we build, ship, and scale our cloud solutions.
At Cloud Elemental, we’re committed to embracing tools like ChatGPT and GitHub Copilot not just for efficiency, but to raise the bar on quality, security, and developer experience across our service offerings.
If you’re exploring how to streamline your own API development workflows, or looking for a partner to help build cloud-native, AI-enabled solutions, we’d love to hear from you. Get in touch with the team at Cloud Elemental to start a conversation about how we can support your next project.