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

No subschema in "anyOf" matched #223

Closed
smoak opened this issue May 27, 2015 · 8 comments
Closed

No subschema in "anyOf" matched #223

smoak opened this issue May 27, 2015 · 8 comments

Comments

@smoak
Copy link
Contributor

smoak commented May 27, 2015

Just updated to prmd 0.7.1 from 0.7.0 and getting this error with no changes to my schema:

docs/schema/schema.json: #/definitions/email/definitions/identity: failed schema #/definitions/resource/dependencies/properties/definitions/properties/identity: No subschema in "anyOf" matched.

My email definition is like so:

{
  "$schema": "http://json-schema.org/draft-04/hyper-schema",
  "title": "Email",
  "definitions": {
    "id": {
      "description": "unique identifier of email",
      "example": "01234567-89ab-cdef-0123-456789abcdef",
      "format": "uuid",
      "type": [
        "string"
      ]
    },
    "identity": {
      "$ref": "/schemata/email#/definitions/id"
    },
    "email": {
      "description": "email address",
      "example": "foo@example.com",
      "format": "email",
      "type": [
        "string"
      ]
    }
  },
  "description": "Represents a users email",
  "properties": {
    "id": {
      "$ref": "/schemata/email#/definitions/id"
    },
    "email": {
      "$ref": "/schemata/email#/definitions/email"
    }
  },
  "type": [
    "object"
  ],
  "id": "schemata/email"
}

Reverting back to 0.7.0 fixes the problem. The problem also occurs with 0.7.2 and 0.7.3.

@adrianpike
Copy link

+1

@erickreutz
Copy link

Running into this problem as well.

@geemus
Copy link
Member

geemus commented Jun 2, 2015

Sorry to hear. I tried a bit to sort this out, but was having a little trouble reproducing. Could you share the full schema and command you are using so I can have that to work from? Thanks!

@smoak
Copy link
Contributor Author

smoak commented Jun 3, 2015

I created a very simple repository to reproduce the issue: https://github.com/smoak/prmd-test

@geemus
Copy link
Member

geemus commented Jun 3, 2015

@smoak thanks, hopefully I'll be able to pin it down a bit easier from that.

@geemus geemus closed this as completed in a0a48e8 Jun 3, 2015
@geemus
Copy link
Member

geemus commented Jun 3, 2015

That did, indeed, make it easier. That fix should do what you need (at least it seems to work with your test setup). Let me know if that looks good for you and I can cut a release. Thanks!

@smoak
Copy link
Contributor Author

smoak commented Jun 3, 2015

Yep! That seems to fix it. Thanks!

@geemus
Copy link
Member

geemus commented Jun 3, 2015

Thanks for confirming. Released in 0.7.4

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

4 participants