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

Response body validation #147

Closed
marceloverdijk opened this issue Apr 16, 2024 · 1 comment
Closed

Response body validation #147

marceloverdijk opened this issue Apr 16, 2024 · 1 comment

Comments

@marceloverdijk
Copy link
Contributor

Similar as https://cloudflare.github.io/itty-router-openapi/user-guide/request-body/ it would be great to have Response body validation.

Maybe in a different manner as this is maybe less suited for Runtime errors, but instead for compile time.

Rationale:

  1. make sure responses follow the defined openapi contact.
  2. make sure that additionally fetched fields from eg database query are not accidentally included in the response; eg think about any secret field in User table.
@marceloverdijk
Copy link
Contributor Author

See #159 for more details using Chanfana.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant