I have a json payload and I need some help on how to represent it in swagger-YAML
keywords can be an empty array [] or and array like ['a','b','c']
Here is my object
{
"keywords": [],
"distance": "25",
"jobType": "all",
"sectorId": "0",
"location": {
"lat": "33.7489954",
"lng": "-84.3879824",
"name": "Atlanta, GA"
}
}
This is what I have so far but I am getting the error
SyntaxError: Data does not match any schemas from "oneOf"
Data path: "/paths/~1users~1{userId}~1jobdeckSearch/get/responses/200"
Schema path: "/properties/paths/patternProperties/^~1/properties/get/properties/responses/patternProperties/^([0-9]{3})$|^(default)$/oneOf"
responses:
200:
schema:
type: object
properties:
distance:
type: string
keywords:
type: array
items:
type: string
jobType:
type: string
sectorId:
type: string
location:
properties:
lat:
type: string
lng:
type: string
name:
type: string