forked from loafle/openapi-generator-original
* Sync with upstream/master * Fix for issue #5653 Override the toModelName(String name) [from DefaultCodegen] in StaticHtmlGenerator to return `name` unmodified so that the anchors for models and the href for body parameters match case (do not convert model names to TitleCase. * Revert "Fix for issue #5653" This reverts commit 5472aa10a3101ea5dd417bc509c5d9c5351a3d66. * Fix for issue #5653 Override the toModelName(String name) [from DefaultCodegen] in StaticHtmlGenerator to return `name` unmodified so that the anchors for models and the href for body parameters match case (do not convert model names to TitleCase.
This commit is contained in:
parent
4417bb6b32
commit
632a2e3949
@ -170,6 +170,14 @@ public class StaticHtmlGenerator extends DefaultCodegen implements CodegenConfig
|
|||||||
return markdownConverter.toHtml(input);
|
return markdownConverter.toHtml(input);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DefaultCodegen converts model names to UpperCamelCase
|
||||||
|
// but for static HTML, we want the names to be preserved as coded in the OpenApi
|
||||||
|
// so HTML links work
|
||||||
|
@Override
|
||||||
|
public String toModelName(final String name) {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
public void preprocessSwagger(Swagger swagger) {
|
public void preprocessSwagger(Swagger swagger) {
|
||||||
Info info = swagger.getInfo();
|
Info info = swagger.getInfo();
|
||||||
info.setDescription(toHtml(info.getDescription()));
|
info.setDescription(toHtml(info.getDescription()));
|
||||||
|
1
samples/html/.swagger-codegen/VERSION
Normal file
1
samples/html/.swagger-codegen/VERSION
Normal file
@ -0,0 +1 @@
|
|||||||
|
2.2.3-SNAPSHOT
|
Loading…
x
Reference in New Issue
Block a user