Skip to content

Commit

Permalink
Adds expirationdate to OAS
Browse files Browse the repository at this point in the history
  • Loading branch information
pcrespov committed Sep 20, 2022
1 parent 41a78fc commit 93bcefb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
10 changes: 7 additions & 3 deletions api/specs/webserver/components/schemas/me.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ ProfileCommon:
first_name: Pedro
last_name: Crespo

ProfileInput:
ProfileUpdate:
allOf:
- $ref: "#/ProfileCommon"
example:
first_name: Pedro
last_name: Crespo

ProfileOutput:
ProfileGet:
allOf:
- $ref: "#/ProfileCommon"
- type: object
Expand All @@ -30,6 +30,10 @@ ProfileOutput:
$ref: "./group.yaml#/AllUsersGroups"
gravatar_id:
type: string
expirationDate:
type: string
format: date
description: "If user has a trial account, it sets the expiration date, otherwise None"
example:
login: [email protected]
role: Admin
Expand All @@ -41,7 +45,7 @@ ProfileEnveloped:
- data
properties:
data:
$ref: "#/ProfileOutput"
$ref: "#/ProfileGet"
error:
nullable: true
default: null
Expand Down
2 changes: 1 addition & 1 deletion api/specs/webserver/openapi-user.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ paths:
content:
application/json:
schema:
$ref: "./components/schemas/me.yaml#/ProfileInput"
$ref: "./components/schemas/me.yaml#/ProfileUpdate"
responses:
"204":
description: updated profile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,10 @@ paths:
$ref: '#/paths/~1groups/get/responses/200/content/application~1json/schema/properties/data'
gravatar_id:
type: string
expirationDate:
type: string
format: date
description: 'If user has a trial account, it sets the expiration date, otherwise None'
example:
login: [email protected]
role: Admin
Expand Down Expand Up @@ -2470,12 +2474,12 @@ paths:
CreationStatus:
operationId: get_task_status
parameters:
task_id: '$response.body#/data/task_id'
task_id: $response.body#/data/task_id
CreationResult:
operationId: get_task_result
description: Returns 201 if creation succeeded
parameters:
task_id: '$response.body#/data/task_id'
task_id: $response.body#/data/task_id
default:
$ref: '#/components/responses/DefaultErrorResponse'
/projects/active:
Expand Down

0 comments on commit 93bcefb

Please sign in to comment.