Use operationId instead operationRef

pull/13/head
Nathanaël Jourdane 4 years ago committed by guhur
parent abfa75ff96
commit d9dc37de16

@ -17,7 +17,7 @@ lint:
license-url: off license-url: off
no-extra-fields: off no-extra-fields: off
operation-description: off operation-description: off
operation-operationId: off operation-operationId: on
operation-tags: off operation-tags: off
provide-contact: off provide-contact: off
servers-no-trailing-slash: off servers-no-trailing-slash: off

@ -15,6 +15,7 @@ servers:
paths: paths:
/polls: /polls:
get: get:
operationId: get-polls
summary: Gets all polls. summary: Gets all polls.
responses: responses:
'200': '200':
@ -26,6 +27,7 @@ paths:
items: items:
$ref: '#/components/schemas/Poll' $ref: '#/components/schemas/Poll'
post: post:
operationId: create-poll
summary: Creates a poll. summary: Creates a poll.
requestBody: requestBody:
required: true required: true
@ -66,6 +68,7 @@ paths:
type: integer type: integer
format: int64 format: int64
get: get:
operationId: get-poll
summary: Gets a poll by ID summary: Gets a poll by ID
responses: responses:
'200': '200':
@ -77,6 +80,7 @@ paths:
'404': '404':
$ref: '#/components/responses/PollNotFound' $ref: '#/components/responses/PollNotFound'
patch: patch:
operationId: update-poll
summary: Updates a poll summary: Updates a poll
requestBody: requestBody:
required: true required: true
@ -97,6 +101,7 @@ paths:
items: items:
$ref: '#/components/schemas/Poll' $ref: '#/components/schemas/Poll'
delete: delete:
operationId: delete-poll
summary: Deletes a poll summary: Deletes a poll
responses: responses:
'200': '200':
@ -113,6 +118,7 @@ paths:
schema: schema:
type: string type: string
post: post:
operationId: add-judge-to-poll
description: Add a judge to a poll description: Add a judge to a poll
requestBody: requestBody:
content: content:
@ -136,6 +142,7 @@ paths:
schema: schema:
type: string type: string
get: get:
operationId: get-poll-results
description: Get results of a poll description: Get results of a poll
responses: responses:
'200': '200':
@ -154,6 +161,7 @@ paths:
schema: schema:
type: string type: string
post: post:
operationId: create-poll-judgment
summary: Creates a judgment summary: Creates a judgment
requestBody: requestBody:
required: true required: true
@ -188,6 +196,7 @@ paths:
schema: schema:
type: string type: string
get: get:
operationId: get-poll-judgment
summary: Gets a judgment by ID summary: Gets a judgment by ID
responses: responses:
'200': '200':
@ -197,6 +206,7 @@ paths:
schema: schema:
$ref: '#/components/schemas/Judgment' $ref: '#/components/schemas/Judgment'
delete: delete:
operationId: delete-poll-judgment
summary: Deletes a judgment summary: Deletes a judgment
responses: responses:
'200': '200':
@ -213,6 +223,7 @@ paths:
schema: schema:
type: string type: string
get: get:
operationId: get-poll-judge
summary: Get a judge from a poll summary: Get a judge from a poll
responses: responses:
'200': '200':
@ -227,6 +238,7 @@ paths:
- {} - {}
- pollAuth: [] - pollAuth: []
delete: delete:
operationId: delete-poll-judge
summary: Delete a judge from a poll summary: Delete a judge from a poll
responses: responses:
'200': '200':
@ -344,49 +356,49 @@ components:
format: int16 format: int16
links: links:
GetPollByPollId: GetPollByPollId:
operationRef: '#/paths/~1polls/~1{poll-id}/get' operationRef: get-poll
parameters: parameters:
pollId: $response.body#/id pollId: $response.body#/id
description: > description: >
The `id` value returned in the response can be used as the `poll-id` The `id` value returned in the response can be used as the `poll-id`
parameter in GET /polls/{poll-id}. parameter in GET /polls/{poll-id}.
SetPollByPollId: SetPollByPollId:
operationRef: '#/paths/~1polls/~1{poll-id}/patch' operationRef: update-poll
parameters: parameters:
pollId: $response.body#/id pollId: $response.body#/id
description: > description: >
The `id` value returned in the response can be used as the `poll-id` The `id` value returned in the response can be used as the `poll-id`
parameter in PATCH /polls/{poll-id}. parameter in PATCH /polls/{poll-id}.
DelPollByPollId: DelPollByPollId:
operationRef: '#/paths/~1polls/~1{poll-id}/delete' operationRef: delete-poll
parameters: parameters:
pollId: $response.body#/id pollId: $response.body#/id
description: > description: >
The `id` value returned in the response can be used as the `poll-id` The `id` value returned in the response can be used as the `poll-id`
parameter in DELETE /polls/{poll-id}. parameter in DELETE /polls/{poll-id}.
JudgeByPollId: JudgeByPollId:
operationRef: '#/paths/~1judges/~1{poll-id}/post' operationRef: create-poll-judgment
parameters: parameters:
userId: $response.body#/id userId: $response.body#/id
description: > description: >
The `id` value returned in the response can be used as the `poll-id` The `id` value returned in the response can be used as the `poll-id`
parameter in GET /judgments/{poll-id}. parameter in GET /judgments/{poll-id}.
ResultsByPollId: ResultsByPollId:
operationRef: '#/paths/~1polls/~1{poll-id}/results/get' operationRef: get-poll-results
parameters: parameters:
pollId: $response.body#/id pollId: $response.body#/id
description: > description: >
The `id` value returned in the response can be used as the `poll-id` The `id` value returned in the response can be used as the `poll-id`
parameter in GET /results/{result-id}. parameter in GET /results/{result-id}.
GetJudgmentByJudgmentId: GetJudgmentByJudgmentId:
operationRef: '#/paths/~1judgments/~1{judgment-id}/get' operationRef: get-judgment
parameters: parameters:
judgmentId: $response.body#/id judgmentId: $response.body#/id
description: > description: >
The `id` value returned in the response can be used as the `judgment-id` The `id` value returned in the response can be used as the `judgment-id`
parameter in GET /judgments/{judgment-id}. parameter in GET /judgments/{judgment-id}.
DelJudgmentByJudgmentId: DelJudgmentByJudgmentId:
operationRef: '#/paths/~1judgments/~1{judgment-id}/delete' operationId: delete-poll-judgment
parameters: parameters:
judgmentId: $response.body#/id judgmentId: $response.body#/id
description: > description: >

@ -1,4 +1,4 @@
operationRef: '#/paths/~1judgments/~1{judgment-id}/delete' operationId: 'delete-poll-judgment'
parameters: parameters:
judgmentId: $response.body#/id judgmentId: $response.body#/id
description: > description: >

@ -1,4 +1,4 @@
operationRef: '#/paths/~1polls/~1{poll-id}/delete' operationRef: 'delete-poll'
parameters: parameters:
pollId: $response.body#/id pollId: $response.body#/id
description: > description: >

@ -1,4 +1,4 @@
operationRef: '#/paths/~1judgments/~1{judgment-id}/get' operationRef: 'get-judgment'
parameters: parameters:
judgmentId: $response.body#/id judgmentId: $response.body#/id
description: > description: >

@ -1,4 +1,4 @@
operationRef: '#/paths/~1polls/~1{poll-id}/get' operationRef: 'get-poll'
parameters: parameters:
pollId: $response.body#/id pollId: $response.body#/id
description: > description: >

@ -1,4 +1,4 @@
operationRef: '#/paths/~1polls/~1{poll-id}/judges/post' operationRef: 'add-judge-to-poll'
parameters: parameters:
userId: $response.body#/id userId: $response.body#/id
description: > description: >

@ -1,4 +1,4 @@
operationRef: '#/paths/~1judges/~1{poll-id}/post' operationRef: 'create-poll-judgment'
parameters: parameters:
userId: $response.body#/id userId: $response.body#/id
description: > description: >

@ -1,4 +1,4 @@
operationRef: '#/paths/~1polls/~1{poll-id}/results/get' operationRef: 'get-poll-results'
parameters: parameters:
pollId: $response.body#/id pollId: $response.body#/id
description: > description: >

@ -1,4 +1,4 @@
operationRef: '#/paths/~1polls/~1{poll-id}/patch' operationRef: 'update-poll'
parameters: parameters:
pollId: $response.body#/id pollId: $response.body#/id
description: > description: >

@ -5,6 +5,7 @@ parameters:
schema: schema:
type: string type: string
get: get:
operationId: get-poll-judgment
summary: Gets a judgment by ID summary: Gets a judgment by ID
responses: responses:
'200': '200':
@ -14,6 +15,7 @@ get:
schema: schema:
$ref: ../components/schemas/Judgment.yaml $ref: ../components/schemas/Judgment.yaml
delete: delete:
operationId: delete-poll-judgment
summary: Deletes a judgment summary: Deletes a judgment
responses: responses:
'200': '200':

@ -1,4 +1,5 @@
get: get:
operationId: get-polls
summary: Gets all polls. summary: Gets all polls.
responses: responses:
'200': '200':
@ -10,6 +11,7 @@ get:
items: items:
$ref: ../components/schemas/Poll.yaml $ref: ../components/schemas/Poll.yaml
post: post:
operationId: create-poll
summary: Creates a poll. summary: Creates a poll.
requestBody: requestBody:
required: true required: true

@ -6,6 +6,7 @@ parameters:
type: integer type: integer
format: int64 format: int64
get: get:
operationId: get-poll
summary: Gets a poll by ID summary: Gets a poll by ID
responses: responses:
'200': '200':
@ -17,6 +18,7 @@ get:
'404': '404':
$ref: ../components/responses/PollNotFound.yaml $ref: ../components/responses/PollNotFound.yaml
patch: patch:
operationId: update-poll
summary: Updates a poll summary: Updates a poll
requestBody: requestBody:
required: true required: true
@ -37,6 +39,7 @@ patch:
items: items:
$ref: ../components/schemas/Poll.yaml $ref: ../components/schemas/Poll.yaml
delete: delete:
operationId: delete-poll
summary: Deletes a poll summary: Deletes a poll
responses: responses:
'200': '200':

@ -5,6 +5,7 @@ parameters:
schema: schema:
type: string type: string
post: post:
operationId: add-judge-to-poll
description: Add a judge to a poll description: Add a judge to a poll
requestBody: requestBody:
content: content:

@ -5,6 +5,7 @@ parameters:
schema: schema:
type: string type: string
get: get:
operationId: get-poll-judge
summary: Get a judge from a poll summary: Get a judge from a poll
responses: responses:
'200': '200':
@ -19,6 +20,7 @@ get:
- {} - {}
- pollAuth: [] - pollAuth: []
delete: delete:
operationId: delete-poll-judge
summary: Delete a judge from a poll summary: Delete a judge from a poll
responses: responses:
'200': '200':

@ -5,6 +5,7 @@ parameters:
schema: schema:
type: string type: string
post: post:
operationId: create-poll-judgment
summary: Creates a judgment summary: Creates a judgment
requestBody: requestBody:
required: true required: true

@ -5,6 +5,7 @@ parameters:
schema: schema:
type: string type: string
get: get:
operationId: get-poll-results
description: Get results of a poll description: Get results of a poll
responses: responses:
'200': '200':

Loading…
Cancel
Save