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
{{ message }}
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.
In RAML I have an array type with item type "Device" that is the union of 2 other types "Phone" and "Notebook". (types are from example in raml spec only array is new)
My array type seems to be converted to an JSON schema that does not describe the same data.
This is the RAML:
#%RAML 1.0title: My API With Typestypes:
Phone:
type: objectproperties:
manufacturer:
type: stringnumberOfSIMCards:
type: numberkind: stringNotebook:
type: objectproperties:
manufacturer:
type: stringnumberOfUSBPorts:
type: numberkind: stringDevice:
type: Phone | NotebookDevices: Device[]
For type "Devices", dt2js produces this JSON Schema :
@wolframkleis: not sure if you had time to test @brevity's PR (#29). If you haven't, feel free to do so and give us your feedback here. If I don't hear from you by tomorrow, I'll go ahead and merge this. Thanks again for reporting the issue!
In RAML I have an array type with item type "Device" that is the union of 2 other types "Phone" and "Notebook". (types are from example in raml spec only array is new)
My array type seems to be converted to an JSON schema that does not describe the same data.
This is the RAML:
For type "Devices", dt2js produces this JSON Schema :
I think the type should be array and not object, and "any-of" should be on items level.
Shouldn't the schema look like this instead?
The text was updated successfully, but these errors were encountered: