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

fix: do not resolve meta refs #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fhueser
Copy link

@fhueser fhueser commented Aug 18, 2022

These changes allow for meta refs to be skipped while resolving a schema which is necessary to conform to https://json-schema.org/draft-07/schema.

{
  $id: 'schemaWithMetaRef',
  type: 'object',
  properties: {
    $ref: { type: 'string' }
  }
}

@Eomm
Copy link
Owner

Eomm commented Aug 21, 2022

Could you elaborate on this use case?

By reading the spec: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-01#section-8.3

An object schema with a "$ref" property MUST be interpreted as a
"$ref" reference. The value of the "$ref" property MUST be a URI
Reference. Resolved against the current URI base, it identifies the
URI of a schema to use. All other properties in a "$ref" object MUST
be ignored.

I understand that $ref cannot contain an object.

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

Successfully merging this pull request may close these issues.

2 participants