Skip to content

NoMethodError thrown when $ref path cant be resolved #29

Description

@aaroncouture

When referencing a ref path that cannot be resolved the following error is thrown:

#<NoMethodError: undefined method `any_of' for #OpenAPIParser::Schemas::Reference:0x000055bceb4393f8>

This error should be translated to something that better indicates the root cause.

This is a pretty minor problem since the schema should be validated against OpenApi specs to begin with.

Sample YAML file:

openapi: 3.0.0
paths:
  /api/v1/events:
    get:
      parameters:
        - in: query
          name: start_time
          description: start time
          required: true
          schema:
            $ref: "#/components/schemas/time"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions