Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

```sh
make build
# ubuntuの場合はsudo権限が必要
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good!

```

## 実行
Expand Down
100 changes: 100 additions & 0 deletions document/bundle.gen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,28 @@ paths:
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalServer'
post:
tags:
- event
description: Post event
security:
- BearerAuth: []
requestBody:
description: Create event
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ReqPostEventEvent'
responses:
'200':
description: Create event
content:
application/json:
schema:
$ref: '#/components/schemas/ResPostEventEvent'
'500':
$ref: '#/components/responses/InternalServer'
'/event/{eventId}':
get:
tags:
Expand All @@ -701,6 +723,38 @@ paths:
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalServer'
put:
tags:
- event
description: Update event
security:
- BearerAuth: []
parameters:
- name: eventId
in: path
required: true
schema:
type: string
requestBody:
description: Update event
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ReqPostEventEvent'
responses:
'200':
description: Success update event
content:
application/json:
schema:
$ref: '#/components/schemas/ResPostEventEvent'
'403':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalServer'
'/event/{eventId}/{reservationId}':
get:
tags:
Expand Down Expand Up @@ -2373,6 +2427,52 @@ components:
x-oapi-codegen-extra-tags:
validate: max=255
ja: URL
ReqPostEventEvent:
required:
- name
- description
- calendar_view
properties:
name:
type: string
x-oapi-codegen-extra-tags:
validate: required
ja: イベント名
description:
type: string
x-oapi-codegen-extra-tags:
validate: required
ja: 説明
calendar_view:
type: boolean
x-oapi-codegen-extra-tags:
validate: required
ja: カレンダー表示
ResPostEventEvent:
type: object
required:
- event_id
- name
- description
- calendar_view
properties:
event_id:
type: string
format: uuid
x-oapi-codegen-extra-tags:
ja: イベントID
name:
type: string
x-oapi-codegen-extra-tags:
ja: イベント名
description:
type: string
x-oapi-codegen-extra-tags:
ja: 説明
calendar_view:
type: boolean
x-oapi-codegen-extra-tags:
ja: カレンダー表示
ResGetStorageMyfile:
required:
- files
Expand Down
22 changes: 22 additions & 0 deletions document/paths/event.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,25 @@ get:
$ref: "../responses/not_found.yml"
500:
$ref: "../responses/internal_server.yml"
post:
tags:
- event
description: "Post event"
security:
- BearerAuth: []
requestBody:
description: "Create event"
required: true
content:
application/json:
schema:
$ref: "../schemas/req_post_event_event.yml"
responses:
200:
description: "Create event"
content:
application/json:
schema:
$ref: "../schemas/res_post_event_event.yml"
500:
$ref: "../responses/internal_server.yml"
32 changes: 32 additions & 0 deletions document/paths/event_event_id.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,35 @@ get:
$ref: "../responses/not_found.yml"
500:
$ref: "../responses/internal_server.yml"
put:
tags:
- event
description: "Update event"
security:
- BearerAuth: []
parameters:
- name: eventId
in: path
required: true
schema:
type: string
requestBody:
description: "Update event"
required: true
content:
application/json:
schema:
$ref: "../schemas/req_post_event_event.yml"
responses:
200:
description: "Success update event"
content:
application/json:
schema:
$ref: "../schemas/res_post_event_event.yml"
403:
$ref: "../responses/unauthorized.yml"
404:
$ref: "../responses/not_found.yml"
500:
$ref: "../responses/internal_server.yml"
4 changes: 4 additions & 0 deletions document/schemas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ ResGetEventEventIdReservationIdObjectUser:
$ref: "./schemas/res_get_event_event_id_reservation_id.user.yml"
ReqPutEventEventIdReservationIdMe:
$ref: "./schemas/req_put_event_event_id_reservation_id_me.yml"
ReqPostEventEvent:
$ref: "./schemas/req_post_event_event.yml"
ResPostEventEvent:
$ref: "./schemas/res_post_event_event.yml"
ResGetStorageMyfile:
$ref: "./schemas/res_get_storage_myfile.yml"
ResGetStorageMyfileObjectFile:
Expand Down
20 changes: 20 additions & 0 deletions document/schemas/req_post_event_event.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
required:
- name
- description
- calendar_view
properties:
name:
type: string
x-oapi-codegen-extra-tags:
validate: required
ja: イベント名
description:
type: string
x-oapi-codegen-extra-tags:
validate: required
ja: 説明
calendar_view:
type: boolean
x-oapi-codegen-extra-tags:
validate: required
ja: カレンダー表示
24 changes: 24 additions & 0 deletions document/schemas/res_post_event_event.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
type: object
required:
- event_id
- name
- description
- calendar_view
properties:
event_id:
type: string
format: uuid
x-oapi-codegen-extra-tags:
ja: イベントID
name:
type: string
x-oapi-codegen-extra-tags:
ja: イベント名
description:
type: string
x-oapi-codegen-extra-tags:
ja: 説明
calendar_view:
type: boolean
x-oapi-codegen-extra-tags:
ja: カレンダー表示
21 changes: 21 additions & 0 deletions pkg/api/models.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions pkg/api/req_post_event.go
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

このファイルは必要なさそうに見えます。api直下にあるのは不自然なファイルなので、削除してもらえると

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package api

type ReqPostEvent struct {
Name string `json:"name"`
Description string `json:"description"`
StartDate string `json:"start_date"`
EndDate string `json:"end_date"`
Tags []string `json:"tags"`
FinishDate string `json:"finish_date"`
}

type ResPostEvent struct {
EventID string `json:"event_id"`
}
37 changes: 37 additions & 0 deletions pkg/api/server.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading