@autobe/agent 0.27.0 → 0.28.1
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/constants/AutoBeSystemPromptConstant.d.ts +1 -1
- package/lib/context/assertSchemaModel.d.ts +1 -1
- package/lib/context/assertSchemaModel.js +4 -7
- package/lib/context/assertSchemaModel.js.map +1 -1
- package/lib/index.mjs +18186 -7689
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeReview.js +164 -86
- package/lib/orchestrate/analyze/orchestrateAnalyzeReview.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js +656 -335
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js +143 -74
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -1
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +17 -52
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +25 -22
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +7 -23
- package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js +165 -2
- package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js.map +1 -1
- package/lib/orchestrate/facade/createAutoBeFacadeController.js +773 -403
- package/lib/orchestrate/facade/createAutoBeFacadeController.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js +749 -2
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js +1637 -9
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +252 -133
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.js +258 -135
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.js +342 -226
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +633 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.js +785 -3
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.js +206 -3
- package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.js +107 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js +1676 -9
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js +1637 -9
- package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js +397 -201
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +1184 -599
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaReview.js +1202 -608
- package/lib/orchestrate/prisma/orchestratePrismaReview.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.js +4 -2
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js +369 -185
- package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +405 -203
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.js +130 -2
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeCorrectCasting.js +165 -2
- package/lib/orchestrate/realize/orchestrateRealizeCorrectCasting.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeWrite.js +130 -2
- package/lib/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
- package/lib/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestCorrect.js +131 -2
- package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js +166 -2
- package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestScenario.js +257 -3
- package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestScenarioReview.js +283 -3
- package/lib/orchestrate/test/orchestrateTestScenarioReview.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestWrite.js +139 -2
- package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -1
- package/package.json +9 -9
- package/src/constants/AutoBeSystemPromptConstant.ts +1 -1
- package/src/context/assertSchemaModel.ts +5 -8
- package/src/orchestrate/analyze/orchestrateAnalyzeReview.ts +7 -9
- package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +13 -9
- package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +7 -9
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.ts +19 -54
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.ts +25 -22
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.ts +8 -24
- package/src/orchestrate/common/orchestrateCommonCorrectCasting.ts +15 -1
- package/src/orchestrate/facade/createAutoBeFacadeController.ts +7 -6
- package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +11 -1
- package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +11 -1
- package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +13 -9
- package/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.ts +13 -9
- package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +17 -14
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +11 -1
- package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +14 -1
- package/src/orchestrate/interface/orchestrateInterfacePrerequisites.ts +11 -1
- package/src/orchestrate/interface/orchestrateInterfaceSchemaRename.ts +9 -1
- package/src/orchestrate/interface/orchestrateInterfaceSchemaReview.ts +14 -1
- package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +11 -1
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +13 -9
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +7 -9
- package/src/orchestrate/prisma/orchestratePrismaReview.ts +7 -10
- package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +13 -9
- package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +13 -9
- package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +11 -1
- package/src/orchestrate/realize/orchestrateRealizeCorrectCasting.ts +15 -1
- package/src/orchestrate/realize/orchestrateRealizeWrite.ts +11 -1
- package/src/orchestrate/test/experimental/orchestrateTestWrite.ast +5 -1
- package/src/orchestrate/test/histories/transformTestWriteHistories.ts +1 -1
- package/src/orchestrate/test/orchestrateTestCorrect.ts +11 -1
- package/src/orchestrate/test/orchestrateTestCorrectInvalidRequest.ts +18 -1
- package/src/orchestrate/test/orchestrateTestScenario.ts +11 -1
- package/src/orchestrate/test/orchestrateTestScenarioReview.ts +11 -1
- package/src/orchestrate/test/orchestrateTestWrite.ts +11 -1
|
@@ -456,7 +456,11 @@ function createReviewController(props) {
|
|
|
456
456
|
};
|
|
457
457
|
return result;
|
|
458
458
|
};
|
|
459
|
-
const application = collection[props.model === "chatgpt"
|
|
459
|
+
const application = collection[props.model === "chatgpt"
|
|
460
|
+
? "chatgpt"
|
|
461
|
+
: props.model === "gemini"
|
|
462
|
+
? "gemini"
|
|
463
|
+
: "claude"](validate);
|
|
460
464
|
return {
|
|
461
465
|
protocol: "class",
|
|
462
466
|
name: "review",
|
|
@@ -481,10 +485,11 @@ const collection = {
|
|
|
481
485
|
{
|
|
482
486
|
name: "reviewOperations",
|
|
483
487
|
parameters: {
|
|
484
|
-
description: " Properties containing the thinking process (review & plan) and\nthe enhanced operations content\n\n------------------------------\n\nDescription of the current {@link IAutoBeInterfaceOperationsReviewApplication.IProps} type:\n\n> Properties for API operation review and improvement process.\n> \n> Contains both the input operations to be reviewed and the outputs generated\n> by the Interface Operations Review Agent, which will be published as part\n> of the AutoBeInterfaceOperationReviewEvent
|
|
488
|
+
description: " Properties containing the thinking process (review & plan) and\nthe enhanced operations content\n\n------------------------------\n\nDescription of the current {@link IAutoBeInterfaceOperationsReviewApplication.IProps} type:\n\n> Properties for API operation review and improvement process.\n> \n> Contains both the input operations to be reviewed and the outputs generated\n> by the Interface Operations Review Agent, which will be published as part\n> of the AutoBeInterfaceOperationReviewEvent.",
|
|
485
489
|
type: "object",
|
|
486
490
|
properties: {
|
|
487
491
|
think: {
|
|
492
|
+
description: "Comprehensive thinking process for API operation review.\n\nEncapsulates the agent's analytical review findings and actionable\nimprovement plan. This structured thinking process ensures systematic\nevaluation of API operations against AutoBE's quality standards before\ngenerating the final enhanced operations.",
|
|
488
493
|
$ref: "#/$defs/IAutoBeInterfaceOperationsReviewApplication.IThink"
|
|
489
494
|
},
|
|
490
495
|
content: {
|
|
@@ -843,10 +848,11 @@ const collection = {
|
|
|
843
848
|
]
|
|
844
849
|
},
|
|
845
850
|
"AutoBeOpenApi.IPrerequisite": {
|
|
846
|
-
description: "Prerequisite API operation dependency.\n\n`IPrerequisite` defines a dependency relationship between API operations,\nspecifying that certain endpoints must be successfully called before the\ncurrent operation can proceed. This ensures proper resource validation,\nstate checking, and data availability in complex API workflows.\n\n## CRITICAL WARNING: Authentication is NOT a Prerequisite\n\n**NEVER use prerequisites for authentication or authorization checks!**\n\nPrerequisites are ONLY for business logic dependencies such as:\n\n- Checking if a resource exists\n- Verifying resource state\n- Loading required data\n\nDo NOT create prerequisites for:\n\n- Login/authentication endpoints\n- Token validation\n- Permission checks\n- User authorization verification\n\nAuthentication is handled separately via the `authorizationActor` field on\nthe operation itself. Mixing authentication with business prerequisites\ncreates confusion and incorrect test scenarios.\n\n## Core Concept\n\nPrerequisites create an execution dependency graph for API operations. They\nexplicitly declare which APIs must succeed before attempting the current\noperation, preventing invalid states and ensuring data consistency.\n\n## Structure\n\nEach prerequisite consists of:\n\n1. **endpoint**: The API endpoint that must be called first\n2. **description**: Clear explanation of why this prerequisite is required\n\n## Common Use Cases\n\n### 1. Resource Existence Validation\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/users/{userId}\", \"method\": \"get\" },\n \"description\": \"User must exist before updating their profile\"\n}\n```\n\n### 2. Parent-Child Relationships\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/posts/{postId}\", \"method\": \"get\" },\n \"description\": \"Post must exist before adding comments\"\n}\n```\n\n### 3. State Prerequisites\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/orders/{orderId}/status\", \"method\": \"get\" },\n \"description\": \"Order must be in 'confirmed' state before shipping\"\n}\n```\n\n### 4. Business Logic Dependencies\n\n```typescript\n{\n \"endpoint\": {\n \"path\": \"/inventory/{productId}/stock\",\n \"method\": \"get\"\n },\n \"description\": \"Product must have sufficient stock before creating order\"\n}\n```\n\n## Implementation Guidelines\n\n1. **Clear Descriptions**: Always explain WHY the prerequisite is needed\n2. **Minimal Dependencies**: Only include truly necessary prerequisites\n3. **Logical Order**: If multiple prerequisites exist, order them logically\n4. **Error Context**: Description should help understand failure scenarios\n5. **No Authentication**: Prerequisites must NEVER be authentication checks\n\n## Test Generation Usage\n\nThe Test Agent utilizes prerequisites to:\n\n- Set up test data in the correct sequence\n- Generate realistic test scenarios\n- Create both positive and negative test cases\n- Ensure proper cleanup in reverse dependency order\n\n## Best Practices\n\n- Keep prerequisite chains as short as possible for performance\n- Consider caching prerequisite results when safe to do so\n- Ensure prerequisite descriptions are specific, not generic\n- Validate that circular dependencies don't exist\n- Document any side effects of prerequisite calls\n- NEVER use for authentication/authorization validation
|
|
851
|
+
description: "Prerequisite API operation dependency.\n\n`IPrerequisite` defines a dependency relationship between API operations,\nspecifying that certain endpoints must be successfully called before the\ncurrent operation can proceed. This ensures proper resource validation,\nstate checking, and data availability in complex API workflows.\n\n## CRITICAL WARNING: Authentication is NOT a Prerequisite\n\n**NEVER use prerequisites for authentication or authorization checks!**\n\nPrerequisites are ONLY for business logic dependencies such as:\n\n- Checking if a resource exists\n- Verifying resource state\n- Loading required data\n\nDo NOT create prerequisites for:\n\n- Login/authentication endpoints\n- Token validation\n- Permission checks\n- User authorization verification\n\nAuthentication is handled separately via the `authorizationActor` field on\nthe operation itself. Mixing authentication with business prerequisites\ncreates confusion and incorrect test scenarios.\n\n## Core Concept\n\nPrerequisites create an execution dependency graph for API operations. They\nexplicitly declare which APIs must succeed before attempting the current\noperation, preventing invalid states and ensuring data consistency.\n\n## Structure\n\nEach prerequisite consists of:\n\n1. **endpoint**: The API endpoint that must be called first\n2. **description**: Clear explanation of why this prerequisite is required\n\n## Common Use Cases\n\n### 1. Resource Existence Validation\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/users/{userId}\", \"method\": \"get\" },\n \"description\": \"User must exist before updating their profile\"\n}\n```\n\n### 2. Parent-Child Relationships\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/posts/{postId}\", \"method\": \"get\" },\n \"description\": \"Post must exist before adding comments\"\n}\n```\n\n### 3. State Prerequisites\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/orders/{orderId}/status\", \"method\": \"get\" },\n \"description\": \"Order must be in 'confirmed' state before shipping\"\n}\n```\n\n### 4. Business Logic Dependencies\n\n```typescript\n{\n \"endpoint\": {\n \"path\": \"/inventory/{productId}/stock\",\n \"method\": \"get\"\n },\n \"description\": \"Product must have sufficient stock before creating order\"\n}\n```\n\n## Implementation Guidelines\n\n1. **Clear Descriptions**: Always explain WHY the prerequisite is needed\n2. **Minimal Dependencies**: Only include truly necessary prerequisites\n3. **Logical Order**: If multiple prerequisites exist, order them logically\n4. **Error Context**: Description should help understand failure scenarios\n5. **No Authentication**: Prerequisites must NEVER be authentication checks\n\n## Test Generation Usage\n\nThe Test Agent utilizes prerequisites to:\n\n- Set up test data in the correct sequence\n- Generate realistic test scenarios\n- Create both positive and negative test cases\n- Ensure proper cleanup in reverse dependency order\n\n## Best Practices\n\n- Keep prerequisite chains as short as possible for performance\n- Consider caching prerequisite results when safe to do so\n- Ensure prerequisite descriptions are specific, not generic\n- Validate that circular dependencies don't exist\n- Document any side effects of prerequisite calls\n- NEVER use for authentication/authorization validation",
|
|
847
852
|
type: "object",
|
|
848
853
|
properties: {
|
|
849
854
|
endpoint: {
|
|
855
|
+
description: "The API endpoint that must be called before the main operation.\n\nThis specifies the exact HTTP method and path of the prerequisite API.\nThe endpoint must be a valid operation defined elsewhere in the API\nspecification. Path parameters in the prerequisite endpoint can reference\nthe same parameters available in the main operation.",
|
|
850
856
|
$ref: "#/$defs/AutoBeOpenApi.IEndpoint"
|
|
851
857
|
},
|
|
852
858
|
description: {
|
|
@@ -2062,5 +2068,781 @@ const collection = {
|
|
|
2062
2068
|
}), { equals: false }));
|
|
2063
2069
|
return application;
|
|
2064
2070
|
})(),
|
|
2071
|
+
gemini: (validate) => (() => {
|
|
2072
|
+
const application = {
|
|
2073
|
+
model: "gemini",
|
|
2074
|
+
options: {
|
|
2075
|
+
reference: true,
|
|
2076
|
+
separate: null
|
|
2077
|
+
},
|
|
2078
|
+
functions: [
|
|
2079
|
+
{
|
|
2080
|
+
name: "reviewOperations",
|
|
2081
|
+
parameters: {
|
|
2082
|
+
description: " Properties containing the thinking process (review & plan) and\nthe enhanced operations content\n\n------------------------------\n\nDescription of the current {@link IAutoBeInterfaceOperationsReviewApplication.IProps} type:\n\n> Properties for API operation review and improvement process.\n> \n> Contains both the input operations to be reviewed and the outputs generated\n> by the Interface Operations Review Agent, which will be published as part\n> of the AutoBeInterfaceOperationReviewEvent.",
|
|
2083
|
+
type: "object",
|
|
2084
|
+
properties: {
|
|
2085
|
+
think: {
|
|
2086
|
+
description: "Comprehensive thinking process for API operation review.\n\nEncapsulates the agent's analytical review findings and actionable\nimprovement plan. This structured thinking process ensures systematic\nevaluation of API operations against AutoBE's quality standards before\ngenerating the final enhanced operations.",
|
|
2087
|
+
$ref: "#/$defs/IAutoBeInterfaceOperationsReviewApplication.IThink"
|
|
2088
|
+
},
|
|
2089
|
+
content: {
|
|
2090
|
+
description: "Production-ready operations with all critical issues resolved.\n\nFinal API operations after systematic enhancement:\n\n- **Security Fixes Applied**: All authentication boundaries enforced,\n sensitive data removed from responses, proper authorization\n implemented\n- **Logic Corrections Made**: Return types match operation intent, HTTP\n methods align with semantics, parameters properly utilized\n- **Schema Alignment Verified**: All fields exist in Prisma schema, types\n correctly mapped, relationships properly defined\n- **Quality Improvements Added**: Enhanced documentation, format\n specifications, validation rules, consistent naming patterns\n\nIf no issues were found during review, this contains the exact original\noperations unchanged. These operations are validated and ready for schema\ngeneration and subsequent implementation phases.",
|
|
2091
|
+
type: "array",
|
|
2092
|
+
items: {
|
|
2093
|
+
$ref: "#/$defs/AutoBeOpenApi.IOperation"
|
|
2094
|
+
}
|
|
2095
|
+
}
|
|
2096
|
+
},
|
|
2097
|
+
required: [
|
|
2098
|
+
"think",
|
|
2099
|
+
"content"
|
|
2100
|
+
],
|
|
2101
|
+
additionalProperties: false,
|
|
2102
|
+
$defs: {
|
|
2103
|
+
"IAutoBeInterfaceOperationsReviewApplication.IThink": {
|
|
2104
|
+
description: "Structured thinking process for comprehensive API operation review.\n\nCombines analytical review findings with actionable improvement planning to\nguide the systematic enhancement of API operations. This thinking structure\nensures all aspects of API quality are evaluated and addressed before\nproducing the final operations.",
|
|
2105
|
+
type: "object",
|
|
2106
|
+
properties: {
|
|
2107
|
+
review: {
|
|
2108
|
+
description: "Comprehensive review analysis with prioritized findings.\n\nSystematic assessment organized by severity levels (CRITICAL, HIGH,\nMEDIUM, LOW):\n\n- **Security Analysis**: Authentication boundary violations, exposed\n passwords/tokens, unauthorized data access patterns, SQL injection\n risks\n- **Logic Validation**: Return type consistency (list operations returning\n arrays, single retrieval returning single items), HTTP method semantics\n alignment, parameter usage verification\n- **Schema Compliance**: Field existence in Prisma schema, type accuracy,\n relationship validity, required field handling\n- **Quality Assessment**: Documentation completeness, naming conventions,\n error handling patterns, pagination standards\n\nEach finding includes specific examples, current vs expected behavior,\nand concrete fix recommendations. Critical security issues and logical\ncontradictions are highlighted for immediate attention.",
|
|
2109
|
+
type: "string"
|
|
2110
|
+
},
|
|
2111
|
+
plan: {
|
|
2112
|
+
description: "Prioritized action plan for identified issues.\n\nStructured improvement strategy categorized by severity:\n\n- **Immediate Actions (CRITICAL)**: Security vulnerabilities that must be\n fixed before production (password exposure, missing authorization,\n authentication bypass risks)\n- **Required Fixes (HIGH)**: Functional issues affecting API correctness\n (wrong return types, missing required fields, schema mismatches)\n- **Recommended Improvements (MEDIUM)**: Quality enhancements for better\n API design (validation rules, format specifications, consistency)\n- **Optional Enhancements (LOW)**: Documentation and usability improvements\n\nIf all operations pass review without issues, contains: \"No improvements\nrequired. All operations meet AutoBE standards.\"\n\nEach action item includes the specific operation path, the exact change\nneeded, and the rationale for the modification.",
|
|
2113
|
+
type: "string"
|
|
2114
|
+
}
|
|
2115
|
+
},
|
|
2116
|
+
required: [
|
|
2117
|
+
"review",
|
|
2118
|
+
"plan"
|
|
2119
|
+
]
|
|
2120
|
+
},
|
|
2121
|
+
"AutoBeOpenApi.IOperation": {
|
|
2122
|
+
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}\n```",
|
|
2123
|
+
type: "object",
|
|
2124
|
+
properties: {
|
|
2125
|
+
specification: {
|
|
2126
|
+
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.",
|
|
2127
|
+
type: "string"
|
|
2128
|
+
},
|
|
2129
|
+
authorizationType: {
|
|
2130
|
+
description: "Authorization type of the API operation.\n\n- `\"login\"`: User login operations that validate credentials\n- `\"join\"`: User registration operations that create accounts\n- `\"refresh\"`: Token refresh operations that renew access tokens\n- `null`: All other operations (CRUD, business logic, etc.)\n\nUse authentication values only for credential validation, user\nregistration, or token refresh operations. Use `null` for all other\nbusiness operations.\n\nExamples:\n\n- `/auth/login` \u2192 `\"login\"`\n- `/auth/register` \u2192 `\"join\"`\n- `/auth/refresh` \u2192 `\"refresh\"`\n- `/auth/validate` \u2192 `null`\n- `/users/{id}`, `/shoppings/customers/sales/cancel`, \u2192 `null`",
|
|
2131
|
+
anyOf: [
|
|
2132
|
+
{
|
|
2133
|
+
type: "null"
|
|
2134
|
+
},
|
|
2135
|
+
{
|
|
2136
|
+
type: "string",
|
|
2137
|
+
"enum": [
|
|
2138
|
+
"login",
|
|
2139
|
+
"join",
|
|
2140
|
+
"refresh"
|
|
2141
|
+
]
|
|
2142
|
+
}
|
|
2143
|
+
]
|
|
2144
|
+
},
|
|
2145
|
+
description: {
|
|
2146
|
+
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**CRITICAL WARNING about soft delete keywords**: DO NOT use terms like\n\"soft delete\", \"soft-delete\", or similar variations in this description\nUNLESS the operation actually implements soft deletion. These keywords\ntrigger validation logic that expects a corresponding soft_delete_column\nto be specified. Only use these terms when you intend to implement soft\ndeletion (marking records as deleted without removing them from the\ndatabase).\n\nExample of problematic description: \u274C \"This would normally be a\nsoft-delete, but we intentionally perform permanent deletion here\" - This\ntriggers soft delete validation despite being a hard delete operation.\n\n> MUST be written in English. Never use other languages.",
|
|
2147
|
+
type: "string"
|
|
2148
|
+
},
|
|
2149
|
+
summary: {
|
|
2150
|
+
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**CRITICAL WARNING about soft delete keywords**: DO NOT use terms like\n\"soft delete\", \"soft-delete\", or similar variations in this summary\nUNLESS the operation actually implements soft deletion. These keywords\ntrigger validation logic that expects a corresponding soft_delete_column\nto be specified. Only use these terms when you intend to implement soft\ndeletion (marking records as deleted without removing them from the\ndatabase).\n\n> MUST be written in English. Never use other languages",
|
|
2151
|
+
type: "string"
|
|
2152
|
+
},
|
|
2153
|
+
parameters: {
|
|
2154
|
+
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`",
|
|
2155
|
+
type: "array",
|
|
2156
|
+
items: {
|
|
2157
|
+
$ref: "#/$defs/AutoBeOpenApi.IParameter"
|
|
2158
|
+
}
|
|
2159
|
+
},
|
|
2160
|
+
requestBody: {
|
|
2161
|
+
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.",
|
|
2162
|
+
anyOf: [
|
|
2163
|
+
{
|
|
2164
|
+
type: "null"
|
|
2165
|
+
},
|
|
2166
|
+
{
|
|
2167
|
+
$ref: "#/$defs/AutoBeOpenApi.IRequestBody"
|
|
2168
|
+
}
|
|
2169
|
+
]
|
|
2170
|
+
},
|
|
2171
|
+
responseBody: {
|
|
2172
|
+
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.",
|
|
2173
|
+
anyOf: [
|
|
2174
|
+
{
|
|
2175
|
+
type: "null"
|
|
2176
|
+
},
|
|
2177
|
+
{
|
|
2178
|
+
$ref: "#/$defs/AutoBeOpenApi.IResponseBody"
|
|
2179
|
+
}
|
|
2180
|
+
]
|
|
2181
|
+
},
|
|
2182
|
+
authorizationActor: {
|
|
2183
|
+
description: "Authorization actor required to access this API operation.\n\nThis field specifies which user actor is allowed to access this endpoint.\nThe actor name must correspond exactly to the actual actors defined in\nyour system's Prisma schema.\n\n## Naming Convention\n\nActor names MUST use camelCase.\n\n## Actor-Based Path Convention\n\nWhen authorizationActor is specified, it should align with the path\nstructure:\n\n- If authorizationActor is \"admin\" \u2192 path might be \"/admin/resources/{id}\"\n- If authorizationActor is \"seller\" \u2192 path might be \"/seller/products\"\n- Special case: For user's own resources, use path prefix \"/my/\" regardless\n of actor\n\n## Important Guidelines\n\n- Set to `null` for public endpoints that require no authentication\n- Set to specific actor string for actor-restricted endpoints\n- The actor name MUST match exactly with the user type/actor defined in the\n database\n- This actor will be used by the Realize Agent to generate appropriate\n decorator and authorization logic in the provider functions\n- The controller will apply the corresponding authentication decorator\n based on this actor\n\n## Examples\n\n- `null` - Public endpoint, no authentication required\n- `\"user\"` - Any authenticated user can access\n- `\"admin\"` - Only admin users can access\n- `\"seller\"` - Only seller users can access\n- `\"moderator\"` - Only moderator users can access\n\nNote: The actual authentication/authorization implementation will be\nhandled by decorators at the controller level, and the provider function\nwill receive the authenticated user object with the appropriate type.",
|
|
2184
|
+
anyOf: [
|
|
2185
|
+
{
|
|
2186
|
+
type: "null"
|
|
2187
|
+
},
|
|
2188
|
+
{
|
|
2189
|
+
type: "string",
|
|
2190
|
+
pattern: "^[a-z][a-zA-Z0-9]*$",
|
|
2191
|
+
minLength: 1
|
|
2192
|
+
}
|
|
2193
|
+
]
|
|
2194
|
+
},
|
|
2195
|
+
name: {
|
|
2196
|
+
description: "Functional name of the API endpoint.\n\nThis is a semantic identifier that represents the primary function or\npurpose of the API endpoint. It serves as a canonical name that can be\nused for code generation, SDK method names, and internal references.\n\n## Reserved Word Restrictions\n\nCRITICAL: The name MUST NOT be a TypeScript/JavaScript reserved word, as\nit will be used as a class method name in generated code. Avoid names\nlike:\n\n- `delete`, `for`, `if`, `else`, `while`, `do`, `switch`, `case`, `break`\n- `continue`, `function`, `return`, `with`, `in`, `of`, `instanceof`\n- `typeof`, `void`, `var`, `let`, `const`, `class`, `extends`, `import`\n- `export`, `default`, `try`, `catch`, `finally`, `throw`, `new`\n- `super`, `this`, `null`, `true`, `false`, `async`, `await`\n- `yield`, `static`, `private`, `protected`, `public`, `implements`\n- `interface`, `package`, `enum`, `debugger`\n\nInstead, use alternative names for these operations:\n\n- Use `erase` instead of `delete`\n- Use `iterate` instead of `for`\n- Use `when` instead of `if`\n- Use `cls` instead of `class`\n\n## Standard Endpoint Names\n\nUse these conventional names based on the endpoint's primary function:\n\n- **`index`**: List/search operations that return multiple entities\n\n - Typically used with PATCH method for complex queries\n - Example: `PATCH /users` \u2192 `name: \"index\"`\n- **`at`**: Retrieve a specific entity by identifier\n\n - Typically used with GET method on single resource\n - Example: `GET /users/{userId}` \u2192 `name: \"at\"`\n- **`create`**: Create a new entity\n\n - Typically used with POST method\n - Example: `POST /users` \u2192 `name: \"create\"`\n- **`update`**: Update an existing entity\n\n - Typically used with PUT method\n - Example: `PUT /users/{userId}` \u2192 `name: \"update\"`\n- **`erase`**: Delete/remove an entity (NOT `delete` - reserved word!)\n\n - Typically used with DELETE method\n - Example: `DELETE /users/{userId}` \u2192 `name: \"erase\"`\n\n## Custom Endpoint Names\n\nFor specialized operations beyond basic CRUD, use descriptive verbs:\n\n- **`activate`**: Enable or turn on a feature/entity\n- **`deactivate`**: Disable or turn off a feature/entity\n- **`approve`**: Approve a request or entity\n- **`reject`**: Reject a request or entity\n- **`publish`**: Make content publicly available\n- **`archive`**: Move to archived state\n- **`restore`**: Restore from archived/deleted state\n- **`duplicate`**: Create a copy of an entity\n- **`transfer`**: Move ownership or change assignment\n- **`validate`**: Validate data or state\n- **`process`**: Execute a business process or workflow\n- **`export`**: Generate downloadable data\n- **`import`**: Process uploaded data\n\n## Naming Guidelines\n\n- MUST use camelCase naming convention\n- Use singular verb forms\n- Be concise but descriptive\n- Avoid abbreviations unless widely understood\n- Ensure the name clearly represents the endpoint's primary action\n- For nested resources, focus on the action rather than hierarchy\n- NEVER use JavaScript/TypeScript reserved words\n\nValid Examples:\n\n- `index`, `create`, `update`, `erase` (single word)\n- `updatePassword`, `cancelOrder`, `publishArticle` (camelCase)\n- `validateEmail`, `generateReport`, `exportData` (camelCase)\n\nInvalid Examples:\n\n- `update_password` (snake_case not allowed)\n- `UpdatePassword` (PascalCase not allowed)\n- `update-password` (kebab-case not allowed)\n\nPath to Name Examples:\n\n- `GET /shopping/orders/{orderId}/items` \u2192 `name: \"index\"` (lists items)\n- `POST /shopping/orders/{orderId}/cancel` \u2192 `name: \"cancel\"`\n- `PUT /users/{userId}/password` \u2192 `name: \"updatePassword\"`\n\n## Uniqueness Rule\n\nThe `name` must be unique within the API's accessor namespace. The\naccessor is formed by combining the path segments (excluding parameters)\nwith the operation name.\n\nAccessor formation:\n\n1. Extract non-parameter segments from the path (remove `{...}` parts)\n2. Join segments with dots\n3. Append the operation name\n\nExamples:\n\n- Path: `/shopping/sale/{saleId}/review/{reviewId}`, Name: `at` \u2192 Accessor:\n `shopping.sale.review.at`\n- Path: `/users/{userId}/posts`, Name: `index` \u2192 Accessor:\n `users.posts.index`\n- Path: `/auth/login`, Name: `signIn` \u2192 Accessor: `auth.login.signIn`\n\nEach accessor must be globally unique across the entire API. This ensures\noperations can be uniquely identified in generated SDKs and prevents\nnaming conflicts.",
|
|
2197
|
+
type: "string",
|
|
2198
|
+
pattern: "^[a-z][a-zA-Z0-9]*$"
|
|
2199
|
+
},
|
|
2200
|
+
prerequisites: {
|
|
2201
|
+
description: "Prerequisites for this API operation.\n\nThe `prerequisites` field defines API operations that must be\nsuccessfully executed before this operation can be performed. This\ncreates an explicit dependency chain between API endpoints, ensuring\nproper execution order and data availability.\n\n## CRITICAL WARNING: Authentication Prerequisites\n\n**NEVER include authentication-related operations as prerequisites!**\nAuthentication is handled separately through the `authorizationActor`\nfield and should NOT be part of the prerequisite chain. Do NOT add\nprerequisites for:\n\n- Login endpoints\n- Token validation endpoints\n- User authentication checks\n- Permission verification endpoints\n\nPrerequisites are ONLY for business logic dependencies, NOT for\nauthentication/authorization.\n\n## Purpose and Use Cases\n\nPrerequisites are essential for operations that depend on:\n\n1. **Existence Validation**: Ensuring resources exist before manipulation\n2. **State Requirements**: Verifying resources are in the correct state\n3. **Data Dependencies**: Loading necessary data for the current operation\n4. **Business Logic Constraints**: Enforcing domain-specific rules\n\n## Execution Flow\n\nWhen an operation has prerequisites:\n\n1. Each prerequisite API must be called first in the specified order\n2. Prerequisites must return successful responses (2xx status codes)\n3. Only after all prerequisites succeed can the main operation proceed\n4. If any prerequisite fails, the operation should not be attempted\n\n## Common Patterns\n\n### Resource Existence Check\n\n```typescript\n// Before updating an order item, ensure the order exists\nprerequisites: [\n {\n endpoint: { path: \"/orders/{orderId}\", method: \"get\" },\n description: \"Order must exist in the system\",\n },\n];\n```\n\n### State Validation\n\n```typescript\n// Before processing payment, ensure order is in correct state\nprerequisites: [\n {\n endpoint: { path: \"/orders/{orderId}/status\", method: \"get\" },\n description: \"Order must be in 'pending_payment' status\",\n },\n];\n```\n\n### Hierarchical Dependencies\n\n```typescript\n// Before accessing a deeply nested resource\nprerequisites: [\n {\n endpoint: { path: \"/projects/{projectId}\", method: \"get\" },\n description: \"Project must exist\",\n },\n {\n endpoint: {\n path: \"/projects/{projectId}/tasks/{taskId}\",\n method: \"get\",\n },\n description: \"Task must exist within the project\",\n },\n];\n```\n\n## Important Guidelines\n\n1. **Order Matters**: Prerequisites are executed in array order\n2. **Parameter Inheritance**: Path parameters from prerequisites can be used\n in the main operation\n3. **Error Handling**: Failed prerequisites should prevent main operation\n4. **Performance**: Consider caching prerequisite results when appropriate\n5. **Documentation**: Each prerequisite must have a clear description\n explaining why it's required\n6. **No Authentication**: NEVER use prerequisites for authentication checks\n\n## Test Generation Impact\n\nThe Test Agent uses prerequisites to:\n\n- Generate proper test setup sequences\n- Create valid test data in the correct order\n- Ensure test scenarios follow realistic workflows\n- Validate error handling when prerequisites fail",
|
|
2202
|
+
type: "array",
|
|
2203
|
+
items: {
|
|
2204
|
+
$ref: "#/$defs/AutoBeOpenApi.IPrerequisite"
|
|
2205
|
+
}
|
|
2206
|
+
},
|
|
2207
|
+
path: {
|
|
2208
|
+
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.\n\nPath validation rules:\n\n- Must start with a forward slash (/)\n- Can contain only: letters (a-z, A-Z), numbers (0-9), forward slashes (/),\n curly braces for parameters ({paramName}), hyphens (-), and underscores\n (_)\n- Parameters must be enclosed in curly braces: {paramName}\n- Resource names should be in camelCase\n- No quotes, spaces, or invalid special characters allowed\n- No domain or role-based prefixes\n\nValid examples:\n\n- \"/users\"\n- \"/users/{userId}\"\n- \"/articles/{articleId}/comments\"\n- \"/attachmentFiles\"\n- \"/orders/{orderId}/items/{itemId}\"\n\nInvalid examples:\n\n- \"'/users'\" (contains quotes)\n- \"/user profile\" (contains space)\n- \"/users/[userId]\" (wrong bracket format)\n- \"/admin/users\" (role prefix)\n- \"/api/v1/users\" (API prefix)",
|
|
2209
|
+
type: "string",
|
|
2210
|
+
pattern: "^\\/[a-zA-Z0-9\\/_{}.-]*$"
|
|
2211
|
+
},
|
|
2212
|
+
method: {
|
|
2213
|
+
description: "HTTP method of the API operation.\n\n**IMPORTANT**: Methods must be written in lowercase only (e.g., \"get\",\nnot \"GET\").\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",
|
|
2214
|
+
type: "string",
|
|
2215
|
+
"enum": [
|
|
2216
|
+
"get",
|
|
2217
|
+
"post",
|
|
2218
|
+
"put",
|
|
2219
|
+
"delete",
|
|
2220
|
+
"patch"
|
|
2221
|
+
]
|
|
2222
|
+
}
|
|
2223
|
+
},
|
|
2224
|
+
required: [
|
|
2225
|
+
"specification",
|
|
2226
|
+
"authorizationType",
|
|
2227
|
+
"description",
|
|
2228
|
+
"summary",
|
|
2229
|
+
"parameters",
|
|
2230
|
+
"requestBody",
|
|
2231
|
+
"responseBody",
|
|
2232
|
+
"authorizationActor",
|
|
2233
|
+
"name",
|
|
2234
|
+
"prerequisites",
|
|
2235
|
+
"path",
|
|
2236
|
+
"method"
|
|
2237
|
+
]
|
|
2238
|
+
},
|
|
2239
|
+
"AutoBeOpenApi.IParameter": {
|
|
2240
|
+
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```",
|
|
2241
|
+
type: "object",
|
|
2242
|
+
properties: {
|
|
2243
|
+
name: {
|
|
2244
|
+
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}.\n\nMUST use camelCase naming convention.",
|
|
2245
|
+
type: "string",
|
|
2246
|
+
pattern: "^[a-z][a-zA-Z0-9]*$"
|
|
2247
|
+
},
|
|
2248
|
+
description: {
|
|
2249
|
+
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.",
|
|
2250
|
+
type: "string"
|
|
2251
|
+
},
|
|
2252
|
+
schema: {
|
|
2253
|
+
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.",
|
|
2254
|
+
anyOf: [
|
|
2255
|
+
{
|
|
2256
|
+
$ref: "#/$defs/AutoBeOpenApi.IJsonSchema.INumber"
|
|
2257
|
+
},
|
|
2258
|
+
{
|
|
2259
|
+
$ref: "#/$defs/AutoBeOpenApi.IJsonSchema.IInteger"
|
|
2260
|
+
},
|
|
2261
|
+
{
|
|
2262
|
+
$ref: "#/$defs/AutoBeOpenApi.IJsonSchema.IString"
|
|
2263
|
+
}
|
|
2264
|
+
],
|
|
2265
|
+
"x-discriminator": {
|
|
2266
|
+
propertyName: "type",
|
|
2267
|
+
mapping: {
|
|
2268
|
+
number: "#/$defs/AutoBeOpenApi.IJsonSchema.INumber",
|
|
2269
|
+
integer: "#/$defs/AutoBeOpenApi.IJsonSchema.IInteger",
|
|
2270
|
+
string: "#/$defs/AutoBeOpenApi.IJsonSchema.IString"
|
|
2271
|
+
}
|
|
2272
|
+
}
|
|
2273
|
+
}
|
|
2274
|
+
},
|
|
2275
|
+
required: [
|
|
2276
|
+
"name",
|
|
2277
|
+
"description",
|
|
2278
|
+
"schema"
|
|
2279
|
+
]
|
|
2280
|
+
},
|
|
2281
|
+
"AutoBeOpenApi.IJsonSchema.INumber": {
|
|
2282
|
+
description: "Number (double) type info.",
|
|
2283
|
+
type: "object",
|
|
2284
|
+
properties: {
|
|
2285
|
+
minimum: {
|
|
2286
|
+
description: "Minimum value restriction.",
|
|
2287
|
+
type: "number"
|
|
2288
|
+
},
|
|
2289
|
+
maximum: {
|
|
2290
|
+
description: "Maximum value restriction.",
|
|
2291
|
+
type: "number"
|
|
2292
|
+
},
|
|
2293
|
+
exclusiveMinimum: {
|
|
2294
|
+
description: "Exclusive minimum value restriction.",
|
|
2295
|
+
type: "number"
|
|
2296
|
+
},
|
|
2297
|
+
exclusiveMaximum: {
|
|
2298
|
+
description: "Exclusive maximum value restriction.",
|
|
2299
|
+
type: "number"
|
|
2300
|
+
},
|
|
2301
|
+
multipleOf: {
|
|
2302
|
+
description: "Multiple of value restriction.",
|
|
2303
|
+
type: "number",
|
|
2304
|
+
exclusiveMinimum: 0
|
|
2305
|
+
},
|
|
2306
|
+
type: {
|
|
2307
|
+
description: "Discriminator value of the type.\n\nCRITICAL: This MUST be a SINGLE string value, NOT an array. The type\nfield identifies the JSON Schema type and must be exactly one of:\n\"boolean\", \"integer\", \"number\", \"string\", \"array\", \"object\", or\n\"null\".\n\n\u274C INCORRECT: type: [\"string\", \"null\"] // This is WRONG! \u2705 CORRECT:\ntype: \"string\" // For nullable string, use oneOf instead\n\nIf you need to express a nullable type (e.g., string | null), you MUST\nuse the `IOneOf` structure:\n\n```typescript\n{\n \"oneOf\": [{ \"type\": \"string\" }, { \"type\": \"null\" }]\n}\n```\n\nNEVER use array notation in the type field. The type field is a\ndiscriminator that accepts only a single string value.",
|
|
2308
|
+
type: "string",
|
|
2309
|
+
"enum": [
|
|
2310
|
+
"number"
|
|
2311
|
+
]
|
|
2312
|
+
}
|
|
2313
|
+
},
|
|
2314
|
+
required: [
|
|
2315
|
+
"type"
|
|
2316
|
+
]
|
|
2317
|
+
},
|
|
2318
|
+
"AutoBeOpenApi.IJsonSchema.IInteger": {
|
|
2319
|
+
description: "Integer type info.",
|
|
2320
|
+
type: "object",
|
|
2321
|
+
properties: {
|
|
2322
|
+
minimum: {
|
|
2323
|
+
description: "Minimum value restriction.",
|
|
2324
|
+
type: "integer"
|
|
2325
|
+
},
|
|
2326
|
+
maximum: {
|
|
2327
|
+
description: "Maximum value restriction.",
|
|
2328
|
+
type: "integer"
|
|
2329
|
+
},
|
|
2330
|
+
exclusiveMinimum: {
|
|
2331
|
+
description: "Exclusive minimum value restriction.",
|
|
2332
|
+
type: "number"
|
|
2333
|
+
},
|
|
2334
|
+
exclusiveMaximum: {
|
|
2335
|
+
description: "Exclusive maximum value restriction.",
|
|
2336
|
+
type: "number"
|
|
2337
|
+
},
|
|
2338
|
+
multipleOf: {
|
|
2339
|
+
description: "Multiple of value restriction.",
|
|
2340
|
+
type: "integer",
|
|
2341
|
+
exclusiveMinimum: 0
|
|
2342
|
+
},
|
|
2343
|
+
type: {
|
|
2344
|
+
description: "Discriminator value of the type.\n\nCRITICAL: This MUST be a SINGLE string value, NOT an array. The type\nfield identifies the JSON Schema type and must be exactly one of:\n\"boolean\", \"integer\", \"number\", \"string\", \"array\", \"object\", or\n\"null\".\n\n\u274C INCORRECT: type: [\"string\", \"null\"] // This is WRONG! \u2705 CORRECT:\ntype: \"string\" // For nullable string, use oneOf instead\n\nIf you need to express a nullable type (e.g., string | null), you MUST\nuse the `IOneOf` structure:\n\n```typescript\n{\n \"oneOf\": [{ \"type\": \"string\" }, { \"type\": \"null\" }]\n}\n```\n\nNEVER use array notation in the type field. The type field is a\ndiscriminator that accepts only a single string value.",
|
|
2345
|
+
type: "string",
|
|
2346
|
+
"enum": [
|
|
2347
|
+
"integer"
|
|
2348
|
+
]
|
|
2349
|
+
}
|
|
2350
|
+
},
|
|
2351
|
+
required: [
|
|
2352
|
+
"type"
|
|
2353
|
+
]
|
|
2354
|
+
},
|
|
2355
|
+
"AutoBeOpenApi.IJsonSchema.IString": {
|
|
2356
|
+
description: "String type info.",
|
|
2357
|
+
type: "object",
|
|
2358
|
+
properties: {
|
|
2359
|
+
format: {
|
|
2360
|
+
description: "Format restriction.",
|
|
2361
|
+
type: "string",
|
|
2362
|
+
"enum": [
|
|
2363
|
+
"date-time",
|
|
2364
|
+
"password",
|
|
2365
|
+
"regex",
|
|
2366
|
+
"uuid",
|
|
2367
|
+
"email",
|
|
2368
|
+
"hostname",
|
|
2369
|
+
"idn-email",
|
|
2370
|
+
"idn-hostname",
|
|
2371
|
+
"iri",
|
|
2372
|
+
"iri-reference",
|
|
2373
|
+
"ipv4",
|
|
2374
|
+
"ipv6",
|
|
2375
|
+
"uri",
|
|
2376
|
+
"uri-reference",
|
|
2377
|
+
"uri-template",
|
|
2378
|
+
"url",
|
|
2379
|
+
"date",
|
|
2380
|
+
"time",
|
|
2381
|
+
"duration",
|
|
2382
|
+
"json-pointer",
|
|
2383
|
+
"relative-json-pointer"
|
|
2384
|
+
]
|
|
2385
|
+
},
|
|
2386
|
+
pattern: {
|
|
2387
|
+
description: "Pattern restriction.",
|
|
2388
|
+
type: "string"
|
|
2389
|
+
},
|
|
2390
|
+
contentMediaType: {
|
|
2391
|
+
description: "Content media type restriction.",
|
|
2392
|
+
type: "string"
|
|
2393
|
+
},
|
|
2394
|
+
minLength: {
|
|
2395
|
+
description: "Minimum length restriction.",
|
|
2396
|
+
type: "integer",
|
|
2397
|
+
minimum: 0
|
|
2398
|
+
},
|
|
2399
|
+
maxLength: {
|
|
2400
|
+
description: "Maximum length restriction.",
|
|
2401
|
+
type: "integer",
|
|
2402
|
+
minimum: 0
|
|
2403
|
+
},
|
|
2404
|
+
type: {
|
|
2405
|
+
description: "Discriminator value of the type.\n\nCRITICAL: This MUST be a SINGLE string value, NOT an array. The type\nfield identifies the JSON Schema type and must be exactly one of:\n\"boolean\", \"integer\", \"number\", \"string\", \"array\", \"object\", or\n\"null\".\n\n\u274C INCORRECT: type: [\"string\", \"null\"] // This is WRONG! \u2705 CORRECT:\ntype: \"string\" // For nullable string, use oneOf instead\n\nIf you need to express a nullable type (e.g., string | null), you MUST\nuse the `IOneOf` structure:\n\n```typescript\n{\n \"oneOf\": [{ \"type\": \"string\" }, { \"type\": \"null\" }]\n}\n```\n\nNEVER use array notation in the type field. The type field is a\ndiscriminator that accepts only a single string value.",
|
|
2406
|
+
type: "string",
|
|
2407
|
+
"enum": [
|
|
2408
|
+
"string"
|
|
2409
|
+
]
|
|
2410
|
+
}
|
|
2411
|
+
},
|
|
2412
|
+
required: [
|
|
2413
|
+
"type"
|
|
2414
|
+
]
|
|
2415
|
+
},
|
|
2416
|
+
"AutoBeOpenApi.IRequestBody": {
|
|
2417
|
+
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```",
|
|
2418
|
+
type: "object",
|
|
2419
|
+
properties: {
|
|
2420
|
+
description: {
|
|
2421
|
+
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.",
|
|
2422
|
+
type: "string"
|
|
2423
|
+
},
|
|
2424
|
+
typeName: {
|
|
2425
|
+
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```",
|
|
2426
|
+
type: "string"
|
|
2427
|
+
}
|
|
2428
|
+
},
|
|
2429
|
+
required: [
|
|
2430
|
+
"description",
|
|
2431
|
+
"typeName"
|
|
2432
|
+
]
|
|
2433
|
+
},
|
|
2434
|
+
"AutoBeOpenApi.IResponseBody": {
|
|
2435
|
+
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```",
|
|
2436
|
+
type: "object",
|
|
2437
|
+
properties: {
|
|
2438
|
+
description: {
|
|
2439
|
+
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.",
|
|
2440
|
+
type: "string"
|
|
2441
|
+
},
|
|
2442
|
+
typeName: {
|
|
2443
|
+
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```",
|
|
2444
|
+
type: "string"
|
|
2445
|
+
}
|
|
2446
|
+
},
|
|
2447
|
+
required: [
|
|
2448
|
+
"description",
|
|
2449
|
+
"typeName"
|
|
2450
|
+
]
|
|
2451
|
+
},
|
|
2452
|
+
"AutoBeOpenApi.IPrerequisite": {
|
|
2453
|
+
description: "Prerequisite API operation dependency.\n\n`IPrerequisite` defines a dependency relationship between API operations,\nspecifying that certain endpoints must be successfully called before the\ncurrent operation can proceed. This ensures proper resource validation,\nstate checking, and data availability in complex API workflows.\n\n## CRITICAL WARNING: Authentication is NOT a Prerequisite\n\n**NEVER use prerequisites for authentication or authorization checks!**\n\nPrerequisites are ONLY for business logic dependencies such as:\n\n- Checking if a resource exists\n- Verifying resource state\n- Loading required data\n\nDo NOT create prerequisites for:\n\n- Login/authentication endpoints\n- Token validation\n- Permission checks\n- User authorization verification\n\nAuthentication is handled separately via the `authorizationActor` field on\nthe operation itself. Mixing authentication with business prerequisites\ncreates confusion and incorrect test scenarios.\n\n## Core Concept\n\nPrerequisites create an execution dependency graph for API operations. They\nexplicitly declare which APIs must succeed before attempting the current\noperation, preventing invalid states and ensuring data consistency.\n\n## Structure\n\nEach prerequisite consists of:\n\n1. **endpoint**: The API endpoint that must be called first\n2. **description**: Clear explanation of why this prerequisite is required\n\n## Common Use Cases\n\n### 1. Resource Existence Validation\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/users/{userId}\", \"method\": \"get\" },\n \"description\": \"User must exist before updating their profile\"\n}\n```\n\n### 2. Parent-Child Relationships\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/posts/{postId}\", \"method\": \"get\" },\n \"description\": \"Post must exist before adding comments\"\n}\n```\n\n### 3. State Prerequisites\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/orders/{orderId}/status\", \"method\": \"get\" },\n \"description\": \"Order must be in 'confirmed' state before shipping\"\n}\n```\n\n### 4. Business Logic Dependencies\n\n```typescript\n{\n \"endpoint\": {\n \"path\": \"/inventory/{productId}/stock\",\n \"method\": \"get\"\n },\n \"description\": \"Product must have sufficient stock before creating order\"\n}\n```\n\n## Implementation Guidelines\n\n1. **Clear Descriptions**: Always explain WHY the prerequisite is needed\n2. **Minimal Dependencies**: Only include truly necessary prerequisites\n3. **Logical Order**: If multiple prerequisites exist, order them logically\n4. **Error Context**: Description should help understand failure scenarios\n5. **No Authentication**: Prerequisites must NEVER be authentication checks\n\n## Test Generation Usage\n\nThe Test Agent utilizes prerequisites to:\n\n- Set up test data in the correct sequence\n- Generate realistic test scenarios\n- Create both positive and negative test cases\n- Ensure proper cleanup in reverse dependency order\n\n## Best Practices\n\n- Keep prerequisite chains as short as possible for performance\n- Consider caching prerequisite results when safe to do so\n- Ensure prerequisite descriptions are specific, not generic\n- Validate that circular dependencies don't exist\n- Document any side effects of prerequisite calls\n- NEVER use for authentication/authorization validation",
|
|
2454
|
+
type: "object",
|
|
2455
|
+
properties: {
|
|
2456
|
+
endpoint: {
|
|
2457
|
+
description: "The API endpoint that must be called before the main operation.\n\nThis specifies the exact HTTP method and path of the prerequisite API.\nThe endpoint must be a valid operation defined elsewhere in the API\nspecification. Path parameters in the prerequisite endpoint can reference\nthe same parameters available in the main operation.",
|
|
2458
|
+
$ref: "#/$defs/AutoBeOpenApi.IEndpoint"
|
|
2459
|
+
},
|
|
2460
|
+
description: {
|
|
2461
|
+
description: "Clear description of why this prerequisite is required.\n\nThis description should explain:\n\n- What validation or check this prerequisite performs\n- What state or condition must be satisfied\n- What happens if this prerequisite fails\n- Any specific data from the prerequisite used by the main operation\n\nThe description helps developers understand the dependency relationship\nand aids in debugging when prerequisites fail.\n\nGuidelines for good descriptions:\n\n- Be specific about the requirement (e.g., \"must be in 'active' state\")\n- Explain business logic constraints (e.g., \"budget must not be exceeded\")\n- Explain data dependencies (e.g., \"provides pricing information needed\")\n- Keep it concise but complete\n\n> MUST be written in English. Never use other languages.",
|
|
2462
|
+
type: "string"
|
|
2463
|
+
}
|
|
2464
|
+
},
|
|
2465
|
+
required: [
|
|
2466
|
+
"endpoint",
|
|
2467
|
+
"description"
|
|
2468
|
+
]
|
|
2469
|
+
},
|
|
2470
|
+
"AutoBeOpenApi.IEndpoint": {
|
|
2471
|
+
description: "API endpoint information.",
|
|
2472
|
+
type: "object",
|
|
2473
|
+
properties: {
|
|
2474
|
+
path: {
|
|
2475
|
+
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.\n\nPath validation rules:\n\n- Must start with a forward slash (/)\n- Can contain only: letters (a-z, A-Z), numbers (0-9), forward slashes (/),\n curly braces for parameters ({paramName}), hyphens (-), and underscores\n (_)\n- Parameters must be enclosed in curly braces: {paramName}\n- Resource names should be in camelCase\n- No quotes, spaces, or invalid special characters allowed\n- No domain or role-based prefixes\n\nValid examples:\n\n- \"/users\"\n- \"/users/{userId}\"\n- \"/articles/{articleId}/comments\"\n- \"/attachmentFiles\"\n- \"/orders/{orderId}/items/{itemId}\"\n\nInvalid examples:\n\n- \"'/users'\" (contains quotes)\n- \"/user profile\" (contains space)\n- \"/users/[userId]\" (wrong bracket format)\n- \"/admin/users\" (role prefix)\n- \"/api/v1/users\" (API prefix)",
|
|
2476
|
+
type: "string",
|
|
2477
|
+
pattern: "^\\/[a-zA-Z0-9\\/_{}.-]*$"
|
|
2478
|
+
},
|
|
2479
|
+
method: {
|
|
2480
|
+
description: "HTTP method of the API operation.\n\n**IMPORTANT**: Methods must be written in lowercase only (e.g., \"get\",\nnot \"GET\").\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",
|
|
2481
|
+
type: "string",
|
|
2482
|
+
"enum": [
|
|
2483
|
+
"get",
|
|
2484
|
+
"post",
|
|
2485
|
+
"put",
|
|
2486
|
+
"delete",
|
|
2487
|
+
"patch"
|
|
2488
|
+
]
|
|
2489
|
+
}
|
|
2490
|
+
},
|
|
2491
|
+
required: [
|
|
2492
|
+
"path",
|
|
2493
|
+
"method"
|
|
2494
|
+
]
|
|
2495
|
+
}
|
|
2496
|
+
}
|
|
2497
|
+
},
|
|
2498
|
+
description: "Reviews a batch of API operations for quality and correctness.\n\nAnalyzes operations for security vulnerabilities, schema compliance,\nlogical consistency, and standard adherence. Outputs a structured thinking\nprocess containing review findings and improvement plans, plus the final\nproduction-ready operations with all critical issues resolved.",
|
|
2499
|
+
validate: (() => { const _iv4 = new Set(["date-time", "password", "regex", "uuid", "email", "hostname", "idn-email", "idn-hostname", "iri", "iri-reference", "ipv4", "ipv6", "uri", "uri-reference", "uri-template", "url", "date", "time", "duration", "json-pointer", "relative-json-pointer"]); const _vv8 = new Set(["date-time", "password", "regex", "uuid", "email", "hostname", "idn-email", "idn-hostname", "iri", "iri-reference", "ipv4", "ipv6", "uri", "uri-reference", "uri-template", "url", "date", "time", "duration", "json-pointer", "relative-json-pointer"]); const _io0 = input => "object" === typeof input.think && null !== input.think && _io1(input.think) && (Array.isArray(input.content) && input.content.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io1 = input => "string" === typeof input.review && "string" === typeof input.plan; const _io2 = input => "string" === typeof input.specification && (null === input.authorizationType || "login" === input.authorizationType || "join" === input.authorizationType || "refresh" === input.authorizationType) && "string" === typeof input.description && "string" === typeof input.summary && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io3(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io7(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io8(input.responseBody)) && (null === input.authorizationActor || "string" === typeof input.authorizationActor && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.authorizationActor) && 1 <= input.authorizationActor.length)) && ("string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name)) && (Array.isArray(input.prerequisites) && input.prerequisites.every(elem => "object" === typeof elem && null !== elem && _io9(elem))) && ("string" === typeof input.path && RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path)) && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _io3 = input => "string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) && "string" === typeof input.description && ("object" === typeof input.schema && null !== input.schema && _iu0(input.schema)); const _io4 = 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 _io5 = 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 _io6 = input => (undefined === input.format || true === _iv4.has(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 _io7 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io8 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io9 = input => "object" === typeof input.endpoint && null !== input.endpoint && _io10(input.endpoint) && "string" === typeof input.description; const _io10 = input => "string" === typeof input.path && RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _iu0 = input => (() => {
|
|
2500
|
+
if ("number" === input.type)
|
|
2501
|
+
return _io5(input);
|
|
2502
|
+
else if ("integer" === input.type)
|
|
2503
|
+
return _io4(input);
|
|
2504
|
+
else if ("string" === input.type)
|
|
2505
|
+
return _io6(input);
|
|
2506
|
+
else
|
|
2507
|
+
return false;
|
|
2508
|
+
})(); const _vo0 = (input, _path, _exceptionable = true) => [("object" === typeof input.think && null !== input.think || _report(_exceptionable, {
|
|
2509
|
+
path: _path + ".think",
|
|
2510
|
+
expected: "IAutoBeInterfaceOperationsReviewApplication.IThink",
|
|
2511
|
+
value: input.think
|
|
2512
|
+
})) && _vo1(input.think, _path + ".think", true && _exceptionable) || _report(_exceptionable, {
|
|
2513
|
+
path: _path + ".think",
|
|
2514
|
+
expected: "IAutoBeInterfaceOperationsReviewApplication.IThink",
|
|
2515
|
+
value: input.think
|
|
2516
|
+
}), (Array.isArray(input.content) || _report(_exceptionable, {
|
|
2517
|
+
path: _path + ".content",
|
|
2518
|
+
expected: "Array<AutoBeOpenApi.IOperation>",
|
|
2519
|
+
value: input.content
|
|
2520
|
+
})) && input.content.map((elem, _index5) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
2521
|
+
path: _path + ".content[" + _index5 + "]",
|
|
2522
|
+
expected: "AutoBeOpenApi.IOperation",
|
|
2523
|
+
value: elem
|
|
2524
|
+
})) && _vo2(elem, _path + ".content[" + _index5 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
2525
|
+
path: _path + ".content[" + _index5 + "]",
|
|
2526
|
+
expected: "AutoBeOpenApi.IOperation",
|
|
2527
|
+
value: elem
|
|
2528
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
2529
|
+
path: _path + ".content",
|
|
2530
|
+
expected: "Array<AutoBeOpenApi.IOperation>",
|
|
2531
|
+
value: input.content
|
|
2532
|
+
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.review || _report(_exceptionable, {
|
|
2533
|
+
path: _path + ".review",
|
|
2534
|
+
expected: "string",
|
|
2535
|
+
value: input.review
|
|
2536
|
+
}), "string" === typeof input.plan || _report(_exceptionable, {
|
|
2537
|
+
path: _path + ".plan",
|
|
2538
|
+
expected: "string",
|
|
2539
|
+
value: input.plan
|
|
2540
|
+
})].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.specification || _report(_exceptionable, {
|
|
2541
|
+
path: _path + ".specification",
|
|
2542
|
+
expected: "string",
|
|
2543
|
+
value: input.specification
|
|
2544
|
+
}), null === input.authorizationType || "login" === input.authorizationType || "join" === input.authorizationType || "refresh" === input.authorizationType || _report(_exceptionable, {
|
|
2545
|
+
path: _path + ".authorizationType",
|
|
2546
|
+
expected: "(\"join\" | \"login\" | \"refresh\" | null)",
|
|
2547
|
+
value: input.authorizationType
|
|
2548
|
+
}), "string" === typeof input.description || _report(_exceptionable, {
|
|
2549
|
+
path: _path + ".description",
|
|
2550
|
+
expected: "string",
|
|
2551
|
+
value: input.description
|
|
2552
|
+
}), "string" === typeof input.summary || _report(_exceptionable, {
|
|
2553
|
+
path: _path + ".summary",
|
|
2554
|
+
expected: "string",
|
|
2555
|
+
value: input.summary
|
|
2556
|
+
}), (Array.isArray(input.parameters) || _report(_exceptionable, {
|
|
2557
|
+
path: _path + ".parameters",
|
|
2558
|
+
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
2559
|
+
value: input.parameters
|
|
2560
|
+
})) && input.parameters.map((elem, _index6) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
2561
|
+
path: _path + ".parameters[" + _index6 + "]",
|
|
2562
|
+
expected: "AutoBeOpenApi.IParameter",
|
|
2563
|
+
value: elem
|
|
2564
|
+
})) && _vo3(elem, _path + ".parameters[" + _index6 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
2565
|
+
path: _path + ".parameters[" + _index6 + "]",
|
|
2566
|
+
expected: "AutoBeOpenApi.IParameter",
|
|
2567
|
+
value: elem
|
|
2568
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
2569
|
+
path: _path + ".parameters",
|
|
2570
|
+
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
2571
|
+
value: input.parameters
|
|
2572
|
+
}), null === input.requestBody || ("object" === typeof input.requestBody && null !== input.requestBody || _report(_exceptionable, {
|
|
2573
|
+
path: _path + ".requestBody",
|
|
2574
|
+
expected: "(AutoBeOpenApi.IRequestBody | null)",
|
|
2575
|
+
value: input.requestBody
|
|
2576
|
+
})) && _vo7(input.requestBody, _path + ".requestBody", true && _exceptionable) || _report(_exceptionable, {
|
|
2577
|
+
path: _path + ".requestBody",
|
|
2578
|
+
expected: "(AutoBeOpenApi.IRequestBody | null)",
|
|
2579
|
+
value: input.requestBody
|
|
2580
|
+
}), null === input.responseBody || ("object" === typeof input.responseBody && null !== input.responseBody || _report(_exceptionable, {
|
|
2581
|
+
path: _path + ".responseBody",
|
|
2582
|
+
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
2583
|
+
value: input.responseBody
|
|
2584
|
+
})) && _vo8(input.responseBody, _path + ".responseBody", true && _exceptionable) || _report(_exceptionable, {
|
|
2585
|
+
path: _path + ".responseBody",
|
|
2586
|
+
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
2587
|
+
value: input.responseBody
|
|
2588
|
+
}), null === input.authorizationActor || "string" === typeof input.authorizationActor && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.authorizationActor) || _report(_exceptionable, {
|
|
2589
|
+
path: _path + ".authorizationActor",
|
|
2590
|
+
expected: "string & CamelCasePattern",
|
|
2591
|
+
value: input.authorizationActor
|
|
2592
|
+
})) && (1 <= input.authorizationActor.length || _report(_exceptionable, {
|
|
2593
|
+
path: _path + ".authorizationActor",
|
|
2594
|
+
expected: "string & MinLength<1>",
|
|
2595
|
+
value: input.authorizationActor
|
|
2596
|
+
})) || _report(_exceptionable, {
|
|
2597
|
+
path: _path + ".authorizationActor",
|
|
2598
|
+
expected: "((string & CamelCasePattern & MinLength<1>) | null)",
|
|
2599
|
+
value: input.authorizationActor
|
|
2600
|
+
}), "string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
|
|
2601
|
+
path: _path + ".name",
|
|
2602
|
+
expected: "string & CamelCasePattern",
|
|
2603
|
+
value: input.name
|
|
2604
|
+
})) || _report(_exceptionable, {
|
|
2605
|
+
path: _path + ".name",
|
|
2606
|
+
expected: "(string & CamelCasePattern)",
|
|
2607
|
+
value: input.name
|
|
2608
|
+
}), (Array.isArray(input.prerequisites) || _report(_exceptionable, {
|
|
2609
|
+
path: _path + ".prerequisites",
|
|
2610
|
+
expected: "Array<AutoBeOpenApi.IPrerequisite>",
|
|
2611
|
+
value: input.prerequisites
|
|
2612
|
+
})) && input.prerequisites.map((elem, _index7) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
2613
|
+
path: _path + ".prerequisites[" + _index7 + "]",
|
|
2614
|
+
expected: "AutoBeOpenApi.IPrerequisite",
|
|
2615
|
+
value: elem
|
|
2616
|
+
})) && _vo9(elem, _path + ".prerequisites[" + _index7 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
2617
|
+
path: _path + ".prerequisites[" + _index7 + "]",
|
|
2618
|
+
expected: "AutoBeOpenApi.IPrerequisite",
|
|
2619
|
+
value: elem
|
|
2620
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
2621
|
+
path: _path + ".prerequisites",
|
|
2622
|
+
expected: "Array<AutoBeOpenApi.IPrerequisite>",
|
|
2623
|
+
value: input.prerequisites
|
|
2624
|
+
}), "string" === typeof input.path && (RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) || _report(_exceptionable, {
|
|
2625
|
+
path: _path + ".path",
|
|
2626
|
+
expected: "string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">",
|
|
2627
|
+
value: input.path
|
|
2628
|
+
})) || _report(_exceptionable, {
|
|
2629
|
+
path: _path + ".path",
|
|
2630
|
+
expected: "(string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">)",
|
|
2631
|
+
value: input.path
|
|
2632
|
+
}), "get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method || _report(_exceptionable, {
|
|
2633
|
+
path: _path + ".method",
|
|
2634
|
+
expected: "(\"delete\" | \"get\" | \"patch\" | \"post\" | \"put\")",
|
|
2635
|
+
value: input.method
|
|
2636
|
+
})].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
|
|
2637
|
+
path: _path + ".name",
|
|
2638
|
+
expected: "string & CamelCasePattern",
|
|
2639
|
+
value: input.name
|
|
2640
|
+
})) || _report(_exceptionable, {
|
|
2641
|
+
path: _path + ".name",
|
|
2642
|
+
expected: "(string & CamelCasePattern)",
|
|
2643
|
+
value: input.name
|
|
2644
|
+
}), "string" === typeof input.description || _report(_exceptionable, {
|
|
2645
|
+
path: _path + ".description",
|
|
2646
|
+
expected: "string",
|
|
2647
|
+
value: input.description
|
|
2648
|
+
}), ("object" === typeof input.schema && null !== input.schema || _report(_exceptionable, {
|
|
2649
|
+
path: _path + ".schema",
|
|
2650
|
+
expected: "(AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IString)",
|
|
2651
|
+
value: input.schema
|
|
2652
|
+
})) && _vu0(input.schema, _path + ".schema", true && _exceptionable) || _report(_exceptionable, {
|
|
2653
|
+
path: _path + ".schema",
|
|
2654
|
+
expected: "(AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IString)",
|
|
2655
|
+
value: input.schema
|
|
2656
|
+
})].every(flag => flag); const _vo4 = (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, {
|
|
2657
|
+
path: _path + ".minimum",
|
|
2658
|
+
expected: "number & Type<\"int64\">",
|
|
2659
|
+
value: input.minimum
|
|
2660
|
+
})) || _report(_exceptionable, {
|
|
2661
|
+
path: _path + ".minimum",
|
|
2662
|
+
expected: "((number & Type<\"int64\">) | undefined)",
|
|
2663
|
+
value: input.minimum
|
|
2664
|
+
}), undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000 || _report(_exceptionable, {
|
|
2665
|
+
path: _path + ".maximum",
|
|
2666
|
+
expected: "number & Type<\"int64\">",
|
|
2667
|
+
value: input.maximum
|
|
2668
|
+
})) || _report(_exceptionable, {
|
|
2669
|
+
path: _path + ".maximum",
|
|
2670
|
+
expected: "((number & Type<\"int64\">) | undefined)",
|
|
2671
|
+
value: input.maximum
|
|
2672
|
+
}), undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || _report(_exceptionable, {
|
|
2673
|
+
path: _path + ".exclusiveMinimum",
|
|
2674
|
+
expected: "(number | undefined)",
|
|
2675
|
+
value: input.exclusiveMinimum
|
|
2676
|
+
}), undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || _report(_exceptionable, {
|
|
2677
|
+
path: _path + ".exclusiveMaximum",
|
|
2678
|
+
expected: "(number | undefined)",
|
|
2679
|
+
value: input.exclusiveMaximum
|
|
2680
|
+
}), undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 || _report(_exceptionable, {
|
|
2681
|
+
path: _path + ".multipleOf",
|
|
2682
|
+
expected: "number & Type<\"uint64\">",
|
|
2683
|
+
value: input.multipleOf
|
|
2684
|
+
})) && (0 < input.multipleOf || _report(_exceptionable, {
|
|
2685
|
+
path: _path + ".multipleOf",
|
|
2686
|
+
expected: "number & ExclusiveMinimum<0>",
|
|
2687
|
+
value: input.multipleOf
|
|
2688
|
+
})) || _report(_exceptionable, {
|
|
2689
|
+
path: _path + ".multipleOf",
|
|
2690
|
+
expected: "((number & Type<\"uint64\"> & ExclusiveMinimum<0>) | undefined)",
|
|
2691
|
+
value: input.multipleOf
|
|
2692
|
+
}), "integer" === input.type || _report(_exceptionable, {
|
|
2693
|
+
path: _path + ".type",
|
|
2694
|
+
expected: "\"integer\"",
|
|
2695
|
+
value: input.type
|
|
2696
|
+
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [undefined === input.minimum || "number" === typeof input.minimum || _report(_exceptionable, {
|
|
2697
|
+
path: _path + ".minimum",
|
|
2698
|
+
expected: "(number | undefined)",
|
|
2699
|
+
value: input.minimum
|
|
2700
|
+
}), undefined === input.maximum || "number" === typeof input.maximum || _report(_exceptionable, {
|
|
2701
|
+
path: _path + ".maximum",
|
|
2702
|
+
expected: "(number | undefined)",
|
|
2703
|
+
value: input.maximum
|
|
2704
|
+
}), undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || _report(_exceptionable, {
|
|
2705
|
+
path: _path + ".exclusiveMinimum",
|
|
2706
|
+
expected: "(number | undefined)",
|
|
2707
|
+
value: input.exclusiveMinimum
|
|
2708
|
+
}), undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || _report(_exceptionable, {
|
|
2709
|
+
path: _path + ".exclusiveMaximum",
|
|
2710
|
+
expected: "(number | undefined)",
|
|
2711
|
+
value: input.exclusiveMaximum
|
|
2712
|
+
}), undefined === input.multipleOf || "number" === typeof input.multipleOf && (0 < input.multipleOf || _report(_exceptionable, {
|
|
2713
|
+
path: _path + ".multipleOf",
|
|
2714
|
+
expected: "number & ExclusiveMinimum<0>",
|
|
2715
|
+
value: input.multipleOf
|
|
2716
|
+
})) || _report(_exceptionable, {
|
|
2717
|
+
path: _path + ".multipleOf",
|
|
2718
|
+
expected: "((number & ExclusiveMinimum<0>) | undefined)",
|
|
2719
|
+
value: input.multipleOf
|
|
2720
|
+
}), "number" === input.type || _report(_exceptionable, {
|
|
2721
|
+
path: _path + ".type",
|
|
2722
|
+
expected: "\"number\"",
|
|
2723
|
+
value: input.type
|
|
2724
|
+
})].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => [undefined === input.format || true === _vv8.has(input.format) || _report(_exceptionable, {
|
|
2725
|
+
path: _path + ".format",
|
|
2726
|
+
expected: "(\"date\" | \"date-time\" | \"duration\" | \"email\" | \"hostname\" | \"idn-email\" | \"idn-hostname\" | \"ipv4\" | \"ipv6\" | \"iri\" | \"iri-reference\" | \"json-pointer\" | \"password\" | \"regex\" | \"relative-json-pointer\" | \"time\" | \"uri\" | \"uri-reference\" | \"uri-template\" | \"url\" | \"uuid\" | undefined)",
|
|
2727
|
+
value: input.format
|
|
2728
|
+
}), undefined === input.pattern || "string" === typeof input.pattern || _report(_exceptionable, {
|
|
2729
|
+
path: _path + ".pattern",
|
|
2730
|
+
expected: "(string | undefined)",
|
|
2731
|
+
value: input.pattern
|
|
2732
|
+
}), undefined === input.contentMediaType || "string" === typeof input.contentMediaType || _report(_exceptionable, {
|
|
2733
|
+
path: _path + ".contentMediaType",
|
|
2734
|
+
expected: "(string | undefined)",
|
|
2735
|
+
value: input.contentMediaType
|
|
2736
|
+
}), undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000 || _report(_exceptionable, {
|
|
2737
|
+
path: _path + ".minLength",
|
|
2738
|
+
expected: "number & Type<\"uint64\">",
|
|
2739
|
+
value: input.minLength
|
|
2740
|
+
})) || _report(_exceptionable, {
|
|
2741
|
+
path: _path + ".minLength",
|
|
2742
|
+
expected: "((number & Type<\"uint64\">) | undefined)",
|
|
2743
|
+
value: input.minLength
|
|
2744
|
+
}), undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000 || _report(_exceptionable, {
|
|
2745
|
+
path: _path + ".maxLength",
|
|
2746
|
+
expected: "number & Type<\"uint64\">",
|
|
2747
|
+
value: input.maxLength
|
|
2748
|
+
})) || _report(_exceptionable, {
|
|
2749
|
+
path: _path + ".maxLength",
|
|
2750
|
+
expected: "((number & Type<\"uint64\">) | undefined)",
|
|
2751
|
+
value: input.maxLength
|
|
2752
|
+
}), "string" === input.type || _report(_exceptionable, {
|
|
2753
|
+
path: _path + ".type",
|
|
2754
|
+
expected: "\"string\"",
|
|
2755
|
+
value: input.type
|
|
2756
|
+
})].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
2757
|
+
path: _path + ".description",
|
|
2758
|
+
expected: "string",
|
|
2759
|
+
value: input.description
|
|
2760
|
+
}), "string" === typeof input.typeName || _report(_exceptionable, {
|
|
2761
|
+
path: _path + ".typeName",
|
|
2762
|
+
expected: "string",
|
|
2763
|
+
value: input.typeName
|
|
2764
|
+
})].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
2765
|
+
path: _path + ".description",
|
|
2766
|
+
expected: "string",
|
|
2767
|
+
value: input.description
|
|
2768
|
+
}), "string" === typeof input.typeName || _report(_exceptionable, {
|
|
2769
|
+
path: _path + ".typeName",
|
|
2770
|
+
expected: "string",
|
|
2771
|
+
value: input.typeName
|
|
2772
|
+
})].every(flag => flag); const _vo9 = (input, _path, _exceptionable = true) => [("object" === typeof input.endpoint && null !== input.endpoint || _report(_exceptionable, {
|
|
2773
|
+
path: _path + ".endpoint",
|
|
2774
|
+
expected: "AutoBeOpenApi.IEndpoint",
|
|
2775
|
+
value: input.endpoint
|
|
2776
|
+
})) && _vo10(input.endpoint, _path + ".endpoint", true && _exceptionable) || _report(_exceptionable, {
|
|
2777
|
+
path: _path + ".endpoint",
|
|
2778
|
+
expected: "AutoBeOpenApi.IEndpoint",
|
|
2779
|
+
value: input.endpoint
|
|
2780
|
+
}), "string" === typeof input.description || _report(_exceptionable, {
|
|
2781
|
+
path: _path + ".description",
|
|
2782
|
+
expected: "string",
|
|
2783
|
+
value: input.description
|
|
2784
|
+
})].every(flag => flag); const _vo10 = (input, _path, _exceptionable = true) => ["string" === typeof input.path && (RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) || _report(_exceptionable, {
|
|
2785
|
+
path: _path + ".path",
|
|
2786
|
+
expected: "string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">",
|
|
2787
|
+
value: input.path
|
|
2788
|
+
})) || _report(_exceptionable, {
|
|
2789
|
+
path: _path + ".path",
|
|
2790
|
+
expected: "(string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">)",
|
|
2791
|
+
value: input.path
|
|
2792
|
+
}), "get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method || _report(_exceptionable, {
|
|
2793
|
+
path: _path + ".method",
|
|
2794
|
+
expected: "(\"delete\" | \"get\" | \"patch\" | \"post\" | \"put\")",
|
|
2795
|
+
value: input.method
|
|
2796
|
+
})].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
2797
|
+
if ("number" === input.type)
|
|
2798
|
+
return _vo5(input, _path, true && _exceptionable);
|
|
2799
|
+
else if ("integer" === input.type)
|
|
2800
|
+
return _vo4(input, _path, true && _exceptionable);
|
|
2801
|
+
else if ("string" === input.type)
|
|
2802
|
+
return _vo6(input, _path, true && _exceptionable);
|
|
2803
|
+
else
|
|
2804
|
+
return _report(_exceptionable, {
|
|
2805
|
+
path: _path,
|
|
2806
|
+
expected: "(AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.IString)",
|
|
2807
|
+
value: input
|
|
2808
|
+
});
|
|
2809
|
+
})(); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
2810
|
+
if (false === __is(input)) {
|
|
2811
|
+
errors = [];
|
|
2812
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
2813
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
2814
|
+
path: _path + "",
|
|
2815
|
+
expected: "IAutoBeInterfaceOperationsReviewApplication.IProps",
|
|
2816
|
+
value: input
|
|
2817
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
2818
|
+
path: _path + "",
|
|
2819
|
+
expected: "IAutoBeInterfaceOperationsReviewApplication.IProps",
|
|
2820
|
+
value: input
|
|
2821
|
+
}))(input, "$input", true);
|
|
2822
|
+
const success = 0 === errors.length;
|
|
2823
|
+
return success ? {
|
|
2824
|
+
success,
|
|
2825
|
+
data: input
|
|
2826
|
+
} : {
|
|
2827
|
+
success,
|
|
2828
|
+
errors,
|
|
2829
|
+
data: input
|
|
2830
|
+
};
|
|
2831
|
+
}
|
|
2832
|
+
return {
|
|
2833
|
+
success: true,
|
|
2834
|
+
data: input
|
|
2835
|
+
};
|
|
2836
|
+
}; })()
|
|
2837
|
+
}
|
|
2838
|
+
]
|
|
2839
|
+
};
|
|
2840
|
+
__typia_transform__llmApplicationFinalize._llmApplicationFinalize(application, Object.assign(Object.assign({}, {
|
|
2841
|
+
validate: {
|
|
2842
|
+
reviewOperations: validate,
|
|
2843
|
+
},
|
|
2844
|
+
}), { equals: false }));
|
|
2845
|
+
return application;
|
|
2846
|
+
})(),
|
|
2065
2847
|
};
|
|
2066
2848
|
//# sourceMappingURL=orchestrateInterfaceOperationsReview.js.map
|