{"openapi":"3.0.0","info":{"description":"This is our Swagger project for our Advanced App Development school project.\n","version":"1.0.0","title":"Advanced App Development","termsOfService":"http://swagger.io/terms/","contact":{"email":"481909@student.saxion.nl"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"servers":[{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/Serwet66/AAD/1.0.0"},{"url":"https://aad.swagger.io/v2"}],"tags":[{"name":"event","description":"Everything about events","externalDocs":{"description":"Find out more","url":"http://swagger.io"}},{"name":"user","description":"Operations about user","externalDocs":{"description":"Find out more about our store","url":"http://swagger.io"}}],"paths":{"/event":{"post":{"tags":["event"],"summary":"Create a new event","operationId":"addEvent","responses":{"405":{"description":"Invalid input"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"requestBody":{"$ref":"#/components/requestBodies/Event"}}},"/event/{eventId}":{"get":{"tags":["event"],"summary":"Find event by ID","description":"Returns a single event","operationId":"getEventById","parameters":[{"name":"eventId","in":"path","description":"ID of event to return","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Event"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Event not found"}},"security":[{"api_key":[]}]},"patch":{"tags":["event"],"summary":"Update an existing event","operationId":"updateEvent","parameters":[{"name":"eventId","in":"path","description":"ID of event to update","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Invalid ID supplied"},"404":{"description":"Event not found"},"405":{"description":"Validation exception"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"requestBody":{"$ref":"#/components/requestBodies/Event"}},"delete":{"tags":["event"],"summary":"Deletes an event","operationId":"deleteEvent","parameters":[{"name":"api_key","in":"header","required":false,"schema":{"type":"string"}},{"name":"eventId","in":"path","description":"Event id to delete","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Invalid ID supplied"},"404":{"description":"Event not found"}},"security":[{"petstore_auth":["write:pets","read:pets"]}]}},"/event/{eventId}/chat":{"get":{"tags":["chat"],"summary":"Find event by ID","description":"Returns a single event","operationId":"getChatByEventId","parameters":[{"name":"eventId","in":"path","description":"ID of event to return","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chat"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Chat"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Event not found"}},"security":[{"api_key":[]}]}},"/user":{"post":{"tags":["user"],"summary":"Create user","description":"This can only be done by the logged in user.","operationId":"createUser","responses":{"default":{"description":"successful operation"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"description":"Created user object","required":true}}},"/user/login":{"get":{"tags":["user"],"summary":"Logs user into the system","operationId":"loginUser","parameters":[{"name":"username","in":"query","description":"The user name for login","required":true,"schema":{"type":"string"}},{"name":"password","in":"query","description":"The password for login in clear text","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","headers":{"X-Rate-Limit":{"description":"calls per hour allowed by the user","schema":{"type":"integer","format":"int32"}},"X-Expires-After":{"description":"date in UTC when token expires","schema":{"type":"string","format":"date-time"}}},"content":{"application/json":{"schema":{"type":"string"}},"application/xml":{"schema":{"type":"string"}}}},"400":{"description":"Invalid username/password supplied"}}}},"/user/logout":{"get":{"tags":["user"],"summary":"Logs out current logged in user session","operationId":"logoutUser","responses":{"default":{"description":"successful operation"}}}},"/user/{username}":{"get":{"tags":["user"],"summary":"Get user by user name","operationId":"getUserByName","parameters":[{"name":"username","in":"path","description":"The name that needs to be fetched. Use user1 for testing.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}},"application/xml":{"schema":{"$ref":"#/components/schemas/User"}}}},"400":{"description":"Invalid username supplied"},"404":{"description":"User not found"}}},"patch":{"tags":["user"],"summary":"Updated user","description":"This can only be done by the logged in user.","operationId":"updateUser","parameters":[{"name":"username","in":"path","description":"name that need to be updated","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Invalid user supplied"},"404":{"description":"User not found"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"description":"Updated user object","required":true}},"delete":{"tags":["user"],"summary":"Delete user","description":"This can only be done by the logged in user.","operationId":"deleteUser","parameters":[{"name":"username","in":"path","description":"The name that needs to be deleted","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Invalid username supplied"},"404":{"description":"User not found"}}}}},"externalDocs":{"description":"Find out more about Swagger","url":"http://swagger.io"},"components":{"schemas":{"User":{"type":"object","required":["username","firstName","lastName","email","password"],"properties":{"id":{"type":"integer","format":"int64"},"username":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string","example":"name@mail.com"},"password":{"type":"string"}},"xml":{"name":"User"}},"Event":{"type":"object","required":["title","description"],"properties":{"id":{"type":"integer","format":"int64"},"title":{"type":"string"},"participants":{"type":"array","xml":{"name":"users","wrapped":true},"items":{"$ref":"#/components/schemas/User"}},"description":{"type":"string","description":"description of the event"}},"xml":{"name":"Pet"}},"Chat":{"type":"object","required":["title","description"],"properties":{"id":{"type":"integer","format":"int64"},"eventId":{"$ref":"#/components/schemas/Event/properties/id"},"userId":{"$ref":"#/components/schemas/User/properties/id"},"message":{"type":"string","description":"chat message the user is sending"}},"xml":{"name":"Pet"}}},"requestBodies":{"Event":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Event"}}},"description":"Pet object that needs to be added to the store","required":true},"UserArray":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}},"description":"List of user object","required":true}},"securitySchemes":{"petstore_auth":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"type":"apiKey","name":"api_key","in":"header"}}}}