Comments (5)
const routing: Routing = {
api: {
users: {
"": new DependsOnMethod({
get: getUsersEndpoint,
post: makeUsersEndpoint,
}),
":id": new DependsOnMethod({
get: getUserByIdEndpoint,
patch: changeUserByIdEndpoint,
delete: deleteUserByIdEndpoint,
})
}
}
}
from express-zod-api.
@RobinTail thank you for your answer, its not obvious from the documentation how to achieve such a configuration (i mean empty quotes), perhaps need to add such an example to the documentation
from express-zod-api.
And I'm also in the process of writing an autorouting generator depending on the file structure, if it's useful I may add MR later on
from express-zod-api.
you need to read the following two articles in order to achieve the desired configuration:
- https://github.com/RobinTail/express-zod-api#multiple-schemas-for-one-route
- https://github.com/RobinTail/express-zod-api#route-path-params
This should help you to make it possible.
If not, please let me know in another issue.
from express-zod-api.
perhaps need to add such an example to the documentation
I tried my best.
I'm open to other suggestions.
from express-zod-api.
Related Issues (20)
- Specifying input headers HOT 8
- TypeScript errors TS4023, TS4094 HOT 11
- Multiple servers in Swagger HOT 2
- Export request/response types from generated client HOT 5
- Listening to a configurable hostname HOT 1
- Insufficient types export (TS4023) of `Metadata` HOT 1
- Task: fix NPM warning during publishing
- Cannot create multiple errors response when generate Document
- Set schema name using withMeta
- Type regression from 16.1.0 to 16.2.0 HOT 3
- incorrect pattern field for openapi HOT 4
- What tool did you use to make the handdrawn diagram?
- OpenApi yaml spec has wrong minimum value for doubles HOT 6
- Allow all express-fileupload configurations HOT 5
- winston detetction not sufficient HOT 10
- tsc error when trying to build using the getting started instructions HOT 7
- Is it possible to add custom documentation generation for my custom zod types HOT 2
- Duplicated headers in request body in generated docs (POST, PATCH, etc.) HOT 10
- Customising logger with winston erroring out in v19 HOT 17
- Default number range for `z.number()` causes `openapi-generator-cli generate` to fail HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from express-zod-api.