You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current NancyFX generator constructs the C# namespace as follows: <packageName>.<packageContext>. Currently <packageContext> is set to a (sanitized) version of the swagger basepath.
In cases where the base path is non-simple, this can lead to strange namespaces. For example for packageName=company.security and basePath=/security.svc/v1 the resulting namespace would be company.security.security_svcv1 which is rather ugly.
I suggest to add a new nancyfx specific option called packageContext that allows us to overwrite the packageContext. I.e. we could use the command line
Description
The current NancyFX generator constructs the C# namespace as follows:
<packageName>.<packageContext>
. Currently<packageContext>
is set to a (sanitized) version of the swagger basepath.In cases where the base path is non-simple, this can lead to strange namespaces. For example for
packageName=company.security
andbasePath=/security.svc/v1
the resulting namespace would becompany.security.security_svcv1
which is rather ugly.Swagger-codegen version
Current master branch.
Command line used for generation
java -jar .\swagger-codegen-cli.jar generate -i ..\swagger\pos\swagger.yaml -l nancyfx -o . --additional-properties packageName=company.security
Suggest a fix/enhancement
I suggest to add a new nancyfx specific option called packageContext that allows us to overwrite the packageContext. I.e. we could use the command line
to get the namespace
company.security.v1
which would be much nicer.The text was updated successfully, but these errors were encountered: