express-openapi-validator
express-openapi-validator copied to clipboard
Parameters declared by $ref are skipped
Describe the bug Parameters that are declared as a $ref are skipped
To Reproduce file openapi.yaml has this portion:
openapi: 3.0.3
info:
title: Parameter ReferenceObject
description: test
version: '1'
termsOfService: https://www.google.be
contact:
email: [email protected]
security:
- basicAuth: []
servers:
- url: http://localhost
description: local host
paths:
/subject:
get:
summary: Test
operationId: doTest
parameters:
- in: query
name: firstParam
schema:
type: string
- $ref: "#/components/parameters/FromDateTime"
- in: query
name: secondParam
schema:
$ref: "/components/schemas/SecondParam"
responses:
... (abbreviated for clarity)
components:
schemas:
SecondParam:
type: string
parameters:
FromDateTime:
in: query
name: fromDateTime
required: false
schema:
type: string
Actual behavior
parameter fromDateTime is present in req.openapi.schema.parameters
but is not translated/parsed
Expected behavior
parameter fromDateTime is fully present in req.openapi.schema.parameters
Examples and context see issue https://github.com/bug-hunters/oas3-tools/issues/59
Same. I am having to define them inline for each endpoint. This goes for both path and query parameters. :(