Skip to content
Draft
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
15 changes: 3 additions & 12 deletions fixtures/event_update_full.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
{
"uuid": "workshop-intro-to-git",
"location": {
"string": "Virtual - Discord",
"valid": true
},
"location": "Virtual - Discord",
"start_at": 1712865600000,
"end_at": 1712872800000,
"is_all_day": {
"bool": false,
"valid": true
},
"host": {
"string": "ACM AI",
"valid": true
}
"is_all_day": false,
"host": "ACM AI"
}
5 changes: 1 addition & 4 deletions fixtures/event_update_location.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"uuid": "workshop-intro-to-git",
"location": {
"string": "CS-101",
"valid": true
}
"location": "CS-101"
}
15 changes: 3 additions & 12 deletions fixtures/event_update_partial.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
{
"uuid": "event3",
"location": {
"string": "Updated Location",
"valid": true
},
"location": "Updated Location",
"start_at": 1712851200000,
"end_at": 1712851200000,
"is_all_day": {
"bool": true,
"valid": true
},
"host": {
"string": "Updated Host",
"valid": true
}
"is_all_day": true,
"host": "Updated Host"
}
136 changes: 47 additions & 89 deletions internal/api/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,7 @@ const docTemplate = `{
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/dbmodels.Event"
"$ref": "#/definitions/dto.Event"
}
}
},
Expand Down Expand Up @@ -1089,7 +1089,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dbmodels.CreateEventParams"
"$ref": "#/definitions/dto.Event"
}
}
],
Expand Down Expand Up @@ -1148,7 +1148,7 @@ const docTemplate = `{
"200": {
"description": "Event details",
"schema": {
"$ref": "#/definitions/dbmodels.Event"
"$ref": "#/definitions/dto.Event"
}
},
"404": {
Expand Down Expand Up @@ -1197,7 +1197,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dbmodels.UpdateEventParams"
"$ref": "#/definitions/dto.UpdateEvent"
}
}
],
Expand Down Expand Up @@ -1294,31 +1294,6 @@ const docTemplate = `{
}
},
"definitions": {
"dbmodels.CreateEventParams": {
"type": "object",
"properties": {
"endAt": {
"type": "integer",
"format": "int64"
},
"host": {
"type": "string"
},
"isAllDay": {
"type": "boolean"
},
"location": {
"type": "string"
},
"startAt": {
"type": "integer",
"format": "int64"
},
"uuid": {
"type": "string"
}
}
},
"dbmodels.CreatePositionParams": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -1376,31 +1351,6 @@ const docTemplate = `{
}
}
},
"dbmodels.Event": {
"type": "object",
"properties": {
"endAt": {
"type": "integer",
"format": "int64"
},
"host": {
"type": "string"
},
"isAllDay": {
"type": "boolean"
},
"location": {
"type": "string"
},
"startAt": {
"type": "integer",
"format": "int64"
},
"uuid": {
"type": "string"
}
}
},
"dbmodels.Position": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -1443,29 +1393,6 @@ const docTemplate = `{
}
}
},
"dbmodels.UpdateEventParams": {
"type": "object",
"properties": {
"endAt": {
"$ref": "#/definitions/sql.NullInt64"
},
"host": {
"$ref": "#/definitions/sql.NullString"
},
"isAllDay": {
"$ref": "#/definitions/sql.NullBool"
},
"location": {
"$ref": "#/definitions/sql.NullString"
},
"startAt": {
"$ref": "#/definitions/sql.NullInt64"
},
"uuid": {
"type": "string"
}
}
},
"dbmodels.UpdatePositionParams": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -1528,6 +1455,29 @@ const docTemplate = `{
}
}
},
"dto.Event": {
"type": "object",
"properties": {
"end_at": {
"type": "integer"
},
"host": {
"type": "string"
},
"is_all_day": {
"type": "boolean"
},
"location": {
"type": "string"
},
"start_at": {
"type": "integer"
},
"uuid": {
"type": "string"
}
}
},
"dto.Officer": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -1568,6 +1518,26 @@ const docTemplate = `{
}
}
},
"dto.UpdateEvent": {
"type": "object",
"properties": {
"end_at": {
"type": "integer"
},
"host": {
"type": "string"
},
"is_all_day": {
"type": "boolean"
},
"location": {
"type": "string"
},
"start_at": {
"type": "integer"
}
}
},
"dto.UpdateOfficer": {
"type": "object",
"properties": {
Expand All @@ -1585,18 +1555,6 @@ const docTemplate = `{
}
}
},
"sql.NullBool": {
"type": "object",
"properties": {
"bool": {
"type": "boolean"
},
"valid": {
"description": "Valid is true if Bool is not NULL",
"type": "boolean"
}
}
},
"sql.NullInt64": {
"type": "object",
"properties": {
Expand Down
Loading
Loading