Skip to content

Commit

Permalink
[IOPLT-683] Add endpoint to exposed OpenAPI (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
kin0992 authored Sep 3, 2024
1 parent cebee25 commit 2d98cb9
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions infra/resources/modules/commons/api/ts_management/v1/_openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,42 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ProblemJson'
put:
operationId: updateSubscription
summary: Update a subscription
description: >-
Update the state of a subscription
parameters:
- $ref: '#/components/parameters/pathTrialId'
- $ref: '#/components/parameters/pathUserId'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateSubscription'
responses:
'202':
description: Accepted
content:
application/json:
schema:
$ref: '#/components/schemas/UpdatedSubscription'
'400':
description: Bad Request.
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemJson'
'401':
description: Unauthorized
'404':
description: Not Found
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemJson'
/trials/{trialId}/subscriptions:
post:
operationId: createSubscription
Expand Down Expand Up @@ -287,6 +323,28 @@ components:
$ref: '#/components/schemas/UserId'
state:
$ref: '#/components/schemas/CreateSubscriptionState'
UpdateSubscription:
description: >
Payload to update the state of the subscription.
type: object
required:
- state
properties:
state:
$ref: '#/components/schemas/SubscriptionState'
UpdatedSubscription:
type: object
required:
- trialId
- userId
- state
properties:
trialId:
$ref: '#/components/schemas/TrialId'
userId:
$ref: '#/components/schemas/UserId'
state:
$ref: '#/components/schemas/SubscriptionState'
Subscription:
type: object
required:
Expand Down

0 comments on commit 2d98cb9

Please sign in to comment.