"ReviewsWithOperationRef": {
"operationRef": "#/paths/~1products~1{id}~1reviews/get",
"parameters": {
"id": "$request.path.product-id",
"product-tag": "$request.query.product-tag"
}
}
status: false
message: |-
Failed OpenAPI3 schema validation: [
{
"keyword": "required",
"dataPath": "/components/links/ReviewsWithOperationRef",
"schemaPath": "#/required",
"params": {
"missingProperty": "$ref"
},
"message": "should have required property '$ref'",
"schema": {
"$ref": {
"type": "string",
"format": "uriref"
}
},
"parentSchema": {
"type": "object",
"required": [
"$ref"
],
"properties": {
"$ref": {
"type": "string",
"format": "uriref"
}
},
"description": "A simple object to allow referencing other components in the specification, internally and externally. The Reference Object is defined by JSON Reference and follows the same structure, behavior and rules. For this specification, reference resolution is done as defined by the JSON Reference specification and not by the JSON Schema specification."
},
"data": {
"operationRef": "#/paths/~1products~1{id}~1reviews/get",
"parameters": {
"id": "$request.path.product-id",
"product-tag": "$request.query.product-tag"
}
}
},
...
]
context: '#/'
"ReviewsWithOperationRef": {
"$ref" : "blah",
"operationRef": "#/paths/~1products~1{id}~1reviews/get",
"parameters": {
"id": "$request.path.product-id",
"product-tag": "$request.query.product-tag"
}
}
... oas-validator gives the thumbs up.