-
Notifications
You must be signed in to change notification settings - Fork 0
ApiDocs (JSON)
Takiainen edited this page Feb 7, 2023
·
3 revisions
{
"openapi": "3.0.1",
"info": {
"title": "OpenAPI definition",
"version": "v0"
},
"servers": [
{
"url": "http://localhost:8080",
"description": "Generated server url"
}
],
"paths": {
"/api/event/edit": {
"put": {
"tags": [
"event-controller"
],
"summary": "Edit an existing event.",
"operationId": "editEvent",
"parameters": [
{
"name": "loggedInUser",
"description": "Not required. Automatically added currently logged in user."
},
{
"name": "usersLocale",
"description": "Automatically inserted based on request headers."
},
{
"name": "userTimeZone",
"description": "Automatically inserted based on request headers."
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Event"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Event editing successful."
},
"401": {
"description": "Unauthorized."
},
"404": {
"description": "Unable to edit. Old event not found.",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"406": {
"description": "Not Acceptable",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/api/event/archive/{eventId}": {
"put": {
"tags": [
"event-controller"
],
"summary": "Archive an event.",
"operationId": "archiveEvent",
"parameters": [
{
"name": "eventId",
"in": "path",
"description": "Event's id.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "loggedInUser",
"description": "Not required. Automatically added currently logged in user."
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Event"
}
}
}
},
"responses": {
"200": {
"description": "Event archiving successful."
},
"401": {
"description": "Unauthorized."
},
"404": {
"description": "Unable to archive event. Event was not found.",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"406": {
"description": "Not Acceptable",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/api/admin/users/edit/": {
"put": {
"tags": [
"user-controller"
],
"summary": "Edit an existing users.",
"operationId": "editUser",
"parameters": [
{
"name": "loggedInUser",
"description": "Not required. Automatically added currently logged in user."
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/User"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "User editing successful."
},
"401": {
"description": "Unauthenticated."
},
"404": {
"description": "Not Found",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"406": {
"description": "Not Acceptable",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/api/signup/{eventId}/add": {
"post": {
"tags": [
"signup-controller"
],
"summary": "Signup for an event (i.e. add a participant).",
"operationId": "addParticipantToEvent",
"parameters": [
{
"name": "usersLocale",
"description": "Automatically inserted based on request headers."
},
{
"name": "userTimeZone",
"description": "Automatically inserted based on request headers."
},
{
"name": "eventId",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Participant"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Signup successful."
},
"404": {
"description": "Event not found.",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"406": {
"description": "Not Acceptable",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/api/event/create": {
"post": {
"tags": [
"event-controller"
],
"summary": "Create a new event.",
"operationId": "createEvent",
"parameters": [
{
"name": "loggedInUser",
"description": "Not required. Automatically added currently logged in user."
},
{
"name": "usersLocale",
"description": "Automatically inserted based on request headers."
},
{
"name": "userTimeZone",
"description": "Automatically inserted based on request headers."
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Event"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Event creation successful."
},
"401": {
"description": "Unauthorized."
},
"404": {
"description": "Not Found",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"406": {
"description": "Not Acceptable",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/api/event/banner/add": {
"post": {
"tags": [
"image-controller"
],
"summary": "Upload a new banner image.",
"operationId": "addBannerImg",
"parameters": [
{
"name": "file",
"description": "Raw bytes of the image being uploaded."
},
{
"name": "loggedInUser",
"description": "Not required. Automatically added currently logged in user."
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"file": {
"type": "object",
"properties": {
"short": {
"type": "integer",
"format": "int32"
},
"char": {
"type": "string"
},
"int": {
"type": "integer",
"format": "int32"
},
"long": {
"type": "integer",
"format": "int64"
},
"float": {
"type": "number",
"format": "float"
},
"double": {
"type": "number",
"format": "double"
},
"direct": {
"type": "boolean"
},
"readOnly": {
"type": "boolean"
}
}
},
"loggedInUser": {
"$ref": "#/components/schemas/User"
}
}
}
}
},
"required": true
},
"responses": {
"303": {
"description": "Redirect to /api/event/banner/{fileName}.",
"content": {
"*/*": {
"schema": {
"$ref": "#/components/schemas/RedirectView"
}
}
}
},
"401": {
"description": "Unauthenticated",
"content": {
"*/*": {
"schema": {
"$ref": "#/components/schemas/RedirectView"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"406": {
"description": "Invalid image file/file not an image.",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"500": {
"description": "Target directory creation failed.",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/api/auth/authenticate": {
"post": {
"tags": [
"auth-controller"
],
"summary": "Try to authenticate a user.",
"operationId": "login",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AuthCredentialsRequest"
}
}
},
"required": true
},
"responses": {
"303": {
"description": "Authentication was successful. Do a get request to get data.",
"content": {
"*/*": {
"schema": {
"type": "object"
}
}
}
},
"401": {
"description": "Authentication was unsuccessful.",
"content": {
"*/*": {
"schema": {
"type": "object"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"406": {
"description": "Not Acceptable",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/api/admin/users/add": {
"post": {
"tags": [
"user-controller"
],
"summary": "Add a new user to the system.",
"operationId": "addUser",
"parameters": [
{
"name": "loggedInUser",
"description": "Not required. Automatically added currently logged in user."
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/User"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "New user adding successful."
},
"401": {
"description": "Unauthenticated."
},
"404": {
"description": "Not Found",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"406": {
"description": "Not Acceptable",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/api/signup/{eventId}": {
"get": {
"tags": [
"signup-controller"
],
"summary": "Get an event for signup purposes.",
"operationId": "getEventForSignup",
"parameters": [
{
"name": "eventId",
"in": "path",
"description": "Event's id",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "usersLocale",
"description": "Automatically inserted based on request headers."
},
{
"name": "userTimeZone",
"description": "Automatically inserted based on request headers."
}
],
"responses": {
"200": {
"description": "The event requested.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SignupEvent"
}
}
}
},
"404": {
"description": "Event was already held.",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"406": {
"description": "Not Acceptable",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"409": {
"description": "Signup not started/signup already ended/event full. See the message in response for details.",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/api/signup/upcomingEvents/{days}": {
"get": {
"tags": [
"signup-controller"
],
"summary": "Get a list of upcoming events at to selected days.",
"operationId": "getUpcomingEvents",
"parameters": [
{
"name": "days",
"in": "path",
"description": "How many days into the future events are wanted.",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "The events requested.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SignupEvent"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"406": {
"description": "Not Acceptable",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/api/event/participants/{eventId}": {
"get": {
"tags": [
"event-controller"
],
"summary": "Get participants for an event by event's id.",
"operationId": "getParticipants",
"parameters": [
{
"name": "eventId",
"in": "path",
"description": "Event's id.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "loggedInUser",
"in": "query",
"description": "Not required. Automatically added currently logged in user.",
"required": true,
"schema": {
"$ref": "#/components/schemas/User"
}
}
],
"responses": {
"200": {
"description": "Participants of the requested event. List can be empty.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Participant"
}
}
}
},
"401": {
"description": "Unauthorized.",
"content": {
"*/*": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Participant"
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"406": {
"description": "Not Acceptable",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/api/event/get/{eventId}": {
"get": {
"tags": [
"event-controller"
],
"summary": "Get an event by its id.",
"operationId": "getEvent",
"parameters": [
{
"name": "eventId",
"in": "path",
"description": "Requested events id.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "loggedInUser",
"in": "query",
"description": "Not required. Automatically added currently logged in user.",
"required": true,
"schema": {
"$ref": "#/components/schemas/User"
}
}
],
"responses": {
"200": {
"description": "Requested event.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Event"
}
}
}
},
"401": {
"description": "Unauthorized.",
"content": {
"*/*": {
"schema": {
"$ref": "#/components/schemas/Event"
}
}
}
},
"404": {
"description": "Event not found.",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"406": {
"description": "Not Acceptable",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/api/event/banner/{fileName}": {
"get": {
"tags": [
"image-controller"
],
"summary": "Get file path for the uploaded banner image.",
"operationId": "getBannerImagePath",
"parameters": [
{
"name": "fileName",
"in": "path",
"description": "Filename generated when saving an image.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "loggedInUser",
"in": "query",
"description": "Not required. Automatically added currently logged in user.",
"required": true,
"schema": {
"$ref": "#/components/schemas/User"
}
}
],
"responses": {
"200": {
"description": "Json: {'fileName': fileName}",
"content": {
"*/*": {
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"406": {
"description": "Not Acceptable",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/api/event/banner/get/{fileName}": {
"get": {
"tags": [
"image-controller"
],
"summary": "Get a banner image.",
"operationId": "getBannerImage",
"parameters": [
{
"name": "fileName",
"in": "path",
"description": "File's name we want.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "loggedInUser",
"in": "query",
"description": "Automatically added currently logged in user.",
"required": true,
"schema": {
"$ref": "#/components/schemas/User"
}
}
],
"responses": {
"200": {
"description": "The file requested.",
"content": {
"image/png": {
"schema": {
"type": "array",
"items": {
"type": "string",
"format": "byte"
}
}
},
"image/jpeg": {
"schema": {
"type": "array",
"items": {
"type": "string",
"format": "byte"
}
}
},
"image/gif": {
"schema": {
"type": "array",
"items": {
"type": "string",
"format": "byte"
}
}
}
}
},
"404": {
"description": "File not found.",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"406": {
"description": "Not Acceptable",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/api/event/all/{user}": {
"get": {
"tags": [
"event-controller"
],
"summary": "Get all events for a user.",
"operationId": "getAllEventsForUser",
"parameters": [
{
"description": "User's id."
},
{
"name": "loggedInUser",
"in": "query",
"description": "Not required. Automatically added currently logged in user.",
"required": true,
"schema": {
"$ref": "#/components/schemas/User"
}
},
{
"name": "user",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "All events of the user. List can be empty.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Event"
}
}
}
},
"401": {
"description": "Unauthorized.",
"content": {
"*/*": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Event"
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"406": {
"description": "Not Acceptable",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/api/auth/creds/{id}": {
"get": {
"tags": [
"auth-controller"
],
"summary": "Get needed login data so client side scripts can work.",
"operationId": "getCredentials",
"parameters": [
{
"name": "id",
"in": "path",
"description": "Id in cache the data was stored to (created during the post call).",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "The requested data.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AuthCredentialsResponse"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"406": {
"description": "Not Acceptable",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/api/admin/users/all": {
"get": {
"tags": [
"user-controller"
],
"summary": "Get all non-admin users for admin view.",
"operationId": "getAllNonAdminUsers",
"parameters": [
{
"name": "loggedInUser",
"in": "query",
"required": true,
"schema": {
"$ref": "#/components/schemas/User"
}
}
],
"responses": {
"200": {
"description": "All participants in the specific event.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/User"
}
}
}
},
"401": {
"description": "Unauthenticated.",
"content": {
"*/*": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/User"
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"406": {
"description": "Not Acceptable",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/api/admin/participants/{eventId}": {
"get": {
"tags": [
"admin-controller"
],
"summary": "Gets all participants for a specific event.",
"operationId": "getAllParticipantsForEvent",
"parameters": [
{
"name": "eventId",
"in": "path",
"description": "Event's id.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "loggedInUser",
"in": "query",
"description": "Not required. Automatically added currently logged in user.",
"required": true,
"schema": {
"$ref": "#/components/schemas/User"
}
}
],
"responses": {
"200": {
"description": "All participants in the specific event.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Participant"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"406": {
"description": "Not Acceptable",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/api/admin/participants/all": {
"get": {
"tags": [
"admin-controller"
],
"summary": "Gets all participants for admin view.",
"operationId": "getAllParticipants",
"parameters": [
{
"name": "loggedInUser",
"in": "query",
"description": "Not required. Automatically added currently logged in user.",
"required": true,
"schema": {
"$ref": "#/components/schemas/User"
}
}
],
"responses": {
"200": {
"description": "All participants in all events.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Participant"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"406": {
"description": "Not Acceptable",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/api/admin/event/{userId}": {
"get": {
"tags": [
"admin-controller"
],
"summary": "Get all events of a specific user to admin view.",
"operationId": "getAllEventsForUser_1",
"parameters": [
{
"name": "loggedInUser",
"in": "query",
"description": "Not required. Automatically added currently logged in user.",
"required": true,
"schema": {
"$ref": "#/components/schemas/User"
}
},
{
"name": "userId",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "All events for the specific user.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Event"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"406": {
"description": "Not Acceptable",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/api/admin/event/all": {
"get": {
"tags": [
"admin-controller"
],
"summary": "Gets all events for admin view.",
"operationId": "getAllEvents",
"parameters": [
{
"name": "loggedInUser",
"in": "query",
"description": "Not required. Automatically added currently logged in user.",
"required": true,
"schema": {
"$ref": "#/components/schemas/User"
}
}
],
"responses": {
"200": {
"description": "All events.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Event"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"406": {
"description": "Not Acceptable",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/api/signup/cancel/{eventId}/{participantId}": {
"delete": {
"tags": [
"signup-controller"
],
"summary": "Cancel participation to an event.",
"operationId": "removeParticipantFromEvent",
"parameters": [
{
"name": "eventId",
"in": "path",
"description": "Event's id where to cancel from.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "participantId",
"in": "path",
"description": "Participant's id (who's cancelling).",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "usersLocale",
"description": "Automatically inserted based on request headers."
},
{
"name": "userTimeZone",
"description": "Automatically inserted based on request headers."
}
],
"responses": {
"200": {
"description": "Cancellation successful."
},
"404": {
"description": "Event not found",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"406": {
"description": "Not Acceptable",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/api/event/remove/{eventId}": {
"delete": {
"tags": [
"event-controller"
],
"summary": "Delete an event.",
"operationId": "removeEvent",
"parameters": [
{
"name": "eventId",
"in": "path",
"description": "Event's id.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "loggedInUser",
"description": "Not required. Automatically added currently logged in user."
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/User"
}
}
}
},
"responses": {
"200": {
"description": "Event deleted successfully."
},
"401": {
"description": "Unauthorized."
},
"404": {
"description": "Not Found",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"406": {
"description": "Not Acceptable",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/api/admin/users/delete/{userId}": {
"delete": {
"tags": [
"user-controller"
],
"summary": "Deletes an user by their id.",
"operationId": "deleteUser",
"parameters": [
{
"name": "userId",
"in": "path",
"description": "Id of the user to delete.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "loggedInUser",
"description": "Not required. Automatically added currently logged in user."
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/User"
}
}
}
},
"responses": {
"200": {
"description": "Delete was successful."
},
"401": {
"description": "Unauthenticated."
},
"404": {
"description": "Not Found",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"406": {
"description": "Not Acceptable",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/api/admin/users/delete/all": {
"delete": {
"tags": [
"user-controller"
],
"summary": "Delete ALL non-admin users.",
"operationId": "deleteAllNonAdminUsers",
"parameters": [
{
"name": "loggedInUser",
"description": "Not required. Automatically added currently logged in user."
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/User"
}
}
}
},
"responses": {
"200": {
"description": "Delete was successful."
},
"401": {
"description": "Unauthenticated."
},
"404": {
"description": "Not Found",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"406": {
"description": "Not Acceptable",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"Event": {
"required": [
"description",
"form",
"name",
"place",
"startDate"
],
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"startDate": {
"type": "string",
"format": "date-time"
},
"place": {
"type": "string"
},
"description": {
"type": "string"
},
"form": {
"$ref": "#/components/schemas/Form"
},
"owner": {
"type": "string"
},
"endDate": {
"type": "string",
"format": "date-time"
},
"minParticipants": {
"type": "integer",
"format": "int32"
},
"maxParticipants": {
"type": "integer",
"format": "int32"
},
"signupStarts": {
"type": "string",
"format": "date-time"
},
"signupEnds": {
"type": "string",
"format": "date-time"
},
"quotas": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"type": "object"
}
}
},
"price": {
"type": "number",
"format": "double"
},
"bannerImg": {
"type": "string"
},
"otherData": {
"type": "object",
"additionalProperties": {
"type": "object"
}
},
"metaData": {
"type": "object",
"additionalProperties": {
"type": "object"
}
}
}
},
"Form": {
"required": [
"formData"
],
"type": "object",
"properties": {
"dateCreated": {
"type": "string",
"format": "date-time"
},
"formData": {
"type": "object",
"additionalProperties": {
"type": "object"
}
},
"userCreated": {
"type": "string"
}
}
},
"GrantedAuthority": {
"type": "object",
"properties": {
"authority": {
"type": "string"
}
}
},
"User": {
"required": [
"email",
"firstName",
"lastName",
"password",
"username"
],
"type": "object",
"properties": {
"id": {
"type": "string"
},
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"email": {
"type": "string"
},
"password": {
"type": "string"
},
"username": {
"type": "string"
},
"expirationDate": {
"type": "string",
"format": "date-time"
},
"userRole": {
"type": "string",
"enum": [
"ROLE_ADMIN",
"ROLE_USER",
"ADMIN",
"USER"
]
},
"locked": {
"type": "boolean"
},
"enabled": {
"type": "boolean"
},
"authorities": {
"type": "array",
"items": {
"$ref": "#/components/schemas/GrantedAuthority"
}
},
"admin": {
"type": "boolean"
},
"accountNonExpired": {
"type": "boolean"
},
"credentialsNonExpired": {
"type": "boolean"
},
"accountNonLocked": {
"type": "boolean"
}
}
},
"Participant": {
"required": [
"email",
"event",
"name"
],
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"event": {
"type": "string"
},
"gender": {
"type": "string",
"enum": [
"M",
"F",
"X"
]
},
"mealChoice": {
"type": "string",
"enum": [
"meat",
"vegetarian"
]
},
"drinkChoice": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"belongsToQuota": {
"type": "string"
},
"isMember": {
"type": "boolean"
},
"hasPaid": {
"type": "boolean"
},
"signupTime": {
"type": "string",
"format": "date-time"
},
"otherData": {
"type": "object",
"additionalProperties": {
"type": "object"
}
},
"metaData": {
"type": "object",
"additionalProperties": {
"type": "object"
}
}
}
},
"ApplicationContext": {
"type": "object",
"properties": {
"parent": {
"$ref": "#/components/schemas/ApplicationContext"
},
"id": {
"type": "string"
},
"displayName": {
"type": "string"
},
"autowireCapableBeanFactory": {
"$ref": "#/components/schemas/AutowireCapableBeanFactory"
},
"applicationName": {
"type": "string"
},
"startupDate": {
"type": "integer",
"format": "int64"
},
"environment": {
"$ref": "#/components/schemas/Environment"
},
"beanDefinitionCount": {
"type": "integer",
"format": "int32"
},
"beanDefinitionNames": {
"type": "array",
"items": {
"type": "string"
}
},
"parentBeanFactory": {
"$ref": "#/components/schemas/BeanFactory"
},
"classLoader": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"registeredAsParallelCapable": {
"type": "boolean"
},
"parent": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"registeredAsParallelCapable": {
"type": "boolean"
},
"unnamedModule": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"classLoader": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"registeredAsParallelCapable": {
"type": "boolean"
},
"definedPackages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"annotations": {
"type": "array",
"items": {
"type": "object"
}
},
"declaredAnnotations": {
"type": "array",
"items": {
"type": "object"
}
},
"sealed": {
"type": "boolean"
},
"specificationTitle": {
"type": "string"
},
"specificationVersion": {
"type": "string"
},
"specificationVendor": {
"type": "string"
},
"implementationTitle": {
"type": "string"
},
"implementationVersion": {
"type": "string"
},
"implementationVendor": {
"type": "string"
}
}
}
},
"defaultAssertionStatus": {
"type": "boolean",
"writeOnly": true
}
}
},
"descriptor": {
"type": "object",
"properties": {
"open": {
"type": "boolean"
},
"automatic": {
"type": "boolean"
}
}
},
"named": {
"type": "boolean"
},
"annotations": {
"type": "array",
"items": {
"type": "object"
}
},
"declaredAnnotations": {
"type": "array",
"items": {
"type": "object"
}
},
"packages": {
"uniqueItems": true,
"type": "array",
"items": {
"type": "string"
}
},
"layer": {
"type": "object"
}
}
},
"definedPackages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"annotations": {
"type": "array",
"items": {
"type": "object"
}
},
"declaredAnnotations": {
"type": "array",
"items": {
"type": "object"
}
},
"sealed": {
"type": "boolean"
},
"specificationTitle": {
"type": "string"
},
"specificationVersion": {
"type": "string"
},
"specificationVendor": {
"type": "string"
},
"implementationTitle": {
"type": "string"
},
"implementationVersion": {
"type": "string"
},
"implementationVendor": {
"type": "string"
}
}
}
},
"defaultAssertionStatus": {
"type": "boolean",
"writeOnly": true
}
}
},
"unnamedModule": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"classLoader": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"registeredAsParallelCapable": {
"type": "boolean"
},
"definedPackages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"annotations": {
"type": "array",
"items": {
"type": "object"
}
},
"declaredAnnotations": {
"type": "array",
"items": {
"type": "object"
}
},
"sealed": {
"type": "boolean"
},
"specificationTitle": {
"type": "string"
},
"specificationVersion": {
"type": "string"
},
"specificationVendor": {
"type": "string"
},
"implementationTitle": {
"type": "string"
},
"implementationVersion": {
"type": "string"
},
"implementationVendor": {
"type": "string"
}
}
}
},
"defaultAssertionStatus": {
"type": "boolean",
"writeOnly": true
}
}
},
"descriptor": {
"type": "object",
"properties": {
"open": {
"type": "boolean"
},
"automatic": {
"type": "boolean"
}
}
},
"named": {
"type": "boolean"
},
"annotations": {
"type": "array",
"items": {
"type": "object"
}
},
"declaredAnnotations": {
"type": "array",
"items": {
"type": "object"
}
},
"packages": {
"uniqueItems": true,
"type": "array",
"items": {
"type": "string"
}
},
"layer": {
"type": "object"
}
}
},
"definedPackages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"annotations": {
"type": "array",
"items": {
"type": "object"
}
},
"declaredAnnotations": {
"type": "array",
"items": {
"type": "object"
}
},
"sealed": {
"type": "boolean"
},
"specificationTitle": {
"type": "string"
},
"specificationVersion": {
"type": "string"
},
"specificationVendor": {
"type": "string"
},
"implementationTitle": {
"type": "string"
},
"implementationVersion": {
"type": "string"
},
"implementationVendor": {
"type": "string"
}
}
}
},
"defaultAssertionStatus": {
"type": "boolean",
"writeOnly": true
}
}
}
}
},
"AutowireCapableBeanFactory": {
"type": "object"
},
"BeanFactory": {
"type": "object"
},
"Environment": {
"type": "object",
"properties": {
"activeProfiles": {
"type": "array",
"items": {
"type": "string"
}
},
"defaultProfiles": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"RedirectView": {
"type": "object",
"properties": {
"applicationContext": {
"$ref": "#/components/schemas/ApplicationContext"
},
"servletContext": {
"type": "object",
"properties": {
"classLoader": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"registeredAsParallelCapable": {
"type": "boolean"
},
"definedPackages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"annotations": {
"type": "array",
"items": {
"type": "object"
}
},
"declaredAnnotations": {
"type": "array",
"items": {
"type": "object"
}
},
"sealed": {
"type": "boolean"
},
"specificationTitle": {
"type": "string"
},
"specificationVersion": {
"type": "string"
},
"specificationVendor": {
"type": "string"
},
"implementationTitle": {
"type": "string"
},
"implementationVersion": {
"type": "string"
},
"implementationVendor": {
"type": "string"
}
}
}
},
"defaultAssertionStatus": {
"type": "boolean",
"writeOnly": true
}
}
},
"majorVersion": {
"type": "integer",
"format": "int32"
},
"minorVersion": {
"type": "integer",
"format": "int32"
},
"contextPath": {
"type": "string"
},
"effectiveMajorVersion": {
"type": "integer",
"format": "int32"
},
"servletContextName": {
"type": "string"
},
"effectiveMinorVersion": {
"type": "integer",
"format": "int32"
},
"servletRegistrations": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"mappings": {
"type": "array",
"items": {
"type": "string"
}
},
"runAsRole": {
"type": "string"
},
"name": {
"type": "string"
},
"className": {
"type": "string"
},
"initParameters": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"initParameterNames": {
"type": "object"
},
"virtualServerName": {
"type": "string"
},
"sessionCookieConfig": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"path": {
"type": "string"
},
"comment": {
"type": "string"
},
"secure": {
"type": "boolean"
},
"maxAge": {
"type": "integer",
"format": "int32"
},
"httpOnly": {
"type": "boolean"
},
"domain": {
"type": "string"
}
}
},
"sessionTrackingModes": {
"uniqueItems": true,
"type": "array",
"writeOnly": true,
"items": {
"type": "string",
"enum": [
"COOKIE",
"URL",
"SSL"
]
}
},
"effectiveSessionTrackingModes": {
"uniqueItems": true,
"type": "array",
"items": {
"type": "string",
"enum": [
"COOKIE",
"URL",
"SSL"
]
}
},
"requestCharacterEncoding": {
"type": "string"
},
"responseCharacterEncoding": {
"type": "string"
},
"jspConfigDescriptor": {
"type": "object",
"properties": {
"jspPropertyGroups": {
"type": "array",
"items": {
"type": "object",
"properties": {
"buffer": {
"type": "string"
},
"deferredSyntaxAllowedAsLiteral": {
"type": "string"
},
"errorOnUndeclaredNamespace": {
"type": "string"
},
"scriptingInvalid": {
"type": "string"
},
"trimDirectiveWhitespaces": {
"type": "string"
},
"defaultContentType": {
"type": "string"
},
"urlPatterns": {
"type": "array",
"items": {
"type": "string"
}
},
"includePreludes": {
"type": "array",
"items": {
"type": "string"
}
},
"pageEncoding": {
"type": "string"
},
"isXml": {
"type": "string"
},
"includeCodas": {
"type": "array",
"items": {
"type": "string"
}
},
"elIgnored": {
"type": "string"
}
}
}
},
"taglibs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"taglibURI": {
"type": "string"
},
"taglibLocation": {
"type": "string"
}
}
}
}
}
},
"defaultSessionTrackingModes": {
"uniqueItems": true,
"type": "array",
"items": {
"type": "string",
"enum": [
"COOKIE",
"URL",
"SSL"
]
}
},
"filterRegistrations": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"urlPatternMappings": {
"type": "array",
"items": {
"type": "string"
}
},
"servletNameMappings": {
"type": "array",
"items": {
"type": "string"
}
},
"name": {
"type": "string"
},
"className": {
"type": "string"
},
"initParameters": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"servletNames": {
"type": "object",
"deprecated": true
},
"servlets": {
"type": "object",
"deprecated": true
},
"serverInfo": {
"type": "string"
},
"attributeNames": {
"type": "object"
},
"sessionTimeout": {
"type": "integer",
"format": "int32"
}
},
"writeOnly": true
},
"contentType": {
"type": "string"
},
"requestContextAttribute": {
"type": "string"
},
"staticAttributes": {
"type": "object",
"additionalProperties": {
"type": "object"
}
},
"exposePathVariables": {
"type": "boolean"
},
"exposeContextBeansAsAttributes": {
"type": "boolean",
"writeOnly": true
},
"exposedContextBeanNames": {
"type": "array",
"writeOnly": true,
"items": {
"type": "string"
}
},
"beanName": {
"type": "string"
},
"url": {
"type": "string"
},
"contextRelative": {
"type": "boolean",
"writeOnly": true
},
"http10Compatible": {
"type": "boolean",
"writeOnly": true
},
"exposeModelAttributes": {
"type": "boolean",
"writeOnly": true
},
"encodingScheme": {
"type": "string",
"writeOnly": true
},
"statusCode": {
"type": "string",
"writeOnly": true,
"enum": [
"100 CONTINUE",
"101 SWITCHING_PROTOCOLS",
"102 PROCESSING",
"103 CHECKPOINT",
"200 OK",
"201 CREATED",
"202 ACCEPTED",
"203 NON_AUTHORITATIVE_INFORMATION",
"204 NO_CONTENT",
"205 RESET_CONTENT",
"206 PARTIAL_CONTENT",
"207 MULTI_STATUS",
"208 ALREADY_REPORTED",
"226 IM_USED",
"300 MULTIPLE_CHOICES",
"301 MOVED_PERMANENTLY",
"302 FOUND",
"302 MOVED_TEMPORARILY",
"303 SEE_OTHER",
"304 NOT_MODIFIED",
"305 USE_PROXY",
"307 TEMPORARY_REDIRECT",
"308 PERMANENT_REDIRECT",
"400 BAD_REQUEST",
"401 UNAUTHORIZED",
"402 PAYMENT_REQUIRED",
"403 FORBIDDEN",
"404 NOT_FOUND",
"405 METHOD_NOT_ALLOWED",
"406 NOT_ACCEPTABLE",
"407 PROXY_AUTHENTICATION_REQUIRED",
"408 REQUEST_TIMEOUT",
"409 CONFLICT",
"410 GONE",
"411 LENGTH_REQUIRED",
"412 PRECONDITION_FAILED",
"413 PAYLOAD_TOO_LARGE",
"413 REQUEST_ENTITY_TOO_LARGE",
"414 URI_TOO_LONG",
"414 REQUEST_URI_TOO_LONG",
"415 UNSUPPORTED_MEDIA_TYPE",
"416 REQUESTED_RANGE_NOT_SATISFIABLE",
"417 EXPECTATION_FAILED",
"418 I_AM_A_TEAPOT",
"419 INSUFFICIENT_SPACE_ON_RESOURCE",
"420 METHOD_FAILURE",
"421 DESTINATION_LOCKED",
"422 UNPROCESSABLE_ENTITY",
"423 LOCKED",
"424 FAILED_DEPENDENCY",
"425 TOO_EARLY",
"426 UPGRADE_REQUIRED",
"428 PRECONDITION_REQUIRED",
"429 TOO_MANY_REQUESTS",
"431 REQUEST_HEADER_FIELDS_TOO_LARGE",
"451 UNAVAILABLE_FOR_LEGAL_REASONS",
"500 INTERNAL_SERVER_ERROR",
"501 NOT_IMPLEMENTED",
"502 BAD_GATEWAY",
"503 SERVICE_UNAVAILABLE",
"504 GATEWAY_TIMEOUT",
"505 HTTP_VERSION_NOT_SUPPORTED",
"506 VARIANT_ALSO_NEGOTIATES",
"507 INSUFFICIENT_STORAGE",
"508 LOOP_DETECTED",
"509 BANDWIDTH_LIMIT_EXCEEDED",
"510 NOT_EXTENDED",
"511 NETWORK_AUTHENTICATION_REQUIRED"
]
},
"expandUriTemplateVariables": {
"type": "boolean",
"writeOnly": true
},
"propagateQueryParams": {
"type": "boolean",
"writeOnly": true
},
"hosts": {
"type": "array",
"items": {
"type": "string"
}
},
"redirectView": {
"type": "boolean"
},
"propagateQueryProperties": {
"type": "boolean"
},
"attributesMap": {
"type": "object",
"additionalProperties": {
"type": "object"
}
},
"attributesCSV": {
"type": "string",
"writeOnly": true
},
"attributes": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"writeOnly": true
}
}
},
"AuthCredentialsRequest": {
"type": "object",
"properties": {
"username": {
"type": "string"
},
"password": {
"type": "string"
}
}
},
"SignupEvent": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"startDate": {
"type": "string",
"format": "date-time"
},
"place": {
"type": "string"
},
"description": {
"type": "string"
},
"form": {
"$ref": "#/components/schemas/Form"
},
"endDate": {
"type": "string",
"format": "date-time"
},
"price": {
"type": "number",
"format": "double"
},
"bannerImg": {
"type": "string"
}
}
},
"AuthCredentialsResponse": {
"type": "object",
"properties": {
"isAdmin": {
"type": "boolean"
},
"token": {
"type": "string"
}
}
}
}
}
}