oneOf anyOf allOf break response schema table in markup
See original GitHub issueHi. Using a oneOf/anyOf/allOf in the following way seems to break the response schema table in the Slate Markdown/HTML generated by shins. I’ve created an example code base in https://github.com/simondean/widdershins-issues/tree/master/one-of-in-response-schema that demoes the issue.
Here’s a simplified version of the response schema I’m seeing the issue with:
{
"type": "object",
"properties": {
"greeting": {
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"properties": {
"message1": {
"type": "string"
},
"message2": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"message1",
"message2"
]
}
]
}
},
"additionalProperties": false,
"required": [
"greeting"
]
}
Actual markdown produced for this schema by widdershins + shins is the following. The blank lines in the middle of the table seem to break the table when it’s converted by shins into HTML. Everything above allOf is correctly converted into an HTML table by the rest just appears unformatted in the HTML.
|Name|Type|Required|Description|
|---|---|---|---|
|» greeting|any|true|No description|
*allOf*
|»» *anonymous*|string|false|No description|
*and*
|»» *anonymous*|object|false|No description|
|»»» message1|string|true|No description|
|»»» message2|string|true|No description|
Expected markdown could be something like this:
|Name|Type|Required|Description|
|---|---|---|---|
|» greeting|any|true|No description|
|*allOf*| | | |
|»» *anonymous*|string|false|No description|
|*and*| | | |
|»» *anonymous*|object|false|No description|
|»»» message1|string|true|No description|
|»»» message2|string|true|No description|
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
oneOf, anyOf, allOf, not - Swagger
oneOf – validates the value against exactly one of the subschemas; allOf ... The following JSON object is valid against both schemas, so...
Read more >oneOf / anyOf / allOf - react-jsonschema-form documentation
react-jsonschema-form supports custom widgets for oneOf, anyOf, and allOf. A schema with oneOf is valid if exactly one of the subschemas is valid....
Read more >TS 129 501 - V17.6.0 - 5G ; 5G System; Principles and Guidelines ...
Formatting of structured data types in query parameters . ... object using the "oneOf" , "anyOf" or "allOf" keyword to list alternative or...
Read more >Chapter 17 Binding between XML Schema and Java Classes
Binding XML Schemas. This section describes the default XML-to-Java bindings used by JAXB. All of these bindings can be overridden on global or...
Read more >GitLab Flavored Markdown (GLFM)
For more information, see the gitlab-markup gem project. ... Other languages are supported by adding a specifier to any of the existing ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@MikeRalphson I’ve just enabled it and here’s the URL: https://simondean.github.io/widdershins-issues/one-of-in-response-schema/
@JLNNN I was seeing a different issue. The issue I was seeing what that only the first part of the table was rendering correctly for me (before the
oneOfin your example). See https://simondean.github.io/widdershins-issues/one-of-in-response-schema/ for an example. My issue is fixed now.