@autobe/agent 0.9.2 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/AutoBeAgent.js +11 -4
- package/lib/AutoBeAgent.js.map +1 -1
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +6 -6
- package/lib/context/AutoBeTokenUsage.d.ts +15 -1
- package/lib/context/AutoBeTokenUsage.js +56 -1
- package/lib/context/AutoBeTokenUsage.js.map +1 -1
- package/lib/factory/createAutoBeApplication.js +288 -643
- package/lib/factory/createAutoBeApplication.js.map +1 -1
- package/lib/index.mjs +5057 -7211
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.js +82 -319
- package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.js.map +1 -1
- package/lib/orchestrate/analyze/AutoBeAnalyzeReviewer.js +0 -1
- package/lib/orchestrate/analyze/AutoBeAnalyzeReviewer.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyze.js +95 -266
- package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
- package/lib/orchestrate/facade/transformFacadeStateMessage.js +2 -2
- package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +1 -1
- package/lib/orchestrate/index.d.ts +2 -2
- package/lib/orchestrate/index.js +4 -4
- package/lib/orchestrate/index.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js +56 -142
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceComponents.js +195 -199
- package/lib/orchestrate/interface/orchestrateInterfaceComponents.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +75 -172
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +772 -1097
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
- package/lib/orchestrate/interface/transformInterfaceHistories.js +2 -0
- package/lib/orchestrate/interface/transformInterfaceHistories.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js +64 -175
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +552 -1073
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaSchema.js +571 -1119
- package/lib/orchestrate/prisma/orchestratePrismaSchema.js.map +1 -1
- package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js +9 -0
- package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js.map +1 -1
- package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js +8 -0
- package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealize.d.ts +11 -0
- package/lib/orchestrate/realize/orchestrateRealize.js +109 -0
- package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -0
- package/lib/orchestrate/realize/orchestrateRealizeCoder.d.ts +25 -0
- package/lib/orchestrate/realize/orchestrateRealizeCoder.js +337 -0
- package/lib/orchestrate/realize/orchestrateRealizeCoder.js.map +1 -0
- package/lib/orchestrate/realize/orchestrateRealizeIntegrator.d.ts +52 -0
- package/lib/orchestrate/realize/orchestrateRealizeIntegrator.js +57 -0
- package/lib/orchestrate/realize/orchestrateRealizeIntegrator.js.map +1 -0
- package/lib/orchestrate/realize/orchestrateRealizePlanner.d.ts +80 -0
- package/lib/orchestrate/realize/orchestrateRealizePlanner.js +53 -0
- package/lib/orchestrate/realize/orchestrateRealizePlanner.js.map +1 -0
- package/lib/orchestrate/realize/orchestrateRealizeValidator.d.ts +46 -0
- package/lib/orchestrate/realize/orchestrateRealizeValidator.js +37 -0
- package/lib/orchestrate/realize/orchestrateRealizeValidator.js.map +1 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +33 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js +3 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js.map +1 -0
- package/lib/orchestrate/realize/transformRealizeCoderHistories.d.ts +5 -0
- package/lib/orchestrate/realize/transformRealizeCoderHistories.js +127 -0
- package/lib/orchestrate/realize/transformRealizeCoderHistories.js.map +1 -0
- package/lib/orchestrate/test/compile/completeTestCode.d.ts +2 -0
- package/lib/orchestrate/test/compile/completeTestCode.js +21 -0
- package/lib/orchestrate/test/compile/completeTestCode.js.map +1 -0
- package/lib/orchestrate/test/{filterTestFileName.js → compile/filterTestFileName.js} +1 -1
- package/lib/orchestrate/test/compile/filterTestFileName.js.map +1 -0
- package/lib/orchestrate/test/compile/getTestExternalDeclarations.d.ts +3 -0
- package/lib/orchestrate/test/compile/getTestExternalDeclarations.js +27 -0
- package/lib/orchestrate/test/compile/getTestExternalDeclarations.js.map +1 -0
- package/lib/orchestrate/test/compile/getTestScenarioArtifacts.d.ts +5 -0
- package/lib/orchestrate/test/{compileTestScenario.js → compile/getTestScenarioArtifacts.js} +10 -5
- package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js.map +1 -0
- package/lib/orchestrate/test/orchestrateTest.js +14 -9
- package/lib/orchestrate/test/orchestrateTest.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestCorrect.d.ts +3 -2
- package/lib/orchestrate/test/orchestrateTestCorrect.js +150 -448
- package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestScenario.js +272 -530
- package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestWrite.d.ts +3 -2
- package/lib/orchestrate/test/orchestrateTestWrite.js +139 -90
- package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -1
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +121 -0
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.js +3 -0
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.js.map +1 -0
- package/lib/orchestrate/test/structures/IAutoBeTestFunction.d.ts +8 -0
- package/lib/{utils/types/BackoffOptions.js → orchestrate/test/structures/IAutoBeTestFunction.js} +1 -1
- package/lib/orchestrate/test/structures/IAutoBeTestFunction.js.map +1 -0
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +14 -2
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +112 -0
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.js +3 -0
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.js.map +1 -0
- package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.d.ts +7 -0
- package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.js +3 -0
- package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.js.map +1 -0
- package/lib/orchestrate/test/transformTestCorrectHistories.d.ts +3 -2
- package/lib/orchestrate/test/transformTestCorrectHistories.js +28 -67
- package/lib/orchestrate/test/transformTestCorrectHistories.js.map +1 -1
- package/lib/orchestrate/test/transformTestWriteHistories.d.ts +5 -4
- package/lib/orchestrate/test/transformTestWriteHistories.js +168 -43
- package/lib/orchestrate/test/transformTestWriteHistories.js.map +1 -1
- package/lib/structures/IAutoBeConfig.d.ts +11 -0
- package/lib/utils/backoffRetry.d.ts +4 -7
- package/lib/utils/backoffRetry.js +19 -37
- package/lib/utils/backoffRetry.js.map +1 -1
- package/lib/utils/forceRetry.d.ts +1 -0
- package/lib/{orchestrate/orchestrateRealize.js → utils/forceRetry.js} +15 -8
- package/lib/utils/forceRetry.js.map +1 -0
- package/package.json +8 -7
- package/src/AutoBeAgent.ts +17 -3
- package/src/constants/AutoBeSystemPromptConstant.ts +6 -6
- package/src/context/AutoBeTokenUsage.ts +85 -1
- package/src/factory/createAutoBeApplication.ts +2 -3
- package/src/orchestrate/analyze/AutoBeAnalyzeAgent.ts +8 -3
- package/src/orchestrate/analyze/AutoBeAnalyzeReviewer.ts +0 -1
- package/src/orchestrate/analyze/orchestrateAnalyze.ts +6 -5
- package/src/orchestrate/facade/transformFacadeStateMessage.ts +2 -1
- package/src/orchestrate/index.ts +2 -2
- package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +4 -3
- package/src/orchestrate/interface/orchestrateInterfaceComponents.ts +26 -23
- package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +6 -4
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +14 -11
- package/src/orchestrate/interface/transformInterfaceHistories.ts +2 -0
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +10 -5
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +11 -5
- package/src/orchestrate/prisma/orchestratePrismaSchema.ts +16 -8
- package/src/orchestrate/prisma/transformPrismaComponentsHistories.ts +9 -0
- package/src/orchestrate/prisma/transformPrismaSchemaHistories.ts +8 -0
- package/src/orchestrate/realize/orchestrateRealize.ts +169 -0
- package/src/orchestrate/realize/orchestrateRealizeCoder.ts +156 -0
- package/src/orchestrate/realize/orchestrateRealizeIntegrator.ts +75 -0
- package/src/orchestrate/realize/orchestrateRealizePlanner.ts +115 -0
- package/src/orchestrate/realize/orchestrateRealizeValidator.ts +64 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.ts +36 -0
- package/src/orchestrate/realize/transformRealizeCoderHistories.ts +136 -0
- package/src/orchestrate/test/compile/completeTestCode.ts +35 -0
- package/src/orchestrate/test/{filterTestFileName.ts → compile/filterTestFileName.ts} +1 -1
- package/src/orchestrate/test/compile/getTestExternalDeclarations.ts +24 -0
- package/src/orchestrate/test/{compileTestScenario.ts → compile/getTestScenarioArtifacts.ts} +16 -8
- package/src/orchestrate/test/experimental/orchestrateTestCorrect.ast +240 -0
- package/src/orchestrate/test/experimental/orchestrateTestWrite.ast +316 -0
- package/src/orchestrate/test/experimental/transformTestCorrectHistories.ast +52 -0
- package/src/orchestrate/test/orchestrateTest.ts +33 -16
- package/src/orchestrate/test/orchestrateTestCorrect.ts +109 -497
- package/src/orchestrate/test/orchestrateTestScenario.ts +102 -71
- package/src/orchestrate/test/orchestrateTestWrite.ts +55 -181
- package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +126 -0
- package/src/orchestrate/test/structures/IAutoBeTestFunction.ts +10 -0
- package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +14 -2
- package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +117 -0
- package/src/orchestrate/test/structures/IAutoBeTestWriteResult.ts +9 -0
- package/src/orchestrate/test/transformTestCorrectHistories.ts +38 -71
- package/src/orchestrate/test/transformTestWriteHistories.ts +88 -46
- package/src/structures/IAutoBeConfig.ts +9 -0
- package/src/utils/backoffRetry.ts +25 -36
- package/src/utils/forceRetry.ts +13 -0
- package/lib/factory/invertOpenApiDocument.d.ts +0 -3
- package/lib/factory/invertOpenApiDocument.js +0 -51
- package/lib/factory/invertOpenApiDocument.js.map +0 -1
- package/lib/orchestrate/orchestrateRealize.d.ts +0 -5
- package/lib/orchestrate/orchestrateRealize.js.map +0 -1
- package/lib/orchestrate/test/compileTestScenario.d.ts +0 -5
- package/lib/orchestrate/test/compileTestScenario.js.map +0 -1
- package/lib/orchestrate/test/filterTestFileName.js.map +0 -1
- package/lib/utils/StringUtil.d.ts +0 -4
- package/lib/utils/StringUtil.js +0 -43
- package/lib/utils/StringUtil.js.map +0 -1
- package/lib/utils/types/BackoffOptions.d.ts +0 -12
- package/lib/utils/types/BackoffOptions.js.map +0 -1
- package/src/factory/invertOpenApiDocument.ts +0 -63
- package/src/orchestrate/orchestrateRealize.ts +0 -18
- package/src/utils/StringUtil.ts +0 -45
- package/src/utils/types/BackoffOptions.ts +0 -15
- /package/lib/orchestrate/test/{filterTestFileName.d.ts → compile/filterTestFileName.d.ts} +0 -0
|
@@ -112,7 +112,6 @@ function process(ctx, endpoints) {
|
|
|
112
112
|
describe: null,
|
|
113
113
|
} }),
|
|
114
114
|
histories: (0, transformInterfaceHistories_1.transformInterfaceHistories)(ctx.state(), "# API Endpoint Generator System Prompt\n\n## 1. Overview\n\nYou are the API Endpoint Generator, specializing in creating comprehensive lists of REST API endpoints with their paths and HTTP methods based on requirements documents, Prisma schema files, and ERD diagrams. You must output your results by calling the `makeEndpoints()` function.\n\n## 2. Your Mission\n\nAnalyze the provided information and generate a complete array of API endpoints that includes EVERY entity from the Prisma schema and addresses ALL functional requirements. You will call the `makeEndpoints()` function with an array of endpoint definitions that contain ONLY path and method properties.\n\n## 3. Output Method\n\nYou MUST call the `makeEndpoints()` function with your results.\n\n```typescript\nmakeEndpoints({\n endpoints: [\n {\n \"path\": \"/resources\",\n \"method\": \"get\"\n },\n {\n \"path\": \"/resources/{resourceId}\",\n \"method\": \"get\"\n },\n // more endpoints...\n ],\n});\n```\n\n## 4. Endpoint Design Principles\n\n### 4.1. Follow REST principles\n\n- Resource-centric URL design (use nouns, not verbs)\n- Appropriate HTTP methods:\n - `put`: Retrieve a collection resources with searching information\n - `get`: Retrieve a single resource\n - `post`: Create new resources\n - `delete`: Remove resources\n - `patch`: Partial updates or complex queries with request bodies\n\n### 4.2. Path Formatting Rules\n\n1. **Use camelCase for all resource names in paths**\n - Example: Use `/attachmentFiles` instead of `/attachment-files`\n\n2. **Use domain prefixes with slashes**\n - Example: Use `/shopping/channels` instead of `/shopping-channels`\n - **Important**: If you identify any service-related prefix in the DB schema, use it as the global prefix for ALL API endpoints\n\n3. **Structure hierarchical relationships with slashes**\n - Example: For a child entity like \"sale-snapshots\" under \"sales\", use `/shopping/sales/snapshots` instead of `/shopping-sale-snapshots`\n\n### 4.3. Path patterns\n\n- Collection endpoints: `/domain/resources`\n- Single resource endpoints: `/domain/resources/{resourceId}`\n- Nested resources: `/domain/resources/{resourceId}/subsidiaries/{subsidiaryId}`\n\n### 4.4. Standard API operations per entity\n\nFor EACH independent entity identified in the requirements document, Prisma DB Schema, and ERD diagram, you MUST include these standard endpoints:\n\n1. `PATCH /entity-plural` - List entities with searching\n2. `GET /entity-plural/{id}` - Get specific entity\n3. `POST /entity-plural` - Create entity\n4. `PUT /entity-plural/{id}` - Update entity\n5. `DELETE /entity-plural/{id}` - Delete entity\n\n## 5. Critical Requirements\n\n- **Function Call Required**: You MUST use the `makeEndpoints()` function to submit your results\n- **Complete Coverage**: EVERY independent entity in the Prisma schema MUST have corresponding endpoints\n- **No Omissions**: Process ALL independent entities regardless of quantity\n- **Strict Output Format**: ONLY include objects with `path` and `method` properties in your function call\n- **No Additional Properties**: Do NOT include any properties beyond `path` and `method`\n\n## 6. Implementation Strategy\n\n1. Identify ALL independent entities from the Prisma schema, requirements document, and ERD\n2. Identify service-related prefixes in the DB schema to use as the global prefix for ALL API endpoints\n3. Identify domain prefixes and hierarchical relationships between entities\n4. For each independent entity:\n - Convert kebab-case names to camelCase (e.g., `attachment-files` \u2192 `attachmentFiles`)\n - Structure paths to reflect domain and hierarchical relationships\n - Generate the standard endpoints\n5. Add endpoints for relationships and complex operations\n6. Verify ALL independent entities and requirements are covered\n7. Call the `makeEndpoints()` function with your complete array\n\nYour implementation MUST be COMPLETE and EXHAUSTIVE, ensuring NO independent entity or requirement is missed, while strictly adhering to the `AutoBeOpenApi.IEndpoint` interface format. Calling the `makeEndpoints()` function is MANDATORY.\n\n## 7. Path Transformation Examples\n\n| Original Format | Improved Format | Explanation |\n|-----------------|-----------------|-------------|\n| `/attachment-files` | `/attachmentFiles` | Convert kebab-case to camelCase |\n| `/bbs-articles` | `/bbs/articles` | Separate domain prefix with slash |\n| `/bbs-article-snapshots` | `/bbs/articles/snapshots` | Reflect hierarchy in URL structure |\n| `/shopping-sale-snapshots` | `/shopping/sales/snapshots` | Both domain prefix and hierarchy properly formatted |\n\nYour implementation MUST be COMPLETE and EXHAUSTIVE, ensuring NO independent entity or requirement is missed, while strictly adhering to the `AutoBeOpenApi.IEndpoint` interface format. Calling the `makeEndpoints()` function is MANDATORY.\n\nYou're right - I removed too much of the original structure. Here's a better version that maintains the section structure while adding explanations:\n\n## 8. Example Cases\n\nBelow are example projects that demonstrate the proper endpoint formatting.\n\n### 8.1. BBS (Bulletin Board System)\n\n```json\n{\"endpoints\":[{\"path\":\"/bbs/articles\",\"method\":\"post\"},{\"path\":\"/bbs/articles\",\"method\":\"patch\"},{\"path\":\"/bbs/articles/abridges\",\"method\":\"patch\"},{\"path\":\"/bbs/articles/{id}\",\"method\":\"get\"},{\"path\":\"/bbs/articles/{id}\",\"method\":\"put\"},{\"path\":\"/bbs/articles/{id}\",\"method\":\"delete\"},{\"path\":\"/bbs/articles/{articleId}/comments\",\"method\":\"post\"},{\"path\":\"/bbs/articles/{articleId}/comments\",\"method\":\"patch\"},{\"path\":\"/bbs/articles/{articleId}/comments/{id}\",\"method\":\"get\"},{\"path\":\"/bbs/articles/{articleId}/comments/{id}\",\"method\":\"put\"},{\"path\":\"/bbs/articles/{articleId}/comments/{id}\",\"method\":\"delete\"},{\"path\":\"/monitors/health\",\"method\":\"get\"},{\"path\":\"/monitors/performance\",\"method\":\"get\"},{\"path\":\"/monitors/system\",\"method\":\"get\"}]}\n```\n\n**Key points**: Notice how the domain prefix \"bbs\" is separated with a slash, entities use camelCase, and hierarchical relationships are expressed (e.g., `/bbs/articles/{articleId}/comments`).\n\n### 8.2. Shopping Mall\n\n```json\n{\"endpoints\":[{\"path\":\"/monitors/health\",\"method\":\"get\"},{\"path\":\"/monitors/performance\",\"method\":\"get\"},{\"path\":\"/monitors/system\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/authenticate\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/authenticate\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/authenticate/login\",\"method\":\"put\"},{\"path\":\"/shoppings/admins/coupons\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/coupons\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/coupons/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/coupons/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/admins/deposits\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/deposits\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/deposits/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/deposits/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/admins/deposits/{code}/get\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/mileages\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/mileages\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/mileages/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/mileages/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/admins/mileages/{code}/get\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/mileages/donations\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/mileages/donations\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/mileages/donations/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/orders\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/orders/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/sales/details\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/sales/{saleId}/questions/{inquiryId}/comments\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/sales/{saleId}/questions/{inquiryId}/comments\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales/{saleId}/questions/{inquiryId}/comments/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/sales/{saleId}/questions/{inquiryId}/comments/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/admins/sales/{saleId}/questions\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales/{saleId}/questions/abridges\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales/{saleId}/questions/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/sales/{saleId}/reviews/{inquiryId}/comments\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/sales/{saleId}/reviews/{inquiryId}/comments\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales/{saleId}/reviews/{inquiryId}/comments/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/sales/{saleId}/reviews/{inquiryId}/comments/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/admins/sales/{saleId}/reviews\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales/{saleId}/reviews/abridges\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales/{saleId}/reviews/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/sales/{saleId}/snapshots\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales/{saleId}/snapshots/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/sales/{saleId}/snapshots/{id}/flip\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/systematic/channels/{channelCode}/categories\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/systematic/channels/{channelCode}/categories\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/systematic/channels/{channelCode}/categories/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/systematic/channels/{channelCode}/categories/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/admins/systematic/channels/{channelCode}/categories/merge\",\"method\":\"delete\"},{\"path\":\"/shoppings/admins/systematic/channels/{channelCode}/categories/{id}/invert\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/systematic/channels\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/systematic/channels\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/systematic/channels/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/systematic/channels/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/admins/systematic/channels/merge\",\"method\":\"delete\"},{\"path\":\"/shoppings/admins/systematic/channels/hierarchical\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/systematic/channels/{code}/get\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/systematic/sections\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/systematic/sections\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/systematic/sections/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/systematic/sections/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/admins/systematic/sections/merge\",\"method\":\"delete\"},{\"path\":\"/shoppings/admins/systematic/sections/{code}/get\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/authenticate/refresh\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/authenticate\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/authenticate\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/authenticate/join\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/authenticate/login\",\"method\":\"put\"},{\"path\":\"/shoppings/customers/authenticate/activate\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/authenticate/external\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/authenticate/password/change\",\"method\":\"put\"},{\"path\":\"/shoppings/customers/coupons\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/coupons/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/coupons/tickets\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/coupons/tickets\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/coupons/tickets/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/deposits/charges\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/deposits/charges\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/deposits/charges/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/deposits/charges/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/customers/deposits/charges/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/customers/deposits/charges/{chargeId}/publish/able\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/deposits/charges/{chargeId}/publish\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/deposits/histories\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/deposits/histories/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/deposits/histories/balance\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/mileages/histories\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/mileages/histories/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/mileages/histories/balance\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/carts/commodities\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/carts/commodities\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/carts/commodities/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/carts/commodities/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/customers/carts/commodities/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/customers/carts/commodities/{id}/replica\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/carts/commodities/discountable\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/orders\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/orders\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/orders/direct\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/orders/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/orders/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/customers/orders/{id}/price\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/orders/{id}/discountable\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/orders/{id}/discount\",\"method\":\"put\"},{\"path\":\"/shoppings/customers/orders/{orderId}/goods/{id}/confirm\",\"method\":\"put\"},{\"path\":\"/shoppings/customers/orders/{orderId}/publish/able\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/orders/{orderId}/publish\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/orders/{orderId}/publish\",\"method\":\"delete\"},{\"path\":\"/shoppings/customers/sales/details\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions/{inquiryId}/comments\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions/{inquiryId}/comments\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions/{inquiryId}/comments/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions/{inquiryId}/comments/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions/{id}\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions/abridges\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews/{inquiryId}/comments\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews/{inquiryId}/comments\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews/{inquiryId}/comments/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews/{inquiryId}/comments/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews/{id}\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews/abridges\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales/{saleId}/snapshots\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales/{saleId}/snapshots/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/sales/{saleId}/snapshots/{id}/flip\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/systematic/channels/{channelCode}/categories\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/systematic/channels/{channelCode}/categories/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/systematic/channels/{channelCode}/categories/{id}/invert\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/systematic/channels\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/systematic/channels/hierarchical\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/systematic/channels/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/systematic/channels/{code}/get\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/systematic/sections\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/systematic/sections/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/systematic/sections/{code}/get\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/authenticate\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/authenticate\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/authenticate/login\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/deliveries\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/deliveries\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/deliveries/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/deliveries/incompletes\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/deliveries/{deliveryId}/journeys\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/deliveries/{deliveryId}/journeys/{id}/complete\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/deliveries/{deliveryId}/journeys/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/sellers/deliveries/{deliveryId}/shippers\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/coupons\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/coupons\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/coupons/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/coupons/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/sellers/orders\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/orders/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/sales\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/sales\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/sales/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/sales/{id}/open\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/sales/{id}/replica\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/sales/{id}/pause\",\"method\":\"delete\"},{\"path\":\"/shoppings/sellers/sales/{id}/suspend\",\"method\":\"delete\"},{\"path\":\"/shoppings/sellers/sales/{id}/restore\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/sales/details\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions/{questionId}/answer\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions/{questionId}/answer\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions/{inquiryId}/comments\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions/{inquiryId}/comments\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions/{inquiryId}/comments/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions/{inquiryId}/comments/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions/abridges\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews/{reviewId}/answer\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews/{reviewId}/answer\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews/{inquiryId}/comments\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews/{inquiryId}/comments\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews/{inquiryId}/comments/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews/{inquiryId}/comments/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews/abridges\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/snapshots/{id}/replica\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/snapshots\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/snapshots/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/snapshots/{id}/flip\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/units/{unitId}/stocks/{stockId}/supplements\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/units/{unitId}/stocks/{stockId}/supplements\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/units/{unitId}/stocks/{stockId}/supplements/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/units/{unitId}/stocks/{stockId}/supplements/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/sellers/systematic/channels/{channelCode}/categories\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/systematic/channels/{channelCode}/categories/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/systematic/channels/{channelCode}/categories/{id}/invert\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/systematic/channels\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/systematic/channels/hierarchical\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/systematic/channels/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/systematic/channels/{code}/get\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/systematic/sections\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/systematic/sections/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/systematic/sections/{code}/get\",\"method\":\"get\"}]}\n```\n\n**Key points**: Observe how `/shopping` is used as domain prefix, hierarchical relationships are reflected in paths (e.g., `/shopping/sales/{saleId}/reviews/{reviewId}`), and consistent HTTP methods are applied across similar operations." /* AutoBeSystemPromptConstant.INTERFACE_ENDPOINT */),
|
|
115
|
-
tokenUsage: ctx.usage(),
|
|
116
115
|
controllers: [
|
|
117
116
|
createApplication({
|
|
118
117
|
model: ctx.model,
|
|
@@ -125,13 +124,18 @@ function process(ctx, endpoints) {
|
|
|
125
124
|
],
|
|
126
125
|
});
|
|
127
126
|
(0, enforceToolCall_1.enforceToolCall)(agentica);
|
|
128
|
-
yield agentica
|
|
127
|
+
yield agentica
|
|
128
|
+
.conversate([
|
|
129
129
|
"Make API operations for below endpoints:",
|
|
130
130
|
"",
|
|
131
131
|
"```json",
|
|
132
132
|
JSON.stringify(Array.from(endpoints), null, 2),
|
|
133
133
|
"```",
|
|
134
|
-
].join("\n"))
|
|
134
|
+
].join("\n"))
|
|
135
|
+
.finally(() => {
|
|
136
|
+
const tokenUsage = agentica.getTokenUsage();
|
|
137
|
+
ctx.usage().record(tokenUsage, ["interface"]);
|
|
138
|
+
});
|
|
135
139
|
if (pointer.value === null)
|
|
136
140
|
throw new Error("Failed to create operations."); // never be happened
|
|
137
141
|
return pointer.value;
|
|
@@ -141,7 +145,7 @@ function createApplication(props) {
|
|
|
141
145
|
(0, assertSchemaModel_1.assertSchemaModel)(props.model);
|
|
142
146
|
const application = collection[props.model];
|
|
143
147
|
application.functions[0].validate = (next) => {
|
|
144
|
-
const result = (() => { const _io0 = input => Array.isArray(input.operations) && input.operations.every(elem => "object" === typeof elem && null !== elem && _io1(elem)); const _io1 = input => "string" === typeof input.specification && "string" === typeof input.description && "string" === typeof input.summary && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io6(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io7(input.responseBody)) && "string" === typeof input.path && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _io2 = input => "string" === typeof input.name && "string" === typeof input.description && ("object" === typeof input.schema && null !== input.schema && _iu0(input.schema)); const _io3 = input => (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 && 0 < input.multipleOf)) && "integer" === input.type; const _io4 = input => (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && "number" === input.type; const _io5 = input => (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type; const _io6 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io7 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _iu0 = input => (() => {
|
|
148
|
+
const result = (() => { const _io0 = input => Array.isArray(input.operations) && input.operations.every(elem => "object" === typeof elem && null !== elem && _io1(elem)); const _io1 = input => "string" === typeof input.specification && "string" === typeof input.description && "string" === typeof input.summary && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io6(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io7(input.responseBody)) && (null === input.authorization || undefined === input.authorization || "object" === typeof input.authorization && null !== input.authorization && _io8(input.authorization)) && "string" === typeof input.path && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _io2 = input => "string" === typeof input.name && "string" === typeof input.description && ("object" === typeof input.schema && null !== input.schema && _iu0(input.schema)); const _io3 = input => (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 && 0 < input.multipleOf)) && "integer" === input.type; const _io4 = input => (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && "number" === input.type; const _io5 = input => (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type; const _io6 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io7 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io8 = input => Array.isArray(input.role) && input.role.every(elem => "string" === typeof elem) && "Bearer" === input.type; const _iu0 = input => (() => {
|
|
145
149
|
if ("number" === input.type)
|
|
146
150
|
return _io4(input);
|
|
147
151
|
else if ("integer" === input.type)
|
|
@@ -154,12 +158,12 @@ function createApplication(props) {
|
|
|
154
158
|
path: _path + ".operations",
|
|
155
159
|
expected: "Array<AutoBeOpenApi.IOperation>",
|
|
156
160
|
value: input.operations
|
|
157
|
-
})) && input.operations.map((elem,
|
|
158
|
-
path: _path + ".operations[" +
|
|
161
|
+
})) && input.operations.map((elem, _index4) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
162
|
+
path: _path + ".operations[" + _index4 + "]",
|
|
159
163
|
expected: "AutoBeOpenApi.IOperation",
|
|
160
164
|
value: elem
|
|
161
|
-
})) && _vo1(elem, _path + ".operations[" +
|
|
162
|
-
path: _path + ".operations[" +
|
|
165
|
+
})) && _vo1(elem, _path + ".operations[" + _index4 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
166
|
+
path: _path + ".operations[" + _index4 + "]",
|
|
163
167
|
expected: "AutoBeOpenApi.IOperation",
|
|
164
168
|
value: elem
|
|
165
169
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -182,12 +186,12 @@ function createApplication(props) {
|
|
|
182
186
|
path: _path + ".parameters",
|
|
183
187
|
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
184
188
|
value: input.parameters
|
|
185
|
-
})) && input.parameters.map((elem,
|
|
186
|
-
path: _path + ".parameters[" +
|
|
189
|
+
})) && input.parameters.map((elem, _index5) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
190
|
+
path: _path + ".parameters[" + _index5 + "]",
|
|
187
191
|
expected: "AutoBeOpenApi.IParameter",
|
|
188
192
|
value: elem
|
|
189
|
-
})) && _vo2(elem, _path + ".parameters[" +
|
|
190
|
-
path: _path + ".parameters[" +
|
|
193
|
+
})) && _vo2(elem, _path + ".parameters[" + _index5 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
194
|
+
path: _path + ".parameters[" + _index5 + "]",
|
|
191
195
|
expected: "AutoBeOpenApi.IParameter",
|
|
192
196
|
value: elem
|
|
193
197
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -210,6 +214,14 @@ function createApplication(props) {
|
|
|
210
214
|
path: _path + ".responseBody",
|
|
211
215
|
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
212
216
|
value: input.responseBody
|
|
217
|
+
}), null === input.authorization || undefined === input.authorization || ("object" === typeof input.authorization && null !== input.authorization || _report(_exceptionable, {
|
|
218
|
+
path: _path + ".authorization",
|
|
219
|
+
expected: "(AutoBeOpenApi.IAuthorization | null | undefined)",
|
|
220
|
+
value: input.authorization
|
|
221
|
+
})) && _vo8(input.authorization, _path + ".authorization", true && _exceptionable) || _report(_exceptionable, {
|
|
222
|
+
path: _path + ".authorization",
|
|
223
|
+
expected: "(AutoBeOpenApi.IAuthorization | null | undefined)",
|
|
224
|
+
value: input.authorization
|
|
213
225
|
}), "string" === typeof input.path || _report(_exceptionable, {
|
|
214
226
|
path: _path + ".path",
|
|
215
227
|
expected: "string",
|
|
@@ -350,6 +362,22 @@ function createApplication(props) {
|
|
|
350
362
|
path: _path + ".typeName",
|
|
351
363
|
expected: "string",
|
|
352
364
|
value: input.typeName
|
|
365
|
+
})].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => [(Array.isArray(input.role) || _report(_exceptionable, {
|
|
366
|
+
path: _path + ".role",
|
|
367
|
+
expected: "Array<string>",
|
|
368
|
+
value: input.role
|
|
369
|
+
})) && input.role.map((elem, _index6) => "string" === typeof elem || _report(_exceptionable, {
|
|
370
|
+
path: _path + ".role[" + _index6 + "]",
|
|
371
|
+
expected: "string",
|
|
372
|
+
value: elem
|
|
373
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
374
|
+
path: _path + ".role",
|
|
375
|
+
expected: "Array<string>",
|
|
376
|
+
value: input.role
|
|
377
|
+
}), "Bearer" === input.type || _report(_exceptionable, {
|
|
378
|
+
path: _path + ".type",
|
|
379
|
+
expected: "\"Bearer\"",
|
|
380
|
+
value: input.type
|
|
353
381
|
})].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
354
382
|
if ("number" === input.type)
|
|
355
383
|
return _vo4(input, _path, true && _exceptionable);
|
|
@@ -439,272 +467,7 @@ const claude = {
|
|
|
439
467
|
description: "Array of API operations to generate.\n\nEach operation in this array must include:\n\n- Specification: Detailed API specification with clear purpose and\n functionality\n- Path: Resource-centric URL path (e.g., \"/resources/{resourceId}\")\n- Method: HTTP method (get, post, put, delete, patch)\n- Description: Extremely detailed multi-paragraph description referencing\n Prisma schema comments\n- Summary: Concise one-sentence summary of the endpoint\n- Parameters: Array of all necessary parameters with descriptions and schema\n definitions\n- RequestBody: For POST/PUT/PATCH methods, with typeName referencing\n components.schemas\n- ResponseBody: With typeName referencing appropriate response type\n\nAll operations must follow strict quality standards:\n\n1. Detailed descriptions referencing Prisma schema comments\n2. Accurate parameter definitions matching path parameters\n3. Appropriate request/response body type references\n4. Consistent patterns for CRUD operations\n\nFor list retrievals (typically PATCH), include pagination, search, and\nsorting. For detail retrieval (GET), return a single resource. For creation\n(POST), use .ICreate request body. For modification (PUT), use .IUpdate\nrequest body.",
|
|
440
468
|
type: "array",
|
|
441
469
|
items: {
|
|
442
|
-
|
|
443
|
-
type: "object",
|
|
444
|
-
properties: {
|
|
445
|
-
specification: {
|
|
446
|
-
title: "Specification of the API operation",
|
|
447
|
-
description: "Specification of the API operation.\n\nBefore defining the API operation interface, please describe what you're\nplanning to write in this `specification` field.\n\nThe specification must be fully detailed and clear, so that anyone can\nunderstand the purpose and functionality of the API operation and its\nrelated components (e.g., {@link path}, {@link parameters},\n{@link requestBody}).\n\nIMPORTANT: The specification MUST identify which Prisma DB table this\noperation is associated with, helping ensure complete coverage of all\ndatabase entities.",
|
|
448
|
-
type: "string"
|
|
449
|
-
},
|
|
450
|
-
description: {
|
|
451
|
-
title: "Detailed description about the API operation",
|
|
452
|
-
description: "Detailed description about the API operation.\n\nIMPORTANT: This field MUST be extensively detailed and MUST reference the\ndescription comments from the related Prisma DB schema tables and\ncolumns. The description should be organized into MULTIPLE PARAGRAPHS\nseparated by line breaks to improve readability and comprehension.\n\nFor example, include separate paragraphs for:\n\n- The purpose and overview of the API operation\n- Security considerations and user permissions\n- Relationship to underlying database entities\n- Validation rules and business logic\n- Related API operations that might be used together with this one\n- Expected behavior and error handling\n\nWhen writing the description, be sure to incorporate the corresponding DB\nschema's description comments, matching the level of detail and style of\nthose comments. This ensures consistency between the API documentation\nand database structure.\n\nIf there's a dependency to other APIs, please describe the dependency API\noperation in this field with detailed reason. For example, if this API\noperation needs a pre-execution of other API operation, it must be\nexplicitly described.\n\n- `GET /shoppings/customers/sales` must be pre-executed to get entire list\n of summarized sales. Detailed sale information would be obtained by\n specifying the sale ID in the path parameter.\n\n> MUST be written in English. Never use other languages.",
|
|
453
|
-
type: "string"
|
|
454
|
-
},
|
|
455
|
-
summary: {
|
|
456
|
-
title: "Short summary of the API operation",
|
|
457
|
-
description: "Short summary of the API operation.\n\nThis should be a concise description of the API operation, typically one\nsentence long. It should provide a quick overview of what the API does\nwithout going into too much detail.\n\nThis summary will be used in the OpenAPI documentation to give users a\nquick understanding of the API operation's purpose.\n\nIMPORTANT: The summary should clearly indicate which Prisma DB table this\noperation relates to, helping to ensure all tables have API coverage.\n\n> MUST be written in English. Never use other languages",
|
|
458
|
-
type: "string"
|
|
459
|
-
},
|
|
460
|
-
parameters: {
|
|
461
|
-
title: "List of path parameters",
|
|
462
|
-
description: "List of path parameters.\n\nNote that, the {@link AutoBeOpenApi.IParameter.name identifier name} of\npath parameter must be corresponded to the\n{@link path API operation path}.\n\nFor example, if there's an API operation which has {@link path} of\n`/shoppings/customers/sales/{saleId}/questions/${questionId}/comments/${commentId}`,\nits list of {@link AutoBeOpenApi.IParameter.name path parameters} must be\nlike:\n\n- `saleId`\n- `questionId`\n- `commentId`",
|
|
463
|
-
type: "array",
|
|
464
|
-
items: {
|
|
465
|
-
description: "Description of the current {@link AutoBeOpenApi.IParameter} type:\n\n> Path parameter information for API routes.\n> \n> This interface defines a path parameter that appears in the URL of an API\n> endpoint. Path parameters are enclosed in curly braces in the\n> {@link AutoBeOpenApi.IOperation.path operation path} and must be defined\n> with their types and descriptions.\n> \n> For example, if API operation path is\n> `/shoppings/customers/sales/{saleId}/questions/${questionId}/comments/${commentId}`,\n> the path parameters should be like below:\n> \n> ```json\n> {\n> \"path\": \"/shoppings/customers/sales/{saleId}/questions/${questionId}/comments/${commentId}\",\n> \"method\": \"get\",\n> \"parameters\": [\n> {\n> \"name\": \"saleId\",\n> \"in\": \"path\",\n> \"schema\": { \"type\": \"string\", \"format\": \"uuid\" },\n> \"description\": \"Target sale's ID\"\n> },\n> {\n> \"name\": \"questionId\",\n> \"in\": \"path\",\n> \"schema\": { \"type\": \"string\", \"format\": \"uuid\" },\n> \"description\": \"Target question's ID\"\n> },\n> {\n> \"name\": \"commentId\",\n> \"in\": \"path\",\n> \"schema\": { \"type\": \"string\", \"format\": \"uuid\" },\n> \"description\": \"Target comment's ID\"\n> }\n> ]\n> }\n> ```",
|
|
466
|
-
type: "object",
|
|
467
|
-
properties: {
|
|
468
|
-
name: {
|
|
469
|
-
title: "Identifier name of the path parameter",
|
|
470
|
-
description: "Identifier name of the path parameter.\n\nThis name must match exactly with the parameter name in the route path.\nIt must be corresponded to the\n{@link AutoBeOpenApi.IOperation.path API operation path}.",
|
|
471
|
-
type: "string"
|
|
472
|
-
},
|
|
473
|
-
description: {
|
|
474
|
-
title: "Description about the path parameter",
|
|
475
|
-
description: "Description about the path parameter.\n\nMake short, concise and clear description about the path parameter.\n\n> MUST be written in English. Never use other languages.",
|
|
476
|
-
type: "string"
|
|
477
|
-
},
|
|
478
|
-
schema: {
|
|
479
|
-
title: "Type schema of the path parameter",
|
|
480
|
-
description: "Type schema of the path parameter.\n\nPath parameters are typically primitive types like\n{@link AutoBeOpenApi.IJsonSchema.IString strings},\n{@link AutoBeOpenApi.IJsonSchema.IInteger integers},\n{@link AutoBeOpenApi.IJsonSchema.INumber numbers}.\n\nIf you need other types, please use request body instead with object type\nencapsulation.",
|
|
481
|
-
oneOf: [
|
|
482
|
-
{
|
|
483
|
-
type: "object",
|
|
484
|
-
properties: {
|
|
485
|
-
minimum: {
|
|
486
|
-
title: "Minimum value restriction",
|
|
487
|
-
description: "Minimum value restriction.",
|
|
488
|
-
type: "number"
|
|
489
|
-
},
|
|
490
|
-
maximum: {
|
|
491
|
-
title: "Maximum value restriction",
|
|
492
|
-
description: "Maximum value restriction.",
|
|
493
|
-
type: "number"
|
|
494
|
-
},
|
|
495
|
-
exclusiveMinimum: {
|
|
496
|
-
title: "Exclusive minimum value restriction",
|
|
497
|
-
description: "Exclusive minimum value restriction.",
|
|
498
|
-
type: "number"
|
|
499
|
-
},
|
|
500
|
-
exclusiveMaximum: {
|
|
501
|
-
title: "Exclusive maximum value restriction",
|
|
502
|
-
description: "Exclusive maximum value restriction.",
|
|
503
|
-
type: "number"
|
|
504
|
-
},
|
|
505
|
-
multipleOf: {
|
|
506
|
-
title: "Multiple of value restriction",
|
|
507
|
-
description: "Multiple of value restriction.",
|
|
508
|
-
type: "number",
|
|
509
|
-
exclusiveMinimum: 0
|
|
510
|
-
},
|
|
511
|
-
type: {
|
|
512
|
-
title: "Discriminator value of the type",
|
|
513
|
-
description: "Discriminator value of the type.",
|
|
514
|
-
"const": "number"
|
|
515
|
-
}
|
|
516
|
-
},
|
|
517
|
-
required: [
|
|
518
|
-
"type"
|
|
519
|
-
],
|
|
520
|
-
description: "Description of the current {@link AutoBeOpenApi.IJsonSchema.INumber} type:\n\n> Number (double) type info."
|
|
521
|
-
},
|
|
522
|
-
{
|
|
523
|
-
type: "object",
|
|
524
|
-
properties: {
|
|
525
|
-
minimum: {
|
|
526
|
-
title: "Minimum value restriction",
|
|
527
|
-
description: "Minimum value restriction.",
|
|
528
|
-
type: "integer"
|
|
529
|
-
},
|
|
530
|
-
maximum: {
|
|
531
|
-
title: "Maximum value restriction",
|
|
532
|
-
description: "Maximum value restriction.",
|
|
533
|
-
type: "integer"
|
|
534
|
-
},
|
|
535
|
-
exclusiveMinimum: {
|
|
536
|
-
title: "Exclusive minimum value restriction",
|
|
537
|
-
description: "Exclusive minimum value restriction.",
|
|
538
|
-
type: "number"
|
|
539
|
-
},
|
|
540
|
-
exclusiveMaximum: {
|
|
541
|
-
title: "Exclusive maximum value restriction",
|
|
542
|
-
description: "Exclusive maximum value restriction.",
|
|
543
|
-
type: "number"
|
|
544
|
-
},
|
|
545
|
-
multipleOf: {
|
|
546
|
-
title: "Multiple of value restriction",
|
|
547
|
-
description: "Multiple of value restriction.",
|
|
548
|
-
type: "integer",
|
|
549
|
-
exclusiveMinimum: 0
|
|
550
|
-
},
|
|
551
|
-
type: {
|
|
552
|
-
title: "Discriminator value of the type",
|
|
553
|
-
description: "Discriminator value of the type.",
|
|
554
|
-
"const": "integer"
|
|
555
|
-
}
|
|
556
|
-
},
|
|
557
|
-
required: [
|
|
558
|
-
"type"
|
|
559
|
-
],
|
|
560
|
-
description: "Description of the current {@link AutoBeOpenApi.IJsonSchema.IInteger} type:\n\n> Integer type info."
|
|
561
|
-
},
|
|
562
|
-
{
|
|
563
|
-
type: "object",
|
|
564
|
-
properties: {
|
|
565
|
-
format: {
|
|
566
|
-
title: "Format restriction",
|
|
567
|
-
description: "Format restriction.",
|
|
568
|
-
type: "string"
|
|
569
|
-
},
|
|
570
|
-
pattern: {
|
|
571
|
-
title: "Pattern restriction",
|
|
572
|
-
description: "Pattern restriction.",
|
|
573
|
-
type: "string"
|
|
574
|
-
},
|
|
575
|
-
contentMediaType: {
|
|
576
|
-
title: "Content media type restriction",
|
|
577
|
-
description: "Content media type restriction.",
|
|
578
|
-
type: "string"
|
|
579
|
-
},
|
|
580
|
-
minLength: {
|
|
581
|
-
title: "Minimum length restriction",
|
|
582
|
-
description: "Minimum length restriction.",
|
|
583
|
-
type: "integer",
|
|
584
|
-
minimum: 0
|
|
585
|
-
},
|
|
586
|
-
maxLength: {
|
|
587
|
-
title: "Maximum length restriction",
|
|
588
|
-
description: "Maximum length restriction.",
|
|
589
|
-
type: "integer",
|
|
590
|
-
minimum: 0
|
|
591
|
-
},
|
|
592
|
-
type: {
|
|
593
|
-
title: "Discriminator value of the type",
|
|
594
|
-
description: "Discriminator value of the type.",
|
|
595
|
-
"const": "string"
|
|
596
|
-
}
|
|
597
|
-
},
|
|
598
|
-
required: [
|
|
599
|
-
"type"
|
|
600
|
-
],
|
|
601
|
-
description: "Description of the current {@link AutoBeOpenApi.IJsonSchema.IString} type:\n\n> String type info."
|
|
602
|
-
}
|
|
603
|
-
]
|
|
604
|
-
}
|
|
605
|
-
},
|
|
606
|
-
required: [
|
|
607
|
-
"name",
|
|
608
|
-
"description",
|
|
609
|
-
"schema"
|
|
610
|
-
]
|
|
611
|
-
}
|
|
612
|
-
},
|
|
613
|
-
requestBody: {
|
|
614
|
-
title: "Request body of the API operation",
|
|
615
|
-
description: "Request body of the API operation.\n\nDefines the payload structure for the request. Contains a description and\nschema reference to define the expected input data.\n\nShould be `null` for operations that don't require a request body, such\nas most \"get\" operations.",
|
|
616
|
-
oneOf: [
|
|
617
|
-
{
|
|
618
|
-
type: "null"
|
|
619
|
-
},
|
|
620
|
-
{
|
|
621
|
-
type: "object",
|
|
622
|
-
properties: {
|
|
623
|
-
description: {
|
|
624
|
-
title: "Description about the request body",
|
|
625
|
-
description: "Description about the request body.\n\nMake short, concise and clear description about the request body.\n\n> MUST be written in English. Never use other languages.",
|
|
626
|
-
type: "string"
|
|
627
|
-
},
|
|
628
|
-
typeName: {
|
|
629
|
-
title: "Request body type name",
|
|
630
|
-
description: "Request body type name.\n\nThis specifies the data structure expected in the request body, that will\nbe transformed to {@link AutoBeOpenApi.IJsonSchema.IReference reference}\ntype in the {@link AutoBeOpenApi.IComponents.schemas components section}\nas an {@link AutoBeOpenApi.IJsonSchema.Object object} type.\n\nHere is the naming convention for the request body type:\n\n- `IEntityName.ICreate`: Request body for creation operations (POST)\n- `IEntityName.IUpdate`: Request body for update operations (PUT)\n- `IEntityName.IRequest`: Request parameters for list operations (often\n with search/pagination)\n\nWhat you write:\n\n```json\n{\n \"typeName\": \"IShoppingOrder.ICreate\"\n}\n```\n\nTransformed to:\n\n```json\n{\n \"schema\": {\n \"$ref\": \"#/components/schemas/IShoppingOrder.ICreate\"\n }\n}\n```",
|
|
631
|
-
type: "string"
|
|
632
|
-
}
|
|
633
|
-
},
|
|
634
|
-
required: [
|
|
635
|
-
"description",
|
|
636
|
-
"typeName"
|
|
637
|
-
],
|
|
638
|
-
description: "Description of the current {@link AutoBeOpenApi.IRequestBody} type:\n\n> Request body information of OpenAPI operation.\n> \n> This interface defines the structure for request bodies in API routes. It\n> corresponds to the requestBody section in OpenAPI specifications, providing\n> both a description and schema reference for the request payload.\n> \n> The content-type for all request bodies is always `application/json`. Even\n> when file uploading is required, don't use `multipart/form-data` or\n> `application/x-www-form-urlencoded` content types. Instead, just define an\n> URI string property in the request body schema.\n> \n> Note that, all body schemas must be transformable to a\n> {@link AutoBeOpenApi.IJsonSchema.IReference reference} type defined in the\n> {@link AutoBeOpenApi.IComponents.schemas components section} as an\n> {@link AutoBeOpenApi.IJsonSchema.IObject object} type.\n> \n> In OpenAPI, this might represent:\n> \n> ```json\n> {\n> \"requestBody\": {\n> \"description\": \"Creation info of the order\",\n> \"content\": {\n> \"application/json\": {\n> \"schema\": {\n> \"$ref\": \"#/components/schemas/IShoppingOrder.ICreate\"\n> }\n> }\n> }\n> }\n> }\n> ```"
|
|
639
|
-
}
|
|
640
|
-
]
|
|
641
|
-
},
|
|
642
|
-
responseBody: {
|
|
643
|
-
title: "Response body of the API operation",
|
|
644
|
-
description: "Response body of the API operation.\n\nDefines the structure of the successful response data. Contains a\ndescription and schema reference for the returned data.\n\nShould be null for operations that don't return any data.",
|
|
645
|
-
oneOf: [
|
|
646
|
-
{
|
|
647
|
-
type: "null"
|
|
648
|
-
},
|
|
649
|
-
{
|
|
650
|
-
type: "object",
|
|
651
|
-
properties: {
|
|
652
|
-
description: {
|
|
653
|
-
title: "Description about the response body",
|
|
654
|
-
description: "Description about the response body.\n\nMake short, concise and clear description about the response body.\n\n> MUST be written in English. Never use other languages.",
|
|
655
|
-
type: "string"
|
|
656
|
-
},
|
|
657
|
-
typeName: {
|
|
658
|
-
title: "Response body's data type",
|
|
659
|
-
description: "Response body's data type.\n\nSpecifies the structure of the returned data (response body), that will\nbe transformed to {@link AutoBeOpenApi.IJsonSchema.IReference} type in the\n{@link AutoBeOpenApi.IComponents.schemas components section} as an\n{@link AutoBeOpenApi.IJsonSchema.IObject object} type.\n\nHere is the naming convention for the response body type:\n\n- `IEntityName`: Main entity with detailed information (e.g.,\n `IShoppingSale`)\n- `IEntityName.ISummary`: Simplified response version with essential\n properties\n- `IEntityName.IInvert`: Alternative view of an entity from a different\n perspective\n- `IPageIEntityName`: Paginated results container with `pagination` and\n `data` properties\n\nWhat you write:\n\n```json\n{\n \"typeName\": \"IShoppingOrder\"\n}\n```\n\nTransformed to:\n\n```json\n{\n \"schema\": {\n \"$ref\": \"#/components/schemas/IShoppingOrder\"\n }\n}\n```",
|
|
660
|
-
type: "string"
|
|
661
|
-
}
|
|
662
|
-
},
|
|
663
|
-
required: [
|
|
664
|
-
"description",
|
|
665
|
-
"typeName"
|
|
666
|
-
],
|
|
667
|
-
description: "Description of the current {@link AutoBeOpenApi.IResponseBody} type:\n\n> Response body information for OpenAPI operation.\n> \n> This interface defines the structure of a successful response from an API\n> operation. It provides a description of the response and a schema reference\n> to define the returned data structure.\n> \n> The content-type for all responses is always `application/json`. Even when\n> file downloading is required, don't use `application/octet-stream` or\n> `multipart/form-data` content types. Instead, just define an URI string\n> property in the response body schema.\n> \n> In OpenAPI, this might represent:\n> \n> ```json\n> {\n> \"responses\": {\n> \"200\": {\n> \"description\": \"Order information\",\n> \"content\": {\n> \"application/json\": {\n> \"schema\": { \"$ref\": \"#/components/schemas/IShoppingOrder\" }\n> }\n> }\n> }\n> }\n> }\n> ```"
|
|
668
|
-
}
|
|
669
|
-
]
|
|
670
|
-
},
|
|
671
|
-
path: {
|
|
672
|
-
title: "HTTP path of the API operation",
|
|
673
|
-
description: "HTTP path of the API operation.\n\nThe URL path for accessing this API operation, using path parameters\nenclosed in curly braces (e.g., `/shoppings/customers/sales/{saleId}`).\n\nIt must be corresponded to the {@link parameters path parameters}.\n\nThe path structure should clearly indicate which database entity this\noperation is manipulating, helping to ensure all entities have\nappropriate API coverage.",
|
|
674
|
-
type: "string"
|
|
675
|
-
},
|
|
676
|
-
method: {
|
|
677
|
-
title: "HTTP method of the API operation",
|
|
678
|
-
description: "HTTP method of the API operation.\n\nNote that, if the API operation has {@link requestBody}, method must not\nbe `get`.\n\nAlso, even though the API operation has been designed to only get\ninformation, but it needs complicated request information, it must be\ndefined as `patch` method with {@link requestBody} data specification.\n\n- `get`: get information\n- `patch`: get information with complicated request data\n ({@link requestBody})\n- `post`: create new record\n- `put`: update existing record\n- `delete`: remove record",
|
|
679
|
-
oneOf: [
|
|
680
|
-
{
|
|
681
|
-
"const": "get"
|
|
682
|
-
},
|
|
683
|
-
{
|
|
684
|
-
"const": "post"
|
|
685
|
-
},
|
|
686
|
-
{
|
|
687
|
-
"const": "put"
|
|
688
|
-
},
|
|
689
|
-
{
|
|
690
|
-
"const": "delete"
|
|
691
|
-
},
|
|
692
|
-
{
|
|
693
|
-
"const": "patch"
|
|
694
|
-
}
|
|
695
|
-
]
|
|
696
|
-
}
|
|
697
|
-
},
|
|
698
|
-
required: [
|
|
699
|
-
"specification",
|
|
700
|
-
"description",
|
|
701
|
-
"summary",
|
|
702
|
-
"parameters",
|
|
703
|
-
"requestBody",
|
|
704
|
-
"responseBody",
|
|
705
|
-
"path",
|
|
706
|
-
"method"
|
|
707
|
-
]
|
|
470
|
+
$ref: "#/$defs/AutoBeOpenApi.IOperation"
|
|
708
471
|
}
|
|
709
472
|
}
|
|
710
473
|
},
|
|
@@ -712,10 +475,343 @@ const claude = {
|
|
|
712
475
|
"operations"
|
|
713
476
|
],
|
|
714
477
|
additionalProperties: false,
|
|
715
|
-
$defs: {
|
|
478
|
+
$defs: {
|
|
479
|
+
"AutoBeOpenApi.IOperation": {
|
|
480
|
+
description: "Operation of the Restful API.\n\nThis interface defines a single API endpoint with its HTTP {@link method},\n{@link path}, {@link parameters path parameters},\n{@link requestBody request body}, and {@link responseBody} structure. It\ncorresponds to an individual operation in the paths section of an OpenAPI\ndocument.\n\nEach operation requires a detailed explanation of its purpose through the\nreason and description fields, making it clear why the API was designed and\nhow it should be used.\n\nAll request bodies and responses for this operation must be object types\nand must reference named types defined in the components section. The\ncontent-type is always `application/json`. For file upload/download\noperations, use `string & tags.Format<\"uri\">` in the appropriate schema\ninstead of binary data formats.\n\nIn OpenAPI, this might represent:\n\n```json\n{\n \"/shoppings/customers/orders\": {\n \"post\": {\n \"description\": \"Create a new order application from shopping cart...\",\n \"parameters\": [...],\n \"requestBody\": {...},\n \"responses\": {...}\n }\n }\n}\n```",
|
|
481
|
+
type: "object",
|
|
482
|
+
properties: {
|
|
483
|
+
specification: {
|
|
484
|
+
title: "Specification of the API operation",
|
|
485
|
+
description: "Specification of the API operation.\n\nBefore defining the API operation interface, please describe what you're\nplanning to write in this `specification` field.\n\nThe specification must be fully detailed and clear, so that anyone can\nunderstand the purpose and functionality of the API operation and its\nrelated components (e.g., {@link path}, {@link parameters},\n{@link requestBody}).\n\nIMPORTANT: The specification MUST identify which Prisma DB table this\noperation is associated with, helping ensure complete coverage of all\ndatabase entities.",
|
|
486
|
+
type: "string"
|
|
487
|
+
},
|
|
488
|
+
description: {
|
|
489
|
+
title: "Detailed description about the API operation",
|
|
490
|
+
description: "Detailed description about the API operation.\n\nIMPORTANT: This field MUST be extensively detailed and MUST reference the\ndescription comments from the related Prisma DB schema tables and\ncolumns. The description should be organized into MULTIPLE PARAGRAPHS\nseparated by line breaks to improve readability and comprehension.\n\nFor example, include separate paragraphs for:\n\n- The purpose and overview of the API operation\n- Security considerations and user permissions\n- Relationship to underlying database entities\n- Validation rules and business logic\n- Related API operations that might be used together with this one\n- Expected behavior and error handling\n\nWhen writing the description, be sure to incorporate the corresponding DB\nschema's description comments, matching the level of detail and style of\nthose comments. This ensures consistency between the API documentation\nand database structure.\n\nIf there's a dependency to other APIs, please describe the dependency API\noperation in this field with detailed reason. For example, if this API\noperation needs a pre-execution of other API operation, it must be\nexplicitly described.\n\n- `GET /shoppings/customers/sales` must be pre-executed to get entire list\n of summarized sales. Detailed sale information would be obtained by\n specifying the sale ID in the path parameter.\n\n> MUST be written in English. Never use other languages.",
|
|
491
|
+
type: "string"
|
|
492
|
+
},
|
|
493
|
+
summary: {
|
|
494
|
+
title: "Short summary of the API operation",
|
|
495
|
+
description: "Short summary of the API operation.\n\nThis should be a concise description of the API operation, typically one\nsentence long. It should provide a quick overview of what the API does\nwithout going into too much detail.\n\nThis summary will be used in the OpenAPI documentation to give users a\nquick understanding of the API operation's purpose.\n\nIMPORTANT: The summary should clearly indicate which Prisma DB table this\noperation relates to, helping to ensure all tables have API coverage.\n\n> MUST be written in English. Never use other languages",
|
|
496
|
+
type: "string"
|
|
497
|
+
},
|
|
498
|
+
parameters: {
|
|
499
|
+
title: "List of path parameters",
|
|
500
|
+
description: "List of path parameters.\n\nNote that, the {@link AutoBeOpenApi.IParameter.name identifier name} of\npath parameter must be corresponded to the\n{@link path API operation path}.\n\nFor example, if there's an API operation which has {@link path} of\n`/shoppings/customers/sales/{saleId}/questions/${questionId}/comments/${commentId}`,\nits list of {@link AutoBeOpenApi.IParameter.name path parameters} must be\nlike:\n\n- `saleId`\n- `questionId`\n- `commentId`",
|
|
501
|
+
type: "array",
|
|
502
|
+
items: {
|
|
503
|
+
$ref: "#/$defs/AutoBeOpenApi.IParameter"
|
|
504
|
+
}
|
|
505
|
+
},
|
|
506
|
+
requestBody: {
|
|
507
|
+
title: "Request body of the API operation",
|
|
508
|
+
description: "Request body of the API operation.\n\nDefines the payload structure for the request. Contains a description and\nschema reference to define the expected input data.\n\nShould be `null` for operations that don't require a request body, such\nas most \"get\" operations.",
|
|
509
|
+
oneOf: [
|
|
510
|
+
{
|
|
511
|
+
type: "null"
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
$ref: "#/$defs/AutoBeOpenApi.IRequestBody"
|
|
515
|
+
}
|
|
516
|
+
]
|
|
517
|
+
},
|
|
518
|
+
responseBody: {
|
|
519
|
+
title: "Response body of the API operation",
|
|
520
|
+
description: "Response body of the API operation.\n\nDefines the structure of the successful response data. Contains a\ndescription and schema reference for the returned data.\n\nShould be null for operations that don't return any data.",
|
|
521
|
+
oneOf: [
|
|
522
|
+
{
|
|
523
|
+
type: "null"
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
$ref: "#/$defs/AutoBeOpenApi.IResponseBody"
|
|
527
|
+
}
|
|
528
|
+
]
|
|
529
|
+
},
|
|
530
|
+
authorization: {
|
|
531
|
+
description: "Authorization\n\nDefines which user role is subject to strategies such as membership\nregistration, login, token issuance, refresh token, etc.",
|
|
532
|
+
oneOf: [
|
|
533
|
+
{
|
|
534
|
+
type: "null"
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
$ref: "#/$defs/AutoBeOpenApi.IAuthorization"
|
|
538
|
+
}
|
|
539
|
+
],
|
|
540
|
+
discriminator: {
|
|
541
|
+
propertyName: "type",
|
|
542
|
+
mapping: {
|
|
543
|
+
Bearer: "#/$defs/AutoBeOpenApi.IAuthorization"
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
},
|
|
547
|
+
path: {
|
|
548
|
+
title: "HTTP path of the API operation",
|
|
549
|
+
description: "HTTP path of the API operation.\n\nThe URL path for accessing this API operation, using path parameters\nenclosed in curly braces (e.g., `/shoppings/customers/sales/{saleId}`).\n\nIt must be corresponded to the {@link parameters path parameters}.\n\nThe path structure should clearly indicate which database entity this\noperation is manipulating, helping to ensure all entities have\nappropriate API coverage.",
|
|
550
|
+
type: "string"
|
|
551
|
+
},
|
|
552
|
+
method: {
|
|
553
|
+
title: "HTTP method of the API operation",
|
|
554
|
+
description: "HTTP method of the API operation.\n\nNote that, if the API operation has {@link requestBody}, method must not\nbe `get`.\n\nAlso, even though the API operation has been designed to only get\ninformation, but it needs complicated request information, it must be\ndefined as `patch` method with {@link requestBody} data specification.\n\n- `get`: get information\n- `patch`: get information with complicated request data\n ({@link requestBody})\n- `post`: create new record\n- `put`: update existing record\n- `delete`: remove record",
|
|
555
|
+
oneOf: [
|
|
556
|
+
{
|
|
557
|
+
"const": "get"
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
"const": "post"
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
"const": "put"
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
"const": "delete"
|
|
567
|
+
},
|
|
568
|
+
{
|
|
569
|
+
"const": "patch"
|
|
570
|
+
}
|
|
571
|
+
]
|
|
572
|
+
}
|
|
573
|
+
},
|
|
574
|
+
required: [
|
|
575
|
+
"specification",
|
|
576
|
+
"description",
|
|
577
|
+
"summary",
|
|
578
|
+
"parameters",
|
|
579
|
+
"requestBody",
|
|
580
|
+
"responseBody",
|
|
581
|
+
"path",
|
|
582
|
+
"method"
|
|
583
|
+
]
|
|
584
|
+
},
|
|
585
|
+
"AutoBeOpenApi.IParameter": {
|
|
586
|
+
description: "Path parameter information for API routes.\n\nThis interface defines a path parameter that appears in the URL of an API\nendpoint. Path parameters are enclosed in curly braces in the\n{@link AutoBeOpenApi.IOperation.path operation path} and must be defined\nwith their types and descriptions.\n\nFor example, if API operation path is\n`/shoppings/customers/sales/{saleId}/questions/${questionId}/comments/${commentId}`,\nthe path parameters should be like below:\n\n```json\n{\n \"path\": \"/shoppings/customers/sales/{saleId}/questions/${questionId}/comments/${commentId}\",\n \"method\": \"get\",\n \"parameters\": [\n {\n \"name\": \"saleId\",\n \"in\": \"path\",\n \"schema\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"description\": \"Target sale's ID\"\n },\n {\n \"name\": \"questionId\",\n \"in\": \"path\",\n \"schema\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"description\": \"Target question's ID\"\n },\n {\n \"name\": \"commentId\",\n \"in\": \"path\",\n \"schema\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"description\": \"Target comment's ID\"\n }\n ]\n}\n```",
|
|
587
|
+
type: "object",
|
|
588
|
+
properties: {
|
|
589
|
+
name: {
|
|
590
|
+
title: "Identifier name of the path parameter",
|
|
591
|
+
description: "Identifier name of the path parameter.\n\nThis name must match exactly with the parameter name in the route path.\nIt must be corresponded to the\n{@link AutoBeOpenApi.IOperation.path API operation path}.",
|
|
592
|
+
type: "string"
|
|
593
|
+
},
|
|
594
|
+
description: {
|
|
595
|
+
title: "Description about the path parameter",
|
|
596
|
+
description: "Description about the path parameter.\n\nMake short, concise and clear description about the path parameter.\n\n> MUST be written in English. Never use other languages.",
|
|
597
|
+
type: "string"
|
|
598
|
+
},
|
|
599
|
+
schema: {
|
|
600
|
+
title: "Type schema of the path parameter",
|
|
601
|
+
description: "Type schema of the path parameter.\n\nPath parameters are typically primitive types like\n{@link AutoBeOpenApi.IJsonSchema.IString strings},\n{@link AutoBeOpenApi.IJsonSchema.IInteger integers},\n{@link AutoBeOpenApi.IJsonSchema.INumber numbers}.\n\nIf you need other types, please use request body instead with object type\nencapsulation.",
|
|
602
|
+
oneOf: [
|
|
603
|
+
{
|
|
604
|
+
$ref: "#/$defs/AutoBeOpenApi.IJsonSchema.INumber"
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
$ref: "#/$defs/AutoBeOpenApi.IJsonSchema.IInteger"
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
$ref: "#/$defs/AutoBeOpenApi.IJsonSchema.IString"
|
|
611
|
+
}
|
|
612
|
+
],
|
|
613
|
+
discriminator: {
|
|
614
|
+
propertyName: "type",
|
|
615
|
+
mapping: {
|
|
616
|
+
number: "#/$defs/AutoBeOpenApi.IJsonSchema.INumber",
|
|
617
|
+
integer: "#/$defs/AutoBeOpenApi.IJsonSchema.IInteger",
|
|
618
|
+
string: "#/$defs/AutoBeOpenApi.IJsonSchema.IString"
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
},
|
|
623
|
+
required: [
|
|
624
|
+
"name",
|
|
625
|
+
"description",
|
|
626
|
+
"schema"
|
|
627
|
+
]
|
|
628
|
+
},
|
|
629
|
+
"AutoBeOpenApi.IJsonSchema.INumber": {
|
|
630
|
+
description: "Number (double) type info.",
|
|
631
|
+
type: "object",
|
|
632
|
+
properties: {
|
|
633
|
+
minimum: {
|
|
634
|
+
title: "Minimum value restriction",
|
|
635
|
+
description: "Minimum value restriction.",
|
|
636
|
+
type: "number"
|
|
637
|
+
},
|
|
638
|
+
maximum: {
|
|
639
|
+
title: "Maximum value restriction",
|
|
640
|
+
description: "Maximum value restriction.",
|
|
641
|
+
type: "number"
|
|
642
|
+
},
|
|
643
|
+
exclusiveMinimum: {
|
|
644
|
+
title: "Exclusive minimum value restriction",
|
|
645
|
+
description: "Exclusive minimum value restriction.",
|
|
646
|
+
type: "number"
|
|
647
|
+
},
|
|
648
|
+
exclusiveMaximum: {
|
|
649
|
+
title: "Exclusive maximum value restriction",
|
|
650
|
+
description: "Exclusive maximum value restriction.",
|
|
651
|
+
type: "number"
|
|
652
|
+
},
|
|
653
|
+
multipleOf: {
|
|
654
|
+
title: "Multiple of value restriction",
|
|
655
|
+
description: "Multiple of value restriction.",
|
|
656
|
+
type: "number",
|
|
657
|
+
exclusiveMinimum: 0
|
|
658
|
+
},
|
|
659
|
+
type: {
|
|
660
|
+
title: "Discriminator value of the type",
|
|
661
|
+
description: "Discriminator value of the type.",
|
|
662
|
+
"const": "number"
|
|
663
|
+
}
|
|
664
|
+
},
|
|
665
|
+
required: [
|
|
666
|
+
"type"
|
|
667
|
+
]
|
|
668
|
+
},
|
|
669
|
+
"AutoBeOpenApi.IJsonSchema.IInteger": {
|
|
670
|
+
description: "Integer type info.",
|
|
671
|
+
type: "object",
|
|
672
|
+
properties: {
|
|
673
|
+
minimum: {
|
|
674
|
+
title: "Minimum value restriction",
|
|
675
|
+
description: "Minimum value restriction.",
|
|
676
|
+
type: "integer"
|
|
677
|
+
},
|
|
678
|
+
maximum: {
|
|
679
|
+
title: "Maximum value restriction",
|
|
680
|
+
description: "Maximum value restriction.",
|
|
681
|
+
type: "integer"
|
|
682
|
+
},
|
|
683
|
+
exclusiveMinimum: {
|
|
684
|
+
title: "Exclusive minimum value restriction",
|
|
685
|
+
description: "Exclusive minimum value restriction.",
|
|
686
|
+
type: "number"
|
|
687
|
+
},
|
|
688
|
+
exclusiveMaximum: {
|
|
689
|
+
title: "Exclusive maximum value restriction",
|
|
690
|
+
description: "Exclusive maximum value restriction.",
|
|
691
|
+
type: "number"
|
|
692
|
+
},
|
|
693
|
+
multipleOf: {
|
|
694
|
+
title: "Multiple of value restriction",
|
|
695
|
+
description: "Multiple of value restriction.",
|
|
696
|
+
type: "integer",
|
|
697
|
+
exclusiveMinimum: 0
|
|
698
|
+
},
|
|
699
|
+
type: {
|
|
700
|
+
title: "Discriminator value of the type",
|
|
701
|
+
description: "Discriminator value of the type.",
|
|
702
|
+
"const": "integer"
|
|
703
|
+
}
|
|
704
|
+
},
|
|
705
|
+
required: [
|
|
706
|
+
"type"
|
|
707
|
+
]
|
|
708
|
+
},
|
|
709
|
+
"AutoBeOpenApi.IJsonSchema.IString": {
|
|
710
|
+
description: "String type info.",
|
|
711
|
+
type: "object",
|
|
712
|
+
properties: {
|
|
713
|
+
format: {
|
|
714
|
+
title: "Format restriction",
|
|
715
|
+
description: "Format restriction.",
|
|
716
|
+
type: "string"
|
|
717
|
+
},
|
|
718
|
+
pattern: {
|
|
719
|
+
title: "Pattern restriction",
|
|
720
|
+
description: "Pattern restriction.",
|
|
721
|
+
type: "string"
|
|
722
|
+
},
|
|
723
|
+
contentMediaType: {
|
|
724
|
+
title: "Content media type restriction",
|
|
725
|
+
description: "Content media type restriction.",
|
|
726
|
+
type: "string"
|
|
727
|
+
},
|
|
728
|
+
minLength: {
|
|
729
|
+
title: "Minimum length restriction",
|
|
730
|
+
description: "Minimum length restriction.",
|
|
731
|
+
type: "integer",
|
|
732
|
+
minimum: 0
|
|
733
|
+
},
|
|
734
|
+
maxLength: {
|
|
735
|
+
title: "Maximum length restriction",
|
|
736
|
+
description: "Maximum length restriction.",
|
|
737
|
+
type: "integer",
|
|
738
|
+
minimum: 0
|
|
739
|
+
},
|
|
740
|
+
type: {
|
|
741
|
+
title: "Discriminator value of the type",
|
|
742
|
+
description: "Discriminator value of the type.",
|
|
743
|
+
"const": "string"
|
|
744
|
+
}
|
|
745
|
+
},
|
|
746
|
+
required: [
|
|
747
|
+
"type"
|
|
748
|
+
]
|
|
749
|
+
},
|
|
750
|
+
"AutoBeOpenApi.IRequestBody": {
|
|
751
|
+
description: "Request body information of OpenAPI operation.\n\nThis interface defines the structure for request bodies in API routes. It\ncorresponds to the requestBody section in OpenAPI specifications, providing\nboth a description and schema reference for the request payload.\n\nThe content-type for all request bodies is always `application/json`. Even\nwhen file uploading is required, don't use `multipart/form-data` or\n`application/x-www-form-urlencoded` content types. Instead, just define an\nURI string property in the request body schema.\n\nNote that, all body schemas must be transformable to a\n{@link AutoBeOpenApi.IJsonSchema.IReference reference} type defined in the\n{@link AutoBeOpenApi.IComponents.schemas components section} as an\n{@link AutoBeOpenApi.IJsonSchema.IObject object} type.\n\nIn OpenAPI, this might represent:\n\n```json\n{\n \"requestBody\": {\n \"description\": \"Creation info of the order\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/IShoppingOrder.ICreate\"\n }\n }\n }\n }\n}\n```",
|
|
752
|
+
type: "object",
|
|
753
|
+
properties: {
|
|
754
|
+
description: {
|
|
755
|
+
title: "Description about the request body",
|
|
756
|
+
description: "Description about the request body.\n\nMake short, concise and clear description about the request body.\n\n> MUST be written in English. Never use other languages.",
|
|
757
|
+
type: "string"
|
|
758
|
+
},
|
|
759
|
+
typeName: {
|
|
760
|
+
title: "Request body type name",
|
|
761
|
+
description: "Request body type name.\n\nThis specifies the data structure expected in the request body, that will\nbe transformed to {@link AutoBeOpenApi.IJsonSchema.IReference reference}\ntype in the {@link AutoBeOpenApi.IComponents.schemas components section}\nas an {@link AutoBeOpenApi.IJsonSchema.Object object} type.\n\nHere is the naming convention for the request body type:\n\n- `IEntityName.ICreate`: Request body for creation operations (POST)\n- `IEntityName.IUpdate`: Request body for update operations (PUT)\n- `IEntityName.IRequest`: Request parameters for list operations (often\n with search/pagination)\n\nWhat you write:\n\n```json\n{\n \"typeName\": \"IShoppingOrder.ICreate\"\n}\n```\n\nTransformed to:\n\n```json\n{\n \"schema\": {\n \"$ref\": \"#/components/schemas/IShoppingOrder.ICreate\"\n }\n}\n```",
|
|
762
|
+
type: "string"
|
|
763
|
+
}
|
|
764
|
+
},
|
|
765
|
+
required: [
|
|
766
|
+
"description",
|
|
767
|
+
"typeName"
|
|
768
|
+
]
|
|
769
|
+
},
|
|
770
|
+
"AutoBeOpenApi.IResponseBody": {
|
|
771
|
+
description: "Response body information for OpenAPI operation.\n\nThis interface defines the structure of a successful response from an API\noperation. It provides a description of the response and a schema reference\nto define the returned data structure.\n\nThe content-type for all responses is always `application/json`. Even when\nfile downloading is required, don't use `application/octet-stream` or\n`multipart/form-data` content types. Instead, just define an URI string\nproperty in the response body schema.\n\nIn OpenAPI, this might represent:\n\n```json\n{\n \"responses\": {\n \"200\": {\n \"description\": \"Order information\",\n \"content\": {\n \"application/json\": {\n \"schema\": { \"$ref\": \"#/components/schemas/IShoppingOrder\" }\n }\n }\n }\n }\n}\n```",
|
|
772
|
+
type: "object",
|
|
773
|
+
properties: {
|
|
774
|
+
description: {
|
|
775
|
+
title: "Description about the response body",
|
|
776
|
+
description: "Description about the response body.\n\nMake short, concise and clear description about the response body.\n\n> MUST be written in English. Never use other languages.",
|
|
777
|
+
type: "string"
|
|
778
|
+
},
|
|
779
|
+
typeName: {
|
|
780
|
+
title: "Response body's data type",
|
|
781
|
+
description: "Response body's data type.\n\nSpecifies the structure of the returned data (response body), that will\nbe transformed to {@link AutoBeOpenApi.IJsonSchema.IReference} type in the\n{@link AutoBeOpenApi.IComponents.schemas components section} as an\n{@link AutoBeOpenApi.IJsonSchema.IObject object} type.\n\nHere is the naming convention for the response body type:\n\n- `IEntityName`: Main entity with detailed information (e.g.,\n `IShoppingSale`)\n- `IEntityName.ISummary`: Simplified response version with essential\n properties\n- `IEntityName.IInvert`: Alternative view of an entity from a different\n perspective\n- `IPageIEntityName`: Paginated results container with `pagination` and\n `data` properties\n\nWhat you write:\n\n```json\n{\n \"typeName\": \"IShoppingOrder\"\n}\n```\n\nTransformed to:\n\n```json\n{\n \"schema\": {\n \"$ref\": \"#/components/schemas/IShoppingOrder\"\n }\n}\n```",
|
|
782
|
+
type: "string"
|
|
783
|
+
}
|
|
784
|
+
},
|
|
785
|
+
required: [
|
|
786
|
+
"description",
|
|
787
|
+
"typeName"
|
|
788
|
+
]
|
|
789
|
+
},
|
|
790
|
+
"AutoBeOpenApi.IAuthorization": {
|
|
791
|
+
description: "Authorization - Authentication and user type information\n\nThis field defines how the API authenticates the request and restricts\naccess to specific user types.\n\n\u2705 Only the `Authorization` HTTP header is used for authentication. The\nexpected format is:\n\nAuthorization: Bearer <access_token>\n\nThe token must be a bearer token (e.g., JWT or similar), and when parsed,\nit is guaranteed to include at least the authenticated actor's `id` field.\nNo other headers or cookie-based authentication methods are supported.",
|
|
792
|
+
type: "object",
|
|
793
|
+
properties: {
|
|
794
|
+
role: {
|
|
795
|
+
description: "Allowed user types for this API\n\nSpecifies which user types are permitted to access this API.\n\nThis is not a permission level or access control role. Instead, it\ndescribes **who** the user is \u2014 their type within the service's domain\nmodel. It must correspond 1:1 with how the user is represented in the\ndatabase.\n\nExamples:\n\n- \"buyer\": a customer who makes purchases\n- \"seller\": a vendor who offers products\n- \"moderator\": a content reviewer or manager\n\n\u26A0\uFE0F Important: Each `role` must **exactly match a table name defined in\nthe database schema**. This is not merely a convention or example \u2014 it is\na strict requirement.\n\nA valid role must meet the following criteria:\n\n- It must uniquely map to a user group at the database level, represented\n by a dedicated table.\n- It must not overlap semantically with other roles \u2014 for instance, both\n `admin` and `administrator` must not exist to describe the same type.\n\nTherefore, if a user type cannot be clearly and uniquely distinguished in\nthe database, It **cannot** be used as a valid `role` here.",
|
|
796
|
+
type: "array",
|
|
797
|
+
items: {
|
|
798
|
+
type: "string"
|
|
799
|
+
}
|
|
800
|
+
},
|
|
801
|
+
type: {
|
|
802
|
+
description: "Authentication method type\n\nCurrently only `\"bearer\"` is supported, which uses a Bearer token in the\nHTTP Authorization header.",
|
|
803
|
+
"const": "Bearer"
|
|
804
|
+
}
|
|
805
|
+
},
|
|
806
|
+
required: [
|
|
807
|
+
"role",
|
|
808
|
+
"type"
|
|
809
|
+
]
|
|
810
|
+
}
|
|
811
|
+
}
|
|
716
812
|
},
|
|
717
813
|
description: "Generate detailed API operations from path/method combinations.\n\nThis function creates complete API operations following REST principles and\nquality standards. Each generated operation includes specification, path,\nmethod, detailed multi-paragraph description, concise summary, parameters,\nand appropriate request/response bodies.\n\nThe function processes as many operations as possible in a single call,\nwith progress tracking to ensure iterative completion of all required\nendpoints.",
|
|
718
|
-
validate: (() => { const _io0 = input => Array.isArray(input.operations) && input.operations.every(elem => "object" === typeof elem && null !== elem && _io1(elem)); const _io1 = input => "string" === typeof input.specification && "string" === typeof input.description && "string" === typeof input.summary && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io6(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io7(input.responseBody)) && "string" === typeof input.path && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _io2 = input => "string" === typeof input.name && "string" === typeof input.description && ("object" === typeof input.schema && null !== input.schema && _iu0(input.schema)); const _io3 = input => (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 && 0 < input.multipleOf)) && "integer" === input.type; const _io4 = input => (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && "number" === input.type; const _io5 = input => (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type; const _io6 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io7 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _iu0 = input => (() => {
|
|
814
|
+
validate: (() => { const _io0 = input => Array.isArray(input.operations) && input.operations.every(elem => "object" === typeof elem && null !== elem && _io1(elem)); const _io1 = input => "string" === typeof input.specification && "string" === typeof input.description && "string" === typeof input.summary && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io6(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io7(input.responseBody)) && (null === input.authorization || undefined === input.authorization || "object" === typeof input.authorization && null !== input.authorization && _io8(input.authorization)) && "string" === typeof input.path && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _io2 = input => "string" === typeof input.name && "string" === typeof input.description && ("object" === typeof input.schema && null !== input.schema && _iu0(input.schema)); const _io3 = input => (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 && 0 < input.multipleOf)) && "integer" === input.type; const _io4 = input => (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && "number" === input.type; const _io5 = input => (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type; const _io6 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io7 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io8 = input => Array.isArray(input.role) && input.role.every(elem => "string" === typeof elem) && "Bearer" === input.type; const _iu0 = input => (() => {
|
|
719
815
|
if ("number" === input.type)
|
|
720
816
|
return _io4(input);
|
|
721
817
|
else if ("integer" === input.type)
|
|
@@ -728,12 +824,12 @@ const claude = {
|
|
|
728
824
|
path: _path + ".operations",
|
|
729
825
|
expected: "Array<AutoBeOpenApi.IOperation>",
|
|
730
826
|
value: input.operations
|
|
731
|
-
})) && input.operations.map((elem,
|
|
732
|
-
path: _path + ".operations[" +
|
|
827
|
+
})) && input.operations.map((elem, _index4) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
828
|
+
path: _path + ".operations[" + _index4 + "]",
|
|
733
829
|
expected: "AutoBeOpenApi.IOperation",
|
|
734
830
|
value: elem
|
|
735
|
-
})) && _vo1(elem, _path + ".operations[" +
|
|
736
|
-
path: _path + ".operations[" +
|
|
831
|
+
})) && _vo1(elem, _path + ".operations[" + _index4 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
832
|
+
path: _path + ".operations[" + _index4 + "]",
|
|
737
833
|
expected: "AutoBeOpenApi.IOperation",
|
|
738
834
|
value: elem
|
|
739
835
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -756,12 +852,12 @@ const claude = {
|
|
|
756
852
|
path: _path + ".parameters",
|
|
757
853
|
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
758
854
|
value: input.parameters
|
|
759
|
-
})) && input.parameters.map((elem,
|
|
760
|
-
path: _path + ".parameters[" +
|
|
855
|
+
})) && input.parameters.map((elem, _index5) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
856
|
+
path: _path + ".parameters[" + _index5 + "]",
|
|
761
857
|
expected: "AutoBeOpenApi.IParameter",
|
|
762
858
|
value: elem
|
|
763
|
-
})) && _vo2(elem, _path + ".parameters[" +
|
|
764
|
-
path: _path + ".parameters[" +
|
|
859
|
+
})) && _vo2(elem, _path + ".parameters[" + _index5 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
860
|
+
path: _path + ".parameters[" + _index5 + "]",
|
|
765
861
|
expected: "AutoBeOpenApi.IParameter",
|
|
766
862
|
value: elem
|
|
767
863
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -784,6 +880,14 @@ const claude = {
|
|
|
784
880
|
path: _path + ".responseBody",
|
|
785
881
|
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
786
882
|
value: input.responseBody
|
|
883
|
+
}), null === input.authorization || undefined === input.authorization || ("object" === typeof input.authorization && null !== input.authorization || _report(_exceptionable, {
|
|
884
|
+
path: _path + ".authorization",
|
|
885
|
+
expected: "(AutoBeOpenApi.IAuthorization | null | undefined)",
|
|
886
|
+
value: input.authorization
|
|
887
|
+
})) && _vo8(input.authorization, _path + ".authorization", true && _exceptionable) || _report(_exceptionable, {
|
|
888
|
+
path: _path + ".authorization",
|
|
889
|
+
expected: "(AutoBeOpenApi.IAuthorization | null | undefined)",
|
|
890
|
+
value: input.authorization
|
|
787
891
|
}), "string" === typeof input.path || _report(_exceptionable, {
|
|
788
892
|
path: _path + ".path",
|
|
789
893
|
expected: "string",
|
|
@@ -924,6 +1028,22 @@ const claude = {
|
|
|
924
1028
|
path: _path + ".typeName",
|
|
925
1029
|
expected: "string",
|
|
926
1030
|
value: input.typeName
|
|
1031
|
+
})].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => [(Array.isArray(input.role) || _report(_exceptionable, {
|
|
1032
|
+
path: _path + ".role",
|
|
1033
|
+
expected: "Array<string>",
|
|
1034
|
+
value: input.role
|
|
1035
|
+
})) && input.role.map((elem, _index6) => "string" === typeof elem || _report(_exceptionable, {
|
|
1036
|
+
path: _path + ".role[" + _index6 + "]",
|
|
1037
|
+
expected: "string",
|
|
1038
|
+
value: elem
|
|
1039
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
1040
|
+
path: _path + ".role",
|
|
1041
|
+
expected: "Array<string>",
|
|
1042
|
+
value: input.role
|
|
1043
|
+
}), "Bearer" === input.type || _report(_exceptionable, {
|
|
1044
|
+
path: _path + ".type",
|
|
1045
|
+
expected: "\"Bearer\"",
|
|
1046
|
+
value: input.type
|
|
927
1047
|
})].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
928
1048
|
if ("number" === input.type)
|
|
929
1049
|
return _vo4(input, _path, true && _exceptionable);
|
|
@@ -988,268 +1108,7 @@ const collection = {
|
|
|
988
1108
|
description: "Array of API operations to generate.\n\nEach operation in this array must include:\n\n- Specification: Detailed API specification with clear purpose and\n functionality\n- Path: Resource-centric URL path (e.g., \"/resources/{resourceId}\")\n- Method: HTTP method (get, post, put, delete, patch)\n- Description: Extremely detailed multi-paragraph description referencing\n Prisma schema comments\n- Summary: Concise one-sentence summary of the endpoint\n- Parameters: Array of all necessary parameters with descriptions and schema\n definitions\n- RequestBody: For POST/PUT/PATCH methods, with typeName referencing\n components.schemas\n- ResponseBody: With typeName referencing appropriate response type\n\nAll operations must follow strict quality standards:\n\n1. Detailed descriptions referencing Prisma schema comments\n2. Accurate parameter definitions matching path parameters\n3. Appropriate request/response body type references\n4. Consistent patterns for CRUD operations\n\nFor list retrievals (typically PATCH), include pagination, search, and\nsorting. For detail retrieval (GET), return a single resource. For creation\n(POST), use .ICreate request body. For modification (PUT), use .IUpdate\nrequest body.",
|
|
989
1109
|
type: "array",
|
|
990
1110
|
items: {
|
|
991
|
-
|
|
992
|
-
type: "object",
|
|
993
|
-
properties: {
|
|
994
|
-
specification: {
|
|
995
|
-
title: "Specification of the API operation",
|
|
996
|
-
description: "Specification of the API operation.\n\nBefore defining the API operation interface, please describe what you're\nplanning to write in this `specification` field.\n\nThe specification must be fully detailed and clear, so that anyone can\nunderstand the purpose and functionality of the API operation and its\nrelated components (e.g., {@link path}, {@link parameters},\n{@link requestBody}).\n\nIMPORTANT: The specification MUST identify which Prisma DB table this\noperation is associated with, helping ensure complete coverage of all\ndatabase entities.",
|
|
997
|
-
type: "string"
|
|
998
|
-
},
|
|
999
|
-
description: {
|
|
1000
|
-
title: "Detailed description about the API operation",
|
|
1001
|
-
description: "Detailed description about the API operation.\n\nIMPORTANT: This field MUST be extensively detailed and MUST reference the\ndescription comments from the related Prisma DB schema tables and\ncolumns. The description should be organized into MULTIPLE PARAGRAPHS\nseparated by line breaks to improve readability and comprehension.\n\nFor example, include separate paragraphs for:\n\n- The purpose and overview of the API operation\n- Security considerations and user permissions\n- Relationship to underlying database entities\n- Validation rules and business logic\n- Related API operations that might be used together with this one\n- Expected behavior and error handling\n\nWhen writing the description, be sure to incorporate the corresponding DB\nschema's description comments, matching the level of detail and style of\nthose comments. This ensures consistency between the API documentation\nand database structure.\n\nIf there's a dependency to other APIs, please describe the dependency API\noperation in this field with detailed reason. For example, if this API\noperation needs a pre-execution of other API operation, it must be\nexplicitly described.\n\n- `GET /shoppings/customers/sales` must be pre-executed to get entire list\n of summarized sales. Detailed sale information would be obtained by\n specifying the sale ID in the path parameter.\n\n> MUST be written in English. Never use other languages.",
|
|
1002
|
-
type: "string"
|
|
1003
|
-
},
|
|
1004
|
-
summary: {
|
|
1005
|
-
title: "Short summary of the API operation",
|
|
1006
|
-
description: "Short summary of the API operation.\n\nThis should be a concise description of the API operation, typically one\nsentence long. It should provide a quick overview of what the API does\nwithout going into too much detail.\n\nThis summary will be used in the OpenAPI documentation to give users a\nquick understanding of the API operation's purpose.\n\nIMPORTANT: The summary should clearly indicate which Prisma DB table this\noperation relates to, helping to ensure all tables have API coverage.\n\n> MUST be written in English. Never use other languages",
|
|
1007
|
-
type: "string"
|
|
1008
|
-
},
|
|
1009
|
-
parameters: {
|
|
1010
|
-
title: "List of path parameters",
|
|
1011
|
-
description: "List of path parameters.\n\nNote that, the {@link AutoBeOpenApi.IParameter.name identifier name} of\npath parameter must be corresponded to the\n{@link path API operation path}.\n\nFor example, if there's an API operation which has {@link path} of\n`/shoppings/customers/sales/{saleId}/questions/${questionId}/comments/${commentId}`,\nits list of {@link AutoBeOpenApi.IParameter.name path parameters} must be\nlike:\n\n- `saleId`\n- `questionId`\n- `commentId`",
|
|
1012
|
-
type: "array",
|
|
1013
|
-
items: {
|
|
1014
|
-
description: "Description of the current {@link AutoBeOpenApi.IParameter} type:\n\n> Path parameter information for API routes.\n> \n> This interface defines a path parameter that appears in the URL of an API\n> endpoint. Path parameters are enclosed in curly braces in the\n> {@link AutoBeOpenApi.IOperation.path operation path} and must be defined\n> with their types and descriptions.\n> \n> For example, if API operation path is\n> `/shoppings/customers/sales/{saleId}/questions/${questionId}/comments/${commentId}`,\n> the path parameters should be like below:\n> \n> ```json\n> {\n> \"path\": \"/shoppings/customers/sales/{saleId}/questions/${questionId}/comments/${commentId}\",\n> \"method\": \"get\",\n> \"parameters\": [\n> {\n> \"name\": \"saleId\",\n> \"in\": \"path\",\n> \"schema\": { \"type\": \"string\", \"format\": \"uuid\" },\n> \"description\": \"Target sale's ID\"\n> },\n> {\n> \"name\": \"questionId\",\n> \"in\": \"path\",\n> \"schema\": { \"type\": \"string\", \"format\": \"uuid\" },\n> \"description\": \"Target question's ID\"\n> },\n> {\n> \"name\": \"commentId\",\n> \"in\": \"path\",\n> \"schema\": { \"type\": \"string\", \"format\": \"uuid\" },\n> \"description\": \"Target comment's ID\"\n> }\n> ]\n> }\n> ```",
|
|
1015
|
-
type: "object",
|
|
1016
|
-
properties: {
|
|
1017
|
-
name: {
|
|
1018
|
-
title: "Identifier name of the path parameter",
|
|
1019
|
-
description: "Identifier name of the path parameter.\n\nThis name must match exactly with the parameter name in the route path.\nIt must be corresponded to the\n{@link AutoBeOpenApi.IOperation.path API operation path}.",
|
|
1020
|
-
type: "string"
|
|
1021
|
-
},
|
|
1022
|
-
description: {
|
|
1023
|
-
title: "Description about the path parameter",
|
|
1024
|
-
description: "Description about the path parameter.\n\nMake short, concise and clear description about the path parameter.\n\n> MUST be written in English. Never use other languages.",
|
|
1025
|
-
type: "string"
|
|
1026
|
-
},
|
|
1027
|
-
schema: {
|
|
1028
|
-
title: "Type schema of the path parameter",
|
|
1029
|
-
description: "Type schema of the path parameter.\n\nPath parameters are typically primitive types like\n{@link AutoBeOpenApi.IJsonSchema.IString strings},\n{@link AutoBeOpenApi.IJsonSchema.IInteger integers},\n{@link AutoBeOpenApi.IJsonSchema.INumber numbers}.\n\nIf you need other types, please use request body instead with object type\nencapsulation.",
|
|
1030
|
-
anyOf: [
|
|
1031
|
-
{
|
|
1032
|
-
type: "object",
|
|
1033
|
-
properties: {
|
|
1034
|
-
minimum: {
|
|
1035
|
-
title: "Minimum value restriction",
|
|
1036
|
-
description: "Minimum value restriction.",
|
|
1037
|
-
type: "number"
|
|
1038
|
-
},
|
|
1039
|
-
maximum: {
|
|
1040
|
-
title: "Maximum value restriction",
|
|
1041
|
-
description: "Maximum value restriction.",
|
|
1042
|
-
type: "number"
|
|
1043
|
-
},
|
|
1044
|
-
exclusiveMinimum: {
|
|
1045
|
-
title: "Exclusive minimum value restriction",
|
|
1046
|
-
description: "Exclusive minimum value restriction.",
|
|
1047
|
-
type: "number"
|
|
1048
|
-
},
|
|
1049
|
-
exclusiveMaximum: {
|
|
1050
|
-
title: "Exclusive maximum value restriction",
|
|
1051
|
-
description: "Exclusive maximum value restriction.",
|
|
1052
|
-
type: "number"
|
|
1053
|
-
},
|
|
1054
|
-
multipleOf: {
|
|
1055
|
-
title: "Multiple of value restriction",
|
|
1056
|
-
description: "Multiple of value restriction.\n\n\n@exclusiveMinimum 0",
|
|
1057
|
-
type: "number"
|
|
1058
|
-
},
|
|
1059
|
-
type: {
|
|
1060
|
-
title: "Discriminator value of the type",
|
|
1061
|
-
description: "Discriminator value of the type.",
|
|
1062
|
-
type: "string",
|
|
1063
|
-
"enum": [
|
|
1064
|
-
"number"
|
|
1065
|
-
]
|
|
1066
|
-
}
|
|
1067
|
-
},
|
|
1068
|
-
required: [
|
|
1069
|
-
"type"
|
|
1070
|
-
],
|
|
1071
|
-
description: "Description of the current {@link AutoBeOpenApi.IJsonSchema.INumber} type:\n\n> Number (double) type info."
|
|
1072
|
-
},
|
|
1073
|
-
{
|
|
1074
|
-
type: "object",
|
|
1075
|
-
properties: {
|
|
1076
|
-
minimum: {
|
|
1077
|
-
title: "Minimum value restriction",
|
|
1078
|
-
description: "Minimum value restriction.",
|
|
1079
|
-
type: "integer"
|
|
1080
|
-
},
|
|
1081
|
-
maximum: {
|
|
1082
|
-
title: "Maximum value restriction",
|
|
1083
|
-
description: "Maximum value restriction.",
|
|
1084
|
-
type: "integer"
|
|
1085
|
-
},
|
|
1086
|
-
exclusiveMinimum: {
|
|
1087
|
-
title: "Exclusive minimum value restriction",
|
|
1088
|
-
description: "Exclusive minimum value restriction.",
|
|
1089
|
-
type: "number"
|
|
1090
|
-
},
|
|
1091
|
-
exclusiveMaximum: {
|
|
1092
|
-
title: "Exclusive maximum value restriction",
|
|
1093
|
-
description: "Exclusive maximum value restriction.",
|
|
1094
|
-
type: "number"
|
|
1095
|
-
},
|
|
1096
|
-
multipleOf: {
|
|
1097
|
-
title: "Multiple of value restriction",
|
|
1098
|
-
description: "Multiple of value restriction.\n\n\n@exclusiveMinimum 0",
|
|
1099
|
-
type: "integer"
|
|
1100
|
-
},
|
|
1101
|
-
type: {
|
|
1102
|
-
title: "Discriminator value of the type",
|
|
1103
|
-
description: "Discriminator value of the type.",
|
|
1104
|
-
type: "string",
|
|
1105
|
-
"enum": [
|
|
1106
|
-
"integer"
|
|
1107
|
-
]
|
|
1108
|
-
}
|
|
1109
|
-
},
|
|
1110
|
-
required: [
|
|
1111
|
-
"type"
|
|
1112
|
-
],
|
|
1113
|
-
description: "Description of the current {@link AutoBeOpenApi.IJsonSchema.IInteger} type:\n\n> Integer type info."
|
|
1114
|
-
},
|
|
1115
|
-
{
|
|
1116
|
-
type: "object",
|
|
1117
|
-
properties: {
|
|
1118
|
-
format: {
|
|
1119
|
-
title: "Format restriction",
|
|
1120
|
-
description: "Format restriction.",
|
|
1121
|
-
type: "string"
|
|
1122
|
-
},
|
|
1123
|
-
pattern: {
|
|
1124
|
-
title: "Pattern restriction",
|
|
1125
|
-
description: "Pattern restriction.",
|
|
1126
|
-
type: "string"
|
|
1127
|
-
},
|
|
1128
|
-
contentMediaType: {
|
|
1129
|
-
title: "Content media type restriction",
|
|
1130
|
-
description: "Content media type restriction.",
|
|
1131
|
-
type: "string"
|
|
1132
|
-
},
|
|
1133
|
-
minLength: {
|
|
1134
|
-
title: "Minimum length restriction",
|
|
1135
|
-
description: "Minimum length restriction.\n\n\n@minimum 0",
|
|
1136
|
-
type: "integer"
|
|
1137
|
-
},
|
|
1138
|
-
maxLength: {
|
|
1139
|
-
title: "Maximum length restriction",
|
|
1140
|
-
description: "Maximum length restriction.\n\n\n@minimum 0",
|
|
1141
|
-
type: "integer"
|
|
1142
|
-
},
|
|
1143
|
-
type: {
|
|
1144
|
-
title: "Discriminator value of the type",
|
|
1145
|
-
description: "Discriminator value of the type.",
|
|
1146
|
-
type: "string",
|
|
1147
|
-
"enum": [
|
|
1148
|
-
"string"
|
|
1149
|
-
]
|
|
1150
|
-
}
|
|
1151
|
-
},
|
|
1152
|
-
required: [
|
|
1153
|
-
"type"
|
|
1154
|
-
],
|
|
1155
|
-
description: "Description of the current {@link AutoBeOpenApi.IJsonSchema.IString} type:\n\n> String type info."
|
|
1156
|
-
}
|
|
1157
|
-
]
|
|
1158
|
-
}
|
|
1159
|
-
},
|
|
1160
|
-
required: [
|
|
1161
|
-
"name",
|
|
1162
|
-
"description",
|
|
1163
|
-
"schema"
|
|
1164
|
-
]
|
|
1165
|
-
}
|
|
1166
|
-
},
|
|
1167
|
-
requestBody: {
|
|
1168
|
-
title: "Request body of the API operation",
|
|
1169
|
-
description: "Request body of the API operation.\n\nDefines the payload structure for the request. Contains a description and\nschema reference to define the expected input data.\n\nShould be `null` for operations that don't require a request body, such\nas most \"get\" operations.",
|
|
1170
|
-
anyOf: [
|
|
1171
|
-
{
|
|
1172
|
-
type: "null"
|
|
1173
|
-
},
|
|
1174
|
-
{
|
|
1175
|
-
type: "object",
|
|
1176
|
-
properties: {
|
|
1177
|
-
description: {
|
|
1178
|
-
title: "Description about the request body",
|
|
1179
|
-
description: "Description about the request body.\n\nMake short, concise and clear description about the request body.\n\n> MUST be written in English. Never use other languages.",
|
|
1180
|
-
type: "string"
|
|
1181
|
-
},
|
|
1182
|
-
typeName: {
|
|
1183
|
-
title: "Request body type name",
|
|
1184
|
-
description: "Request body type name.\n\nThis specifies the data structure expected in the request body, that will\nbe transformed to {@link AutoBeOpenApi.IJsonSchema.IReference reference}\ntype in the {@link AutoBeOpenApi.IComponents.schemas components section}\nas an {@link AutoBeOpenApi.IJsonSchema.Object object} type.\n\nHere is the naming convention for the request body type:\n\n- `IEntityName.ICreate`: Request body for creation operations (POST)\n- `IEntityName.IUpdate`: Request body for update operations (PUT)\n- `IEntityName.IRequest`: Request parameters for list operations (often\n with search/pagination)\n\nWhat you write:\n\n```json\n{\n \"typeName\": \"IShoppingOrder.ICreate\"\n}\n```\n\nTransformed to:\n\n```json\n{\n \"schema\": {\n \"$ref\": \"#/components/schemas/IShoppingOrder.ICreate\"\n }\n}\n```",
|
|
1185
|
-
type: "string"
|
|
1186
|
-
}
|
|
1187
|
-
},
|
|
1188
|
-
required: [
|
|
1189
|
-
"description",
|
|
1190
|
-
"typeName"
|
|
1191
|
-
],
|
|
1192
|
-
description: "Description of the current {@link AutoBeOpenApi.IRequestBody} type:\n\n> Request body information of OpenAPI operation.\n> \n> This interface defines the structure for request bodies in API routes. It\n> corresponds to the requestBody section in OpenAPI specifications, providing\n> both a description and schema reference for the request payload.\n> \n> The content-type for all request bodies is always `application/json`. Even\n> when file uploading is required, don't use `multipart/form-data` or\n> `application/x-www-form-urlencoded` content types. Instead, just define an\n> URI string property in the request body schema.\n> \n> Note that, all body schemas must be transformable to a\n> {@link AutoBeOpenApi.IJsonSchema.IReference reference} type defined in the\n> {@link AutoBeOpenApi.IComponents.schemas components section} as an\n> {@link AutoBeOpenApi.IJsonSchema.IObject object} type.\n> \n> In OpenAPI, this might represent:\n> \n> ```json\n> {\n> \"requestBody\": {\n> \"description\": \"Creation info of the order\",\n> \"content\": {\n> \"application/json\": {\n> \"schema\": {\n> \"$ref\": \"#/components/schemas/IShoppingOrder.ICreate\"\n> }\n> }\n> }\n> }\n> }\n> ```"
|
|
1193
|
-
}
|
|
1194
|
-
]
|
|
1195
|
-
},
|
|
1196
|
-
responseBody: {
|
|
1197
|
-
title: "Response body of the API operation",
|
|
1198
|
-
description: "Response body of the API operation.\n\nDefines the structure of the successful response data. Contains a\ndescription and schema reference for the returned data.\n\nShould be null for operations that don't return any data.",
|
|
1199
|
-
anyOf: [
|
|
1200
|
-
{
|
|
1201
|
-
type: "null"
|
|
1202
|
-
},
|
|
1203
|
-
{
|
|
1204
|
-
type: "object",
|
|
1205
|
-
properties: {
|
|
1206
|
-
description: {
|
|
1207
|
-
title: "Description about the response body",
|
|
1208
|
-
description: "Description about the response body.\n\nMake short, concise and clear description about the response body.\n\n> MUST be written in English. Never use other languages.",
|
|
1209
|
-
type: "string"
|
|
1210
|
-
},
|
|
1211
|
-
typeName: {
|
|
1212
|
-
title: "Response body's data type",
|
|
1213
|
-
description: "Response body's data type.\n\nSpecifies the structure of the returned data (response body), that will\nbe transformed to {@link AutoBeOpenApi.IJsonSchema.IReference} type in the\n{@link AutoBeOpenApi.IComponents.schemas components section} as an\n{@link AutoBeOpenApi.IJsonSchema.IObject object} type.\n\nHere is the naming convention for the response body type:\n\n- `IEntityName`: Main entity with detailed information (e.g.,\n `IShoppingSale`)\n- `IEntityName.ISummary`: Simplified response version with essential\n properties\n- `IEntityName.IInvert`: Alternative view of an entity from a different\n perspective\n- `IPageIEntityName`: Paginated results container with `pagination` and\n `data` properties\n\nWhat you write:\n\n```json\n{\n \"typeName\": \"IShoppingOrder\"\n}\n```\n\nTransformed to:\n\n```json\n{\n \"schema\": {\n \"$ref\": \"#/components/schemas/IShoppingOrder\"\n }\n}\n```",
|
|
1214
|
-
type: "string"
|
|
1215
|
-
}
|
|
1216
|
-
},
|
|
1217
|
-
required: [
|
|
1218
|
-
"description",
|
|
1219
|
-
"typeName"
|
|
1220
|
-
],
|
|
1221
|
-
description: "Description of the current {@link AutoBeOpenApi.IResponseBody} type:\n\n> Response body information for OpenAPI operation.\n> \n> This interface defines the structure of a successful response from an API\n> operation. It provides a description of the response and a schema reference\n> to define the returned data structure.\n> \n> The content-type for all responses is always `application/json`. Even when\n> file downloading is required, don't use `application/octet-stream` or\n> `multipart/form-data` content types. Instead, just define an URI string\n> property in the response body schema.\n> \n> In OpenAPI, this might represent:\n> \n> ```json\n> {\n> \"responses\": {\n> \"200\": {\n> \"description\": \"Order information\",\n> \"content\": {\n> \"application/json\": {\n> \"schema\": { \"$ref\": \"#/components/schemas/IShoppingOrder\" }\n> }\n> }\n> }\n> }\n> }\n> ```"
|
|
1222
|
-
}
|
|
1223
|
-
]
|
|
1224
|
-
},
|
|
1225
|
-
path: {
|
|
1226
|
-
title: "HTTP path of the API operation",
|
|
1227
|
-
description: "HTTP path of the API operation.\n\nThe URL path for accessing this API operation, using path parameters\nenclosed in curly braces (e.g., `/shoppings/customers/sales/{saleId}`).\n\nIt must be corresponded to the {@link parameters path parameters}.\n\nThe path structure should clearly indicate which database entity this\noperation is manipulating, helping to ensure all entities have\nappropriate API coverage.",
|
|
1228
|
-
type: "string"
|
|
1229
|
-
},
|
|
1230
|
-
method: {
|
|
1231
|
-
title: "HTTP method of the API operation",
|
|
1232
|
-
description: "HTTP method of the API operation.\n\nNote that, if the API operation has {@link requestBody}, method must not\nbe `get`.\n\nAlso, even though the API operation has been designed to only get\ninformation, but it needs complicated request information, it must be\ndefined as `patch` method with {@link requestBody} data specification.\n\n- `get`: get information\n- `patch`: get information with complicated request data\n ({@link requestBody})\n- `post`: create new record\n- `put`: update existing record\n- `delete`: remove record",
|
|
1233
|
-
type: "string",
|
|
1234
|
-
"enum": [
|
|
1235
|
-
"get",
|
|
1236
|
-
"post",
|
|
1237
|
-
"put",
|
|
1238
|
-
"delete",
|
|
1239
|
-
"patch"
|
|
1240
|
-
]
|
|
1241
|
-
}
|
|
1242
|
-
},
|
|
1243
|
-
required: [
|
|
1244
|
-
"specification",
|
|
1245
|
-
"description",
|
|
1246
|
-
"summary",
|
|
1247
|
-
"parameters",
|
|
1248
|
-
"requestBody",
|
|
1249
|
-
"responseBody",
|
|
1250
|
-
"path",
|
|
1251
|
-
"method"
|
|
1252
|
-
]
|
|
1111
|
+
$ref: "#/$defs/AutoBeOpenApi.IOperation"
|
|
1253
1112
|
}
|
|
1254
1113
|
}
|
|
1255
1114
|
},
|
|
@@ -1257,554 +1116,342 @@ const collection = {
|
|
|
1257
1116
|
"operations"
|
|
1258
1117
|
],
|
|
1259
1118
|
additionalProperties: false,
|
|
1260
|
-
$defs: {
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
expected: "string",
|
|
1295
|
-
value: input.description
|
|
1296
|
-
}), "string" === typeof input.summary || _report(_exceptionable, {
|
|
1297
|
-
path: _path + ".summary",
|
|
1298
|
-
expected: "string",
|
|
1299
|
-
value: input.summary
|
|
1300
|
-
}), (Array.isArray(input.parameters) || _report(_exceptionable, {
|
|
1301
|
-
path: _path + ".parameters",
|
|
1302
|
-
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
1303
|
-
value: input.parameters
|
|
1304
|
-
})) && input.parameters.map((elem, _index4) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1305
|
-
path: _path + ".parameters[" + _index4 + "]",
|
|
1306
|
-
expected: "AutoBeOpenApi.IParameter",
|
|
1307
|
-
value: elem
|
|
1308
|
-
})) && _vo2(elem, _path + ".parameters[" + _index4 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1309
|
-
path: _path + ".parameters[" + _index4 + "]",
|
|
1310
|
-
expected: "AutoBeOpenApi.IParameter",
|
|
1311
|
-
value: elem
|
|
1312
|
-
})).every(flag => flag) || _report(_exceptionable, {
|
|
1313
|
-
path: _path + ".parameters",
|
|
1314
|
-
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
1315
|
-
value: input.parameters
|
|
1316
|
-
}), null === input.requestBody || ("object" === typeof input.requestBody && null !== input.requestBody || _report(_exceptionable, {
|
|
1317
|
-
path: _path + ".requestBody",
|
|
1318
|
-
expected: "(AutoBeOpenApi.IRequestBody | null)",
|
|
1319
|
-
value: input.requestBody
|
|
1320
|
-
})) && _vo6(input.requestBody, _path + ".requestBody", true && _exceptionable) || _report(_exceptionable, {
|
|
1321
|
-
path: _path + ".requestBody",
|
|
1322
|
-
expected: "(AutoBeOpenApi.IRequestBody | null)",
|
|
1323
|
-
value: input.requestBody
|
|
1324
|
-
}), null === input.responseBody || ("object" === typeof input.responseBody && null !== input.responseBody || _report(_exceptionable, {
|
|
1325
|
-
path: _path + ".responseBody",
|
|
1326
|
-
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
1327
|
-
value: input.responseBody
|
|
1328
|
-
})) && _vo7(input.responseBody, _path + ".responseBody", true && _exceptionable) || _report(_exceptionable, {
|
|
1329
|
-
path: _path + ".responseBody",
|
|
1330
|
-
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
1331
|
-
value: input.responseBody
|
|
1332
|
-
}), "string" === typeof input.path || _report(_exceptionable, {
|
|
1333
|
-
path: _path + ".path",
|
|
1334
|
-
expected: "string",
|
|
1335
|
-
value: input.path
|
|
1336
|
-
}), "get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method || _report(_exceptionable, {
|
|
1337
|
-
path: _path + ".method",
|
|
1338
|
-
expected: "(\"delete\" | \"get\" | \"patch\" | \"post\" | \"put\")",
|
|
1339
|
-
value: input.method
|
|
1340
|
-
})].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
|
|
1341
|
-
path: _path + ".name",
|
|
1342
|
-
expected: "string",
|
|
1343
|
-
value: input.name
|
|
1344
|
-
}), "string" === typeof input.description || _report(_exceptionable, {
|
|
1345
|
-
path: _path + ".description",
|
|
1346
|
-
expected: "string",
|
|
1347
|
-
value: input.description
|
|
1348
|
-
}), ("object" === typeof input.schema && null !== input.schema || _report(_exceptionable, {
|
|
1349
|
-
path: _path + ".schema",
|
|
1350
|
-
expected: "(AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IString)",
|
|
1351
|
-
value: input.schema
|
|
1352
|
-
})) && _vu0(input.schema, _path + ".schema", true && _exceptionable) || _report(_exceptionable, {
|
|
1353
|
-
path: _path + ".schema",
|
|
1354
|
-
expected: "(AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IString)",
|
|
1355
|
-
value: input.schema
|
|
1356
|
-
})].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => [undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000 || _report(_exceptionable, {
|
|
1357
|
-
path: _path + ".minimum",
|
|
1358
|
-
expected: "number & Type<\"int64\">",
|
|
1359
|
-
value: input.minimum
|
|
1360
|
-
})) || _report(_exceptionable, {
|
|
1361
|
-
path: _path + ".minimum",
|
|
1362
|
-
expected: "((number & Type<\"int64\">) | undefined)",
|
|
1363
|
-
value: input.minimum
|
|
1364
|
-
}), undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000 || _report(_exceptionable, {
|
|
1365
|
-
path: _path + ".maximum",
|
|
1366
|
-
expected: "number & Type<\"int64\">",
|
|
1367
|
-
value: input.maximum
|
|
1368
|
-
})) || _report(_exceptionable, {
|
|
1369
|
-
path: _path + ".maximum",
|
|
1370
|
-
expected: "((number & Type<\"int64\">) | undefined)",
|
|
1371
|
-
value: input.maximum
|
|
1372
|
-
}), undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || _report(_exceptionable, {
|
|
1373
|
-
path: _path + ".exclusiveMinimum",
|
|
1374
|
-
expected: "(number | undefined)",
|
|
1375
|
-
value: input.exclusiveMinimum
|
|
1376
|
-
}), undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || _report(_exceptionable, {
|
|
1377
|
-
path: _path + ".exclusiveMaximum",
|
|
1378
|
-
expected: "(number | undefined)",
|
|
1379
|
-
value: input.exclusiveMaximum
|
|
1380
|
-
}), undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 || _report(_exceptionable, {
|
|
1381
|
-
path: _path + ".multipleOf",
|
|
1382
|
-
expected: "number & Type<\"uint64\">",
|
|
1383
|
-
value: input.multipleOf
|
|
1384
|
-
})) && (0 < input.multipleOf || _report(_exceptionable, {
|
|
1385
|
-
path: _path + ".multipleOf",
|
|
1386
|
-
expected: "number & ExclusiveMinimum<0>",
|
|
1387
|
-
value: input.multipleOf
|
|
1388
|
-
})) || _report(_exceptionable, {
|
|
1389
|
-
path: _path + ".multipleOf",
|
|
1390
|
-
expected: "((number & Type<\"uint64\"> & ExclusiveMinimum<0>) | undefined)",
|
|
1391
|
-
value: input.multipleOf
|
|
1392
|
-
}), "integer" === input.type || _report(_exceptionable, {
|
|
1393
|
-
path: _path + ".type",
|
|
1394
|
-
expected: "\"integer\"",
|
|
1395
|
-
value: input.type
|
|
1396
|
-
})].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => [undefined === input.minimum || "number" === typeof input.minimum || _report(_exceptionable, {
|
|
1397
|
-
path: _path + ".minimum",
|
|
1398
|
-
expected: "(number | undefined)",
|
|
1399
|
-
value: input.minimum
|
|
1400
|
-
}), undefined === input.maximum || "number" === typeof input.maximum || _report(_exceptionable, {
|
|
1401
|
-
path: _path + ".maximum",
|
|
1402
|
-
expected: "(number | undefined)",
|
|
1403
|
-
value: input.maximum
|
|
1404
|
-
}), undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || _report(_exceptionable, {
|
|
1405
|
-
path: _path + ".exclusiveMinimum",
|
|
1406
|
-
expected: "(number | undefined)",
|
|
1407
|
-
value: input.exclusiveMinimum
|
|
1408
|
-
}), undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || _report(_exceptionable, {
|
|
1409
|
-
path: _path + ".exclusiveMaximum",
|
|
1410
|
-
expected: "(number | undefined)",
|
|
1411
|
-
value: input.exclusiveMaximum
|
|
1412
|
-
}), undefined === input.multipleOf || "number" === typeof input.multipleOf && (0 < input.multipleOf || _report(_exceptionable, {
|
|
1413
|
-
path: _path + ".multipleOf",
|
|
1414
|
-
expected: "number & ExclusiveMinimum<0>",
|
|
1415
|
-
value: input.multipleOf
|
|
1416
|
-
})) || _report(_exceptionable, {
|
|
1417
|
-
path: _path + ".multipleOf",
|
|
1418
|
-
expected: "((number & ExclusiveMinimum<0>) | undefined)",
|
|
1419
|
-
value: input.multipleOf
|
|
1420
|
-
}), "number" === input.type || _report(_exceptionable, {
|
|
1421
|
-
path: _path + ".type",
|
|
1422
|
-
expected: "\"number\"",
|
|
1423
|
-
value: input.type
|
|
1424
|
-
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [undefined === input.format || "string" === typeof input.format || _report(_exceptionable, {
|
|
1425
|
-
path: _path + ".format",
|
|
1426
|
-
expected: "(string | undefined)",
|
|
1427
|
-
value: input.format
|
|
1428
|
-
}), undefined === input.pattern || "string" === typeof input.pattern || _report(_exceptionable, {
|
|
1429
|
-
path: _path + ".pattern",
|
|
1430
|
-
expected: "(string | undefined)",
|
|
1431
|
-
value: input.pattern
|
|
1432
|
-
}), undefined === input.contentMediaType || "string" === typeof input.contentMediaType || _report(_exceptionable, {
|
|
1433
|
-
path: _path + ".contentMediaType",
|
|
1434
|
-
expected: "(string | undefined)",
|
|
1435
|
-
value: input.contentMediaType
|
|
1436
|
-
}), undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000 || _report(_exceptionable, {
|
|
1437
|
-
path: _path + ".minLength",
|
|
1438
|
-
expected: "number & Type<\"uint64\">",
|
|
1439
|
-
value: input.minLength
|
|
1440
|
-
})) || _report(_exceptionable, {
|
|
1441
|
-
path: _path + ".minLength",
|
|
1442
|
-
expected: "((number & Type<\"uint64\">) | undefined)",
|
|
1443
|
-
value: input.minLength
|
|
1444
|
-
}), undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000 || _report(_exceptionable, {
|
|
1445
|
-
path: _path + ".maxLength",
|
|
1446
|
-
expected: "number & Type<\"uint64\">",
|
|
1447
|
-
value: input.maxLength
|
|
1448
|
-
})) || _report(_exceptionable, {
|
|
1449
|
-
path: _path + ".maxLength",
|
|
1450
|
-
expected: "((number & Type<\"uint64\">) | undefined)",
|
|
1451
|
-
value: input.maxLength
|
|
1452
|
-
}), "string" === input.type || _report(_exceptionable, {
|
|
1453
|
-
path: _path + ".type",
|
|
1454
|
-
expected: "\"string\"",
|
|
1455
|
-
value: input.type
|
|
1456
|
-
})].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
1457
|
-
path: _path + ".description",
|
|
1458
|
-
expected: "string",
|
|
1459
|
-
value: input.description
|
|
1460
|
-
}), "string" === typeof input.typeName || _report(_exceptionable, {
|
|
1461
|
-
path: _path + ".typeName",
|
|
1462
|
-
expected: "string",
|
|
1463
|
-
value: input.typeName
|
|
1464
|
-
})].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
1465
|
-
path: _path + ".description",
|
|
1466
|
-
expected: "string",
|
|
1467
|
-
value: input.description
|
|
1468
|
-
}), "string" === typeof input.typeName || _report(_exceptionable, {
|
|
1469
|
-
path: _path + ".typeName",
|
|
1470
|
-
expected: "string",
|
|
1471
|
-
value: input.typeName
|
|
1472
|
-
})].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
1473
|
-
if ("number" === input.type)
|
|
1474
|
-
return _vo4(input, _path, true && _exceptionable);
|
|
1475
|
-
else if ("integer" === input.type)
|
|
1476
|
-
return _vo3(input, _path, true && _exceptionable);
|
|
1477
|
-
else if ("string" === input.type)
|
|
1478
|
-
return _vo5(input, _path, true && _exceptionable);
|
|
1479
|
-
else
|
|
1480
|
-
return _report(_exceptionable, {
|
|
1481
|
-
path: _path,
|
|
1482
|
-
expected: "(AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.IString)",
|
|
1483
|
-
value: input
|
|
1484
|
-
});
|
|
1485
|
-
})(); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
1486
|
-
if (false === __is(input)) {
|
|
1487
|
-
errors = [];
|
|
1488
|
-
_report = __typia_transform__validateReport._validateReport(errors);
|
|
1489
|
-
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
1490
|
-
path: _path + "",
|
|
1491
|
-
expected: "IMakeOperationProps",
|
|
1492
|
-
value: input
|
|
1493
|
-
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
1494
|
-
path: _path + "",
|
|
1495
|
-
expected: "IMakeOperationProps",
|
|
1496
|
-
value: input
|
|
1497
|
-
}))(input, "$input", true);
|
|
1498
|
-
const success = 0 === errors.length;
|
|
1499
|
-
return success ? {
|
|
1500
|
-
success,
|
|
1501
|
-
data: input
|
|
1502
|
-
} : {
|
|
1503
|
-
success,
|
|
1504
|
-
errors,
|
|
1505
|
-
data: input
|
|
1506
|
-
};
|
|
1507
|
-
}
|
|
1508
|
-
return {
|
|
1509
|
-
success: true,
|
|
1510
|
-
data: input
|
|
1511
|
-
};
|
|
1512
|
-
}; })()
|
|
1513
|
-
}
|
|
1514
|
-
]
|
|
1515
|
-
},
|
|
1516
|
-
claude,
|
|
1517
|
-
llama: claude,
|
|
1518
|
-
deepseek: claude,
|
|
1519
|
-
"3.1": claude,
|
|
1520
|
-
"3.0": {
|
|
1521
|
-
model: "3.0",
|
|
1522
|
-
options: {
|
|
1523
|
-
constraint: true,
|
|
1524
|
-
recursive: 3,
|
|
1525
|
-
separate: null
|
|
1526
|
-
},
|
|
1527
|
-
functions: [
|
|
1528
|
-
{
|
|
1529
|
-
name: "makeOperations",
|
|
1530
|
-
parameters: {
|
|
1531
|
-
type: "object",
|
|
1532
|
-
properties: {
|
|
1533
|
-
operations: {
|
|
1534
|
-
type: "array",
|
|
1535
|
-
items: {
|
|
1536
|
-
type: "object",
|
|
1537
|
-
properties: {
|
|
1538
|
-
specification: {
|
|
1539
|
-
type: "string",
|
|
1540
|
-
title: "Specification of the API operation",
|
|
1541
|
-
description: "Specification of the API operation.\n\nBefore defining the API operation interface, please describe what you're\nplanning to write in this `specification` field.\n\nThe specification must be fully detailed and clear, so that anyone can\nunderstand the purpose and functionality of the API operation and its\nrelated components (e.g., {@link path}, {@link parameters},\n{@link requestBody}).\n\nIMPORTANT: The specification MUST identify which Prisma DB table this\noperation is associated with, helping ensure complete coverage of all\ndatabase entities."
|
|
1542
|
-
},
|
|
1543
|
-
description: {
|
|
1544
|
-
type: "string",
|
|
1545
|
-
title: "Detailed description about the API operation",
|
|
1546
|
-
description: "Detailed description about the API operation.\n\nIMPORTANT: This field MUST be extensively detailed and MUST reference the\ndescription comments from the related Prisma DB schema tables and\ncolumns. The description should be organized into MULTIPLE PARAGRAPHS\nseparated by line breaks to improve readability and comprehension.\n\nFor example, include separate paragraphs for:\n\n- The purpose and overview of the API operation\n- Security considerations and user permissions\n- Relationship to underlying database entities\n- Validation rules and business logic\n- Related API operations that might be used together with this one\n- Expected behavior and error handling\n\nWhen writing the description, be sure to incorporate the corresponding DB\nschema's description comments, matching the level of detail and style of\nthose comments. This ensures consistency between the API documentation\nand database structure.\n\nIf there's a dependency to other APIs, please describe the dependency API\noperation in this field with detailed reason. For example, if this API\noperation needs a pre-execution of other API operation, it must be\nexplicitly described.\n\n- `GET /shoppings/customers/sales` must be pre-executed to get entire list\n of summarized sales. Detailed sale information would be obtained by\n specifying the sale ID in the path parameter.\n\n> MUST be written in English. Never use other languages."
|
|
1547
|
-
},
|
|
1548
|
-
summary: {
|
|
1549
|
-
type: "string",
|
|
1550
|
-
title: "Short summary of the API operation",
|
|
1551
|
-
description: "Short summary of the API operation.\n\nThis should be a concise description of the API operation, typically one\nsentence long. It should provide a quick overview of what the API does\nwithout going into too much detail.\n\nThis summary will be used in the OpenAPI documentation to give users a\nquick understanding of the API operation's purpose.\n\nIMPORTANT: The summary should clearly indicate which Prisma DB table this\noperation relates to, helping to ensure all tables have API coverage.\n\n> MUST be written in English. Never use other languages"
|
|
1552
|
-
},
|
|
1553
|
-
parameters: {
|
|
1554
|
-
type: "array",
|
|
1555
|
-
items: {
|
|
1556
|
-
type: "object",
|
|
1557
|
-
properties: {
|
|
1558
|
-
name: {
|
|
1559
|
-
type: "string",
|
|
1560
|
-
title: "Identifier name of the path parameter",
|
|
1561
|
-
description: "Identifier name of the path parameter.\n\nThis name must match exactly with the parameter name in the route path.\nIt must be corresponded to the\n{@link AutoBeOpenApi.IOperation.path API operation path}."
|
|
1562
|
-
},
|
|
1563
|
-
description: {
|
|
1564
|
-
type: "string",
|
|
1565
|
-
title: "Description about the path parameter",
|
|
1566
|
-
description: "Description about the path parameter.\n\nMake short, concise and clear description about the path parameter.\n\n> MUST be written in English. Never use other languages."
|
|
1567
|
-
},
|
|
1568
|
-
schema: {
|
|
1569
|
-
oneOf: [
|
|
1570
|
-
{
|
|
1571
|
-
type: "object",
|
|
1572
|
-
properties: {
|
|
1573
|
-
minimum: {
|
|
1574
|
-
type: "number",
|
|
1575
|
-
title: "Minimum value restriction",
|
|
1576
|
-
description: "Minimum value restriction."
|
|
1577
|
-
},
|
|
1578
|
-
maximum: {
|
|
1579
|
-
type: "number",
|
|
1580
|
-
title: "Maximum value restriction",
|
|
1581
|
-
description: "Maximum value restriction."
|
|
1582
|
-
},
|
|
1583
|
-
exclusiveMinimum: {
|
|
1584
|
-
type: "number",
|
|
1585
|
-
title: "Exclusive minimum value restriction",
|
|
1586
|
-
description: "Exclusive minimum value restriction."
|
|
1587
|
-
},
|
|
1588
|
-
exclusiveMaximum: {
|
|
1589
|
-
type: "number",
|
|
1590
|
-
title: "Exclusive maximum value restriction",
|
|
1591
|
-
description: "Exclusive maximum value restriction."
|
|
1592
|
-
},
|
|
1593
|
-
multipleOf: {
|
|
1594
|
-
type: "number",
|
|
1595
|
-
exclusiveMinimum: 0,
|
|
1596
|
-
title: "Multiple of value restriction",
|
|
1597
|
-
description: "Multiple of value restriction."
|
|
1598
|
-
},
|
|
1599
|
-
type: {
|
|
1600
|
-
type: "string",
|
|
1601
|
-
"enum": [
|
|
1602
|
-
"number"
|
|
1603
|
-
],
|
|
1604
|
-
title: "Discriminator value of the type",
|
|
1605
|
-
description: "Discriminator value of the type."
|
|
1606
|
-
}
|
|
1607
|
-
},
|
|
1608
|
-
required: [
|
|
1609
|
-
"type"
|
|
1610
|
-
],
|
|
1611
|
-
description: "Description of the current {@link AutoBeOpenApi.IJsonSchema.INumber} type:\n\n> Number (double) type info.",
|
|
1612
|
-
additionalProperties: false
|
|
1613
|
-
},
|
|
1614
|
-
{
|
|
1615
|
-
type: "object",
|
|
1616
|
-
properties: {
|
|
1617
|
-
minimum: {
|
|
1618
|
-
type: "integer",
|
|
1619
|
-
title: "Minimum value restriction",
|
|
1620
|
-
description: "Minimum value restriction."
|
|
1621
|
-
},
|
|
1622
|
-
maximum: {
|
|
1623
|
-
type: "integer",
|
|
1624
|
-
title: "Maximum value restriction",
|
|
1625
|
-
description: "Maximum value restriction."
|
|
1626
|
-
},
|
|
1627
|
-
exclusiveMinimum: {
|
|
1628
|
-
type: "number",
|
|
1629
|
-
title: "Exclusive minimum value restriction",
|
|
1630
|
-
description: "Exclusive minimum value restriction."
|
|
1631
|
-
},
|
|
1632
|
-
exclusiveMaximum: {
|
|
1633
|
-
type: "number",
|
|
1634
|
-
title: "Exclusive maximum value restriction",
|
|
1635
|
-
description: "Exclusive maximum value restriction."
|
|
1636
|
-
},
|
|
1637
|
-
multipleOf: {
|
|
1638
|
-
type: "integer",
|
|
1639
|
-
exclusiveMinimum: 0,
|
|
1640
|
-
title: "Multiple of value restriction",
|
|
1641
|
-
description: "Multiple of value restriction."
|
|
1642
|
-
},
|
|
1643
|
-
type: {
|
|
1644
|
-
type: "string",
|
|
1645
|
-
"enum": [
|
|
1646
|
-
"integer"
|
|
1647
|
-
],
|
|
1648
|
-
title: "Discriminator value of the type",
|
|
1649
|
-
description: "Discriminator value of the type."
|
|
1650
|
-
}
|
|
1651
|
-
},
|
|
1652
|
-
required: [
|
|
1653
|
-
"type"
|
|
1654
|
-
],
|
|
1655
|
-
description: "Description of the current {@link AutoBeOpenApi.IJsonSchema.IInteger} type:\n\n> Integer type info.",
|
|
1656
|
-
additionalProperties: false
|
|
1657
|
-
},
|
|
1658
|
-
{
|
|
1659
|
-
type: "object",
|
|
1660
|
-
properties: {
|
|
1661
|
-
format: {
|
|
1662
|
-
type: "string",
|
|
1663
|
-
title: "Format restriction",
|
|
1664
|
-
description: "Format restriction."
|
|
1665
|
-
},
|
|
1666
|
-
pattern: {
|
|
1667
|
-
type: "string",
|
|
1668
|
-
title: "Pattern restriction",
|
|
1669
|
-
description: "Pattern restriction."
|
|
1670
|
-
},
|
|
1671
|
-
contentMediaType: {
|
|
1672
|
-
type: "string",
|
|
1673
|
-
title: "Content media type restriction",
|
|
1674
|
-
description: "Content media type restriction."
|
|
1675
|
-
},
|
|
1676
|
-
minLength: {
|
|
1677
|
-
type: "integer",
|
|
1678
|
-
minimum: 0,
|
|
1679
|
-
title: "Minimum length restriction",
|
|
1680
|
-
description: "Minimum length restriction."
|
|
1681
|
-
},
|
|
1682
|
-
maxLength: {
|
|
1683
|
-
type: "integer",
|
|
1684
|
-
minimum: 0,
|
|
1685
|
-
title: "Maximum length restriction",
|
|
1686
|
-
description: "Maximum length restriction."
|
|
1687
|
-
},
|
|
1688
|
-
type: {
|
|
1689
|
-
type: "string",
|
|
1690
|
-
"enum": [
|
|
1691
|
-
"string"
|
|
1692
|
-
],
|
|
1693
|
-
title: "Discriminator value of the type",
|
|
1694
|
-
description: "Discriminator value of the type."
|
|
1695
|
-
}
|
|
1696
|
-
},
|
|
1697
|
-
required: [
|
|
1698
|
-
"type"
|
|
1699
|
-
],
|
|
1700
|
-
description: "Description of the current {@link AutoBeOpenApi.IJsonSchema.IString} type:\n\n> String type info.",
|
|
1701
|
-
additionalProperties: false
|
|
1702
|
-
}
|
|
1703
|
-
],
|
|
1704
|
-
title: "Type schema of the path parameter",
|
|
1705
|
-
description: "Type schema of the path parameter.\n\nPath parameters are typically primitive types like\n{@link AutoBeOpenApi.IJsonSchema.IString strings},\n{@link AutoBeOpenApi.IJsonSchema.IInteger integers},\n{@link AutoBeOpenApi.IJsonSchema.INumber numbers}.\n\nIf you need other types, please use request body instead with object type\nencapsulation."
|
|
1706
|
-
}
|
|
1707
|
-
},
|
|
1708
|
-
required: [
|
|
1709
|
-
"name",
|
|
1710
|
-
"description",
|
|
1711
|
-
"schema"
|
|
1712
|
-
],
|
|
1713
|
-
description: "Description of the current {@link AutoBeOpenApi.IParameter} type:\n\n> Path parameter information for API routes.\n> \n> This interface defines a path parameter that appears in the URL of an API\n> endpoint. Path parameters are enclosed in curly braces in the\n> {@link AutoBeOpenApi.IOperation.path operation path} and must be defined\n> with their types and descriptions.\n> \n> For example, if API operation path is\n> `/shoppings/customers/sales/{saleId}/questions/${questionId}/comments/${commentId}`,\n> the path parameters should be like below:\n> \n> ```json\n> {\n> \"path\": \"/shoppings/customers/sales/{saleId}/questions/${questionId}/comments/${commentId}\",\n> \"method\": \"get\",\n> \"parameters\": [\n> {\n> \"name\": \"saleId\",\n> \"in\": \"path\",\n> \"schema\": { \"type\": \"string\", \"format\": \"uuid\" },\n> \"description\": \"Target sale's ID\"\n> },\n> {\n> \"name\": \"questionId\",\n> \"in\": \"path\",\n> \"schema\": { \"type\": \"string\", \"format\": \"uuid\" },\n> \"description\": \"Target question's ID\"\n> },\n> {\n> \"name\": \"commentId\",\n> \"in\": \"path\",\n> \"schema\": { \"type\": \"string\", \"format\": \"uuid\" },\n> \"description\": \"Target comment's ID\"\n> }\n> ]\n> }\n> ```",
|
|
1714
|
-
additionalProperties: false
|
|
1119
|
+
$defs: {
|
|
1120
|
+
"AutoBeOpenApi.IOperation": {
|
|
1121
|
+
description: "Operation of the Restful API.\n\nThis interface defines a single API endpoint with its HTTP {@link method},\n{@link path}, {@link parameters path parameters},\n{@link requestBody request body}, and {@link responseBody} structure. It\ncorresponds to an individual operation in the paths section of an OpenAPI\ndocument.\n\nEach operation requires a detailed explanation of its purpose through the\nreason and description fields, making it clear why the API was designed and\nhow it should be used.\n\nAll request bodies and responses for this operation must be object types\nand must reference named types defined in the components section. The\ncontent-type is always `application/json`. For file upload/download\noperations, use `string & tags.Format<\"uri\">` in the appropriate schema\ninstead of binary data formats.\n\nIn OpenAPI, this might represent:\n\n```json\n{\n \"/shoppings/customers/orders\": {\n \"post\": {\n \"description\": \"Create a new order application from shopping cart...\",\n \"parameters\": [...],\n \"requestBody\": {...},\n \"responses\": {...}\n }\n }\n}\n```",
|
|
1122
|
+
type: "object",
|
|
1123
|
+
properties: {
|
|
1124
|
+
specification: {
|
|
1125
|
+
title: "Specification of the API operation",
|
|
1126
|
+
description: "Specification of the API operation.\n\nBefore defining the API operation interface, please describe what you're\nplanning to write in this `specification` field.\n\nThe specification must be fully detailed and clear, so that anyone can\nunderstand the purpose and functionality of the API operation and its\nrelated components (e.g., {@link path}, {@link parameters},\n{@link requestBody}).\n\nIMPORTANT: The specification MUST identify which Prisma DB table this\noperation is associated with, helping ensure complete coverage of all\ndatabase entities.",
|
|
1127
|
+
type: "string"
|
|
1128
|
+
},
|
|
1129
|
+
description: {
|
|
1130
|
+
title: "Detailed description about the API operation",
|
|
1131
|
+
description: "Detailed description about the API operation.\n\nIMPORTANT: This field MUST be extensively detailed and MUST reference the\ndescription comments from the related Prisma DB schema tables and\ncolumns. The description should be organized into MULTIPLE PARAGRAPHS\nseparated by line breaks to improve readability and comprehension.\n\nFor example, include separate paragraphs for:\n\n- The purpose and overview of the API operation\n- Security considerations and user permissions\n- Relationship to underlying database entities\n- Validation rules and business logic\n- Related API operations that might be used together with this one\n- Expected behavior and error handling\n\nWhen writing the description, be sure to incorporate the corresponding DB\nschema's description comments, matching the level of detail and style of\nthose comments. This ensures consistency between the API documentation\nand database structure.\n\nIf there's a dependency to other APIs, please describe the dependency API\noperation in this field with detailed reason. For example, if this API\noperation needs a pre-execution of other API operation, it must be\nexplicitly described.\n\n- `GET /shoppings/customers/sales` must be pre-executed to get entire list\n of summarized sales. Detailed sale information would be obtained by\n specifying the sale ID in the path parameter.\n\n> MUST be written in English. Never use other languages.",
|
|
1132
|
+
type: "string"
|
|
1133
|
+
},
|
|
1134
|
+
summary: {
|
|
1135
|
+
title: "Short summary of the API operation",
|
|
1136
|
+
description: "Short summary of the API operation.\n\nThis should be a concise description of the API operation, typically one\nsentence long. It should provide a quick overview of what the API does\nwithout going into too much detail.\n\nThis summary will be used in the OpenAPI documentation to give users a\nquick understanding of the API operation's purpose.\n\nIMPORTANT: The summary should clearly indicate which Prisma DB table this\noperation relates to, helping to ensure all tables have API coverage.\n\n> MUST be written in English. Never use other languages",
|
|
1137
|
+
type: "string"
|
|
1138
|
+
},
|
|
1139
|
+
parameters: {
|
|
1140
|
+
title: "List of path parameters",
|
|
1141
|
+
description: "List of path parameters.\n\nNote that, the {@link AutoBeOpenApi.IParameter.name identifier name} of\npath parameter must be corresponded to the\n{@link path API operation path}.\n\nFor example, if there's an API operation which has {@link path} of\n`/shoppings/customers/sales/{saleId}/questions/${questionId}/comments/${commentId}`,\nits list of {@link AutoBeOpenApi.IParameter.name path parameters} must be\nlike:\n\n- `saleId`\n- `questionId`\n- `commentId`",
|
|
1142
|
+
type: "array",
|
|
1143
|
+
items: {
|
|
1144
|
+
$ref: "#/$defs/AutoBeOpenApi.IParameter"
|
|
1145
|
+
}
|
|
1146
|
+
},
|
|
1147
|
+
requestBody: {
|
|
1148
|
+
title: "Request body of the API operation",
|
|
1149
|
+
description: "Request body of the API operation.\n\nDefines the payload structure for the request. Contains a description and\nschema reference to define the expected input data.\n\nShould be `null` for operations that don't require a request body, such\nas most \"get\" operations.",
|
|
1150
|
+
anyOf: [
|
|
1151
|
+
{
|
|
1152
|
+
type: "null"
|
|
1715
1153
|
},
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
typeName: {
|
|
1728
|
-
type: "string",
|
|
1729
|
-
title: "Request body type name",
|
|
1730
|
-
description: "Request body type name.\n\nThis specifies the data structure expected in the request body, that will\nbe transformed to {@link AutoBeOpenApi.IJsonSchema.IReference reference}\ntype in the {@link AutoBeOpenApi.IComponents.schemas components section}\nas an {@link AutoBeOpenApi.IJsonSchema.Object object} type.\n\nHere is the naming convention for the request body type:\n\n- `IEntityName.ICreate`: Request body for creation operations (POST)\n- `IEntityName.IUpdate`: Request body for update operations (PUT)\n- `IEntityName.IRequest`: Request parameters for list operations (often\n with search/pagination)\n\nWhat you write:\n\n```json\n{\n \"typeName\": \"IShoppingOrder.ICreate\"\n}\n```\n\nTransformed to:\n\n```json\n{\n \"schema\": {\n \"$ref\": \"#/components/schemas/IShoppingOrder.ICreate\"\n }\n}\n```"
|
|
1731
|
-
}
|
|
1154
|
+
{
|
|
1155
|
+
$ref: "#/$defs/AutoBeOpenApi.IRequestBody"
|
|
1156
|
+
}
|
|
1157
|
+
]
|
|
1158
|
+
},
|
|
1159
|
+
responseBody: {
|
|
1160
|
+
title: "Response body of the API operation",
|
|
1161
|
+
description: "Response body of the API operation.\n\nDefines the structure of the successful response data. Contains a\ndescription and schema reference for the returned data.\n\nShould be null for operations that don't return any data.",
|
|
1162
|
+
anyOf: [
|
|
1163
|
+
{
|
|
1164
|
+
type: "null"
|
|
1732
1165
|
},
|
|
1733
|
-
|
|
1734
|
-
"
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
type: "object",
|
|
1744
|
-
properties: {
|
|
1745
|
-
description: {
|
|
1746
|
-
type: "string",
|
|
1747
|
-
title: "Description about the response body",
|
|
1748
|
-
description: "Description about the response body.\n\nMake short, concise and clear description about the response body.\n\n> MUST be written in English. Never use other languages."
|
|
1749
|
-
},
|
|
1750
|
-
typeName: {
|
|
1751
|
-
type: "string",
|
|
1752
|
-
title: "Response body's data type",
|
|
1753
|
-
description: "Response body's data type.\n\nSpecifies the structure of the returned data (response body), that will\nbe transformed to {@link AutoBeOpenApi.IJsonSchema.IReference} type in the\n{@link AutoBeOpenApi.IComponents.schemas components section} as an\n{@link AutoBeOpenApi.IJsonSchema.IObject object} type.\n\nHere is the naming convention for the response body type:\n\n- `IEntityName`: Main entity with detailed information (e.g.,\n `IShoppingSale`)\n- `IEntityName.ISummary`: Simplified response version with essential\n properties\n- `IEntityName.IInvert`: Alternative view of an entity from a different\n perspective\n- `IPageIEntityName`: Paginated results container with `pagination` and\n `data` properties\n\nWhat you write:\n\n```json\n{\n \"typeName\": \"IShoppingOrder\"\n}\n```\n\nTransformed to:\n\n```json\n{\n \"schema\": {\n \"$ref\": \"#/components/schemas/IShoppingOrder\"\n }\n}\n```"
|
|
1754
|
-
}
|
|
1166
|
+
{
|
|
1167
|
+
$ref: "#/$defs/AutoBeOpenApi.IResponseBody"
|
|
1168
|
+
}
|
|
1169
|
+
]
|
|
1170
|
+
},
|
|
1171
|
+
authorization: {
|
|
1172
|
+
description: "Authorization\n\nDefines which user role is subject to strategies such as membership\nregistration, login, token issuance, refresh token, etc.",
|
|
1173
|
+
anyOf: [
|
|
1174
|
+
{
|
|
1175
|
+
type: "null"
|
|
1755
1176
|
},
|
|
1756
|
-
|
|
1757
|
-
"
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
path: {
|
|
1766
|
-
type: "string",
|
|
1767
|
-
title: "HTTP path of the API operation",
|
|
1768
|
-
description: "HTTP path of the API operation.\n\nThe URL path for accessing this API operation, using path parameters\nenclosed in curly braces (e.g., `/shoppings/customers/sales/{saleId}`).\n\nIt must be corresponded to the {@link parameters path parameters}.\n\nThe path structure should clearly indicate which database entity this\noperation is manipulating, helping to ensure all entities have\nappropriate API coverage."
|
|
1769
|
-
},
|
|
1770
|
-
method: {
|
|
1771
|
-
type: "string",
|
|
1772
|
-
"enum": [
|
|
1773
|
-
"get",
|
|
1774
|
-
"post",
|
|
1775
|
-
"put",
|
|
1776
|
-
"delete",
|
|
1777
|
-
"patch"
|
|
1778
|
-
],
|
|
1779
|
-
title: "HTTP method of the API operation",
|
|
1780
|
-
description: "HTTP method of the API operation.\n\nNote that, if the API operation has {@link requestBody}, method must not\nbe `get`.\n\nAlso, even though the API operation has been designed to only get\ninformation, but it needs complicated request information, it must be\ndefined as `patch` method with {@link requestBody} data specification.\n\n- `get`: get information\n- `patch`: get information with complicated request data\n ({@link requestBody})\n- `post`: create new record\n- `put`: update existing record\n- `delete`: remove record"
|
|
1177
|
+
{
|
|
1178
|
+
$ref: "#/$defs/AutoBeOpenApi.IAuthorization"
|
|
1179
|
+
}
|
|
1180
|
+
],
|
|
1181
|
+
"x-discriminator": {
|
|
1182
|
+
propertyName: "type",
|
|
1183
|
+
mapping: {
|
|
1184
|
+
Bearer: "#/$defs/AutoBeOpenApi.IAuthorization"
|
|
1185
|
+
}
|
|
1781
1186
|
}
|
|
1782
1187
|
},
|
|
1783
|
-
|
|
1784
|
-
"
|
|
1785
|
-
|
|
1786
|
-
"
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
"
|
|
1790
|
-
"
|
|
1791
|
-
"
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1188
|
+
path: {
|
|
1189
|
+
title: "HTTP path of the API operation",
|
|
1190
|
+
description: "HTTP path of the API operation.\n\nThe URL path for accessing this API operation, using path parameters\nenclosed in curly braces (e.g., `/shoppings/customers/sales/{saleId}`).\n\nIt must be corresponded to the {@link parameters path parameters}.\n\nThe path structure should clearly indicate which database entity this\noperation is manipulating, helping to ensure all entities have\nappropriate API coverage.",
|
|
1191
|
+
type: "string"
|
|
1192
|
+
},
|
|
1193
|
+
method: {
|
|
1194
|
+
title: "HTTP method of the API operation",
|
|
1195
|
+
description: "HTTP method of the API operation.\n\nNote that, if the API operation has {@link requestBody}, method must not\nbe `get`.\n\nAlso, even though the API operation has been designed to only get\ninformation, but it needs complicated request information, it must be\ndefined as `patch` method with {@link requestBody} data specification.\n\n- `get`: get information\n- `patch`: get information with complicated request data\n ({@link requestBody})\n- `post`: create new record\n- `put`: update existing record\n- `delete`: remove record",
|
|
1196
|
+
type: "string",
|
|
1197
|
+
"enum": [
|
|
1198
|
+
"get",
|
|
1199
|
+
"post",
|
|
1200
|
+
"put",
|
|
1201
|
+
"delete",
|
|
1202
|
+
"patch"
|
|
1203
|
+
]
|
|
1204
|
+
}
|
|
1795
1205
|
},
|
|
1796
|
-
|
|
1797
|
-
|
|
1206
|
+
required: [
|
|
1207
|
+
"specification",
|
|
1208
|
+
"description",
|
|
1209
|
+
"summary",
|
|
1210
|
+
"parameters",
|
|
1211
|
+
"requestBody",
|
|
1212
|
+
"responseBody",
|
|
1213
|
+
"path",
|
|
1214
|
+
"method"
|
|
1215
|
+
]
|
|
1216
|
+
},
|
|
1217
|
+
"AutoBeOpenApi.IParameter": {
|
|
1218
|
+
description: "Path parameter information for API routes.\n\nThis interface defines a path parameter that appears in the URL of an API\nendpoint. Path parameters are enclosed in curly braces in the\n{@link AutoBeOpenApi.IOperation.path operation path} and must be defined\nwith their types and descriptions.\n\nFor example, if API operation path is\n`/shoppings/customers/sales/{saleId}/questions/${questionId}/comments/${commentId}`,\nthe path parameters should be like below:\n\n```json\n{\n \"path\": \"/shoppings/customers/sales/{saleId}/questions/${questionId}/comments/${commentId}\",\n \"method\": \"get\",\n \"parameters\": [\n {\n \"name\": \"saleId\",\n \"in\": \"path\",\n \"schema\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"description\": \"Target sale's ID\"\n },\n {\n \"name\": \"questionId\",\n \"in\": \"path\",\n \"schema\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"description\": \"Target question's ID\"\n },\n {\n \"name\": \"commentId\",\n \"in\": \"path\",\n \"schema\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"description\": \"Target comment's ID\"\n }\n ]\n}\n```",
|
|
1219
|
+
type: "object",
|
|
1220
|
+
properties: {
|
|
1221
|
+
name: {
|
|
1222
|
+
title: "Identifier name of the path parameter",
|
|
1223
|
+
description: "Identifier name of the path parameter.\n\nThis name must match exactly with the parameter name in the route path.\nIt must be corresponded to the\n{@link AutoBeOpenApi.IOperation.path API operation path}.",
|
|
1224
|
+
type: "string"
|
|
1225
|
+
},
|
|
1226
|
+
description: {
|
|
1227
|
+
title: "Description about the path parameter",
|
|
1228
|
+
description: "Description about the path parameter.\n\nMake short, concise and clear description about the path parameter.\n\n> MUST be written in English. Never use other languages.",
|
|
1229
|
+
type: "string"
|
|
1230
|
+
},
|
|
1231
|
+
schema: {
|
|
1232
|
+
title: "Type schema of the path parameter",
|
|
1233
|
+
description: "Type schema of the path parameter.\n\nPath parameters are typically primitive types like\n{@link AutoBeOpenApi.IJsonSchema.IString strings},\n{@link AutoBeOpenApi.IJsonSchema.IInteger integers},\n{@link AutoBeOpenApi.IJsonSchema.INumber numbers}.\n\nIf you need other types, please use request body instead with object type\nencapsulation.",
|
|
1234
|
+
anyOf: [
|
|
1235
|
+
{
|
|
1236
|
+
$ref: "#/$defs/AutoBeOpenApi.IJsonSchema.INumber"
|
|
1237
|
+
},
|
|
1238
|
+
{
|
|
1239
|
+
$ref: "#/$defs/AutoBeOpenApi.IJsonSchema.IInteger"
|
|
1240
|
+
},
|
|
1241
|
+
{
|
|
1242
|
+
$ref: "#/$defs/AutoBeOpenApi.IJsonSchema.IString"
|
|
1243
|
+
}
|
|
1244
|
+
],
|
|
1245
|
+
"x-discriminator": {
|
|
1246
|
+
propertyName: "type",
|
|
1247
|
+
mapping: {
|
|
1248
|
+
number: "#/$defs/AutoBeOpenApi.IJsonSchema.INumber",
|
|
1249
|
+
integer: "#/$defs/AutoBeOpenApi.IJsonSchema.IInteger",
|
|
1250
|
+
string: "#/$defs/AutoBeOpenApi.IJsonSchema.IString"
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
},
|
|
1255
|
+
required: [
|
|
1256
|
+
"name",
|
|
1257
|
+
"description",
|
|
1258
|
+
"schema"
|
|
1259
|
+
]
|
|
1260
|
+
},
|
|
1261
|
+
"AutoBeOpenApi.IJsonSchema.INumber": {
|
|
1262
|
+
description: "Number (double) type info.",
|
|
1263
|
+
type: "object",
|
|
1264
|
+
properties: {
|
|
1265
|
+
minimum: {
|
|
1266
|
+
title: "Minimum value restriction",
|
|
1267
|
+
description: "Minimum value restriction.",
|
|
1268
|
+
type: "number"
|
|
1269
|
+
},
|
|
1270
|
+
maximum: {
|
|
1271
|
+
title: "Maximum value restriction",
|
|
1272
|
+
description: "Maximum value restriction.",
|
|
1273
|
+
type: "number"
|
|
1274
|
+
},
|
|
1275
|
+
exclusiveMinimum: {
|
|
1276
|
+
title: "Exclusive minimum value restriction",
|
|
1277
|
+
description: "Exclusive minimum value restriction.",
|
|
1278
|
+
type: "number"
|
|
1279
|
+
},
|
|
1280
|
+
exclusiveMaximum: {
|
|
1281
|
+
title: "Exclusive maximum value restriction",
|
|
1282
|
+
description: "Exclusive maximum value restriction.",
|
|
1283
|
+
type: "number"
|
|
1284
|
+
},
|
|
1285
|
+
multipleOf: {
|
|
1286
|
+
title: "Multiple of value restriction",
|
|
1287
|
+
description: "Multiple of value restriction.\n\n\n@exclusiveMinimum 0",
|
|
1288
|
+
type: "number"
|
|
1289
|
+
},
|
|
1290
|
+
type: {
|
|
1291
|
+
title: "Discriminator value of the type",
|
|
1292
|
+
description: "Discriminator value of the type.",
|
|
1293
|
+
type: "string",
|
|
1294
|
+
"enum": [
|
|
1295
|
+
"number"
|
|
1296
|
+
]
|
|
1297
|
+
}
|
|
1298
|
+
},
|
|
1299
|
+
required: [
|
|
1300
|
+
"type"
|
|
1301
|
+
]
|
|
1302
|
+
},
|
|
1303
|
+
"AutoBeOpenApi.IJsonSchema.IInteger": {
|
|
1304
|
+
description: "Integer type info.",
|
|
1305
|
+
type: "object",
|
|
1306
|
+
properties: {
|
|
1307
|
+
minimum: {
|
|
1308
|
+
title: "Minimum value restriction",
|
|
1309
|
+
description: "Minimum value restriction.",
|
|
1310
|
+
type: "integer"
|
|
1311
|
+
},
|
|
1312
|
+
maximum: {
|
|
1313
|
+
title: "Maximum value restriction",
|
|
1314
|
+
description: "Maximum value restriction.",
|
|
1315
|
+
type: "integer"
|
|
1316
|
+
},
|
|
1317
|
+
exclusiveMinimum: {
|
|
1318
|
+
title: "Exclusive minimum value restriction",
|
|
1319
|
+
description: "Exclusive minimum value restriction.",
|
|
1320
|
+
type: "number"
|
|
1321
|
+
},
|
|
1322
|
+
exclusiveMaximum: {
|
|
1323
|
+
title: "Exclusive maximum value restriction",
|
|
1324
|
+
description: "Exclusive maximum value restriction.",
|
|
1325
|
+
type: "number"
|
|
1326
|
+
},
|
|
1327
|
+
multipleOf: {
|
|
1328
|
+
title: "Multiple of value restriction",
|
|
1329
|
+
description: "Multiple of value restriction.\n\n\n@exclusiveMinimum 0",
|
|
1330
|
+
type: "integer"
|
|
1331
|
+
},
|
|
1332
|
+
type: {
|
|
1333
|
+
title: "Discriminator value of the type",
|
|
1334
|
+
description: "Discriminator value of the type.",
|
|
1335
|
+
type: "string",
|
|
1336
|
+
"enum": [
|
|
1337
|
+
"integer"
|
|
1338
|
+
]
|
|
1339
|
+
}
|
|
1340
|
+
},
|
|
1341
|
+
required: [
|
|
1342
|
+
"type"
|
|
1343
|
+
]
|
|
1344
|
+
},
|
|
1345
|
+
"AutoBeOpenApi.IJsonSchema.IString": {
|
|
1346
|
+
description: "String type info.",
|
|
1347
|
+
type: "object",
|
|
1348
|
+
properties: {
|
|
1349
|
+
format: {
|
|
1350
|
+
title: "Format restriction",
|
|
1351
|
+
description: "Format restriction.",
|
|
1352
|
+
type: "string"
|
|
1353
|
+
},
|
|
1354
|
+
pattern: {
|
|
1355
|
+
title: "Pattern restriction",
|
|
1356
|
+
description: "Pattern restriction.",
|
|
1357
|
+
type: "string"
|
|
1358
|
+
},
|
|
1359
|
+
contentMediaType: {
|
|
1360
|
+
title: "Content media type restriction",
|
|
1361
|
+
description: "Content media type restriction.",
|
|
1362
|
+
type: "string"
|
|
1363
|
+
},
|
|
1364
|
+
minLength: {
|
|
1365
|
+
title: "Minimum length restriction",
|
|
1366
|
+
description: "Minimum length restriction.\n\n\n@minimum 0",
|
|
1367
|
+
type: "integer"
|
|
1368
|
+
},
|
|
1369
|
+
maxLength: {
|
|
1370
|
+
title: "Maximum length restriction",
|
|
1371
|
+
description: "Maximum length restriction.\n\n\n@minimum 0",
|
|
1372
|
+
type: "integer"
|
|
1373
|
+
},
|
|
1374
|
+
type: {
|
|
1375
|
+
title: "Discriminator value of the type",
|
|
1376
|
+
description: "Discriminator value of the type.",
|
|
1377
|
+
type: "string",
|
|
1378
|
+
"enum": [
|
|
1379
|
+
"string"
|
|
1380
|
+
]
|
|
1381
|
+
}
|
|
1382
|
+
},
|
|
1383
|
+
required: [
|
|
1384
|
+
"type"
|
|
1385
|
+
]
|
|
1386
|
+
},
|
|
1387
|
+
"AutoBeOpenApi.IRequestBody": {
|
|
1388
|
+
description: "Request body information of OpenAPI operation.\n\nThis interface defines the structure for request bodies in API routes. It\ncorresponds to the requestBody section in OpenAPI specifications, providing\nboth a description and schema reference for the request payload.\n\nThe content-type for all request bodies is always `application/json`. Even\nwhen file uploading is required, don't use `multipart/form-data` or\n`application/x-www-form-urlencoded` content types. Instead, just define an\nURI string property in the request body schema.\n\nNote that, all body schemas must be transformable to a\n{@link AutoBeOpenApi.IJsonSchema.IReference reference} type defined in the\n{@link AutoBeOpenApi.IComponents.schemas components section} as an\n{@link AutoBeOpenApi.IJsonSchema.IObject object} type.\n\nIn OpenAPI, this might represent:\n\n```json\n{\n \"requestBody\": {\n \"description\": \"Creation info of the order\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/IShoppingOrder.ICreate\"\n }\n }\n }\n }\n}\n```",
|
|
1389
|
+
type: "object",
|
|
1390
|
+
properties: {
|
|
1391
|
+
description: {
|
|
1392
|
+
title: "Description about the request body",
|
|
1393
|
+
description: "Description about the request body.\n\nMake short, concise and clear description about the request body.\n\n> MUST be written in English. Never use other languages.",
|
|
1394
|
+
type: "string"
|
|
1395
|
+
},
|
|
1396
|
+
typeName: {
|
|
1397
|
+
title: "Request body type name",
|
|
1398
|
+
description: "Request body type name.\n\nThis specifies the data structure expected in the request body, that will\nbe transformed to {@link AutoBeOpenApi.IJsonSchema.IReference reference}\ntype in the {@link AutoBeOpenApi.IComponents.schemas components section}\nas an {@link AutoBeOpenApi.IJsonSchema.Object object} type.\n\nHere is the naming convention for the request body type:\n\n- `IEntityName.ICreate`: Request body for creation operations (POST)\n- `IEntityName.IUpdate`: Request body for update operations (PUT)\n- `IEntityName.IRequest`: Request parameters for list operations (often\n with search/pagination)\n\nWhat you write:\n\n```json\n{\n \"typeName\": \"IShoppingOrder.ICreate\"\n}\n```\n\nTransformed to:\n\n```json\n{\n \"schema\": {\n \"$ref\": \"#/components/schemas/IShoppingOrder.ICreate\"\n }\n}\n```",
|
|
1399
|
+
type: "string"
|
|
1400
|
+
}
|
|
1401
|
+
},
|
|
1402
|
+
required: [
|
|
1403
|
+
"description",
|
|
1404
|
+
"typeName"
|
|
1405
|
+
]
|
|
1406
|
+
},
|
|
1407
|
+
"AutoBeOpenApi.IResponseBody": {
|
|
1408
|
+
description: "Response body information for OpenAPI operation.\n\nThis interface defines the structure of a successful response from an API\noperation. It provides a description of the response and a schema reference\nto define the returned data structure.\n\nThe content-type for all responses is always `application/json`. Even when\nfile downloading is required, don't use `application/octet-stream` or\n`multipart/form-data` content types. Instead, just define an URI string\nproperty in the response body schema.\n\nIn OpenAPI, this might represent:\n\n```json\n{\n \"responses\": {\n \"200\": {\n \"description\": \"Order information\",\n \"content\": {\n \"application/json\": {\n \"schema\": { \"$ref\": \"#/components/schemas/IShoppingOrder\" }\n }\n }\n }\n }\n}\n```",
|
|
1409
|
+
type: "object",
|
|
1410
|
+
properties: {
|
|
1411
|
+
description: {
|
|
1412
|
+
title: "Description about the response body",
|
|
1413
|
+
description: "Description about the response body.\n\nMake short, concise and clear description about the response body.\n\n> MUST be written in English. Never use other languages.",
|
|
1414
|
+
type: "string"
|
|
1415
|
+
},
|
|
1416
|
+
typeName: {
|
|
1417
|
+
title: "Response body's data type",
|
|
1418
|
+
description: "Response body's data type.\n\nSpecifies the structure of the returned data (response body), that will\nbe transformed to {@link AutoBeOpenApi.IJsonSchema.IReference} type in the\n{@link AutoBeOpenApi.IComponents.schemas components section} as an\n{@link AutoBeOpenApi.IJsonSchema.IObject object} type.\n\nHere is the naming convention for the response body type:\n\n- `IEntityName`: Main entity with detailed information (e.g.,\n `IShoppingSale`)\n- `IEntityName.ISummary`: Simplified response version with essential\n properties\n- `IEntityName.IInvert`: Alternative view of an entity from a different\n perspective\n- `IPageIEntityName`: Paginated results container with `pagination` and\n `data` properties\n\nWhat you write:\n\n```json\n{\n \"typeName\": \"IShoppingOrder\"\n}\n```\n\nTransformed to:\n\n```json\n{\n \"schema\": {\n \"$ref\": \"#/components/schemas/IShoppingOrder\"\n }\n}\n```",
|
|
1419
|
+
type: "string"
|
|
1420
|
+
}
|
|
1421
|
+
},
|
|
1422
|
+
required: [
|
|
1423
|
+
"description",
|
|
1424
|
+
"typeName"
|
|
1425
|
+
]
|
|
1426
|
+
},
|
|
1427
|
+
"AutoBeOpenApi.IAuthorization": {
|
|
1428
|
+
description: "Authorization - Authentication and user type information\n\nThis field defines how the API authenticates the request and restricts\naccess to specific user types.\n\n\u2705 Only the `Authorization` HTTP header is used for authentication. The\nexpected format is:\n\nAuthorization: Bearer <access_token>\n\nThe token must be a bearer token (e.g., JWT or similar), and when parsed,\nit is guaranteed to include at least the authenticated actor's `id` field.\nNo other headers or cookie-based authentication methods are supported.",
|
|
1429
|
+
type: "object",
|
|
1430
|
+
properties: {
|
|
1431
|
+
role: {
|
|
1432
|
+
description: "Allowed user types for this API\n\nSpecifies which user types are permitted to access this API.\n\nThis is not a permission level or access control role. Instead, it\ndescribes **who** the user is \u2014 their type within the service's domain\nmodel. It must correspond 1:1 with how the user is represented in the\ndatabase.\n\nExamples:\n\n- \"buyer\": a customer who makes purchases\n- \"seller\": a vendor who offers products\n- \"moderator\": a content reviewer or manager\n\n\u26A0\uFE0F Important: Each `role` must **exactly match a table name defined in\nthe database schema**. This is not merely a convention or example \u2014 it is\na strict requirement.\n\nA valid role must meet the following criteria:\n\n- It must uniquely map to a user group at the database level, represented\n by a dedicated table.\n- It must not overlap semantically with other roles \u2014 for instance, both\n `admin` and `administrator` must not exist to describe the same type.\n\nTherefore, if a user type cannot be clearly and uniquely distinguished in\nthe database, It **cannot** be used as a valid `role` here.",
|
|
1433
|
+
type: "array",
|
|
1434
|
+
items: {
|
|
1435
|
+
type: "string"
|
|
1436
|
+
}
|
|
1437
|
+
},
|
|
1438
|
+
type: {
|
|
1439
|
+
description: "Authentication method type\n\nCurrently only `\"bearer\"` is supported, which uses a Bearer token in the\nHTTP Authorization header.",
|
|
1440
|
+
type: "string",
|
|
1441
|
+
"enum": [
|
|
1442
|
+
"Bearer"
|
|
1443
|
+
]
|
|
1444
|
+
}
|
|
1445
|
+
},
|
|
1446
|
+
required: [
|
|
1447
|
+
"role",
|
|
1448
|
+
"type"
|
|
1449
|
+
]
|
|
1798
1450
|
}
|
|
1799
|
-
}
|
|
1800
|
-
required: [
|
|
1801
|
-
"operations"
|
|
1802
|
-
],
|
|
1803
|
-
description: " Properties containing the operations to generate.\n\n------------------------------\n\nCurrent Type: {@link IMakeOperationProps}",
|
|
1804
|
-
additionalProperties: false
|
|
1451
|
+
}
|
|
1805
1452
|
},
|
|
1806
1453
|
description: "Generate detailed API operations from path/method combinations.\n\nThis function creates complete API operations following REST principles and\nquality standards. Each generated operation includes specification, path,\nmethod, detailed multi-paragraph description, concise summary, parameters,\nand appropriate request/response bodies.\n\nThe function processes as many operations as possible in a single call,\nwith progress tracking to ensure iterative completion of all required\nendpoints.",
|
|
1807
|
-
validate: (() => { const _io0 = input => Array.isArray(input.operations) && input.operations.every(elem => "object" === typeof elem && null !== elem && _io1(elem)); const _io1 = input => "string" === typeof input.specification && "string" === typeof input.description && "string" === typeof input.summary && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io6(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io7(input.responseBody)) && "string" === typeof input.path && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _io2 = input => "string" === typeof input.name && "string" === typeof input.description && ("object" === typeof input.schema && null !== input.schema && _iu0(input.schema)); const _io3 = input => (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 && 0 < input.multipleOf)) && "integer" === input.type; const _io4 = input => (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && "number" === input.type; const _io5 = input => (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type; const _io6 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io7 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _iu0 = input => (() => {
|
|
1454
|
+
validate: (() => { const _io0 = input => Array.isArray(input.operations) && input.operations.every(elem => "object" === typeof elem && null !== elem && _io1(elem)); const _io1 = input => "string" === typeof input.specification && "string" === typeof input.description && "string" === typeof input.summary && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io6(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io7(input.responseBody)) && (null === input.authorization || undefined === input.authorization || "object" === typeof input.authorization && null !== input.authorization && _io8(input.authorization)) && "string" === typeof input.path && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _io2 = input => "string" === typeof input.name && "string" === typeof input.description && ("object" === typeof input.schema && null !== input.schema && _iu0(input.schema)); const _io3 = input => (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 && 0 < input.multipleOf)) && "integer" === input.type; const _io4 = input => (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && "number" === input.type; const _io5 = input => (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type; const _io6 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io7 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io8 = input => Array.isArray(input.role) && input.role.every(elem => "string" === typeof elem) && "Bearer" === input.type; const _iu0 = input => (() => {
|
|
1808
1455
|
if ("number" === input.type)
|
|
1809
1456
|
return _io4(input);
|
|
1810
1457
|
else if ("integer" === input.type)
|
|
@@ -1817,12 +1464,12 @@ const collection = {
|
|
|
1817
1464
|
path: _path + ".operations",
|
|
1818
1465
|
expected: "Array<AutoBeOpenApi.IOperation>",
|
|
1819
1466
|
value: input.operations
|
|
1820
|
-
})) && input.operations.map((elem,
|
|
1821
|
-
path: _path + ".operations[" +
|
|
1467
|
+
})) && input.operations.map((elem, _index4) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1468
|
+
path: _path + ".operations[" + _index4 + "]",
|
|
1822
1469
|
expected: "AutoBeOpenApi.IOperation",
|
|
1823
1470
|
value: elem
|
|
1824
|
-
})) && _vo1(elem, _path + ".operations[" +
|
|
1825
|
-
path: _path + ".operations[" +
|
|
1471
|
+
})) && _vo1(elem, _path + ".operations[" + _index4 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1472
|
+
path: _path + ".operations[" + _index4 + "]",
|
|
1826
1473
|
expected: "AutoBeOpenApi.IOperation",
|
|
1827
1474
|
value: elem
|
|
1828
1475
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -1845,12 +1492,12 @@ const collection = {
|
|
|
1845
1492
|
path: _path + ".parameters",
|
|
1846
1493
|
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
1847
1494
|
value: input.parameters
|
|
1848
|
-
})) && input.parameters.map((elem,
|
|
1849
|
-
path: _path + ".parameters[" +
|
|
1495
|
+
})) && input.parameters.map((elem, _index5) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1496
|
+
path: _path + ".parameters[" + _index5 + "]",
|
|
1850
1497
|
expected: "AutoBeOpenApi.IParameter",
|
|
1851
1498
|
value: elem
|
|
1852
|
-
})) && _vo2(elem, _path + ".parameters[" +
|
|
1853
|
-
path: _path + ".parameters[" +
|
|
1499
|
+
})) && _vo2(elem, _path + ".parameters[" + _index5 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1500
|
+
path: _path + ".parameters[" + _index5 + "]",
|
|
1854
1501
|
expected: "AutoBeOpenApi.IParameter",
|
|
1855
1502
|
value: elem
|
|
1856
1503
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -1873,6 +1520,14 @@ const collection = {
|
|
|
1873
1520
|
path: _path + ".responseBody",
|
|
1874
1521
|
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
1875
1522
|
value: input.responseBody
|
|
1523
|
+
}), null === input.authorization || undefined === input.authorization || ("object" === typeof input.authorization && null !== input.authorization || _report(_exceptionable, {
|
|
1524
|
+
path: _path + ".authorization",
|
|
1525
|
+
expected: "(AutoBeOpenApi.IAuthorization | null | undefined)",
|
|
1526
|
+
value: input.authorization
|
|
1527
|
+
})) && _vo8(input.authorization, _path + ".authorization", true && _exceptionable) || _report(_exceptionable, {
|
|
1528
|
+
path: _path + ".authorization",
|
|
1529
|
+
expected: "(AutoBeOpenApi.IAuthorization | null | undefined)",
|
|
1530
|
+
value: input.authorization
|
|
1876
1531
|
}), "string" === typeof input.path || _report(_exceptionable, {
|
|
1877
1532
|
path: _path + ".path",
|
|
1878
1533
|
expected: "string",
|
|
@@ -2013,6 +1668,22 @@ const collection = {
|
|
|
2013
1668
|
path: _path + ".typeName",
|
|
2014
1669
|
expected: "string",
|
|
2015
1670
|
value: input.typeName
|
|
1671
|
+
})].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => [(Array.isArray(input.role) || _report(_exceptionable, {
|
|
1672
|
+
path: _path + ".role",
|
|
1673
|
+
expected: "Array<string>",
|
|
1674
|
+
value: input.role
|
|
1675
|
+
})) && input.role.map((elem, _index6) => "string" === typeof elem || _report(_exceptionable, {
|
|
1676
|
+
path: _path + ".role[" + _index6 + "]",
|
|
1677
|
+
expected: "string",
|
|
1678
|
+
value: elem
|
|
1679
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
1680
|
+
path: _path + ".role",
|
|
1681
|
+
expected: "Array<string>",
|
|
1682
|
+
value: input.role
|
|
1683
|
+
}), "Bearer" === input.type || _report(_exceptionable, {
|
|
1684
|
+
path: _path + ".type",
|
|
1685
|
+
expected: "\"Bearer\"",
|
|
1686
|
+
value: input.type
|
|
2016
1687
|
})].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
2017
1688
|
if ("number" === input.type)
|
|
2018
1689
|
return _vo4(input, _path, true && _exceptionable);
|
|
@@ -2057,5 +1728,9 @@ const collection = {
|
|
|
2057
1728
|
}
|
|
2058
1729
|
]
|
|
2059
1730
|
},
|
|
1731
|
+
claude,
|
|
1732
|
+
llama: claude,
|
|
1733
|
+
deepseek: claude,
|
|
1734
|
+
"3.1": claude,
|
|
2060
1735
|
};
|
|
2061
1736
|
//# sourceMappingURL=orchestrateInterfaceOperations.js.map
|