-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Description
Q&A (please complete the following information)
- OS: Win10
- Browser: Firefox
- Version: 108.0.1
- Method of installation: editor-next.swagger.io
- Swagger-Editor version: whatever version is online there currently
- Swagger/OpenAPI version: OpenAPI 3.0.0 -> 3.0.3
Content & configuration
yaml is from example at https://swagger.io/docs/specification/describing-parameters/
openapi: 3.0.3
components:
parameters:
offsetParam: # <-- Arbitrary name for the definition that will be used to refer to it.
# Not necessarily the same as the parameter name.
in: query
name: offset
required: false
schema:
type: integer
minimum: 0
description: The number of items to skip before starting to collect the result set.
limitParam:
in: query
name: limit
required: false
schema:
type: integer
minimum: 1
maximum: 50
default: 20
description: The numbers of items to return.
paths:
/users:
get:
summary: Gets a list of users.
parameters:
- $ref: '#/components/parameters/offsetParam'
- $ref: '#/components/parameters/limitParam'
responses:
'200':
description: OK
/teams:
get:
summary: Gets a list of teams.
parameters:
- $ref: '#/components/parameters/offsetParam'
- $ref: '#/components/parameters/limitParam'
responses:
'200':
description: OKDescribe the bug you're encountering
I get Parameter Object must contain one of the following fields: content, schema - setting the definition version to swagger: '2.0' or using the non-next version of the editor causes zero error.
To reproduce...
Steps to reproduce the behavior:
- Go to https://editor-next.swagger.io
- Paste yaml from above / documentation example
- See error
Expected behavior
No error. Again, this doesn't happen on editor-next when using swagger: '2.0' or on the previous version of the editor even when using openapi: 3.0.3