Swagger-editor: validation error for in: "query"

Created on 28 Aug 2017  路  4Comments  路  Source: swagger-api/swagger-editor

Given the following:

paths:
  /:
    get:
      tags:
        - Business
      summary: "Search business listings"
      consumes:
        - "application/json"
      produces:
        - "application/json"
      parameters:
        - name: "what"
          in: "query"
          description: ""
          required: true

The editor complains about "query" which should be not in there:

should be equal to one of the following allowed values:
allowedValues: body
P1 validation bug 3.x

Most helpful comment

The error is misleading, the actual error is that the parameter type is missing.

All 4 comments

The error is misleading, the actual error is that the parameter type is missing.

The definition you provide suggests a 2.0 version, but the error suggests a 3.0.0 validation. Can you provide your full API definition?

I am using the web version and started editing the sample API spec on the page, it came with 2.0 version as example.

http://editor.swagger.io/?_ga=2.159126010.159946307.1503870436-1508260114.1503462087#

I see that now, thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

confuser picture confuser  路  6Comments

alecmev picture alecmev  路  4Comments

ClementVidal picture ClementVidal  路  6Comments

jennaprice picture jennaprice  路  4Comments

SteveNewhouse picture SteveNewhouse  路  5Comments