From 048502cbee522e2ea5a8f55e5766ee4d05bddd14 Mon Sep 17 00:00:00 2001 From: rito528 <39003544+rito528@users.noreply.github.com> Date: Sat, 6 Jul 2024 17:53:48 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20TypeSpec=E3=82=B3=E3=83=BC=E3=83=89?= =?UTF-8?q?=E3=82=92src=E3=83=87=E3=82=A3=E3=83=AC=E3=82=AF=E3=83=88?= =?UTF-8?q?=E3=83=AA=E3=81=AE=E4=B8=AD=E3=81=AB=E3=81=BE=E3=81=A8=E3=82=81?= =?UTF-8?q?=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/compile-typespec-and-deploy.yml | 2 +- README.md | 2 +- docker/entrypoint.sh | 2 +- {endpoints => src/endpoints}/forms.tsp | 0 {endpoints => src/endpoints}/users.tsp | 0 main.tsp => src/main.tsp | 0 {models => src/models}/errors.tsp | 0 {models => src/models}/form.tsp | 0 {models => src/models}/user.tsp | 0 9 files changed, 3 insertions(+), 3 deletions(-) rename {endpoints => src/endpoints}/forms.tsp (100%) rename {endpoints => src/endpoints}/users.tsp (100%) rename main.tsp => src/main.tsp (100%) rename {models => src/models}/errors.tsp (100%) rename {models => src/models}/form.tsp (100%) rename {models => src/models}/user.tsp (100%) diff --git a/.github/workflows/compile-typespec-and-deploy.yml b/.github/workflows/compile-typespec-and-deploy.yml index 6a5fe7b..4603e13 100644 --- a/.github/workflows/compile-typespec-and-deploy.yml +++ b/.github/workflows/compile-typespec-and-deploy.yml @@ -31,7 +31,7 @@ jobs: run: npm ci - name: Compile typespec - run: tsp compile . + run: tsp compile ./src - name: Install redocly-cli uses: ./.github/actions/install-redocly-cli diff --git a/README.md b/README.md index fb1f91d..93bc9aa 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ seichi-portal-api-schema は GitHub Pages によって redocly が提供する `docker compose` を利用することで、ローカル環境で、スキーマを視覚的に確認することができます。 -docker を使用する前に seichi-portal-api-schema のルートディレクトリで `tsp compile .` を実行し、`openapi.yaml`を生成する必要があります。 +docker を使用する前に seichi-portal-api-schema のルートディレクトリで `tsp compile ./src` を実行し、`openapi.yaml`を生成する必要があります。 `docker compose up -d` で、コンテナを起動したら、`http://localhost:8081` または `http://localhost:8082` にアクセスすると開くことができます。 diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 7796fe4..3683001 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -1,6 +1,6 @@ #!/bin/bash -tsp compile . +tsp compile ./src redocly build-docs ./tsp-output/@typespec/openapi3/openapi.yaml -o ./docs/index.html -t ./template.hbs http-server ./docs -p $PORT diff --git a/endpoints/forms.tsp b/src/endpoints/forms.tsp similarity index 100% rename from endpoints/forms.tsp rename to src/endpoints/forms.tsp diff --git a/endpoints/users.tsp b/src/endpoints/users.tsp similarity index 100% rename from endpoints/users.tsp rename to src/endpoints/users.tsp diff --git a/main.tsp b/src/main.tsp similarity index 100% rename from main.tsp rename to src/main.tsp diff --git a/models/errors.tsp b/src/models/errors.tsp similarity index 100% rename from models/errors.tsp rename to src/models/errors.tsp diff --git a/models/form.tsp b/src/models/form.tsp similarity index 100% rename from models/form.tsp rename to src/models/form.tsp diff --git a/models/user.tsp b/src/models/user.tsp similarity index 100% rename from models/user.tsp rename to src/models/user.tsp