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

Nested schema support #8

Open
Reggino opened this issue Apr 19, 2017 · 0 comments
Open

Nested schema support #8

Reggino opened this issue Apr 19, 2017 · 0 comments

Comments

@Reggino
Copy link

Reggino commented Apr 19, 2017

Thank you for this, this is awesome.

I ran into an issue using nested schema's. E.g. i'm using the following schemas:

 "Invoice": {
      "type": "object",
      "properties": {
        "invoiceDate": {
          "type": "string",
          "format": "date"
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/InvoiceLine"
          }
        },
...
      }
    }

    "InvoiceLine": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string"
        },
      },
...
    },

I'm using AJV myself in this application and have configured it with all schema's in my app. Would it be possible to 'inject' this preconfigured instance of AJV to support these kind of schema's?

When using Invoice as propType the application currently breaks, because it doesn't 'know' all required schemas.

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

1 participant