I keep getting Should be a object error on line 37 where the following path is defined: ' /api/calcRating/ocp:' ... I removed the definitions at the bottom to keep it concise.
Does anyone have any suggestions on how to fix this?
swagger: 2.0
info:
description: Rating Engine that calculates rates for Owner's Edge
version: 1.0.0
title: Owner's Edge - Rating Engine API
contact:
email: [email protected]
schemes:
- https
basePath: "/"
paths:
/api/calcRating/oi:
post:
tags:
- calculate rating
summary: calculates oi rating
description: takes an oi submission and responds with a rating
operationId: addPet
consumes:
- application/json
produces:
- application/json
parameters:
- in: body
name: body
description: Pet object that needs to be added to the store
required: true
schema:
$ref: '#/definitions/OiSubmission'
responses:
200:
description: successful operation
schema:
type: object
items:
$ref: '#/definitions/OiResponse'
/api/calcRating/ocp:
post:
tags:
- calculate rating
summary: calculates ocp rating
description: takes an ocp submission and responds with a rating
operationId: addPet
consumes:
- application/json
produces:
- application/json
parameters:
- in: body
name: body
description: Pet object that needs to be added to the store
required: true
schema:
$ref: '#/definitions/OcpSubmission'
responses:
200:
description: successful operation
schema:
type: object
items:
$ref: '#/definitions/OcpResponse'
swagger: 2.0 _must be_ swagger: "2.0" (i.e. a string). Start there, and make your operation id values unique.
@fehguy Thanks for the tip. I fixed both but still get the same error.
Never mind. Really appreciate the help! I simply cut/paste the updated yaml paramaters into the editor and they work well now!