atc-net / atc-rest-api-generator

A REST API code generator from OpenAPI Specification in YAML or Json file format
https://atc-net.github.io/repository/atc-rest-api-generator
MIT License
19 stars 4 forks source link

Revert "Implement missing Servers drop down in Swagger UI" #82

Closed christianhelle closed 3 years ago

christianhelle commented 3 years ago

Reverts atc-net/atc-rest-api-generator#76

After doing a thorough double check I noticed that using AddServers() has some other consequences to Swagger UI so even though the endpoint routes are created correct based on what is defined in the OpenAPI spec Servers array, the behavior of using Swagger UI changed from prefixing the specified routes in code with the selected server from the drop down list

The Swagger UI generated cURL commands now look like this: curl -X GET "https://localhost:5001/api/v3/api/v3/pet/1?api-version=1.0" -H "accept: application/json; v=1.0"

I want to revert this change and find a better fix for it

UPDATE: I manually cherry picked commits that include fixes for compiler warnings that I resolved in the original PR