Documentation ¶
Index ¶
- func Append(ref spec.Ref, tks ...string) spec.Ref
- func Last(ref jsonreference.Ref) string
- func NormalizeFileRef(ref spec.Ref, base string) (spec.Ref, error)
- func Parent(ref spec.Ref) spec.Ref
- func RResolve(ref spec.Ref, visitedRefs map[string]bool, inputIsRef bool) (*spec.Schema, spec.Ref, map[string]bool, bool, error)
- func RResolveResponse(ref spec.Ref, visitedRefs map[string]bool, inputIsRef bool) (*spec.Response, spec.Ref, map[string]bool, bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Last ¶
func Last(ref jsonreference.Ref) string
func RResolve ¶
func RResolve(ref spec.Ref, visitedRefs map[string]bool, inputIsRef bool) (*spec.Schema, spec.Ref, map[string]bool, bool, error)
RResolve recursively resolve a schema (pointed by ref) by following its refs until it is a concrete schema (no ref anymore), or until an already visited reference is hit. The 2nd to last return value is used to indicate whether the resolving ends normally (true) or due to hit a cyclic ref (false). Only when it is normally ended, the final schema, its pointing reference and all the visited references are returned. Note that the visited references only include explicitly defined reference during the reference following, which doesn't include the input ref, unless explicitly mark the input is ref via the last param.
func RResolveResponse ¶
func RResolveResponse(ref spec.Ref, visitedRefs map[string]bool, inputIsRef bool) (*spec.Response, spec.Ref, map[string]bool, bool, error)
RResolveResponse recursively resolve a response (pointed by ref) by following its refs until it is a concrete response (no ref anymore), or until an already visited reference is hit. The 2nd to last return value is used to indicate whether the resolving ends normally (true) or due to hit a cyclic ref (false). Only when it is normally ended, the final response, its pointing reference and all the visited references are returned. Note that the visited references only include explicitly defined reference during the reference following, which doesn't include the input ref, unless explicitly mark the input is ref via the last param.
Types ¶
This section is empty.