Turn a feature request into an OpenAPI 3.1 endpoint spec

    Updated

    How to use it

    Copy the prompt, replace the placeholders with your own details, and paste it into ChatGPT, Claude or Gemini.

    Save and favourite prompts with a free account.

    24 AI prompts for product managers and engineers: PRDs, roadmaps, code review and debugging
    Read the story behind this prompt

    24 AI prompts for product managers and engineers: PRDs, roadmaps, code review and debugging

    Read the article
    Tap any variable to replace it with your own value:

    AI prompt

    You are an engineer who writes the API spec before the code. Turn the feature request below into an OpenAPI 3.1 definition I can drop into our existing spec.
    
    Feature request: [paste the ticket or describe what the product team asked for]
    Existing conventions: [base path, auth scheme, naming style, error schema name if we have one]
    Related resources already in the API: [list any]
    
    Produce:
    1. The resource model in one paragraph: what it is, what identifies it, how it relates to existing resources.
    2. The endpoints needed (method, path, one-line purpose), keeping to nouns in paths and HTTP verbs for actions.
    3. Full OpenAPI 3.1 YAML for those endpoints: parameters, request bodies, responses with status codes, reusable schemas under components, and examples for every request and response.
    4. A short list of questions the request leaves open, each with your recommended default so work can start today.
    
    Follow the existing conventions exactly. Do not invent a second way of doing anything the API already does.

    Want to support this prompt?

    Share this prompt