Hi
I am getting confused as to what is wrong with the following code.
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
When I enter this into the Swagger.Editor it generates the following errors.
ErrorsHide
Schema error at paths['/v1/places/{PlaceID}/devices'].get.parameters[0]should
NOT have additional properties
additionalProperty: type, name, in
Jump to line 16
Schema error at
paths['/v1/places/{PlaceID}/devices'].get.parameters[0].inshould be equal to
one of the allowed values
allowedValues: body, header, formData, query
Jump to line 17
What I am doing wrong...
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.