Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API参照先を変更 #83

Merged
merged 2 commits into from
Jan 18, 2024
Merged

API参照先を変更 #83

merged 2 commits into from
Jan 18, 2024

Conversation

Pugma
Copy link
Collaborator

@Pugma Pugma commented Jan 18, 2024

確認よろしくお願いします!

具体的にはバックエンドリポジトリのmainブランチのものにした
@Pugma Pugma requested a review from mehm8128 January 18, 2024 07:41
Copy link
Contributor

@mehm8128 mehm8128 left a comment

Choose a reason for hiding this comment

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

流れとしてこうなっています

  1. npm installする
  2. postinstallというコマンド名は特別で、npm installしたときにinstallする前に実行するコマンドを指定できます。今回ここで2つのコマンドを実行しています
  3. fetch-openapiでサーバーのmainブランチからyamlファイルをfetchしてきてscriptsディレクトリ内に保存
  4. gen-apiでそれを使ってlib/apis/genratedディレクトリ内にapit定義を生成

今回、4で元にするapi定義のyamlファイルをURL指定で直接取ってくるようにしたので、3がいらなくなりそうです。なので、scripts/fetchOpenapi.jsファイルも削除しちゃってよさそうです(dashboardも同様)(それに伴ってfetch-openapiコマンドもいらなくなりそう)

@Pugma
Copy link
Collaborator Author

Pugma commented Jan 18, 2024

今回の変更に伴って、ローカルのyamlファイルがなくなったことによりprismの参照先がなくなってしまっています
そのため正常に動作していないのも確認しているので、この部分も対処します

ここもpackage.json内prismのコマンドでの参照先をapi生成と同じようにオンライン参照にしちゃう感じでいいですか?

@mehm8128
Copy link
Contributor

あー
そうですね、githubのURL直接入れちゃっていいと思います、お願いします

@Pugma
Copy link
Collaborator Author

Pugma commented Jan 18, 2024

CIの更新・npmコマンドの一部削除を行いましたが、正常に動作してそうです!👀

Copy link
Contributor

@mehm8128 mehm8128 left a comment

Choose a reason for hiding this comment

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

よさそうです、ありがとうございます!
dashboardの方も同様に修正しておいてほしいです:pray:

@Pugma
Copy link
Collaborator Author

Pugma commented Jan 18, 2024

:haakusimasita:
マージしておきます!

@Pugma Pugma merged commit 0c06585 into master Jan 18, 2024
6 checks passed
@Pugma Pugma deleted the improveApiReference branch January 18, 2024 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants