cyclosproject / ng-openapi-gen

An OpenAPI 3.0 codegen for Angular
MIT License
397 stars 132 forks source link

rootUrl is not defined when writing configuration template #65

Closed reppners closed 4 years ago

reppners commented 4 years ago

servers in the open api spec file is not evaluated as per https://swagger.io/docs/specification/api-host-and-base-path/. The handlebars template for the api configuration shows the default configuration rootUrl should be populated by the template context variable rootUrl but it isn't.

My use case is that the OpenApi servers spec contains a single member that has a relative basepath set as url. This should be reflected in the generated code as no manual basepath configuration should be necessary.

If you're accepting PRs on this let me know and I'm happy to contribute!

luisfpg commented 4 years ago

Actually, the root URL was never being read from the specification. Will be fixed in 0.8.0.

reppners commented 4 years ago

Awesome! 👍