-
Notifications
You must be signed in to change notification settings - Fork 0
feat: /list/invoicesと/invoiceを/invoicesに統一 #24
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,4 +1,4 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||
| openapi: 3.1.0 | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| info: | ||||||||||||||||||||||||||||||||||||||||||||||||
| title: Checkin API | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -7,7 +7,7 @@ | |||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| paths: | ||||||||||||||||||||||||||||||||||||||||||||||||
| /verify-email: | ||||||||||||||||||||||||||||||||||||||||||||||||
| post: | ||||||||||||||||||||||||||||||||||||||||||||||||
| summary: isct メールアドレスの確認メールを送信 | ||||||||||||||||||||||||||||||||||||||||||||||||
| tags: | ||||||||||||||||||||||||||||||||||||||||||||||||
| - Auth | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -32,7 +32,7 @@ | |||||||||||||||||||||||||||||||||||||||||||||||
| '500': | ||||||||||||||||||||||||||||||||||||||||||||||||
| $ref: '#/components/responses/InternalServerError' | ||||||||||||||||||||||||||||||||||||||||||||||||
| /verify-email/confirm: | ||||||||||||||||||||||||||||||||||||||||||||||||
| get: | ||||||||||||||||||||||||||||||||||||||||||||||||
| summary: メール確認トークンの確認ページを表示 | ||||||||||||||||||||||||||||||||||||||||||||||||
| tags: | ||||||||||||||||||||||||||||||||||||||||||||||||
| - Auth | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -64,7 +64,7 @@ | |||||||||||||||||||||||||||||||||||||||||||||||
| $ref: '#/components/responses/Unauthorized' | ||||||||||||||||||||||||||||||||||||||||||||||||
| '500': | ||||||||||||||||||||||||||||||||||||||||||||||||
| $ref: '#/components/responses/InternalServerError' | ||||||||||||||||||||||||||||||||||||||||||||||||
| post: | ||||||||||||||||||||||||||||||||||||||||||||||||
| summary: メール確認トークンを消費してログインを完了 | ||||||||||||||||||||||||||||||||||||||||||||||||
| tags: | ||||||||||||||||||||||||||||||||||||||||||||||||
| - Auth | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -103,7 +103,7 @@ | |||||||||||||||||||||||||||||||||||||||||||||||
| '500': | ||||||||||||||||||||||||||||||||||||||||||||||||
| $ref: '#/components/responses/InternalServerError' | ||||||||||||||||||||||||||||||||||||||||||||||||
| /csrf: | ||||||||||||||||||||||||||||||||||||||||||||||||
| get: | ||||||||||||||||||||||||||||||||||||||||||||||||
| summary: CSRF トークン用 cookie を発行 | ||||||||||||||||||||||||||||||||||||||||||||||||
| tags: | ||||||||||||||||||||||||||||||||||||||||||||||||
| - Auth | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -217,7 +217,48 @@ | |||||||||||||||||||||||||||||||||||||||||||||||
| $ref: '#/components/responses/Forbidden' | ||||||||||||||||||||||||||||||||||||||||||||||||
| '500': | ||||||||||||||||||||||||||||||||||||||||||||||||
| $ref: '#/components/responses/InternalServerError' | ||||||||||||||||||||||||||||||||||||||||||||||||
| /invoice: | ||||||||||||||||||||||||||||||||||||||||||||||||
| /invoices: | ||||||||||||||||||||||||||||||||||||||||||||||||
| get: | ||||||||||||||||||||||||||||||||||||||||||||||||
| summary: 請求書由来の入金一覧を取得 | ||||||||||||||||||||||||||||||||||||||||||||||||
| tags: | ||||||||||||||||||||||||||||||||||||||||||||||||
| - Invoice | ||||||||||||||||||||||||||||||||||||||||||||||||
| operationId: getInvoices | ||||||||||||||||||||||||||||||||||||||||||||||||
| parameters: | ||||||||||||||||||||||||||||||||||||||||||||||||
| - $ref: '#/components/parameters/CustomerId' | ||||||||||||||||||||||||||||||||||||||||||||||||
| - $ref: '#/components/parameters/SubscriptionId' | ||||||||||||||||||||||||||||||||||||||||||||||||
| - $ref: '#/components/parameters/Limit' | ||||||||||||||||||||||||||||||||||||||||||||||||
| - $ref: '#/components/parameters/StartingAfter' | ||||||||||||||||||||||||||||||||||||||||||||||||
| - $ref: '#/components/parameters/EndingBefore' | ||||||||||||||||||||||||||||||||||||||||||||||||
| - name: status | ||||||||||||||||||||||||||||||||||||||||||||||||
| description: 請求書ステータス | ||||||||||||||||||||||||||||||||||||||||||||||||
| in: query | ||||||||||||||||||||||||||||||||||||||||||||||||
| schema: | ||||||||||||||||||||||||||||||||||||||||||||||||
| type: string | ||||||||||||||||||||||||||||||||||||||||||||||||
| enum: | ||||||||||||||||||||||||||||||||||||||||||||||||
| - draft | ||||||||||||||||||||||||||||||||||||||||||||||||
| - open | ||||||||||||||||||||||||||||||||||||||||||||||||
| - paid | ||||||||||||||||||||||||||||||||||||||||||||||||
| - uncollectible | ||||||||||||||||||||||||||||||||||||||||||||||||
| - void | ||||||||||||||||||||||||||||||||||||||||||||||||
| - name: collection_method | ||||||||||||||||||||||||||||||||||||||||||||||||
| description: 請求書の支払い方法 | ||||||||||||||||||||||||||||||||||||||||||||||||
| in: query | ||||||||||||||||||||||||||||||||||||||||||||||||
| schema: | ||||||||||||||||||||||||||||||||||||||||||||||||
| type: string | ||||||||||||||||||||||||||||||||||||||||||||||||
| enum: | ||||||||||||||||||||||||||||||||||||||||||||||||
| - charge_automatically | ||||||||||||||||||||||||||||||||||||||||||||||||
| - send_invoice | ||||||||||||||||||||||||||||||||||||||||||||||||
| responses: | ||||||||||||||||||||||||||||||||||||||||||||||||
| '200': | ||||||||||||||||||||||||||||||||||||||||||||||||
| description: OK | ||||||||||||||||||||||||||||||||||||||||||||||||
| content: | ||||||||||||||||||||||||||||||||||||||||||||||||
| application/json: | ||||||||||||||||||||||||||||||||||||||||||||||||
| schema: | ||||||||||||||||||||||||||||||||||||||||||||||||
| $ref: '#/components/schemas/Invoice' | ||||||||||||||||||||||||||||||||||||||||||||||||
| '403': | ||||||||||||||||||||||||||||||||||||||||||||||||
| $ref: '#/components/responses/Forbidden' | ||||||||||||||||||||||||||||||||||||||||||||||||
| '500': | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+251
to
+260
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
このエンドポイントは 🧩 追記例 responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '`#/components/schemas/Invoice`'
+ '400':
+ $ref: '`#/components/responses/BadRequest`'
'403':
$ref: '`#/components/responses/Forbidden`'
'500':
$ref: '`#/components/responses/InternalServerError`'📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||
| $ref: '#/components/responses/InternalServerError' | ||||||||||||||||||||||||||||||||||||||||||||||||
| post: | ||||||||||||||||||||||||||||||||||||||||||||||||
| summary: Invoice を作成 | ||||||||||||||||||||||||||||||||||||||||||||||||
| description: session cookie または信頼済み proxy auth が必要。`X-CSRF-Token` も必須 | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -247,7 +288,7 @@ | |||||||||||||||||||||||||||||||||||||||||||||||
| '500': | ||||||||||||||||||||||||||||||||||||||||||||||||
| $ref: '#/components/responses/InternalServerError' | ||||||||||||||||||||||||||||||||||||||||||||||||
| /webhook/invoice-paid: | ||||||||||||||||||||||||||||||||||||||||||||||||
| post: | ||||||||||||||||||||||||||||||||||||||||||||||||
| summary: Webhook の invoice.paid イベントを受け取る | ||||||||||||||||||||||||||||||||||||||||||||||||
| tags: | ||||||||||||||||||||||||||||||||||||||||||||||||
| - Webhook | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -272,51 +313,9 @@ | |||||||||||||||||||||||||||||||||||||||||||||||
| $ref: '#/components/responses/BadRequest' | ||||||||||||||||||||||||||||||||||||||||||||||||
| '500': | ||||||||||||||||||||||||||||||||||||||||||||||||
| $ref: '#/components/responses/InternalServerError' | ||||||||||||||||||||||||||||||||||||||||||||||||
| /list/invoices: | ||||||||||||||||||||||||||||||||||||||||||||||||
| get: | ||||||||||||||||||||||||||||||||||||||||||||||||
| summary: 請求書由来の入金一覧を取得 | ||||||||||||||||||||||||||||||||||||||||||||||||
| tags: | ||||||||||||||||||||||||||||||||||||||||||||||||
| - List | ||||||||||||||||||||||||||||||||||||||||||||||||
| operationId: getInvoices | ||||||||||||||||||||||||||||||||||||||||||||||||
| parameters: | ||||||||||||||||||||||||||||||||||||||||||||||||
| - $ref: '#/components/parameters/CustomerId' | ||||||||||||||||||||||||||||||||||||||||||||||||
| - $ref: '#/components/parameters/SubscriptionId' | ||||||||||||||||||||||||||||||||||||||||||||||||
| - $ref: '#/components/parameters/Limit' | ||||||||||||||||||||||||||||||||||||||||||||||||
| - $ref: '#/components/parameters/StartingAfter' | ||||||||||||||||||||||||||||||||||||||||||||||||
| - $ref: '#/components/parameters/EndingBefore' | ||||||||||||||||||||||||||||||||||||||||||||||||
| - name: status | ||||||||||||||||||||||||||||||||||||||||||||||||
| description: 請求書ステータス | ||||||||||||||||||||||||||||||||||||||||||||||||
| in: query | ||||||||||||||||||||||||||||||||||||||||||||||||
| schema: | ||||||||||||||||||||||||||||||||||||||||||||||||
| type: string | ||||||||||||||||||||||||||||||||||||||||||||||||
| enum: | ||||||||||||||||||||||||||||||||||||||||||||||||
| - draft | ||||||||||||||||||||||||||||||||||||||||||||||||
| - open | ||||||||||||||||||||||||||||||||||||||||||||||||
| - paid | ||||||||||||||||||||||||||||||||||||||||||||||||
| - uncollectible | ||||||||||||||||||||||||||||||||||||||||||||||||
| - void | ||||||||||||||||||||||||||||||||||||||||||||||||
| - name: collection_method | ||||||||||||||||||||||||||||||||||||||||||||||||
| description: 請求書の支払い方法 | ||||||||||||||||||||||||||||||||||||||||||||||||
| in: query | ||||||||||||||||||||||||||||||||||||||||||||||||
| schema: | ||||||||||||||||||||||||||||||||||||||||||||||||
| type: string | ||||||||||||||||||||||||||||||||||||||||||||||||
| enum: | ||||||||||||||||||||||||||||||||||||||||||||||||
| - charge_automatically | ||||||||||||||||||||||||||||||||||||||||||||||||
| - send_invoice | ||||||||||||||||||||||||||||||||||||||||||||||||
| responses: | ||||||||||||||||||||||||||||||||||||||||||||||||
| '200': | ||||||||||||||||||||||||||||||||||||||||||||||||
| description: OK | ||||||||||||||||||||||||||||||||||||||||||||||||
| content: | ||||||||||||||||||||||||||||||||||||||||||||||||
| application/json: | ||||||||||||||||||||||||||||||||||||||||||||||||
| schema: | ||||||||||||||||||||||||||||||||||||||||||||||||
| $ref: '#/components/schemas/Invoice' | ||||||||||||||||||||||||||||||||||||||||||||||||
| '403': | ||||||||||||||||||||||||||||||||||||||||||||||||
| $ref: '#/components/responses/Forbidden' | ||||||||||||||||||||||||||||||||||||||||||||||||
| '500': | ||||||||||||||||||||||||||||||||||||||||||||||||
| $ref: '#/components/responses/InternalServerError' | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| /list/checkout-sessions: | ||||||||||||||||||||||||||||||||||||||||||||||||
| get: | ||||||||||||||||||||||||||||||||||||||||||||||||
| summary: オンライン決済ページ由来の入金一覧を取得 | ||||||||||||||||||||||||||||||||||||||||||||||||
| tags: | ||||||||||||||||||||||||||||||||||||||||||||||||
| - List | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -353,7 +352,7 @@ | |||||||||||||||||||||||||||||||||||||||||||||||
| '500': | ||||||||||||||||||||||||||||||||||||||||||||||||
| $ref: '#/components/responses/InternalServerError' | ||||||||||||||||||||||||||||||||||||||||||||||||
| /admin: | ||||||||||||||||||||||||||||||||||||||||||||||||
| get: | ||||||||||||||||||||||||||||||||||||||||||||||||
| summary: 管理者の一覧を取得 | ||||||||||||||||||||||||||||||||||||||||||||||||
| tags: | ||||||||||||||||||||||||||||||||||||||||||||||||
| - Admin | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GET /invoicesにdescriptionを追加してください。summaryだけだと Spectral のoperation-descriptionに引っかかるので、このエンドポイントだけ生成ドキュメントの情報量が落ちます。📝 追加例
/invoices: get: summary: 請求書由来の入金一覧を取得 + description: 条件に一致する請求書由来の入金一覧を取得 tags: - Invoice📝 Committable suggestion
🧰 Tools
🪛 GitHub Check: Run Spectral
[warning] 221-221:
operation-description Operation "description" must be present and non-empty string. paths./invoices.get
🤖 Prompt for AI Agents