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

Additional json-schema support. #1

Closed
tlivings opened this issue Sep 21, 2014 · 14 comments
Closed

Additional json-schema support. #1

tlivings opened this issue Sep 21, 2014 · 14 comments

Comments

@tlivings
Copy link
Owner

General:

  • enum
  • allOf
  • anyOf
  • oneOf
  • not
  • format

Also:

  • patternProperties?
  • additionalProperties?
  • maxProperties?
  • minProperties?
@MattiSG
Copy link

MattiSG commented Nov 18, 2014

+1 for allOf!

@gergelyke
Copy link

Any update on this?

@tlivings
Copy link
Owner Author

It's been back-burnered but about to prioritize.

@gergelyke
Copy link

Any updates? :)

@tlivings
Copy link
Owner Author

tlivings commented Jun 8, 2015

Actually I just pushed anyOf support but I have more to do.

@tlivings
Copy link
Owner Author

tlivings commented Jun 8, 2015

Also just pushed allOf support.

@gergelyke
Copy link

Wooooo, thanks a lot!

@opyate
Copy link

opyate commented Aug 18, 2015

Please support inline dereferencing.

@tlivings
Copy link
Owner Author

The sub schemas option is for external schema references. If you want to resolve these references and feed them to enjoi, you can do so with the help of https://www.npmjs.com/package/extrefs.

Local inline dereferencing is supported without the need to specify these sub schemas.

@opyate
Copy link

opyate commented Aug 19, 2015

@tlivings Ah, I do apologise - I tested with a schema which is clearly broken:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "CategoryHierarchyWsDTO",
  "type": "object",
  "properties":
  {
    "totalNumber":
    {
      "type": "number"
    },
    "pageSize":
    {
      "type": "number"
    },
    "numberOfPages":
    {
      "type": "number"
    },
    "subcategories":
    {
      "type": "array",
      "items":
      {
        "$ref": "#/definitions/CategoryHierarchyWsDTO"
      }
    },
    "currentPage":
    {
      "type": "number"
    },
    "id":
    {
      "type": "string"
    },
    "lastModified":
    {
      "type": "string"
    },
    "name":
    {
      "type": "string"
    },
    "url":
    {
      "type": "string"
    }
  },
  "definitions":
  {

  }
}

@toboid
Copy link

toboid commented Sep 15, 2015

Would you accept a pull request for minProperties and maxProperties support? I may be able to get some time to take a look.

@tlivings
Copy link
Owner Author

Of course.

@toboid
Copy link

toboid commented Sep 15, 2015

Looks like minProperties and maxProperties are already supported and seem to be working great

@tlivings
Copy link
Owner Author

Ha - I must not have updated my issue :)

tlivings added a commit that referenced this issue Oct 18, 2015
#1 Datetime, date and email format validation, full enum support
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

5 participants