You should define a OpenApi specification (example petstore.yaml).
And then create a file
orval.config.js at root of your project:
The output options configure what and where you want to write the generated code.
mode is where you define the way you want to generate your files (default:
single - only one file with everything)
target is where the generated will be written by default
schemas is where the models will be written.
mock is when you want to generate mocks with MSW. he will be generated in the target file. You can check MSW to setup them correctly
The input options configures the imported specification and also what you want to override on it.
target is the specification file
override is to quickly override the input
transformer to transform the specification like add a param to every call.
Checkout the orval configuration to see all available options.