Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant