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
{
"definitions": {
"Company": {
"description": "A long description with newlines \nand other stuff, so that model description is more informative.\n\nWith some edges cases ...",
"properties": {
"name": {
"description": "Company name",
"type": "string"
}
},
"title": "Company",
"type": "object"
},
"Owner": {
"description": "A user that owns a company.",
"properties": {
"company": {
"$ref": "#/definitions/Company",
"description": "The company object"
},
"firstName": {
"description": "First name",
"type": "string"
}
},
"title": "Owner",
"type": "object"
}
}
Will produce a markdown where the Owner.company.description will be overwritten by Company.description:
# Models
## Company
A long description with newlines
and other stuff, so that model description is more informative.
With some edges cases ...
|Property|Description|Type|Required|
|--------|-----------|----|--------|
|name|Company name|string|true|
## Owner
A user that owns a company.
|Property|Description|Type|Required|
|--------|-----------|----|--------|
|firstName|First name|string|true|
|company|A long description with newlines
and other stuff, so that model description is more informative.
With some edges cases ...
|[Company](#company)|false|
...
Note the description of company property in Owner model. Instead of it being The company object from Owner.company.description, it's a long description from Company.description. This also breaks the generated Slate html formatting. I think a better approach would be to honor the original property description from swagger definitions.
I am not sure if this is actually a bug, because the SwaggerSlateMarkdownWriter.resolve_type/2 function was written specifically to do it that way. It seems intended behaviour, but I wonder if there could be an option setting or something similar to force preservation of original property descriptions.
The text was updated successfully, but these errors were encountered:
Having a swagger json with definitions like this:
Will produce a markdown where the Owner.company.description will be overwritten by Company.description:
Note the description of company property in Owner model. Instead of it being
The company object
from Owner.company.description, it's a long description from Company.description. This also breaks the generated Slate html formatting. I think a better approach would be to honor the original property description from swagger definitions.I am not sure if this is actually a bug, because the
SwaggerSlateMarkdownWriter.resolve_type/2
function was written specifically to do it that way. It seems intended behaviour, but I wonder if there could be an option setting or something similar to force preservation of original property descriptions.The text was updated successfully, but these errors were encountered: