Target of the JSON reference of the example does not exist

Issue ID: v3-validation-reference-example-unresolved

Description

The target of the JSON reference of the example cannot be found in your API. You must define the target example in your API.

Example

The following is an example of how this issue could look in your API definition. The name used in the reference does not match the name of the example:

{
    "content": {
        "application/json": {
            "schema": {
                "type": "array",
                "items": {
                    "$ref": "#/components/schemas/Pet"
                }
            },
            "examples": {
                "objectExample": {
                    "$ref": "#/components/examples/Pet"
                }
            }
        }
    },
     // ...  
    "components": {
        "examples": {
            "myExample": {
                "value": "foo"
                //...
            }
        }
    }   
}

Remediation

Make sure that all targets of JSON references are defined in your API.

{
    "content": {
        "application/json": {
            "schema": {
                "type": "array",
                "items": {
                    "$ref": "#/components/schemas/Pet"
                }
            },
            "examples": {
                "objectExample": {
                    "$ref": "#/components/examples/myExample"
                }
            }
        }
    },
     // ...  
    "components": {
        "examples": {
            "myExample": {
                "value": "foo"
                //...
            }
        }
    }   
}