Forum Discussion

Corporativo's avatar
Corporativo
New Contributor
3 days ago

OAS3 parameter $refs should point to Parameter Object and not #/components/schemas

Hi,

Is correct to use schemas like parameters? This code:

  /vehicle-insurance:
    get:
      tags:
        - admin
    description: Bla bla bla.
      operationId: "findInsurance"
      parameters:
        - $ref: '#/components/parameters/pageNum'
        - $ref: '#/components/parameters/pageLength'
        - $ref: '#/components/schemas/VehicleInsuranceDTO'
      responses:
        '200':
        description: Sucess.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ResultDTO'

In https://editor-next.swagger.io/ works fine, but in https://editor.swagger.io/ warns:

Semantic error at paths./vehicle-insurance.get.parameters.2.$ref
OAS3 parameter $refs should point to Parameter Object and not #/components/schemas/VehicleInsuranceDTO

I've attachment an image.

Regards.

 

No RepliesBe the first to reply