Skip to content

Anchor on property which uses alias fails validation #273

@dleavitt

Description

@dleavitt

Schema:

{
  "title": "Field definitions schema!",
  "$schema": "http://json-schema.org/draft-04/schema#",
  "definitions": {
    "field": {
      "type": "object",
      "additionalProperties": false,
      "required": ["label"],
      "properties": {
        "label": { "type": "string" }
      }
    },
    "model": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "props": {
          "type": "object",
          "additionalProperties": { "$ref": "#/definitions/field" }
        }
      }
    }
  },
  "type": "object",
  "additionalProperties": { "$ref": "#/definitions/model" }
}

Document:

Named:
  props: &NamedProps
    name:
      label: Name

Timestamped:
  props: &TimestampedProps
    <<: *NamedProps
    ts:
      label: Timestamp

Record:
  props:
    <<: *TimestampedProps # commenting out this line removes the errors
    id:
      label: ID

Looks like it's incorrectly adding a layer of nesting or something?

Screenshot 2020-07-08 20 25 57 Screenshot 2020-07-08 20 25 51

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions