Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ fmt: ## Format all go files
@go fmt ./...

check: ## Run static analysis on all go files
staticcheck ./...
staticcheck -f stylish ./...

test: check ## Run all tests
go test ./...
Expand Down
25 changes: 19 additions & 6 deletions internal/api/dbmodels/board.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 30 additions & 21 deletions internal/api/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const docTemplate = `{
"200": {
"description": "Announcement details",
"schema": {
"$ref": "#/definitions/dbmodels.Announcement"
"$ref": "#/definitions/dto.Announcement"
}
},
"404": {
Expand Down Expand Up @@ -1294,26 +1294,6 @@ const docTemplate = `{
}
},
"definitions": {
"dbmodels.Announcement": {
"type": "object",
"properties": {
"announce_at": {
"type": "integer"
},
"discord_channel_id": {
"$ref": "#/definitions/sql.NullString"
},
"discord_message_id": {
"$ref": "#/definitions/sql.NullString"
},
"uuid": {
"type": "string"
},
"visibility": {
"type": "string"
}
}
},
"dbmodels.CreateAnnouncementParams": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -1380,14 +1360,23 @@ const docTemplate = `{
"dbmodels.CreatePositionParams": {
"type": "object",
"properties": {
"full_name": {
"type": "string"
},
"oid": {
"type": "string"
},
"semester": {
"type": "string"
},
"team": {
"$ref": "#/definitions/sql.NullString"
},
"tier": {
"type": "integer"
},
"title": {
"$ref": "#/definitions/sql.NullString"
}
}
},
Expand Down Expand Up @@ -1608,6 +1597,26 @@ const docTemplate = `{
}
}
},
"dto.Announcement": {
"type": "object",
"properties": {
"announce_at": {
"type": "integer"
},
"discord_channel_id": {
"type": "string"
},
"discord_message_id": {
"type": "string"
},
"uuid": {
"type": "string"
},
"visibility": {
"type": "string"
}
}
},
"sql.NullBool": {
"type": "object",
"properties": {
Expand Down
51 changes: 30 additions & 21 deletions internal/api/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"200": {
"description": "Announcement details",
"schema": {
"$ref": "#/definitions/dbmodels.Announcement"
"$ref": "#/definitions/dto.Announcement"
}
},
"404": {
Expand Down Expand Up @@ -1283,26 +1283,6 @@
}
},
"definitions": {
"dbmodels.Announcement": {
"type": "object",
"properties": {
"announce_at": {
"type": "integer"
},
"discord_channel_id": {
"$ref": "#/definitions/sql.NullString"
},
"discord_message_id": {
"$ref": "#/definitions/sql.NullString"
},
"uuid": {
"type": "string"
},
"visibility": {
"type": "string"
}
}
},
"dbmodels.CreateAnnouncementParams": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -1369,14 +1349,23 @@
"dbmodels.CreatePositionParams": {
"type": "object",
"properties": {
"full_name": {
"type": "string"
},
"oid": {
"type": "string"
},
"semester": {
"type": "string"
},
"team": {
"$ref": "#/definitions/sql.NullString"
},
"tier": {
"type": "integer"
},
"title": {
"$ref": "#/definitions/sql.NullString"
}
}
},
Expand Down Expand Up @@ -1597,6 +1586,26 @@
}
}
},
"dto.Announcement": {
"type": "object",
"properties": {
"announce_at": {
"type": "integer"
},
"discord_channel_id": {
"type": "string"
},
"discord_message_id": {
"type": "string"
},
"uuid": {
"type": "string"
},
"visibility": {
"type": "string"
}
}
},
"sql.NullBool": {
"type": "object",
"properties": {
Expand Down
34 changes: 20 additions & 14 deletions internal/api/docs/swagger.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
definitions:
dbmodels.Announcement:
properties:
announce_at:
type: integer
discord_channel_id:
$ref: '#/definitions/sql.NullString'
discord_message_id:
$ref: '#/definitions/sql.NullString'
uuid:
type: string
visibility:
type: string
type: object
dbmodels.CreateAnnouncementParams:
properties:
announce_at:
Expand Down Expand Up @@ -55,12 +42,18 @@ definitions:
type: object
dbmodels.CreatePositionParams:
properties:
full_name:
type: string
oid:
type: string
semester:
type: string
team:
$ref: '#/definitions/sql.NullString'
tier:
type: integer
title:
$ref: '#/definitions/sql.NullString'
type: object
dbmodels.CreateTierParams:
properties:
Expand Down Expand Up @@ -203,6 +196,19 @@ definitions:
title:
$ref: '#/definitions/sql.NullString'
type: object
dto.Announcement:
properties:
announce_at:
type: integer
discord_channel_id:
type: string
discord_message_id:
type: string
uuid:
type: string
visibility:
type: string
type: object
sql.NullBool:
properties:
bool:
Expand Down Expand Up @@ -317,7 +323,7 @@ paths:
"200":
description: Announcement details
schema:
$ref: '#/definitions/dbmodels.Announcement'
$ref: '#/definitions/dto.Announcement'
"404":
description: Not Found
schema:
Expand Down
Loading