Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Allowing externals in unions #112

Open
stephencroberts opened this issue May 2, 2019 · 0 comments
Open

Allowing externals in unions #112

stephencroberts opened this issue May 2, 2019 · 0 comments

Comments

@stephencroberts
Copy link

Proposal: Externals should be allowed in a union if they are not extended or mixed with internals.

#%RAML 1.0
---
types:
  A:
    type: !include A.schema.json
  B:
    type: !include B.schema.json
title: externals with union
baseUri: https://example.com
/resource:
  post:
    body:
      application/json:
        type: A | B

The above currently receives the following error message:

EXTERNALS_MIX: It is not allowed to mix RAML types with externals

If I alter the above example to use RAML types instead of JSON Schemas, the union works as expected; however, I lose the benefits of extracting and using JSON schemas.

It's also important to note that I'm using raml2html to validate my RAML document.

Would the community be open to allowing this behavior?

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

No branches or pull requests

1 participant