Skip to content

Commit

Permalink
fix: remove double checks on pr and push
Browse files Browse the repository at this point in the history
  • Loading branch information
puria committed Jan 7, 2025
1 parent 6cea7a3 commit b5e3b52
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 27 deletions.
1 change: 0 additions & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: 🐹 lint

on:
pull_request:
push:
paths:
- '**.go'
- 'go.mod'
Expand Down
124 changes: 98 additions & 26 deletions docs/public/API/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ info:
url: https://forkbomb.solutions

servers:
- url: https://s.api.didimo.forkbomb.eu/v1
description: Staging server
- url: http://localhost:8090/
description: Localhost server
- url: https://t.api.didimo.forkbomb.eu/v1
description: Test server
- url: https://s.api.didimo.forkbomb.eu/v1
description: Staging server

paths:
/auth/register:
/api/collections/users/records:
post:
summary: Register a new user
description: >
Expand All @@ -37,32 +39,95 @@ paths:
schema:
$ref: '#/components/schemas/RegisterRequest'
responses:
'201':
description: User registered successfully.
'200':
description: Successfully created the record
content:
application/json:
schema:
$ref: '#/components/schemas/SuccessResponse'
type: object
properties:
id:
type: string
description: Unique identifier for the user record
collectionId:
type: string
description: Identifier of the user collection
collectionName:
type: string
description: Name of the user collection
username:
type: string
description: Username of the registered user
verified:
type: boolean
description: Whether the user is verified
emailVisibility:
type: boolean
description: Whether the user's email is visible
email:
type: string
format: email
description: Email of the registered user
created:
type: string
format: date-time
description: Timestamp when the user was created
updated:
type: string
format: date-time
description: Timestamp when the user was last updated
name:
type: string
description: Name of the user
avatar:
type: string
description: Avatar filename for the user
'400':
description: Invalid registration data.
description: Bad request - validation error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'409':
description: User already exists.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error during registration.
type: object
properties:
code:
type: integer
example: 400
message:
type: string
description: Error message
example: "Failed to create record."
data:
type: object
additionalProperties:
type: object
properties:
code:
type: string
description: Validation error code
example: "validation_required"
message:
type: string
description: Validation error message
example: "Missing required value."
'403':
description: Forbidden - access denied
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'

/auth/login:
type: object
properties:
code:
type: integer
example: 403
message:
type: string
description: Error message
example: "You are not allowed to perform this request."
data:
type: object
description: Additional data (if any)
additionalProperties: false
/api/collections/users/auth-with-password:
post:
summary: Log in user
description: >
Expand Down Expand Up @@ -947,34 +1012,41 @@ components:
RegisterRequest:
type: object
properties:
username:
name:
type: string
description: The username of the user to register.
description: The name of the user to register.
password:
type: string
format: password
description: The password for the user.
passwordConfirm:
type: string
format: password
description: The password confirmation for the user.
email:
type: string
format: email
description: The email address of the user.
emailVisibility:
type: boolean
description: Whether to show/hide the auth record email when fetching the record data.
required:
- username
- name
- password
- email
- passwordConfirm

LoginRequest:
type: object
properties:
username:
identiry:
type: string
description: The username of the user.
description: The username or the email of the user.
password:
type: string
format: password
description: The password for the user.
required:
- username
- identity
- password

LoginResponse:
Expand Down

0 comments on commit b5e3b52

Please sign in to comment.