Skip to content

Commit 7e8620b

Browse files
committed
updated openapi page - optional operationId
Signed-off-by: bidi47 <bidi@apidemia.com>
1 parent 449075f commit 7e8620b

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

‎docs/book/v7/openapi/write-documentation.md‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,14 @@ It should specify at least the following parameters:
101101
- `parameters`: an array of `query`/`path` parameters - each parameter is specified as a new `OA\Parameter` object
102102
- `responses`: an array of `OA\Response` objects, each describing a combination of HTTP status codes and their respective response bodies
103103

104+
### Optional parameters
105+
106+
The following parameter is available on every request object but is not required:
107+
108+
- `operationId`: a name for the operation, unique across the whole document (example: `getUserCollection`).
109+
Client generators typically use it as the method name, and `Link` objects use it to refer to an operation.
110+
The endpoints shipped with Dotkernel API do not set it.
111+
104112
## Conclusion
105113

106114
To summarize, the typical scenario on working on your own instance of Dotkernel API would follow these steps:
@@ -131,6 +139,12 @@ A: `path`, `description`, `summary`, `tags`, `parameters` and `responses`, plus
131139

132140
A: Omit the `security` parameter.
133141

142+
**Q: Do I need `operationId`?**
143+
144+
A: No.
145+
It is optional and the shipped endpoints omit it.
146+
Set it if you generate a client from the specification and want stable method names; it must be unique across the document.
147+
134148
**Q: What is the difference between `description` and `summary`?**
135149

136150
A: `summary` is a short one-line label; `description` is the verbose explanation.

0 commit comments

Comments
 (0)