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
When trying to import a spec file from OpenAPI Designer into the Swagger Editor, there are several validation errors. A common validation error is:
Sibling values are not allowed alongside $refs
This basically means that anywhere there is a $ref element, it cannot have any other elements in the same scope. See, for example:
startTime:
// The x-oad-type invalidates the schemax-oad-type: reference
$ref: '#/definitions/time'
Task
Make sure exported spec file does not contain x-oad-type attributes. Also, make sure exported spec file is valid - i.e. should not have any validation errors.
The text was updated successfully, but these errors were encountered:
brylie
changed the title
Sibling values are not allowed alongside $refs
Export spec should not contain x-oad-type attributes
Jan 22, 2018
Due to lines containing "x-oad-type", the exported spec is incompatible with editor.swagger.io. The following regex operation solves the problem one-way:
replace{\n\s+"x-oad-type": "\w+".*\n}{\n}
The cleaned up spec cannot be imported back to openapi.designer.
We had the same problem with Swagger editor, which is why this issue exists. Please consider increasing the priority, so that output from OpenAPI Designer is compatible with Swagger Editor.
A follow-up on a previous post, I have used this fix to bridge between openapi.designer and swagger editor both ways:
replace{,?\n\s+"x-oad-type": "\w+".*\n}{\n}
You can export to JSON, run the fix in a text editor, import to swagger, export from swagger, and import back into openapi.designer. That shows that x-oad-type is unnecessary even within oad. Removing it will make oad much more useful.
When trying to import a spec file from OpenAPI Designer into the Swagger Editor, there are several validation errors. A common validation error is:
This basically means that anywhere there is a
$ref
element, it cannot have any other elements in the same scope. See, for example:Task
Make sure exported spec file does not contain
x-oad-type
attributes. Also, make sure exported spec file is valid - i.e. should not have any validation errors.The text was updated successfully, but these errors were encountered: