grktsh / falcon-oas

Design first approach with OpenAPI 3 for Falcon
Apache License 2.0
7 stars 4 forks source link

Generate routes for all server URLs in OpenAPI spec #33

Open sisp opened 4 years ago

sisp commented 4 years ago

Currently, only a single set of routes is generated based on the base path (the URL path of the first array element in the servers property of the OpenAPI spec) and the paths specified in the OpenAPI spec. I think it would be more consistent with the OpenAPI spec if routes for all array elements of the servers property were generated. If the servers property does not exist, then the base path falls back to / (same as now).

Taking this a bit further, I think also the scheme and hostname of the OpenAPI server object should be considered by the router when resolving routes, but I think Falcon currently doesn't support host-based routing.

What do you think @grktsh?