Path parameters must always be required. Add:

required: true

to the parameter definition and the errors would disappear.

 

 

 

From: <swagger-swaggersocket@googlegroups.com> on behalf of Ian G 
<iggn...@gmail.com>
Reply-To: "swagger-swaggersocket@googlegroups.com" 
<swagger-swaggersocket@googlegroups.com>
Date: Wednesday, September 20, 2017 at 18:29
To: Swagger <swagger-swaggersocket@googlegroups.com>
Subject: Syntax error in Swagger Editor

 

swagger: '2.0'

info:

  version: '1.0.0'

  title: Sample API for editing

  description: Trying to debug this API in the editor

 

 

paths:

  "/v1/places/{PlaceID}/devices":

    get:

      summary: List Devices fo a location

      description: An Array of all devices in location.

      produces:

        - application/json

      parameters: 

        - name: PlaceID        

          in: path

          type: integer

      responses:

        200:

          description: OK

          schema: 

            $ref: "#/definitions/PlaceWithPort"

 

definitions:

  PlaceWithPort:

    type: object

    properties:

      placeId:

        type: integer     

      name:

        type: string

      devices:

        items:

          properties:

            deviceId:

              type: integer

            name:

              type: string

            type:

              type: string

          type: object

        type: array

 

basePath: /getInventoryBySite/1.0.0

schemes:

 - https

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to