Skip to content

Commit

Permalink
removed more crud
Browse files Browse the repository at this point in the history
  • Loading branch information
mwlazlo committed Oct 17, 2018
1 parent 0183ae3 commit adfc8f8
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions refresolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,7 @@ func (r *RefResolver) Init() error {
return nil
}

/*
func (r *RefResolver) SchemaContainsPath(schema *Schema, path string) (bool, error) {
id := schema.GetRoot().ID()
if paths, ok := r.pathToSchema[id]; !ok {
return false, errors.New("schema id not found in refresolver: "+id)
} else {
if _, ok := paths[path]; !ok {
return false, errors.New("path not found in refresolver: "+id+path)
} else {
return true, nil
}
}
}
*/

// recusively generate path to schema
func getPath(schema *Schema, path string) string {
path = schema.PathElement + "/" + path
if schema.IsRoot() {
Expand All @@ -72,7 +55,6 @@ func (r *RefResolver) GetPath(schema *Schema) string {
} else {
return getPath(schema.Parent, schema.PathElement)
}

}

func (r *RefResolver) GetSchemaByReference(schema *Schema) (*Schema, error) {
Expand Down

0 comments on commit adfc8f8

Please sign in to comment.