Skip to content

Make it possible to control the id, summary, and description of an examples #878

@segevfiner

Description

@segevfiner

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the feature has not already been requested

🚀 Feature Proposal

Examples are currently specified as an array of objects in Fastify schemas/JSON Schemas, and converted to the OpenAPI format by @fastify/swagger. But it generates an automatic id

examplesObject['example' + (index + 1)] = { value: example }
, and you can't control the summary or description. Adding some syntax to be able to control this will be nice. As that is what is displayed in swagger-ui.

Motivation

For nicer display in swagger-ui.

Example

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions