Open deiteris opened 3 years ago
When enum is put in a union (or JSON schema enum with multiple types), the information about the enum is lost.
#%RAML 1.0 title: Test API version: v1 mediaType: 'application/json' protocols: - HTTPS types: TestType: | { "type": ["string", "null"], "enum": ["test", null] }
While with JSON schema it's possible to understand what the values are (see the first screenshot below), with RAML union type the example is not rendered at all.
#%RAML 1.0 title: Test API version: v1 mediaType: 'application/json' protocols: - HTTPS types: TestType: type: string | integer enum: [5, "test", 1, "three"]
See "RAML 1.0 spec: Union type" section that demonstrates the same usage example: https://github.com/raml-org/raml-spec/blob/master/versions/raml-10/raml-10.md#union-type
When enum is put in a union (or JSON schema enum with multiple types), the information about the enum is lost.
While with JSON schema it's possible to understand what the values are (see the first screenshot below), with RAML union type the example is not rendered at all.![image](https://user-images.githubusercontent.com/6103913/132470977-7c7f79fd-0c41-4a4c-97a6-4bb1360a548c.png)
See "RAML 1.0 spec: Union type" section that demonstrates the same usage example: https://github.com/raml-org/raml-spec/blob/master/versions/raml-10/raml-10.md#union-type