Skip to content

Commit 73a1904

Browse files
committed
add comment implementation 'springdoc.trim-kotlin-indent'
1 parent c80f191 commit 73a1904

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Diff for: springdoc-openapi-starter-common/src/main/java/org/springdoc/api/AbstractOpenApiResource.java

+16
Original file line numberDiff line numberDiff line change
@@ -406,11 +406,19 @@ protected OpenAPI getOpenApi(Locale locale) {
406406
}
407407
}
408408

409+
/**
410+
* Indents are removed for properties that are mainly used as “explanations” using Open API.
411+
* @param openAPI the open api
412+
*/
409413
private void trimIndent(OpenAPI openAPI) {
410414
trimComponents(openAPI);
411415
trimPaths(openAPI);
412416
}
413417

418+
/**
419+
* Trim the indent for descriptions in the 'components' of open api.
420+
* @param openAPI the open api
421+
*/
414422
private void trimComponents(OpenAPI openAPI) {
415423
final PropertyResolverUtils propertyResolverUtils = operationParser.getPropertyResolverUtils();
416424
if (openAPI.getComponents() == null || openAPI.getComponents().getSchemas() == null) {
@@ -429,6 +437,10 @@ private void trimComponents(OpenAPI openAPI) {
429437
}
430438
}
431439

440+
/**
441+
* Trim the indent for descriptions in the 'paths' of open api.
442+
* @param openAPI the open api
443+
*/
432444
private void trimPaths(OpenAPI openAPI) {
433445
final PropertyResolverUtils propertyResolverUtils = operationParser.getPropertyResolverUtils();
434446
if (openAPI.getPaths() == null) {
@@ -447,6 +459,10 @@ private void trimPaths(OpenAPI openAPI) {
447459
}
448460
}
449461

462+
/**
463+
* Trim the indent for 'operation'
464+
* @param operation the operation
465+
*/
450466
private void trimIndentOperation(Operation operation) {
451467
final PropertyResolverUtils propertyResolverUtils = operationParser.getPropertyResolverUtils();
452468
if (operation == null) {

0 commit comments

Comments
 (0)