DEV: Add missing operationIds to the api docs (#14235)

From the openapi spec:

 https://spec.openapis.org/oas/latest.html#fixed-fields-7

each endpoint needs to have an `operationId`:

> Unique string used to identify the operation. The id MUST be unique
> among all operations described in the API. The operationId value is
> case-sensitive. Tools and libraries MAY use the operationId to uniquely
> identify an operation, therefore, it is RECOMMENDED to follow common
> programming naming conventions.

Running the linter on our openapi.json file with this command:

`npx @redocly/openapi-cli lint openapi.json`

produced the following warning on all of our endpoints:

> Operation object should contain `operationId` field

This commit resolves these warnings by adding an operationId field to
each endpoint.
This commit is contained in:
Blake Erickson
2021-09-03 07:39:29 -06:00
committed by GitHub
parent 85c31c73ba
commit ee7809e8a8
14 changed files with 70 additions and 97 deletions

View File

@ -15,6 +15,7 @@ describe 'notifications' do
get 'Get the notifications that belong to the current user' do
tags 'Notifications'
operationId 'getNotifications'
produces 'application/json'
response '200', 'notifications' do
@ -60,6 +61,7 @@ describe 'notifications' do
put 'Mark notifications as read' do
tags 'Notifications'
operationId 'markNotificationsAsRead'
consumes 'application/json'
parameter name: :notification, in: :body, schema: {
type: :object,