Skip to content

Commit

Permalink
Merge branch 'main' into feat/addRequests
Browse files Browse the repository at this point in the history
Signed-off-by: Valentin Sickert <[email protected]>
  • Loading branch information
Lapotor committed Feb 9, 2024
2 parents b5e83d9 + 6d7f05d commit 9d7a248
Show file tree
Hide file tree
Showing 15 changed files with 536 additions and 161 deletions.
231 changes: 193 additions & 38 deletions .github/assets/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,111 @@ paths:
security:
- BearerAuth: []

/permissions:
get:
tags:
- Permission
summary: Retrieves all permissions
operationId: getPermissions
parameters:
- name: sort
in: query
schema:
type: string
enum:
- id
- id:asc
- id:desc
- name
- name:asc
- name:desc
default: id
- name: per_page
in: query
schema:
type: integer
default: 25
maximum: 50
- name: page
in: query
schema:
type: integer
default: 1
minimum: 0
responses:
"200":
description: Successful operation
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Permission"
"403":
description:
"Forbidden - The server understood the request, but is refusing\
\ to fulfill it."
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"500":
description:
"Internal Server Error - A generic error message, given when\
\ an unexpected condition was encountered and no more specific message\
\ is suitable."
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
security:
- BearerAuth: []

/permissions/{id}:
get:
tags:
- Permission
summary: Retrieves a permission
operationId: getPermission
parameters:
- name: id
in: path
required: true
schema:
type: integer
responses:
"200":
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/Permission"
"403":
description:
"Forbidden - The server understood the request, but is refusing\
\ to fulfill it."
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"404":
description: Not Found - The server cannot find the requested resource.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"500":
description:
"Internal Server Error - A generic error message, given when\
\ an unexpected condition was encountered and no more specific message\
\ is suitable."
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
security:
- BearerAuth: []

/roles:
get:
tags:
Expand Down Expand Up @@ -1079,71 +1184,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 +1275,86 @@ 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
Role:
nullable: true

Permission:
type: object
required:
- created_at
- id
- name
- permissions
- guard
- created_at
- updated_at
type: object
properties:
id:
type: integer
readOnly: true
name:
type: string
readOnly: true
guard:
type: string
readOnly: true
created_at:
type: string
format: date-time
readOnly: true
updated_at:
type: string
format: date-time
readOnly: true

Role:
required:
- id
- name
- permissions
- created_at
- updated_at
type: object
properties:
id:
type: integer
readOnly: true
name:
type: string
permissions:
type: object
properties: {}
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
readOnly: true
Error:
type: object
properties:
Expand Down Expand Up @@ -1249,9 +1408,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
2 changes: 1 addition & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9dc751fe249ad99385a2583ee0d084c400eee04e # v5
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/laravel-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

- name: Setup PHP ${{ matrix.php-versions }}
uses: shivammathur/setup-php@97e0a9729aaea439548b7c85c7cd3ef503aa5365
uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d
with:
php-version: ${{ matrix.php-versions }}
extensions: pcntl, zip, intl, exif, mbstring, dom, fileinfo, ${{ inputs.db-type == 'mysql' && 'pdo_mysql' || inputs.db-type == 'pgsql' && 'pdo_pgsql' }}
Expand All @@ -56,7 +56,7 @@ jobs:
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache Composer Dependencies
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upload-db-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

- name: Setup PHP 8.1
uses: shivammathur/setup-php@97e0a9729aaea439548b7c85c7cd3ef503aa5365
uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d
with:
php-version: "8.1"
extensions: pcntl, zip, intl, exif, mbstring, dom, fileinfo, ${{ inputs.db-type == 'mysql' && 'pdo_mysql' || inputs.db-type == 'pgsql' && 'pdo_pgsql' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upload-file-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

- name: Setup PHP ${{ matrix.php-versions }}
uses: shivammathur/setup-php@97e0a9729aaea439548b7c85c7cd3ef503aa5365
uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d
with:
php-version: ${{ matrix.php-versions }}
extensions: pcntl, zip, intl, exif, mbstring, dom, fileinfo
Expand Down
Loading

0 comments on commit 9d7a248

Please sign in to comment.