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.
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.