dankinsoid / VaporToOpenAPI

OpenAPI specification generator for Vapor based Swift projects.
MIT License
98 stars 8 forks source link

Changing base path. #14

Closed RobertoMachorro closed 1 year ago

RobertoMachorro commented 1 year ago

My services are all served behind an API gateway, the gateway prefixes endpoints paths based on version and API status. The swagger.json generated reflects the original path. How can I change this?

Example: From: /api/resources/vehicle To: /dev/v1/api/resources/vehicle

Thanks!

dankinsoid commented 1 year ago

@RobertoMachorro there is a servers property in routes.openAPI method, is it suitable for you?

dankinsoid commented 1 year ago

@RobertoMachorro there is a servers property in routes.openAPI method, is it suitable for you?

RobertoMachorro commented 1 year ago

Yes! Completely forgot that it's part of the OpenAPI spec. Thanks for the help, much appreciated.