-
Notifications
You must be signed in to change notification settings - Fork 91
Open
Description
When using $ref to reference to whole yaml file, NoMethodError is thrown.
RSpec example that can reproduce error: master...yckimura:ref-whole-file
Failed logs: https://github.com/yckimura/openapi_parser/runs/5725197901
openapi.yaml:
openapi: 3.0.0
info:
version: 1.0.0
title: OpenAPI3 Test
paths:
/whole_local_file:
post:
requestBody:
required: true
content:
application/json:
schema:
$ref: schema-object.yaml
responses:
'200':
description: correctschema-object.yaml:
type: object
required:
- name
properties:
name:
type: string
tag:
type: stringStacktrace:
NoMethodError:
undefined method `any_of' for #
# ./lib/openapi_parser/schema_validator.rb:98:in `validator'
# ./lib/openapi_parser/schema_validator.rb:74:in `validate_schema'
# ./lib/openapi_parser/schema_validator.rb:62:in `validate_data'
# ./lib/openapi_parser/schema_validator.rb:45:in `validate'
# ./lib/openapi_parser/schemas/media_type.rb:15:in `validate_parameter'
# ./lib/openapi_parser/schemas/request_body.rb:24:in `validate_request_body'
# ./lib/openapi_parser/schemas/operation.rb:25:in `validate_request_body'
# ./lib/openapi_parser/request_operation.rb:52:in `validate_request_body'
# ./spec/openapi_parser/concerns/findable_spec.rb:40:in `block (4 levels) in <top (required)>'
nerixim, breis-sa, nanonanomachine and michalwadisplague
Metadata
Metadata
Assignees
Labels
No labels