Skip to content

Commit

Permalink
Add swagger docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghost-in-a-Jar committed Nov 2, 2023
1 parent 6f77d68 commit 70038ad
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions src/main/resources/swagger/api-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3255,6 +3255,53 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/TermsOfServiceConfigResponse'

/termsOfService/v1/user/self:
get:
tags:
- TermsOfService
summary: Returns details about the requesting user's terms of service status.
operationId: userTermsOfServiceGetSelf
responses:
200:
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/UserTermsOfServiceDetails'
404:
description: user not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorReport'

/termsOfService/v1/user/{sam_user_id}:
get:
tags:
- TermsOfService
summary: gets a user's terms of service status, can only get another user's status if the requester is an admin.
operationId: userTermsOfServiceGet
parameters:
- name: sam_user_id
in: path
description: the id of the sam user to get terms of service details for
required: true
schema:
type: string
responses:
200:
description: user exists
content:
application/json:
schema:
$ref: '#/components/schemas/UserTermsOfServiceDetails'
404:
description: user not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorReport'
/version:
get:
tags:
Expand Down Expand Up @@ -3916,6 +3963,24 @@ components:
means that users who have not accepted the latest terms of service
version (and who have accepted the previous version) will be allowed to use the system
for a period of time after the terms of service have been updated.
UserTermsOfServiceDetails:
required:
- latestAcceptedVersion
- acceptedOn
- permitsSystemUsage
type: object
properties:
latestAcceptedVersion:
type: string
description: The latest version of the terms of service that the requesting user has accepted.
acceptedOn:
type: string
format: date-time
description: The timestamp marking when the user accepted the terms of service matching latestAcceptedVersion.
permitsSystemUsage:
type: boolean
description: based on the user's currently accepted terms of service version and when the terms of service were last changed,
should the user still be permitted to use the system?
TermsOfServiceDetails:
required:
- isEnabled
Expand Down

0 comments on commit 70038ad

Please sign in to comment.