openapi: 3.0.4 info: title: Quiz Maker API description: API documentation for Quiz App version: 1.0.0 servers: - url: http://api.example.com/v1 description: Optional server description, e.g. Main (production) server - url: http://127.0.0.1:5000/api description: local server tags: - name: Auth description: Authentication endpoints - name: User description: User data endpoints - name: Quiz description: Quiz endpoints paths: /login: post: summary: Login description: Login to the application tags: - Auth requestBody: required: true content: application/json: schema: type: object properties: email: type: string example: "oukenzeumasio@gmail.com" password: type: string example: "rahasia" responses: "200": description: OK content: application/json: schema: type: object properties: token: type: string example: "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VybmFtZSI6Im91a2VuemV1bWFzaW9AZ21haWwuY29tIiwiZXhwIjoxNjIwNzQwNjY3LCJlbWFpbCI6Im91a2VuemV1bWFzaW9AZ21haWwuY29tIn0.7" "400": description: Bad Request content: application/json: schema: type: object properties: message: type: string example: "Invalid email or password" /login/google: post: summary: Login with Google description: Login to the application using Google tags: - Auth requestBody: required: true content: application/json: schema: type: object properties: token_id: type: string example: "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VybmFtZSI6Im91a2VuemV1bWFzaW9AZ21haWwuY29tIiwiZXhwIjoxNjIwNzQwNjY3LCJlbWFpbCI6Im91a2VuemV1bWFzaW9AZ21haWwuY29tIn0.7" responses: "200": description: OK content: application/json: schema: type: object properties: token: type: string example: "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VybmFtZSI6Im91a2VuemV1bWFzaW9AZ21haWwuY29tIiwiZXhwIjoxNjIwNzQwNjY3LCJlbWFpbCI6Im91a2VuemV1bWFzaW9AZ21haWwuY29tIn0.7" "400": description: Bad Request content: application/json: schema: type: object properties: message: type: string example: "Invalid token" /logout: post: summary: Logout description: Logout from the application tags: - Auth responses: "200": description: OK content: application/json: schema: type: object properties: message: type: string example: "Logout successfully" /register: post: summary: Register description: Register to the application tags: - User requestBody: required: true content: application/json: schema: type: object properties: email: type: string example: "oukenzeumasio@gmail.com" password: type: string example: "rahasia" name: type: string example: "Oukenze" birth_date: type: string example: "09-09-1999" responses: "200": description: OK content: application/json: schema: type: object properties: message: type: string example: "User created successfully" "409": description: Bad Request content: application/json: schema: type: object properties: message: type: string example: "Email already registered"