[OpenAPI Generator Online] requests for server code generation return https://localhost
Description
Example:
$ curl -X POST -H "content-type:application/json" -d '{"openAPIUrl":"https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml"}' https://api.openapi-generator.tech/api/gen/servers/python-flask
{"code":"00932bd5-9530-4115-851b-d5cc878060fd","link":"http://localhost:8080/api/gen/download/00932bd5-9530-4115-851b-d5cc878060fd"}%
http://localhost is used instead of http://api.openapi-generator.tech
specifed in the environment variable.
$ curl -X POST -H "content-type:application/json" -d '{"openAPIUrl":"https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml"}' https://api.openapi-generator.tech/api/gen/clients/ruby
{"code":"4275339e-5bd2-4dfe-b943-f39d71510cb1","link":"http://api.openapi-generator.tech/api/gen/download/4275339e-5bd2-4dfe-b943-f39d71510cb1"}
Ref: https://github.com/Mermade/openapi-gui/issues/36#issuecomment-442722796
openapi-generator version
Latest master
Suggest a fix/enhancement
A good starting point is to look at how /api/gen/clients/ruby
process the request and use the environment variable in the result URL