Skip to content
This repository has been archived by the owner on Feb 4, 2025. It is now read-only.

Create response schemas for API endpoints #308

Open
ethanwu10 opened this issue May 30, 2020 · 0 comments
Open

Create response schemas for API endpoints #308

ethanwu10 opened this issue May 30, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@ethanwu10
Copy link
Member

Fastify has optimizations for JSON serialization when schemas for endpoints are available, so we should generate schemas for each endpoint by having the endpoint declare what response kinds are valid, and attaching a schema for the data of each response type to the response type list.

Having these schemas also allows us to generate an OpenAPI specification for the API through another Fastify plugin.

@ethanwu10 ethanwu10 added the enhancement New feature or request label May 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant