openapi: 3.0.0 paths: /api/v1/users: get: operationId: UserController_GetAllUsers summary: ユーザー一覧取得 parameters: [] responses: "200": description: ユーザー一覧取得完了 content: application/json: schema: $ref: "#/components/schemas/GetAllUsersDto" "401": description: 認証エラー tags: &ref_3 - user # security: *ref_1 /api/v1/users/{userId}: put: operationId: UserController_UpdateUser summary: ユーザー更新 parameters: - name: userId required: true in: path schema: type: string requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UpdateUser" responses: "200": description: ユーザー更新 content: application/json: schema: $ref: "#/components/schemas/GetEditUserDto" "401": description: 認証エラー tags: *ref_3 security: *ref_1 /api/v1/users/{userId}/edit: get: operationId: UserController_GetEditUser summary: 編集ユーザー取得 parameters: - name: userId required: true in: path schema: type: string responses: "200": description: 編集ユーザー取得完了 content: application/json: schema: $ref: "#/components/schemas/GetEditUserDto" "401": description: 認証エラー tags: *ref_3 security: *ref_1 /api/v1/users/{userId}/lists: get: operationId: ListController_GetAllLists summary: リスト一覧取得 parameters: - name: userId required: true in: path schema: type: string responses: "200": description: リスト一覧取得完了 content: application/json: schema: $ref: "#/components/schemas/GetAllListsDto" "401": description: 認証エラー tags: &ref_4 - list security: *ref_1 post: operationId: ListController_PostList summary: リスト登録 parameters: - name: userId required: true in: path schema: type: string requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/PostList" responses: "200": description: リスト登録完了 # content: # application/json: # schema: # $ref: "#/components/schemas/AuthResponseDto" "401": description: 認証エラー tags: *ref_4 security: *ref_1 /api/v1/users/{userId}/lists/{id}: delete: operationId: ListController_DeleteList summary: リスト削除 parameters: - name: userId required: true in: path schema: type: string description: user ID - name: id required: true in: path schema: type: string description: list ID responses: "200": description: リスト削除完了 # content: # application/json: # schema: # $ref: "#/components/schemas/AuthResponseDto" "401": description: 認証エラー tags: *ref_4 security: *ref_1 /api/v1/users/{userId}/foods: get: operationId: FoodController_GetAllFoods summary: 消費期限管理食材一覧取得 parameters: - name: userId required: true in: path schema: type: string description: user ID responses: "200": description: 消費期限管理食材取得完了 content: application/json: schema: $ref: "#/components/schemas/GetAllFoodsDto" "401": description: 認証エラー tags: &ref_5 - food security: *ref_1 post: operationId: FoodController_PostFood summary: 消費期限管理食材登録 parameters: - name: userId required: true in: path schema: type: string description: user ID requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UpdateOrPostFood" responses: "200": description: 消費期限管理食材登録完了 # content: # application/json: # schema: # $ref: "#/components/schemas/AuthResponseDto" "401": description: 認証エラー tags: *ref_5 security: *ref_1 /api/v1/users/{userId}/foods/{id}/edit: get: operationId: FoodController_GetEditFoods summary: 編集消費期限管理食材取得 parameters: - name: userId required: true in: path schema: type: string description: user ID - name: id required: true in: path schema: type: string description: food ID responses: "200": description: 編集消費期限管理食材取得完了 content: application/json: schema: $ref: "#/components/schemas/UpdateOrPostFood" "401": description: 認証エラー tags: *ref_5 security: *ref_1 /api/v1/users/{userId}/foods/{id}: put: operationId: FoodController_GetEditFoos summary: 消費期限管理食材更新 parameters: - name: userId required: true in: path schema: type: string description: user ID - name: id required: true in: path schema: type: string description: food ID requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UpdateOrPostFood" responses: "200": description: 消費期限管理食材更新完了 # content: # application/json: # schema: # $ref: "#/components/schemas/GetEditFoodDto" "401": description: 認証エラー tags: *ref_5 security: *ref_1 delete: operationId: FoodController_DeleteFoods summary: 消費期限管理食材削除 parameters: - name: userId required: true in: path schema: type: string description: user ID - name: id required: true in: path schema: type: string description: list ID responses: "200": description: 消費期限管理食材削除完了 # content: # application/json: # schema: # $ref: "#/components/schemas/AuthResponseDto" "401": description: 認証エラー tags: *ref_5 security: *ref_1 /api/v1/posts: get: operationId: PostController_GetAllPosts summary: 投稿全件取得 parameters: [] responses: "200": description: 編集消費期限管理食材取得完了 content: application/json: schema: $ref: "#/components/schemas/UpdateOrPostFood" "401": description: 認証エラー tags: &ref_6 - post security: *ref_1 info: title: API description description: "" version: "1.0" contact: {} tags: [] servers: - url: / components: securitySchemes: bearer: scheme: bearer bearerFormat: JWT type: http schemas: CreateTodoDto: type: object properties: title: type: string example: Todo4 created minLength: 2 maxLength: 25 content: type: string example: Todo content4 sample created required: - title - content UpdateUser: type: object properties: name: type: string example: User_1 gender: type: number example: 0 birthday: format: date-time type: string example: "2022-10-28" image: type: object example: { url: "http://localhost:3002/uploads/user/image/22/vegetable.png" } memo: type: string example: aaa UpdateOrPostFood: type: object properties: name: type: string example: User_1 classification_id: type: number example: 0 quantity: type: number example: 0 expired_at: format: date-time type: string example: "2023-01-02" notified_at: format: date-time type: string example: "2022-10-28T08:38:14.237Z" image: type: object example: { url: "http://localhost:3002/uploads/user/image/22/vegetable.png" } memo: type: string example: aaa PostList: type: object properties: name: type: string example: sample_1 TodoEntity: type: object properties: id: type: number example: 1 title: type: string example: Todo1 sample minLength: 2 maxLength: 25 content: type: string example: Todo content1 sample userId: type: string example: 1 createdAt: format: date-time type: string example: "2022-10-28T08:38:14.237Z" updatedAt: format: date-time type: string example: "2022-10-28T08:38:14.237Z" required: - id - title - content - userId - createdAt - updatedAt FindTodoResponseDto: type: object properties: todo: example: id: 1 title: Todo1 sample content: Todo content1 sample userId: 1 createdAt: "2022-10-28T08:38:14.237Z" updatedAt: "2022-10-28T08:38:14.237Z" allOf: - $ref: "#/components/schemas/TodoEntity" required: - todo FindTodoListResponseDto: type: object properties: todos: example: - id: 1 title: Todo1 sample content: Todo content1 sample userId: 1 createdAt: "2021-10-28T08:38:14.237Z" updatedAt: "2021-10-28T08:38:14.237Z" - id: 2 title: Todo2 sample content: Todo content2 sample userId: 1 createdAt: "2021-10-28T08:38:14.237Z" updatedAt: "2021-10-28T08:38:14.237Z" - id: 3 title: Todo3 sample content: Todo content3 sample userId: 1 createdAt: "2021-10-28T08:38:14.237Z" updatedAt: "2021-10-28T08:38:14.237Z" type: array items: $ref: "#/components/schemas/TodoEntity" required: - todos UpdateTodoDto: type: object properties: title: type: string example: Todo4 update minLength: 2 maxLength: 25 content: type: string example: Todo content4 sample update required: - title - content SignInUserDto: type: object properties: email: type: string example: user1@test.com password: type: string example: password required: - email - password UserEntity: type: object properties: id: type: number example: 22 provider: type: string example: email uid: type: string example: example@example.co.jp allow_password_change: type: boolean example: false name: type: string example: User_5 image: type: object example: { "url": "http://localhost:3002/uploads/user/image/22/vegetable.png", } email: type: string example: example@example.co.jp created_at: format: date-time type: string example: 2022-10-13T15:20:37.985+09:00 updated_at: format: date-time type: string example: 2022-12-21T14:22:59.814+09:00 gender: type: number example: 2 memo: type: string example: aaaabd birthday: format: date-time type: string example: 2022-10-21 required: - id - provider - uid - encrypted_password - allow_password_change - created_at - updated_at - gender ListEntity: type: object properties: id: type: number example: 80 user_id: type: number example: 22 name: type: string example: sample_1 created_at: format: date-time type: string example: 2022-10-13T15:20:37.985+09:00 updated_at: format: date-time type: string example: 2022-12-21T14:22:59.814+09:00 required: - id - user_id - name - created_at - updated_at FoodEntity: type: object properties: id: type: number example: 97 user_id: type: number example: 22 classification_id: type: number example: 1 name: type: string example: みかん expired_at: format: date-time type: string example: 2022-12-02 notified_at: format: date-time type: string example: 2022-10-30T11:22:06.000+09:00 image: type: object example: { "url": "http://localhost:3002/uploads/food/image/97/mikan.jpg" } memo: type: string example: あ created_at: format: date-time type: string example: 2022-10-13T15:20:37.985+09:00 updated_at: format: date-time type: string example: 2022-12-21T14:22:59.814+09:00 required: - id - user_id - classification_id - name - quantity - expired_at - created_at - updated_at AuthResponseDto: type: object properties: user: example: id: 1 name: ユーザー1 email: user1@test.com createdAt: "2022-10-28T08:38:14.237Z" updatedAt: "2022-10-28T08:38:14.237Z" allOf: - $ref: "#/components/schemas/UserEntity" accessToken: type: string example: token required: - user - accessToken SignUpUserDto: type: object properties: name: type: string example: ユーザー1 email: type: string example: user1@test.com password: type: string example: password required: - name - email - password GetAllUsersDto: type: object properties: users: example: - id: 21 provider: email uid: example1@example.co.jp allow_password_change: false name: Daichi image: { "url": null } email: example1@example.co.jp created_at: 2022-10-13T15:05:03.876+09:00 updated_at: 2022-10-13T15:05:04.069+09:00 gender: 0 memo: null birthday: null - id: 22 provider: email uid: example@example.co.jp allow_password_change: false name: User_5 image: { "url": "http://localhost:3002/uploads/user/image/22/vegetable.png", } email: example@example.co.jp created_at: 2022-10-13T15:20:37.985+09:00 updated_at: 2022-12-21T14:22:59.814+09:00 gender: 2 memo: aaaabd birthday: 2022-10-21 allOf: - $ref: "#/components/schemas/UserEntity" GetEditUserDto: type: object properties: user: example: id: 22 provider: email uid: example@example.co.jp allow_password_change: false name: User_5 image: { "url": "http://localhost:3002/uploads/user/image/22/vegetable.png", } email: example@example.co.jp created_at: 2022-10-13T15:20:37.985+09:00 updated_at: 2022-12-21T14:22:59.814+09:00 gender: 2 memo: aaaabd birthday: 2022-10-21 allOf: - $ref: "#/components/schemas/UserEntity" required: - todo GetAllListsDto: type: object properties: lists: example: - id: 80 user_id: 22 name: sample_1 created_at: 2022-10-16T08:28:06.115+09:00 updated_at: 2022-10-16T08:28:06.115+09:00 - id: 81 user_id: 22 name: sample_2 created_at: 2022-10-16T14:47:10.747+09:00 updated_at: 2022-10-16T14:47:10.747+09:00 allOf: - $ref: "#/components/schemas/ListEntity" GetAllFoodsDto: type: object properties: foods: example: - id: 97 user_id: 22 classification_id: 2 name: みかん quantity: 1 expired_at: 2022-10-30 notified_at: 2022-10-30T11:22:06.000+09:00 image: { "url": "http://localhost:3002/uploads/food/image/97/mikan.jpg", } memo: a created_at: 2022-10-16T08:28:06.115+09:00 updated_at: 2022-10-16T08:28:06.115+09:00 - id: 102 user_id: 22 classification_id: 2 name: 野菜 quantity: 1 expired_at: 2022-12-02 notified_at: 2022-12-03T08:19:25.000+09:00 image: { "url": "http://localhost:3002/uploads/food/image/102/vegetable.png", } memo: あ created_at: 2022-12-03T08:19:45.689+09:00 updated_at: 2022-12-03T08:19:45.689+09:00 allOf: - $ref: "#/components/schemas/FoodEntity" GetEditFoodDto: type: object properties: food: example: id: 97 user_id: 22 classification_id: 2 name: みかん quantity: 1 expired_at: 2022-10-30 notified_at: 2022-10-30T11:22:06.000+09:00 image: { "url": "http://localhost:3002/uploads/food/image/97/mikan.jpg" } memo: a created_at: 2022-10-16T08:28:06.115+09:00 updated_at: 2022-10-16T08:28:06.115+09:00 allOf: - $ref: "#/components/schemas/FoodEntity"