Contracts inside routes files #1418
tepmehatop
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi and Thank's a lot for any help!
To generate/convert openapi to api methods I use command:
npx swagger-typescript-api generate --path http://localhost/blabla/api-docs -o projects/api/__generated__ --templates projects/api/generatorWorker/api-templates --modular --module-name-index 2 --responses --axios
I use option
module-name-index 2
to generate API routes for different files, that is, not all in one file.But how can I make sure that the contracts are also placed in the API route files? I'm referring to the data-contracts.ts file, which is created separately. I need all the DTOs to be placed in the API route files.
Beta Was this translation helpful? Give feedback.
All reactions