raml-org / raml-js-parser

(deprecated) A RAML parser based on PyYAML written in CoffeScript and available for use as NodeJs module or in-browser.
195 stars 53 forks source link

Feature/expandable schemas #176

Closed alvassin closed 8 years ago

alvassin commented 8 years ago

Added flag dereferenceSchemas, that allows to preprocess json-schemas and provide resolved $refs. Fixes #140

alvassin commented 8 years ago

@dmartinezg I implemented support for all !include-d schemas, they work correctly now.

As for inline-specified schemes, that have $refs (see below), I need this issue to be fixed.

After i will get some response from maintainers i will add support for such schemas too.

... raml definition ...
responses:
  200:
    body:
      application/json:
        schema: |
          {
            "$schema": "http://json-schema.org/draft-04/schema#",
            "type": "object",
            "properties": {
              "items": {
                "$ref": "./schemas/collections/items.json"
              }
            }
          }
alvassin commented 8 years ago

@dmartinezg please check code & tests, all cases should be covered now.

dmartinezg commented 8 years ago

@alvassin, apologies for reviewing late, I've had a big mail backlog for the past few days.

I think it is ready to merge, have you signed this?: https://api-notebook.anypoint.mulesoft.com/notebooks#bc1cf75a0284268407e4

After you do that, I can merge, tag and deploy to npm

alvassin commented 8 years ago

@dmartinezg you've got nice automation. Signed.

dmartinezg commented 8 years ago

Oh, please, squash commits

alvassin commented 8 years ago

@dmartinezg done.

dmartinezg commented 8 years ago

@alvassin, thanks!