Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to extend JSON schemas #5

Open
sowmiyaksr opened this issue Jan 18, 2017 · 1 comment
Open

Not able to extend JSON schemas #5

sowmiyaksr opened this issue Jan 18, 2017 · 1 comment

Comments

@sowmiyaksr
Copy link

Hi,

is it not possible to use,
allOf and oneOf in scraml?

I am getting invalid RAML error on using allOf and oneOf in my JSON schema

@rigolepe
Copy link
Contributor

Hi,

There are some approaches for expressing inheritance in json-schema. The only supported way is currently using 'oneOf' :

see: http://scraml.io/scaladocumentation/#_type_hierarchies_in_json_schema (in the topic "Type hierarchies in json-schema")

I know that other approaches use allOf on the sub-types and I've even seen an approach using anyOf.

Currently, we're still working seriously on the new type model to support RAML 1.0 types. As soon as that's ready, we'll continue to add features. Inheritance in json-schema via allOf is on the backlog. I know that swagger proposes this as the right way to express polymorphism.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants