Skip to content

Commit

Permalink
docs(api): update swagger file (#108)
Browse files Browse the repository at this point in the history
Update securitySchema to use type `http` with the `bearer` scheme.
Restructure Component schema properties and define readonly and nullable
properties.

Signed-off-by: Valentin Sickert <[email protected]>
  • Loading branch information
Lapotor authored Dec 29, 2023
1 parent b6c4265 commit 39692ae
Showing 1 changed file with 68 additions and 38 deletions.
106 changes: 68 additions & 38 deletions .github/assets/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1079,71 +1079,85 @@ components:
schemas:
Show:
required:
- created_at
- enabled
- end_date
- id
- is_live
- moderators
- start_date
- title
- body
- start_date
- end_date
- moderators
- is_live
- enabled
- locked_by
- created_at
- updated_at
type: object
properties:
id:
type: integer
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time
readOnly: true
title:
type: string
body:
type: object
properties: {}
type: string
nullable: true
start_date:
type: string
format: date-time
end_date:
type: string
format: date-time
is_live:
type: boolean
enabled:
type: boolean
moderators:
minItems: 1
type: array
items:
type: object
required:
- id
- name
- primary
properties:
id:
type: integer
name:
type: string
readOnly: true
primary:
type: boolean
is_live:
type: boolean
enabled:
type: boolean
locked_by:
type: integer
nullable: true
readOnly: true
created_at:
type: string
format: date-time
readOnly: true
updated_at:
type: string
format: date-time
readOnly: true
Request:
required:
- created_at
- id
- message
- name
- message
- created_at
type: object
properties:
id:
type: integer
readOnly: true
name:
type: string
message:
type: string
created_at:
type: string
format: date-time
readOnly: true
User:
required:
- created_at
Expand All @@ -1156,46 +1170,66 @@ components:
properties:
id:
type: integer
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time
readOnly: true
name:
type: string
email:
type: string
format: email
email_verified_at:
type: string
format: date-time
readOnly: true
nullable: true
password:
type: string
format: password
role:
type: integer
nullable: true
created_at:
type: string
format: date-time
readOnly: true
updated_at:
type: string
format: date-time
readOnly: true
Role:
required:
- created_at
- id
- name
- permissions
- created_at
- updated_at
type: object
properties:
id:
type: integer
readOnly: true
name:
type: string
permissions:
type: array
items:
type: object
required:
- id
- name
properties:
id:
type: integer
name:
type: string
readOnly: true
created_at:
type: string
format: date-time
readOnly: true
updated_at:
type: string
format: date-time
name:
type: string
permissions:
type: object
properties: {}
readOnly: true
Error:
type: object
properties:
Expand Down Expand Up @@ -1249,9 +1283,5 @@ components:
$ref: "#/components/schemas/Error"
securitySchemes:
BearerAuth:
type: apiKey
description:
"Enter the token with the `Bearer: ` prefix, e.g. \"Bearer abcde12345\"\
."
name: Authorization
in: header
type: http
scheme: bearer

0 comments on commit 39692ae

Please sign in to comment.