You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here we would export a src/handlers/putEcho.d.ts file containing the types for the schemas and the operation.
References to external schema could be imported or generated where they actually live and rebuild only when their contents change (via the watch function).
We will need a service that take the various file path for each generated schema (to compute imports) or the recipe to compute them. Also, the first run will probably need to generate the whole schema
In the context of a framework, generating the whole schema types in a single pass and to a single file is not always suitable.
The best would be to allow to build partial schema based on some rules and a context.
For example, we could generate an API endpoint schema only for a single Whook's handler:
https://github.com/nfroidure/whook/blob/1cc395665c5c69e38d4f36612b16d5fc3dd92e72/packages/whook-example/src/handlers/putEcho.ts#L12-L111
Here we would export a
src/handlers/putEcho.d.ts
file containing the types for the schemas and the operation.References to external schema could be imported or generated where they actually live and rebuild only when their contents change (via the watch function).
We will need a service that take the various file path for each generated schema (to compute imports) or the recipe to compute them. Also, the first run will probably need to generate the whole schema
The API interface could be something like:
The text was updated successfully, but these errors were encountered: