Hello plugin developers,
I am trying to add a new path to my OpenAPI spec to support a PATCH method call.
The request is following the JSON Patch standard.
Body should be of the form
[
{ "op": "replace", "path": "/baz", "value": "boo" },
{ "op": "add", "path": "/hello", "value": ["world"] },
{ "op": "remove", "path": "/foo" }
]
But when I load the spec into the plugin I get the following error.
In path /forms/{form_id}, method patch, operationId patchform, request body schema is not an object schema; skipping
In path /forms/{form_id}, method patch, operationId patchform, skipping function due to errors
The spec
{
"/forms/{form_id}": {
"patch": {
"description": "Updates an existing form.",
"summary": "Update form (patch)",
"tags": [
"forms"
],
"operationId": "patchform",
"parameters": [{
"description": "Unique ID for the form.",
"in": "path",
"name": "form_id",
"required": true,
"schema": {}
}],
"requestBody": {
"content": {
"application/json": {
"schema": {
"description": "Request the user submits to partially update a form.",
"items": {
"properties": {
"op": {
"type": "string",
"enum":["replace"]
},
"path": {
"enum": [
"/theme",
"/title",
"/workspace"
],
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"op",
"path",
"value"
],
"type": "object"
},
"type": "array"
}
}
},
"required": false
},
"responses": {
"204": {
"content": {},
"description": "No content"
}
}
}
}
}
Vacuum linter does not throw any error
Editor.swagger.io accepts it too.
Could you see what’s wrong?
It would be great to know the rules the plugin linter is following