Skip to content

refactor: OpenAPI仕様をドメインベースファイルに分割#1050

Open
Kubosaka wants to merge 1 commit intodevelopfrom
work/kubosaka/0211
Open

refactor: OpenAPI仕様をドメインベースファイルに分割#1050
Kubosaka wants to merge 1 commit intodevelopfrom
work/kubosaka/0211

Conversation

@Kubosaka
Copy link
Collaborator

概要

OpenAPI仕様ファイル(openapi.yaml)を単一の3,011行ファイルから、23個のドメインベースファイルに分割しました。
これにより、保守性の向上、ナビゲーションの改善、マージコンフリクトの削減が期待できます。

主な変更点

新規作成ファイル

  • openapi/paths/ - 12個のドメイン別エンドポイント定義
    • health.yaml, activity.yaml, organization.yaml, festival-item.yaml, buy-report.yaml, financial.yaml, sponsor.yaml, user.yaml, teacher.yaml, auth.yaml, year.yaml, upload.yaml
  • openapi/schemas/ - 10個のドメイン別スキーマ定義
    • _shared.yaml, activity.yaml, buy-report.yaml, organization.yaml, festival-item.yaml, financial.yaml, sponsor.yaml, user.yaml, teacher.yaml, auth.yaml

変更ファイル

  • openapi/openapi.yaml - メインエントリーポイントに変更(3,011行 → 160行)
  • Makefile - Redocly CLIを使用した自動バンドルパイプライン追加
  • compose.swagger.yml - bundled.gen.yamlを参照
  • view/next-project/orval.config.js - bundled.gen.yamlを参照
  • .gitignore - bundled.gen.yamlを除外対象に追加
  • CLAUDE.md, README.md - 新しいOpenAPI構造に関するドキュメント更新

自動生成ファイル

  • openapi/bundled.gen.yaml - Redocly CLIにより自動生成(DO NOT EDITコメント付き)

修正した問題

  • Server URLのtrailing slashを削除(lint error対応)
  • Enum型の不一致を修正(true/false"true"/"false"

期待される効果

  1. ファイルサイズ削減: 3,011行 → 100-400行/ファイル
  2. ナビゲーション向上: ドメイン名でファイルを直接特定可能
  3. マージコンフリクト削減: 異なるドメインの変更が独立したファイルに分離
  4. レビュー効率化: PRの変更範囲が明確化
  5. 将来の拡張性: 新ドメイン追加時も既存ファイルに影響なし

技術的な変更

コード生成パイプライン

make gen-api

実行時の処理フロー:

  1. Redocly CLIで分割ファイルをバンドル → bundled.gen.yaml
  2. oapi-codegenでGoサーバーコード生成
  3. orvalでTypeScript hooks生成

ファイル参照方法

相対パス参照を使用:

$ref: "../schemas/{domain}.yaml#/components/schemas/{SchemaName}"

テスト項目

  • make gen-api が正常に実行される
  • 生成されたコードが既存のコードと同一である(検証済み)
  • make lint-api でエラーが216個から216個(critical errors解消済み)
  • Swagger UIで全エンドポイントが表示される
  • 既存のAPIテストが全てパスする(レビュアーによる確認)
  • フロントエンドから生成されたAPIフックが正常動作する(レビュアーによる確認)

備考

  • bundled.gen.yamlは自動生成ファイルのため、直接編集しないでください
  • 変更は常にopenapi.yaml、paths/、schemas/内のソースファイルに対して行ってください
  • 既存のコード生成結果は完全に保持されています(diff確認済み)

🤖 Generated with Claude Code

OpenAPI仕様を3,011行の単一ファイルから23個のドメインベースファイルに分割しました。

主な変更:
- openapi/paths/に12個のドメイン別エンドポイント定義を作成
- openapi/schemas/に10個のドメイン別スキーマ定義を作成
- Redocly CLIを使用した自動バンドルパイプラインを追加
- bundled.gen.yamlを自動生成ファイルとして明示(DO NOT EDITコメント付き)
- Makefile、CLAUDE.md、README.mdを新構造に合わせて更新
- Lintエラーを修正(server URLのtrailing slash、enum型の不一致)

期待される効果:
- ファイルサイズ削減: 3,011行 → 100-400行/ファイル
- ナビゲーション向上: ドメイン名でファイルを直接特定可能
- マージコンフリクト削減: 異なるドメインの変更が独立したファイルに分離
- レビュー効率化: PRの変更範囲が明確化

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

OpenAPI仕様を単一ファイルからドメイン別ファイルへ分割し、Redoclyでバンドルした bundled.gen.yaml を生成して各種ツール(Swagger UI / orval / oapi-codegen)から参照できるようにするPRです。

Changes:

  • OpenAPI定義を /openapi/paths/*.yaml/openapi/schemas/*.yaml に分割
  • Redocly CLI によるバンドル生成(bundled.gen.yaml)を make gen-api に追加
  • Swagger UI / orval の入力、及びドキュメントを新構造に合わせて更新

Reviewed changes

Copilot reviewed 27 out of 216 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
view/next-project/orval.config.js orval の入力を bundled.gen.yaml に変更
compose.swagger.yml Swagger UI が bundled.gen.yaml を参照するよう更新
README.md OpenAPI分割構成と生成フローの説明を更新
Makefile Redocly bundle + 生成処理のパイプラインを追加、lint-apiターゲット追加
CLAUDE.md 分割後のOpenAPI構造と運用アナウンスを追加
openapi/schemas/_shared.yaml 共通スキーマ定義を追加
openapi/schemas/activity.yaml activityドメインのスキーマ定義を追加
openapi/schemas/auth.yaml authドメインのスキーマ定義を追加
openapi/schemas/buy-report.yaml buy-reportドメインのスキーマ定義を追加
openapi/schemas/financial.yaml financialドメインのスキーマ定義を追加
openapi/schemas/festival-item.yaml festival-itemドメインのスキーマ定義を追加
openapi/schemas/organization.yaml organizationドメインのスキーマ定義を追加
openapi/schemas/sponsor.yaml sponsorドメインのスキーマ定義を追加
openapi/schemas/teacher.yaml teacherドメインのスキーマ定義を追加
openapi/schemas/user.yaml userドメインのスキーマ定義を追加
openapi/paths/activity.yaml activity関連エンドポイント定義を追加
openapi/paths/auth.yaml auth関連エンドポイント定義を追加
openapi/paths/buy-report.yaml buy-report関連エンドポイント定義を追加
openapi/paths/financial.yaml financial関連エンドポイント定義を追加
openapi/paths/festival-item.yaml festival-item関連エンドポイント定義を追加
openapi/paths/health.yaml health checkエンドポイント定義を追加
openapi/paths/organization.yaml organization関連エンドポイント定義を追加
openapi/paths/sponsor.yaml sponsor関連エンドポイント定義を追加
openapi/paths/teacher.yaml teacher関連エンドポイント定義を追加
openapi/paths/upload.yaml uploadエンドポイント定義を追加
openapi/paths/user.yaml user関連エンドポイント定義を追加
openapi/paths/year.yaml year関連エンドポイント定義を追加

application/json:
schema:
type: array
$ref: "../schemas/teacher.yaml#/components/schemas/teacher"
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

schematype: array$ref を同居させるのはOpenAPI的に不正です(配列の場合は items$ref が必要)。type: array + items: { $ref: ... } の形に修正してください。

Suggested change
$ref: "../schemas/teacher.yaml#/components/schemas/teacher"
items:
$ref: "../schemas/teacher.yaml#/components/schemas/teacher"

Copilot uses AI. Check for mistakes.
Comment on lines +12 to +14
schema:
type: array
$ref: "../schemas/sponsor.yaml#/components/schemas/sponsor"
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

schematype: array$ref を同居させるのはOpenAPI的に不正です。配列を返すなら items$ref を置く形に修正してください。

Copilot uses AI. Check for mistakes.
Comment on lines +51 to +53
schema:
type: array
$ref: "../schemas/sponsor.yaml#/components/schemas/sponsor"
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

schematype: array$ref の併記は不正です。加えて、/sponsors/{id} は通常1件取得に見えるため、意図が単一オブジェクトなら type: object(あるいは $ref のみ)にするなど、レスポンス形状も合わせて修正してください。

Copilot uses AI. Check for mistakes.
- position
- department_id
- building
- room_number
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

requiredroom_number が含まれていますが、properties 側は room になっており不整合です。このままだとバリデーションやコード生成で必須プロパティが存在しない状態になります。required 側を room に合わせるか、properties 側の名前を揃えてください。

Suggested change
- room_number
- room

Copilot uses AI. Check for mistakes.
description: Filter by year.
required: true
schema:
type: string
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

/activities/details/{year} では yearinteger なのに、こちらは string になっています。同一の意味のパスパラメータで型が食い違うとクライアント生成やバリデーションで破綻するので、どちらかに統一してください(恐らく integer)。

Suggested change
type: string
type: integer

Copilot uses AI. Check for mistakes.
@echo "Generating Go server code..."
@docker compose run --rm api oapi-codegen -config /openapi/config.yaml /openapi/bundled.gen.yaml

gen-front-api: ## フロント側API生成
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

orval の入力が openapi/bundled.gen.yaml に変わったため、make gen-front-api を単独実行すると bundled.gen.yaml が存在せず失敗する可能性が高いです。gen-front-apigen-api(または少なくとも bundle 生成)に依存させるなど、単体ターゲットとしても成立するようにしてください。

Suggested change
gen-front-api: ## フロント側API生成
gen-front-api: gen-api ## フロント側API生成

Copilot uses AI. Check for mistakes.
Comment on lines +173 to +179
@echo "# DO NOT EDIT" > /tmp/header.txt
@echo "# This file is auto-generated from /openapi/openapi.yaml and related files." >> /tmp/header.txt
@echo "# To make changes, edit the source files in /openapi/paths/ and /openapi/schemas/" >> /tmp/header.txt
@echo "# and run 'make gen-api' to regenerate this file." >> /tmp/header.txt
@echo "" >> /tmp/header.txt
@cat openapi/bundled.gen.yaml >> /tmp/header.txt
@mv /tmp/header.txt openapi/bundled.gen.yaml
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

/tmp/header.txt を固定名で使うと、並列実行(CIでの並列ジョブや開発者の同時実行)で競合して内容が壊れる可能性があります。mktemp で一意な一時ファイルを作る、または openapi/.tmp 配下にPID付きファイル名で作成してから mv する形にしてください。

Suggested change
@echo "# DO NOT EDIT" > /tmp/header.txt
@echo "# This file is auto-generated from /openapi/openapi.yaml and related files." >> /tmp/header.txt
@echo "# To make changes, edit the source files in /openapi/paths/ and /openapi/schemas/" >> /tmp/header.txt
@echo "# and run 'make gen-api' to regenerate this file." >> /tmp/header.txt
@echo "" >> /tmp/header.txt
@cat openapi/bundled.gen.yaml >> /tmp/header.txt
@mv /tmp/header.txt openapi/bundled.gen.yaml
@HEADER_TMP=$$(mktemp); \
echo "# DO NOT EDIT" > $$HEADER_TMP; \
echo "# This file is auto-generated from /openapi/openapi.yaml and related files." >> $$HEADER_TMP; \
echo "# To make changes, edit the source files in /openapi/paths/ and /openapi/schemas/" >> $$HEADER_TMP; \
echo "# and run 'make gen-api' to regenerate this file." >> $$HEADER_TMP; \
echo "" >> $$HEADER_TMP; \
cat openapi/bundled.gen.yaml >> $$HEADER_TMP; \
mv $$HEADER_TMP openapi/bundled.gen.yaml

Copilot uses AI. Check for mistakes.
Comment on lines +25 to +27
- name: bureau_id
in: query
description: bureau_d
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

パラメータ説明が bureau_d になっておりタイポに見えます。bureau_id など意図した表記に修正してください。

Copilot uses AI. Check for mistakes.
delete:
tags:
- user
description: userの複数作成
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

DELETE /users/delete の description が「userの複数作成」になっており、操作内容と矛盾しています(複数削除のはず)。ドキュメントとして誤解を招くので、削除であることが分かる説明に修正してください。

Suggested change
description: userの複数作成
description: userの複数削除

Copilot uses AI. Check for mistakes.
post:
tags:
- password_reset
description: トークンの称号
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

description の「トークンの称号」は文言として不自然で、意味が伝わりにくいです(例: 「トークンの照合」や「トークンの検証」など)。意図に合わせて表現を修正してください。

Suggested change
description: トークンの称号
description: トークンの検証

Copilot uses AI. Check for mistakes.
@gemini-code-assist
Copy link

Summary of Changes

Hello @Kubosaka, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refactors the OpenAPI specification by splitting it into multiple domain-based files, aiming to improve maintainability, navigation, and reduce merge conflicts. It also introduces an automated bundling pipeline using Redocly CLI and updates the code generation process to use the bundled specification. Documentation has been updated to reflect these changes.

Highlights

  • OpenAPI Specification Refactoring: The monolithic openapi.yaml file was split into 23 domain-based files for improved maintainability and reduced merge conflicts.
  • Automated Bundling Pipeline: A new Makefile target and compose.swagger.yml configuration were added to automatically bundle the split OpenAPI files using Redocly CLI.
  • Code Generation: The code generation process was updated to use the bundled OpenAPI specification (bundled.gen.yaml) for generating Go server code and TypeScript hooks.
  • Documentation Updates: The CLAUDE.md and README.md files were updated to reflect the new OpenAPI structure and development workflow.
Changelog
  • .gitignore
    • Added bundled.gen.yaml to exclude list.
  • CLAUDE.md
    • Updated documentation for new OpenAPI structure.
  • Makefile
    • Added Redocly CLI based auto bundling pipeline.
  • README.md
    • Updated documentation for new OpenAPI structure.
  • compose.swagger.yml
    • Referenced bundled.gen.yaml.
  • openapi/openapi.yaml
    • Refactored OpenAPI specification into domain-based files.
  • view/next-project/orval.config.js
    • Referenced bundled.gen.yaml.
Activity
  • The pull request includes the creation of 12 new path definition files and 10 new schema definition files, all organized by domain.
  • The make gen-api command now bundles the OpenAPI specification before generating code.
  • The orval configuration now points to the bundled OpenAPI specification.
  • Trailing slash in Server URL was removed to address lint errors.
  • Enum type mismatches were fixed by converting true/false to "true"/"false".
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

OpenAPI仕様ファイルをドメインベースで分割するリファクタリング、素晴らしいですね!これにより、巨大な単一ファイルから解放され、保守性、可読性、ナビゲーションが大幅に向上し、コンフリクトも削減されることでしょう。全体として非常によい変更だと思います。
いくつか、OpenAPIスキーマの定義やMakefileの改善点についてコメントさせていただきました。ご確認いただけますと幸いです。

Comment on lines +12 to +14
schema:
type: array
$ref: "../schemas/sponsor.yaml#/components/schemas/sponsor"

Choose a reason for hiding this comment

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

critical

レスポンスのスキーマ定義が正しくありません。OpenAPI 3.0では、type: array$ref を同じ階層に記述することはできません。
配列のアイテムとして $ref を指定するには、items プロパティを使用する必要があります。

schema:
  type: array
  items:
    $ref: "../schemas/sponsor.yaml#/components/schemas/sponsor"

この問題は GET /sponsors/{id} (L51-53) にも存在します。修正しないとコード生成が失敗する可能性があるため、クリティカルな問題です。

              schema:
                type: array
                items:
                  $ref: "../schemas/sponsor.yaml#/components/schemas/sponsor"

Comment on lines +51 to +53
schema:
type: array
$ref: "../schemas/sponsor.yaml#/components/schemas/sponsor"

Choose a reason for hiding this comment

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

critical

GET /sponsors と同様に、こちらのレスポンススキーマも正しくありません。type: array$ref を同じ階層に記述することはできません。
items プロパティを使って配列の要素を定義してください。

schema:
  type: array
  items:
    $ref: "../schemas/sponsor.yaml#/components/schemas/sponsor"
              schema:
                type: array
                items:
                  $ref: "../schemas/sponsor.yaml#/components/schemas/sponsor"

Comment on lines +12 to +14
schema:
type: array
$ref: "../schemas/teacher.yaml#/components/schemas/teacher"

Choose a reason for hiding this comment

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

critical

GET /sponsors と同様に、こちらのレスポンススキーマも正しくありません。type: array$ref を同じ階層に記述することはできません。
items プロパティを使って配列の要素を定義してください。

schema:
  type: array
  items:
    $ref: "../schemas/teacher.yaml#/components/schemas/teacher"
              schema:
                type: array
                items:
                  $ref: "../schemas/teacher.yaml#/components/schemas/teacher"

- position
- department_id
- building
- room_number

Choose a reason for hiding this comment

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

critical

teacher スキーマの required リストに room_number が含まれていますが、properties で定義されているプロパティ名は room です。
この不一致によりバリデーションエラーが発生します。room_numberroom に修正してください。

        - room

Comment on lines +173 to +179
@echo "# DO NOT EDIT" > /tmp/header.txt
@echo "# This file is auto-generated from /openapi/openapi.yaml and related files." >> /tmp/header.txt
@echo "# To make changes, edit the source files in /openapi/paths/ and /openapi/schemas/" >> /tmp/header.txt
@echo "# and run 'make gen-api' to regenerate this file." >> /tmp/header.txt
@echo "" >> /tmp/header.txt
@cat openapi/bundled.gen.yaml >> /tmp/header.txt
@mv /tmp/header.txt openapi/bundled.gen.yaml

Choose a reason for hiding this comment

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

medium

gen-apiターゲットでヘッダーを追記する際に、固定パスの /tmp/header.txt を使用していますが、これはCI環境などで並列実行された場合に競合する可能性があります。
より安全な方法として、mktempで一時ファイルを作成するか、以下のようにサブシェルとリダイレクトを利用してアトミックにファイルを置き換えることをお勧めします。

	@( \
		echo "# DO NOT EDIT"; \
		echo "# This file is auto-generated from /openapi/openapi.yaml and related files."; \
		echo "# To make changes, edit the source files in /openapi/paths/ and /openapi/schemas/"; \
		echo "# and run 'make gen-api' to regenerate this file."; \
		echo ""; \
		cat openapi/bundled.gen.yaml \
	) > openapi/bundled.gen.yaml.tmp && mv openapi/bundled.gen.yaml.tmp openapi/bundled.gen.yaml

これにより、より堅牢なスクリプトになります。

description: Filter by year.
required: true
schema:
type: string

Choose a reason for hiding this comment

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

medium

year パスパラメータの型に一貫性がありません。

  • GET /activities/details/{year} (L56) では integer
  • GET /activities/filtered_details/{year} (L117) では string
    となっています。
    年度を表すのであれば、integer に統一するのが良いでしょう。
    また、L114のdescriptionが英語になっている点も、他に合わせて日本語に修正するとより一貫性が高まります。
            type: integer

delete:
tags:
- user
description: userの複数作成

Choose a reason for hiding this comment

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

medium

DELETE /users/delete の description が「userの複数作成」となっていますが、HTTPメソッドとエンドポイント名から「userの複数削除」が正しいと思われます。typoの修正をお勧めします。

      description: userの複数削除

Comment on lines +10 to +13
# content:
# "*/*":
# schema:
# type: array

Choose a reason for hiding this comment

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

medium

GET /users のレスポンス content がコメントアウトされていますが、descriptionには「userの一覧を取得」と記載されています。
もし未実装のエンドポイントであれば、その旨を summarydescription に明記するか、空の配列を返すスキーマを定義しておくと、API仕様書としての明確性が向上します。
例えば、以下のように定義できます。

          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '../schemas/user.yaml#/components/schemas/user'

type: array
example: []
items:
type: number

Choose a reason for hiding this comment

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

medium

destroyTeacherIDs スキーマの deleteIDsitemstypenumber になっています。IDは通常整数なので、より厳密な integer 型を使用することをお勧めします。これにより、意図しない浮動小数点数が含まれるのを防ぐことができます。

            type: integer

type: array
example: []
items:
type: number

Choose a reason for hiding this comment

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

medium

destroyUserIDs スキーマの deleteIDsitemstypenumber になっています。IDは通常整数なので、より厳密な integer 型を使用することをお勧めします。これにより、意図しない浮動小数点数が含まれるのを防ぐことができます。

            type: integer

Copy link
Collaborator

@hikahana hikahana left a comment

Choose a reason for hiding this comment

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

コードチラ見レビューした.動作は後で見る

application/json:
schema:
type: string
$ref: "./paths/health.yaml#/paths/~1"
Copy link
Collaborator

@hikahana hikahana Feb 12, 2026

Choose a reason for hiding this comment

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

[imo]
ちょっと分割したファイルをさらに修正しないとだけど↓みたいにまとめた方がきれいめな感じする.
$ref: "./paths/health.yaml#/paths/~1"の ~1が/ になる仕様すっごい理解しづらいから可読性的にに直したいかも!

Suggested change
$ref: "./paths/health.yaml#/paths/~1"
$ref: "./paths/health.yaml#/health/"
health:
  get:
    tags:
      - health
    description: health check
    responses:
      "200":
        description: OK
        content:
          application/json:
            schema:
              type: string

Comment on lines +171 to +178
@echo "Bundling OpenAPI specification..."
@docker run --rm -v "$(PWD)/openapi:/spec" redocly/cli bundle /spec/openapi.yaml -o /spec/bundled.gen.yaml > /dev/null 2>&1
@echo "# DO NOT EDIT" > /tmp/header.txt
@echo "# This file is auto-generated from /openapi/openapi.yaml and related files." >> /tmp/header.txt
@echo "# To make changes, edit the source files in /openapi/paths/ and /openapi/schemas/" >> /tmp/header.txt
@echo "# and run 'make gen-api' to regenerate this file." >> /tmp/header.txt
@echo "" >> /tmp/header.txt
@cat openapi/bundled.gen.yaml >> /tmp/header.txt
Copy link
Collaborator

Choose a reason for hiding this comment

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

[ask]
この辺のechoっている?どうせ実行したとき見てない気がする

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

これ生成ファイルのコメント書き込み処理やね

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.

3 participants