--- openapi: 3.0.1 info: title: API V1 version: v1 components: securitySchemes: bearer_auth: type: http scheme: bearer bearer_format: JWT schemas: category: type: object properties: id: type: string format: uuid example: 123e4567-e89b-12d3-a456-426614174000 name: type: string slug: type: string parent_id: type: uuid nullable: true created_at: type: string format: date-time updated_at: type: string format: date-time required: - id - name - slug - parent_id - created_at - updated_at categories: type: array items: "$ref": "#/components/schemas/categories" categories_response: type: object properties: categories: type: array items: "$ref": "#components/schemas/category" meta: "$ref": "#components/schemas/meta" required: - categories - meta recipe: type: object properties: id: type: string format: uuid example: 123e4567-e89b-12d3-a456-426614174000 name: type: string user_id: type: string format: uuid example: 123e4567-e89b-12d3-a456-426614174000 description: type: string steps: type: array items: type: string is_gluten_free: type: boolean is_carb_free: type: boolean is_kosher: type: boolean is_paleo: type: boolean is_vegetarian: type: boolean is_vegan: type: boolean slug: type: string created_at: type: string format: date-time updated_at: type: string format: date-time required: - id - name - slug - created_at - updated_at recipes_response: type: object properties: recipes: type: array items: "$ref": "#/components/schemas/recipe" meta: "$ref": "#/components/schemas/meta" required: - recipes - meta meta: type: object properties: current_page: type: integer total_pages: type: integer records: type: integer total_records: type: integer required: - current_page - total_pages - records - total_records user: type: object properties: name: type: string email: type: string password: type: string password_confirmation: type: string required: [] user_create_response: type: object properties: data: type: object properties: id: type: string format: uuid example: 123e4567-e89b-12d3-a456-426614174000 name: type: string email: type: string user_update_response: type: object properties: data: type: object properties: id: type: string format: uuid example: 123e4567-e89b-12d3-a456-426614174000 name: type: string email: type: string user_update: type: object properties: data: type: object properties: name: type: string email: type: string password: type: string user_show_response: type: object properties: data: type: object properties: name: type: string profile_show_response: type: object properties: data: type: object properties: id: type: string name: type: string email: type: string profile_show_error_response: type: object properties: errors: type: string error_response: oneOf: - type: object properties: errors: type: string - type: object properties: errors: type: array items: type: string paths: "/v1/categories": get: summary: list categories parameters: - name: page in: query description: Page number schema: type: integer - name: per_page in: query description: Maximum number returned per page schema: type: integer responses: '200': description: categories found "/v1/categories/{id}": parameters: - name: id in: path required: true schema: type: string get: summary: show category responses: '200': description: successful '404': description: not found "/v1/profile/me": get: summary: show user profile not logged in security: - bearer_auth: [] responses: '200': description: successful content: application/json: schema: "$ref": "#/components/schemas/profile_show_response" '401': description: unauthorized "/v1/recipes": get: summary: list recipes parameters: - name: page in: query description: Page number schema: type: integer - name: per_page in: query description: Maximum number returned per page schema: type: integer responses: '200': description: recipes found "/v1/recipes/{id}": parameters: - name: id in: path required: true schema: type: string get: summary: show recipe responses: '200': description: successful '404': description: not found "/v1/users": post: summary: create user parameters: - name: name in: query schema: type: string - name: email in: query schema: type: string - name: password in: query schema: type: string responses: '200': description: user created '422': description: unprocessable entity "/v1/users/{id}": get: summary: show user parameters: - name: id in: path required: true schema: type: string responses: '200': description: successful '404': description: errors "/v1/users/update": put: summary: update user parameters: [] security: - bearer_auth: [] responses: '200': description: successful content: application/json: schema: "$ref": "#/components/schemas/user_update_response" requestBody: content: application/json: schema: "$ref": "#/components/schemas/user_update" required: true servers: - url: http://{defaultHost} variables: defaultHost: default: localhost:3400