errors.go 902 B

12345678910111213141516171819
  1. package spec
  2. import "errors"
  3. // Error codes
  4. var (
  5. // ErrUnknownTypeForReference indicates that a resolved reference was found in an unsupported container type
  6. ErrUnknownTypeForReference = errors.New("unknown type for the resolved reference")
  7. // ErrResolveRefNeedsAPointer indicates that a $ref target must be a valid JSON pointer
  8. ErrResolveRefNeedsAPointer = errors.New("resolve ref: target needs to be a pointer")
  9. // ErrDerefUnsupportedType indicates that a resolved reference was found in an unsupported container type.
  10. // At the moment, $ref are supported only inside: schemas, parameters, responses, path items
  11. ErrDerefUnsupportedType = errors.New("deref: unsupported type")
  12. // ErrExpandUnsupportedType indicates that $ref expansion is attempted on some invalid type
  13. ErrExpandUnsupportedType = errors.New("expand: unsupported type. Input should be of type *Parameter or *Response")
  14. )