cyclosproject / ng-openapi-gen

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

rootUrl not rendered in configuration because missing in template model #79

Closed reppners closed 4 years ago

reppners commented 4 years ago

I'm sorry to report that rendering the rootUrl based on the first entry of servers does not work.

It seems that the model for rendering the template is not populated with the rootUrl: https://github.com/cyclosproject/ng-openapi-gen/blob/0d05410561387ed1505a681b0ae681263cc1ccd9/lib/ng-openapi-gen.ts#L74-L80

luisfpg commented 4 years ago

Mmm... this line should do it:

https://github.com/cyclosproject/ng-openapi-gen/blob/master/lib/ng-openapi-gen.ts#L122

There's also a test that checks whether the rootUrl is correctly populated:

https://github.com/cyclosproject/ng-openapi-gen/blob/master/test/all-operations.spec.ts#L14

The expected output is that the ApiConfiguration has the rootUrl populated. Isn't this happening?

reppners commented 4 years ago

Sorry for the inconvenience, it was a misconfiguration on our side :weary: