Skip to content

Commit 151d887

Browse files
authored
Merge pull request #320 from swagger-api/htmldocs_tweak
Htmldocs tweak
2 parents 0d335e4 + b838800 commit 151d887

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

src/main/java/io/swagger/codegen/v3/generators/DefaultCodegenConfig.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2470,6 +2470,7 @@ public CodegenParameter fromRequestBody(RequestBody body, String name, Schema sc
24702470
codegenParameter.baseName = REQUEST_BODY_NAME;
24712471
codegenParameter.paramName = REQUEST_BODY_NAME;
24722472
codegenParameter.description = body.getDescription();
2473+
codegenParameter.unescapedDescription = body.getDescription();
24732474
codegenParameter.required = body.getRequired() != null ? body.getRequired() : Boolean.FALSE;
24742475
codegenParameter.getVendorExtensions().put(CodegenConstants.IS_BODY_PARAM_EXT_NAME, Boolean.TRUE);
24752476

@@ -2566,6 +2567,7 @@ else if (schema instanceof BinarySchema) {
25662567
}
25672568
}
25682569
setParameterExampleValue(codegenParameter);
2570+
postProcessParameter(codegenParameter);
25692571
return codegenParameter;
25702572
}
25712573

src/main/resources/handlebars/htmlDocs/index.mustache

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@
171171
<div class="param-enum-header">Enum:</div>
172172
{{#_enum}}<div class="param-enum">{{this}}</div>{{/_enum}}
173173
{{/is}}
174+
{{#example}}
175+
<div class="param-desc"><span class="param-type">example: {{example}}</span></div>
176+
{{/example}}
174177
{{/vars}}
175178
</div> <!-- field-items -->
176179
</div>

src/main/resources/mustache/htmlDocs/index.mustache

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@
171171
<div class="param-enum-header">Enum:</div>
172172
{{#_enum}}<div class="param-enum">{{this}}</div>{{/_enum}}
173173
{{/isEnum}}
174+
{{#example}}
175+
<div class="param-desc"><span class="param-type">example: {{example}}</span></div>
176+
{{/example}}
174177
{{/vars}}
175178
</div> <!-- field-items -->
176179
</div>

0 commit comments

Comments
 (0)