Comments (6)
Hello @christian-draeger, operationName is the way to go to modify the operationId and the suffix is for your schemas. If you want you can also use a transformer in the input config. To have access to your specification directly and modify it
from orval.
If you use the axios client or angular itβs override the class name or the name of the object containing all the endpoints. Itβs the title of your specification in fact
from orval.
it turned out we can archive the model name prefixing with the following orval config:
// ...
output: {
// ...
override: {
components: {
schemas: {
suffix: 'FirstApiDTO',
},
},
},
},
But nevertheless being keen what the output title property should do. since it looks like its doing nothing.
and this is just a solution for the models and nit for operations.
from orval.
i also managed to modify the operation names:
// ...
output: {
// ...
override: {
operationName: (operation: any, route: string, verb: any) => `${verb}${operation.operationId}FromFirstApi`,
},
},
from orval.
but still being curious if this is the way to go to avoid name clashes between operations and schemas of different specs that would result in the same name and what title property is doing
from orval.
Alright thanks for the feedback.
I guess the issue can be closed than π
Just out of curiosity, what is output.override.title there for?
from orval.
Related Issues (20)
- Node16 or bundler module resolution causes TS2742 error HOT 1
- Missing import of enum const in generated mock when using split mode HOT 5
- Mock TypeError custom override HOT 7
- Possibility of TS2563 error for mock generation HOT 5
- TS2300 Duplicate identifier: duplicated imports when `mock` enabled HOT 7
- Allow overriding entire handler function in generated MSW handlers, not just response object
- Invalid typescript generation for empty schema HOT 4
- msw generation does not import used models HOT 1
- Mock generation doesn't guarantee the required property mocking
- Is possible ignore the changes in the line of OpenAPI spec version ? HOT 2
- Another duplicate export edge case
- Specify mock property overrides for a specific schema HOT 2
- Support replacing types with custom ones when transforming the input HOT 5
- React Query: Regression in 6.25.0 caused by #1207 HOT 5
- Is possible ignore the changes in the line of OpenAPI spec version ?
- Orval generates wrong import paths in ESM-only package HOT 3
- Pass an additional option object in fetcher function when using custom axios instance HOT 5
- usePrefetch+useSuspenseQuery incorrectly generates prefetchSuspenseQuery calls
- bug: readonly fields missing from mutation function input types
- Regression when updating from 6.21 to 6.22.0 HOT 2
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 orval.