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

dependencies property should not be an Array but Object #119

Closed
chriskessel opened this issue Oct 20, 2016 · 6 comments
Closed

dependencies property should not be an Array but Object #119

chriskessel opened this issue Oct 20, 2016 · 6 comments
Milestone

Comments

@chriskessel
Copy link

chriskessel commented Oct 20, 2016

The generated schema for my object creates this:

  "type": "object",
  "id": "urn:jsonschema:com:kessel:MyResponseObject",
  "dependencies": [],
  "patternProperties": {},
  ...

If I run that through the schema validator, it complains that dependencies should be an object, not an array. Looking at the v3 and v4 specs, they do call out this field as an object.

This is a bug in the schema generator? Or is there a spec addendum that I missed?

(A customer pointed out that our schema had this error and we use Jackson JsonSchema 2.7.0 to generate the schema).

@cowtowncoder
Copy link
Member

@chriskessel Unfortunately I don't know enough about JSON Schema to really answer. This would be good to (try to) discuss on jackson-dev mailing list.

FWIW, this module works on v3 of JSON Schema spec, and it does not seem possible to create something that works on both. There exists a v4 module too (I don't have link handy but should be googlable).

@chriskessel
Copy link
Author

FWIW, v3 and v4 have the same wording about the dependencies field being an object.

@cowtowncoder
Copy link
Member

I don't doubt your statement, just pointing out that for any follow-up work, filing the issue itself probably won't lead to much changes.

@chriskessel
Copy link
Author

Why? Is jackson jsonSchema a dead project?

@cowtowncoder
Copy link
Member

@chriskessel I haven't seen anyone besides me reading issues here; and I did not write this module. I have tried to make occasional changes, but do not have use for JSON Schema myself (nor deep knowledge). There may be others interested in this module, but if so they are best reached via jackson mailing lists.

So this is not an active project by any means. It seems to be used quite widely, however.

@cowtowncoder cowtowncoder added this to the 2.9.0 milestone Nov 8, 2016
@cowtowncoder cowtowncoder changed the title http://www.jsonschemavalidator.net/ says dependencies shouldn't be an array dependencies property should not be an Array but Object Nov 8, 2016
cowtowncoder added a commit that referenced this issue Nov 8, 2016
@cowtowncoder
Copy link
Member

Fixed as per merged #120; will be in 2.9.0.

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

2 participants