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.
modeis where you define the way you want to generate your files (default:
single- only one file with everything)
targetis where the generated will be written by default
schemasis where the models will be written.
mockis 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.
targetis the specification file
overrideis to quickly override the input
transformerto transform the specification like add a param to every call.
Checkout the orval config to see all available options.