0

I'm getting the error:

0 $refs cannot match any of the following: "#/definitions", "#/responses"

When trying to use a definition like this (simplified version):

definitions:
  Camera:
    type: object
    properties:
        ip:
          description: "device IP address"
          type: string
    required: [ip]
paths:
  /cameras:
    put:
      parameters:
        -
          $ref: "#/definitions/Camera"
Philip Kirkbride
  • 21,381
  • 38
  • 125
  • 225
  • Are you trying to send the `Camera` object in the request body? Or as a path/query/header parameter? – Helen Aug 15 '17 at 14:33
  • @Helen I want to send the `Camera` object in the body of the post request. – Philip Kirkbride Aug 15 '17 at 14:34
  • Possible duplicate of [Post a json body with swagger](https://stackoverflow.com/questions/35411628/post-a-json-body-with-swagger), [How to create swagger yaml for post body](https://stackoverflow.com/questions/31390806/how-to-create-swagger-yaml-for-post-body) and [Swagger POST with json body](https://stackoverflow.com/questions/19892998/swagger-post-with-json-body). More info: [Describing Request Body](https://swagger.io/docs/specification/2-0/describing-request-body/). – Helen Aug 15 '17 at 14:37

0 Answers0