nothingToJson doesn't take the generic TResponse anymore. The type is inferred from the endpoint definition. The endpoint definition doesn't need the requestSchema/requestDesc defined anymore.
jsonToJson doesn't take the generic TRequest and TResponse anymore. Types are inferred from the endpoint definition.
Other changes:
Added jsonToNothing that accepts an input, but can respond only with an HTTP code.
⚠️ Breaking change: jsonToNothing, nothingToJson and jsonToJson don't accept the request/response descriptions. The descriptions are automatically extracted from request/response schemas.
Added config option policyGetter which takes a function that returns the privacy policy. This will automatically create an API endpoint /policy that will return it on demand. The policy getter is a function so that the policy can be imported on-demand.
Version 23 changelog: ⚠️ Breaking changes:
nothingToJson
doesn't take the genericTResponse
anymore. The type is inferred from the endpoint definition. The endpoint definition doesn't need therequestSchema
/requestDesc
defined anymore.jsonToJson
doesn't take the genericTRequest
andTResponse
anymore. Types are inferred from the endpoint definition.Other changes:
jsonToNothing
that accepts an input, but can respond only with an HTTP code.Version 24 changelog
⚠️ Breaking change:
jsonToNothing
,nothingToJson
andjsonToJson
don't accept the request/response descriptions. The descriptions are automatically extracted from request/response schemas.Version 25 changelog
The
dto
in request handlers has been renamed toreqBody
.Version 26 changelog
Added config option
policyGetter
which takes a function that returns the privacy policy. This will automatically create an API endpoint/policy
that will return it on demand. The policy getter is a function so that the policy can be imported on-demand.Version 27 changelog
The
policyGetter
can be an async function now. This supports passing it functions like this:Version 29 changelog
If the provided privacy policy ends with
</html>
, the/privacypolicy
endpoint will return it as HTML content instead of plaintext.Version 32 changelog
Version 36 changelog
/
path that deisplays URLs of privacy policy and OpenAPI specVersion 67 changelog