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
Hi, I'm working on porting over my RAML to OpenAPI spec. I am doing the documentation of the API in a yaml file, but I prefer to document the schemas and the examples in JSON (since the is how all of my responses are returned. This seems to let me do this, but when I have both the schema and the example in JSON, I get rendering errors. I've tried manipulating the spacing in various combinations and cannot get it working.
Is this not allowed? Do I need to change my approach somehow, or is there something simple I can change to get it to work this way?
Here is an excerpt form my #/components/schemas/Address that works:
But then when I try to use my JSON schema I get these errors:
Schema error at components.schemas['example']
should NOT have additional properties
additionalProperty: street1, street2, city, state, zipcode, label
Jump to line 4800
Parser error bad indentation of a mapping entry
Jump to line 4801
Here is the same excerpt with the RAML for the schema definition replaced by a true JSON schema:
Sorry for the long delay. Finally got back to my OAS3 conversion and yes, as noted above that is what I was missing. I didn't; however, need to add the comment tag, I just needed to move my example inside the json object for my schema. Thanks so much for showing me what I was doing wrong!
Hi, I'm working on porting over my RAML to OpenAPI spec. I am doing the documentation of the API in a yaml file, but I prefer to document the schemas and the examples in JSON (since the is how all of my responses are returned. This seems to let me do this, but when I have both the schema and the example in JSON, I get rendering errors. I've tried manipulating the spacing in various combinations and cannot get it working.
Is this not allowed? Do I need to change my approach somehow, or is there something simple I can change to get it to work this way?
Here is an excerpt form my #/components/schemas/Address that works:
But then when I try to use my JSON schema I get these errors:
Schema error at components.schemas['example']
should NOT have additional properties
additionalProperty: street1, street2, city, state, zipcode, label
Jump to line 4800
Parser error bad indentation of a mapping entry
Jump to line 4801
Here is the same excerpt with the RAML for the schema definition replaced by a true JSON schema:
The text was updated successfully, but these errors were encountered: