orval
orval copied to clipboard
mapping server types to existing client types
Our swagger doc is generated automatically with swaggo and we don't have a way to define x-enumNames: . is there any way to map server types to client types? so orval will know not to generate this type, but to rely on my own created type in ts?
so something like this:
mapTypes: {
`chiptus.Type`: `app/types@Type`
}
chiptus is the package name, app/types is the path and Type is the client-side type
Hello, it's currently not possible but could be a cool feature
would love to try to implement that, where do I start?
First, check where to add it in the config and the property format. When you have an idea we can discuss it here. Then you can check the function getApiSchemas I think you can do it somewhere there.
I think output.override.types?
@anymaniax I was working on it, but was stuck because I couldn't really understand the logic. is there anyway we can discuss this?