func (d *Document) ResolveRef(ref string) (string, *Schema) {
	prefix := "#/components/schemas/"
	if strings.HasPrefix(ref, prefix) {
		name := ref[len(prefix):]
		if d.Components != nil && d.Components.Schemas != nil {
			schema, hasSchema := d.Components.Schemas[name]
			if hasSchema {
				return name, &schema
			}
			return "", nil
		}
	}
	return "", nil
}
// ResolveRef tries to resolve the referenced schema.
// Currently only searching this document and definitions in components are resolvable.
ResolveRef tries to resolve the referenced schema.
Currently only searching this document and definitions in components are resolvable.
// ResolveRef tries to resolve the referenced schema . // Currently only searching this document and definitions in components are resolvable .
func (d *Document) ResolveRef(ref string) (string, *Schema) {
	prefix := "#/components/schemas/"
	if strings.HasPrefix(ref, prefix) {
		name := ref[len(prefix):]
		if d.Components != nil && d.Components.Schemas != nil {
			schema, hasSchema := d.Components.Schemas[name]
			if hasSchema {
				return name, &schema
			}
			return "", nil
		}
	}
	return "", nil
}
func ( d * Document ) ResolveRef ( ref string ) ( string , * Schema ) { prefix := " " if strings . HasPrefix ( ref , prefix ) { name := ref [ len ( prefix ) : ] if d . Components != nil && d . Components . Schemas != nil { schema , hasSchema := d . Components . Schemas [ name ] if hasSchema { return name , & schema } return " " , nil } } return " " , nil }
ResolveRef tries to resolve the referenced schema.
ResolveRef tries to resolve the referenced schema .