'OperationId' of the link object does not point to an operation object

Description

The value you have defined for the operationId property of a link object is not an operation defined in your API. All operationId properties must point to the operationId of an operation object that exists in the OpenAPI definition.

For more details, see the OpenAPI Specification.

Example

The following is an example of how this issue could look in your API definition. The operationId in the link object is getAddress, but the operationId of the operation is getUserAddress:

1paths:
2  "/users/{id}":
3    parameters:
4      - name: id
5        in: path
6        required: true
7        description: the user identifier, as userId
8        schema:
9          type: string
10          additionalProperties: false
11    get:
12      responses:
13        "200":
14          description: the user being returned
15          content:
16            application/json:
17              schema:
18                type: object
19                additionalProperties: false
20                properties:
21                  uuid:
22                    type: string
23                    format: uuid
24          links:
25            address:
26              operationId: getAddress
27              parameters:
28                userId: $request.path.id
29  "/users/{userid}/address":
30    parameters:
31      - name: userid
32        in: path
33        required: true
34        description: the user identifier, as userId
35        schema:
36          type: string
37          additionalProperties: false
38    get:
39      operationId: getUserAddress
40      responses:
41        "200":
42          description: the user's address
43

Remediation

Make sure that all operationId properties in link objects match the operationId properties of the operations you want to link to.

1paths:
2  "/users/{id}":
3    parameters:
4      - name: id
5        in: path
6        required: true
7        description: the user identifier, as userId
8        schema:
9          type: string
10          additionalProperties: false
11    get:
12      responses:
13        "200":
14          description: the user being returned
15          content:
16            application/json:
17              schema:
18                type: object
19                additionalProperties: false
20                properties:
21                  uuid:
22                    type: string
23                    format: uuid
24          links:
25            address:
26              operationId: getUserAddress
27              parameters:
28                userId: $request.path.id
29  "/users/{userid}/address":
30    parameters:
31      - name: userid
32        in: path
33        required: true
34        description: the user identifier, as userId
35        schema:
36          type: string
37          additionalProperties: false
38    get:
39      operationId: getUserAddress
40      responses:
41        "200":
42          description: the user's address
43

Copyright 42Crunch 2021