-
Notifications
You must be signed in to change notification settings - Fork 22
JSON schema to RAML not converting arrays #111
Comments
@ettoregia: as @gutee pointed-out in this comment, it is not possible to enforce the type of an item at a specific position in RAML. Is this what you really meant to define or did you mean to define |
Hi @jstoiko, all I was trying to achieve was, given the above json schema to get a RAML out. Are we saying that's not possible for the specific json schema in input? |
Since RAML allows you to refer to JSON schemas from within types, you can do: #%RAML 1.0 Library
types:
Account:
properties:
totalSize: integer
done: boolean
records: !include schema.json#records assuming you schema file above is named #%RAML 1.0 Library
types:
Account:
properties:
totalSize: integer
done: boolean
records: !include records.json (I've intentionally simplified your RAML) |
To address this, I think we should find an elegant way to have the output RAML either embed the part of any JSON Schema that cannot be translated to RAML or have it be included like in the examples above. @postatum: can you add this to the "Limitations" of the README for now? |
Added. |
The below JSON schema produce the below RAML library which displays the records item not as an array:
The text was updated successfully, but these errors were encountered: