You should define a OpenApi specification like this
And then create a file orval.config.js at root of your project.
module.exports = {'petstore-file-transfomer': {output: {mode: 'single',target: './src/petstore.ts',schemas: './src/model',mock: true,},input: {target: './petstore.yaml',},},};
The output options configure what and where you want to write the generated code.
The input options configure the imported specification and also what you want to override on it.
Checkout the orval config reference to see all available options.