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

Add support for typed fragments. #133

Open
econchick opened this issue Apr 16, 2017 · 2 comments
Open

Add support for typed fragments. #133

econchick opened this issue Apr 16, 2017 · 2 comments

Comments

@econchick
Copy link
Contributor

RAML 1.0 introduces fragment identifiers that go in the header/first line of RAML files, e.g. #%RAML 1.0 ResourceType. These are (mostly? entirely?) used for !include files, and are optional.

@sichvoge
Copy link

sichvoge commented May 30, 2017

Hi. Fragments are indeed mostly used with !include. The only exceptions (semantically) are:

  • Libraries (libraries are being referenced, not included)
  • Overlays
  • Extensions

You can include them via !include, but that would never really have a meaning and is invalid. But nothing should stop you to do it since it's just nature how !include works in general. Append all nodes from a file into this position.

What typed fragments introduce is for the parser to have a way to validate if a fragment, as it is, is valid or not.

@econchick
Copy link
Contributor Author

@sichvoge that makes total sense, thank you!

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

No branches or pull requests

2 participants