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

Support relative references taking the current resolution scope into account #3

Closed
epoberezkin opened this issue Aug 17, 2016 · 1 comment

Comments

@epoberezkin
Copy link
Member

See ajv-validator/ajv#278

This should work:

{
  id: 'schema.json#',
  definitions: {
    foo: {
      properties: {
        str: { type: 'string' }
      }
    }
  },
  $merge: {
    source: { $ref: '#/definitions/foo' },
    with: {
      properties: {
        int: { type: 'integer' }
      }
    }
  }
}

At the moment it needs source: { $ref: 'schema.json#/definitions/foo' } in order to work.

@epoberezkin
Copy link
Member Author

That would require adding baseId parameter to custom keyword functions in Ajv, see ajv-validator/ajv#280

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant