fastify / fastify/fastify-swagger

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

Open
#878 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.1k
Forks
219
Avg merge
4h 24m
Merged PRs (30d)
2

Description

### Prerequisites

- [x] I have written a descriptive issue title
- [x] 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 https://github.com/fastify/fastify-swagger/blob/20ab71cf9bdb1e8af9dc15bb1355b0ccf296d441/lib/spec/openapi/utils.js#L122, 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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.