OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
21.33k stars 6.46k forks source link

[BUG][aspnetcore] Resolve Discrepancy between build.bat/sh files and launchProfiles #12218

Open DanielHabenicht opened 2 years ago

DanielHabenicht commented 2 years ago
Description

The build.bat and build.sh files mention the next to run command: https://github.com/OpenAPITools/openapi-generator/blob/5b6b4c9d4829b57716741dc35b3f1033e5483784/modules/openapi-generator/src/main/resources/aspnetcore/3.0/build.bat.mustache#L8 https://github.com/OpenAPITools/openapi-generator/blob/5b6b4c9d4829b57716741dc35b3f1033e5483784/modules/openapi-generator/src/main/resources/aspnetcore/3.0/build.sh.mustache#L8

But the mentioned profile (--launch-profile web) does not exist anymore: launchSettings.json, only "IIS Express", "OpenAPI" and "Docker".

Suggest a fix

I would have already supplied a PR fixing it but wanted to speak about a possible refactoring before: Instead of supplying the build.sh/.bat files I would just like to include the commands one would need to run in the README.md. With an explanation of which profiles there are. And possibly also with an explanation of how to run it in production (see #12216)

devhl-labs commented 2 years ago

This parameter should also work in appsettings. If all the args are in appsettings so that users can just launch the program, then removing the script makes perfect sense. Users would still be able to override by using command line arguments.