orval-labs / orval

orval is able to generate client with appropriate type-signatures (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification, either in yaml or json formats. 🍺
https://orval.dev
MIT License
3.18k stars 336 forks source link

Support for OpenAPI servers field #1689

Open AllieJonsson opened 2 weeks ago

AllieJonsson commented 2 weeks ago

What are the steps to reproduce this issue?

Generate from Lichess api spec

What happens?

There is no way to know what endpoint to use, as the spec has different endpoints for many api calls, specified by the servers field.

What were you expecting to happen?

A way to use the servers field.

Any logs, error output, etc?

-

Any other comments?

Unsure how this best would be handled? Maybe let there be an optional parameter to be sent to the function doing the api call, which could be the servers data?