fix multi line description in allOf (#17879)

This commit is contained in:
William Cheng
2024-02-16 15:26:15 +08:00
committed by GitHub
parent 5a0f6b8eb2
commit 436a3e0744
5 changed files with 13 additions and 4 deletions

View File

@@ -4214,7 +4214,8 @@ public class DefaultCodegen implements CodegenConfig {
property.deprecated = p.getDeprecated();
}
if (original.getDescription() != null) {
property.description = p.getDescription();
property.description = escapeText(p.getDescription());
property.unescapedDescription = p.getDescription();
}
if (original.getMaxLength() != null) {
property.setMaxLength(original.getMaxLength());

View File

@@ -2577,6 +2577,10 @@ components:
format: int64
x-is-unique: true
category:
description: |
multi line description
2nd line
last line
allOf:
- $ref: '#/components/schemas/Category'
name:

View File

@@ -2560,6 +2560,10 @@ components:
category:
allOf:
- $ref: '#/components/schemas/Category'
description: |
multi line description
2nd line
last line
name:
example: doggie
type: string

View File

@@ -8,7 +8,7 @@
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**id** | **Long** | | [optional] |
|**category** | [**Category**](Category.md) | | [optional] |
|**category** | [**Category**](Category.md) | multi line description 2nd line last line | [optional] |
|**name** | **String** | | |
|**photoUrls** | **List<String>** | | |
|**tags** | [**List<Tag>**](Tag.md) | | [optional] |

View File

@@ -161,7 +161,7 @@ public class PetUsingAllOf {
}
/**
* Get category
* multi line description 2nd line last line
* @return category
**/
@javax.annotation.Nullable