Skip to content

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