Skip to content

Commit a322341

Browse files
authored
Merge pull request #224 from SIT-DigiCre/chore/openapi-config
chore: OpenAPIの設定を改善
2 parents eaddf31 + 7859e32 commit a322341

File tree

8 files changed

+110
-3057
lines changed

8 files changed

+110
-3057
lines changed

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ include .env
33
.PHONY: generate_api
44
generate_api:
55
docker compose -f ${DOCKER_COMPOSE} run --rm -w /app/document node_tool swagger-cli bundle -o ./bundle.gen.yml -t yaml ./openapi.yml
6-
docker compose -f ${DOCKER_COMPOSE} run --rm -w /app/document node_tool swagger-cli bundle -o ./bundle-develop.gen.yml -t yaml ./openapi-develop.yml
76
docker compose -f ${DOCKER_COMPOSE} run --rm -w /app admin oapi-codegen --config ./config/models.yml ./document/bundle.gen.yml
87
docker compose -f ${DOCKER_COMPOSE} run --rm -w /app admin oapi-codegen --config ./config/server.yml ./document/bundle.gen.yml
98
docker compose -f ${DOCKER_COMPOSE} run --rm -w /app admin oapi-codegen --config ./config/spec.yml ./document/bundle.gen.yml

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## 環境構築
44

5-
1. .env.sample をコピーして.env を作成する
5+
1. `.env.sample` をコピーして `.env` を作成する
66
1. [Discord developers](https://discord.com/developers/applications)で App を作成し、Oauth2 の Redirects に`${FRONTEND_ROOT_URL}/user/discord/callback`を指定する
77
1. 上記で作成した App の Client information から Client ID と Client Secret を取得し、.env に追記する。
88
1. [Google Cloud Platform](https://console.cloud.google.com/home/dashboard)で App を作成し、OAuth クライアント ID をアプリケーションの種類をウェブアプリケーションにして作成し、承認済みのリダイレクト URI に`${FRONTEND_ROOT_URL}/signup/callback``${FRONTEND_ROOT_URL}/login/callback`を指定する。
@@ -20,14 +20,13 @@ make build
2020
## 実行
2121

2222
```sh
23-
make up
24-
# make up-d
23+
make up-d # デタッチモードで起動
2524
```
2625

2726
## DB マイグレーション
2827

2928
```sh
30-
make migrate-dry // dryrun
29+
make migrate-dry # dryrun
3130
make migrate
3231
```
3332

@@ -41,12 +40,14 @@ make insert_test
4140

4241
### api パッケージの更新
4342

44-
**./document/_.gen.yml と./pkg/api/_.gen.go は自動生成であるため直接編集しない**
43+
> [!WARNING]
44+
>
45+
> `./document/_.gen.yml``./pkg/api/_.gen.go` は自動生成であるため直接編集しない
4546
4647
```sh
4748
make generate_api
4849
```
4950

5051
## 開発時の JWT 検証の無効化
5152

52-
.env の AUTH を disable に書き換えてください。
53+
`.env` の AUTH を disable に書き換えてください。

document/.assetsignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
paths/
2+
responses/
3+
schemas/
4+
openapi.yml
5+
paths.yml
6+
responses.yml
7+
schemas.yml
8+
tags.yml

0 commit comments

Comments
 (0)