jsonschema: resolve refs
Implement the $ref keyword, except for remote references (those pointing outside the root schema). Change-Id: Ia5ca88464e62e9c613970d8d9fcd1512ab288934 Reviewed-on: https://go-review.googlesource.com/c/tools/+/670775 Reviewed-by: Alan Donovan <adonovan@google.com> Auto-Submit: Jonathan Amsterdam <jba@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
5bcbf820f2
commit
12fa054310
1 changed files with 1242 additions and 25 deletions
|
|
@ -115,8 +115,11 @@ type Schema struct {
|
|||
// The parent base URI at top level is where the schema was loaded from, or
|
||||
// if not loaded, then it should be provided to Schema.Resolve.
|
||||
baseURI *url.URL
|
||||
// The schema to which Ref refers.
|
||||
resolvedRef *Schema
|
||||
// map from anchors to subschemas
|
||||
anchors map[string]*Schema
|
||||
anchors map[string]*Schema
|
||||
// compiled regexps
|
||||
pattern *regexp.Regexp
|
||||
patternProperties map[*regexp.Regexp]*Schema
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue