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 Feb 17, 2024. It is now read-only.
Hi.
I'm reporting an error in an example in the spec of RAML 1.0.
In the section The Query String as a Whole there is an example API which comments and examples are showing that an union elements must be validated exclusively (like a JSON Schema oneOf).
#%RAML 1.0
title: Illustrate query parameter variations
types:
lat-long: # lat & long required; mutually exclusive with location
properties:
lat: number
long: number
loc: # location required; mutually exclusive with lat & long
properties:
location:
paging: # each is optional, not exclusive with anything
properties:
start?: number
page-size?: number
/locations:
get:
queryString:
type: [paging, lat-long | loc ]
examples:
first:
value:
start: 2
lat: 12
long: 13
second:
value:
start: 2
page-size: 20
location: 1,2
third: # not valid
value:
lat: 12
location: 2
strict: false # because it's not valid
But, in the section Union Type, the text express clearly that they could be inclusive (like a JSON Schema anyOf): An instance of a union type SHALL be considered valid if and only if it meets all restrictions associated with at least one of the super types. It also give an example very similar to the one in Query String section, multiple inheritance mixed with unions.
The text was updated successfully, but these errors were encountered:
This example shows that unions work like exclusive (gives the idea that an instance must match only with one element of the union) but in the union type section always says that it should match `at least with one element` of the union.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi.
I'm reporting an error in an example in the spec of RAML 1.0.
In the section The Query String as a Whole there is an example API which comments and examples are showing that an union elements must be validated exclusively (like a JSON Schema oneOf).
But, in the section Union Type, the text express clearly that they could be inclusive (like a JSON Schema anyOf):
An instance of a union type SHALL be considered valid if and only if it meets all restrictions associated with at least one of the super types
. It also give an example very similar to the one in Query String section, multiple inheritance mixed with unions.The text was updated successfully, but these errors were encountered: