Skip to content
This repository was archived by the owner on Sep 25, 2025. It is now read-only.
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
96 changes: 70 additions & 26 deletions api/swagger.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -30,7 +30,9 @@
"paths": {
"/locations": {
"post": {
"tags": ["location"],
"tags": [
"location"
],
"summary": "Add a new location to the map",
"description": "",
"operationId": "addLocation",
Expand DownExpand Up@@ -75,7 +77,9 @@
}
},
"get": {
"tags": ["location"],
"tags": [
"location"
],
"summary": "Finds Locations by city, country etc",
"description": "Multiple status values can be provided as query params",
"operationId": "findLocations",
Expand DownExpand Up@@ -142,7 +146,9 @@
},
"/locations/{locationId}": {
"get": {
"tags": ["location"],
"tags": [
"location"
],
"summary": "Find location by ID",
"description": "Returns a single location",
"operationId": "getLocationById",
Expand All@@ -169,7 +175,6 @@
}
}
},

"404": {
"description": "Location not found"
},
Expand All@@ -186,7 +191,9 @@
}
},
"patch": {
"tags": ["location"],
"tags": [
"location"
],
"summary": "Update an existing location",
"description": "",
"operationId": "updateLocation",
Expand DownExpand Up@@ -243,7 +250,9 @@
}
},
"delete": {
"tags": ["location"],
"tags": [
"location"
],
"summary": "Deletes a location",
"description": "",
"operationId": "deleteLocation",
Expand DownExpand Up@@ -281,7 +290,9 @@
},
"/chapters": {
"post": {
"tags": ["chapter"],
"tags": [
"chapter"
],
"summary": "Add a new chapter",
"description": "",
"operationId": "addChapter",
Expand DownExpand Up@@ -325,7 +336,9 @@
},
"/chapters/{chapterId}": {
"get": {
"tags": ["chapter"],
"tags": [
"chapter"
],
"summary": "Retreive the details of a chapter",
"description": "",
"operationId": "findChapterById",
Expand DownExpand Up@@ -355,7 +368,6 @@
"401": {
"description": "Not authorized"
},

"404": {
"description": "Chapter not found"
},
Expand All@@ -374,7 +386,9 @@
},
"/chapters/{chapterId}/events": {
"get": {
"tags": ["chapter"],
"tags": [
"chapter"
],
"summary": "Retreive the events belonging to a chapter",
"description": "",
"operationId": "findEventsInChapter",
Expand DownExpand Up@@ -410,7 +424,6 @@
"401": {
"description": "Not authorized"
},

"404": {
"description": "Chapter not found"
},
Expand All@@ -429,7 +442,9 @@
},
"/chapters/{chapterId}/events/{eventId}": {
"get": {
"tags": ["chapter"],
"tags": [
"chapter"
],
"summary": "Retreive an event by id",
"description": "",
"operationId": "findEventById",
Expand DownExpand Up@@ -488,7 +503,9 @@
}
},
"delete": {
"tags": ["chapter"],
"tags": [
"chapter"
],
"summary": "Delete an event by id",
"description": "",
"operationId": "deleteEventById",
Expand DownExpand Up@@ -549,7 +566,9 @@
},
"/chapters/{chapterId}/events/{eventId}/sponsors": {
"get": {
"tags": ["chapter"],
"tags": [
"chapter"
],
"summary": "Retreive list of sponsors by event",
"description": "",
"operationId": "findSponsorsByEvent",
Expand DownExpand Up@@ -605,7 +624,9 @@
}
},
"post": {
"tags": ["chapter"],
"tags": [
"chapter"
],
"summary": "Add a new food, venue or other sponsor",
"description": "",
"operationId": "addSponsorToEvent",
Expand DownExpand Up@@ -677,7 +698,9 @@
},
"/chapters/{chapterId}/events/{eventId}/sponsors/{sponsorId}": {
"get": {
"tags": ["chapter"],
"tags": [
"chapter"
],
"summary": "Retreive sponsor by ID",
"description": "",
"operationId": "findSponsorById",
Expand DownExpand Up@@ -746,7 +769,9 @@
}
},
"delete": {
"tags": ["chapter"],
"tags": [
"chapter"
],
"summary": "Delete a sponsor by id",
"description": "",
"operationId": "deleteSponsorById",
Expand DownExpand Up@@ -815,7 +840,9 @@
}
},
"patch": {
"tags": ["chapter"],
"tags": [
"chapter"
],
"summary": "Update a sponsor by id",
"description": "",
"operationId": "updateSponsorById",
Expand DownExpand Up@@ -886,7 +913,9 @@
},
"/users": {
"post": {
"tags": ["user"],
"tags": [
"user"
],
"summary": "Add a new user",
"description": "",
"operationId": "addUser",
Expand DownExpand Up@@ -925,7 +954,9 @@
},
"/users/{userId}": {
"get": {
"tags": ["user"],
"tags": [
"user"
],
"summary": "Retreive the details of a user",
"description": "",
"operationId": "findUserById",
Expand DownExpand Up@@ -968,7 +999,9 @@
}
},
"patch": {
"tags": ["user"],
"tags": [
"user"
],
"summary": "Edit an existing user",
"description": "",
"operationId": "updateUser",
Expand DownExpand Up@@ -1022,7 +1055,9 @@
},
"/users/{userId}/ban": {
"patch": {
"tags": ["user"],
"tags": [
"user"
],
"summary": "Ban a user",
"description": "",
"operationId": "banUserById",
Expand DownExpand Up@@ -1134,6 +1169,9 @@
"description": {
"type": "string"
},
"category": {
"type": "string"
},
"details": {
"type": "string"
},
Expand All@@ -1152,7 +1190,6 @@
"type": "string",
"format": "uuid"
},

"name": {
"type": "string"
},
Expand DownExpand Up@@ -1181,7 +1218,11 @@
},
"SponsorType": {
"type": "string",
"enum": ["FOOD", "VENUE", "OTHER"]
"enum": [
"FOOD",
"VENUE",
"OTHER"
]
},
"Event": {
"type": "object",
Expand DownExpand Up@@ -1221,7 +1262,10 @@
},
"Error": {
"type": "object",
"required": ["code", "message"],
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "integer",
Expand All@@ -1234,4 +1278,4 @@
}
}
}
}
}
1 change: 1 addition & 0 deletions data/ddl.sql
Original file line numberDiff line numberDiff line change
Expand Up@@ -43,6 +43,7 @@ create table chapters
id uuid primary key ,
name text unique not null,
description text not null,
category text not null,
details jsonb,
location_id uuid references locations(id) not null,
creator_id uuid references users(id) not null,
Expand Down