@autobe/agent 0.21.0 → 0.22.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/agent/src/AutoBeAgent.js +2 -2
- package/lib/agent/src/AutoBeAgent.js.map +1 -1
- package/lib/agent/src/constants/AutoBeConfigConstant.d.ts +3 -0
- package/lib/agent/src/{orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.js → constants/AutoBeConfigConstant.js} +1 -1
- package/lib/agent/src/constants/AutoBeConfigConstant.js.map +1 -0
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.d.ts +27 -27
- package/lib/agent/src/context/AutoBeContext.d.ts +1 -0
- package/lib/agent/src/context/AutoBeTokenUsageComponent.js +4 -3
- package/lib/agent/src/context/AutoBeTokenUsageComponent.js.map +1 -1
- package/lib/agent/src/factory/consentFunctionCall.js +4 -4
- package/lib/agent/src/factory/consentFunctionCall.js.map +1 -1
- package/lib/agent/src/factory/createAutoBeContext.js +13 -10
- package/lib/agent/src/factory/createAutoBeContext.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +2 -2
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js +6 -6
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js +50 -8
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js +4 -4
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +6 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +4 -0
- package/lib/agent/src/orchestrate/facade/transformFacadeStateMessage.js +1 -1
- package/lib/agent/src/orchestrate/facade/transformFacadeStateMessage.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +19 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js +3 -3
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js +2 -2
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js +2 -2
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +2 -2
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.d.ts +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +2 -2
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js +5 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js +16 -10
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.d.ts +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js +3731 -228
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js +2 -2
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.js +2 -2
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js +43 -63
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js +1261 -1628
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js +3468 -105
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +6 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js +3674 -360
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +0 -38
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +48 -141
- package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +29 -23
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaFactory.d.ts +9 -0
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaFactory.js +1385 -0
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaFactory.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaNamingConvention.d.ts +5 -0
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaNamingConvention.js +78 -0
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaNamingConvention.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaValidator.d.ts +10 -0
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaValidator.js +59 -0
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaValidator.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.d.ts +2 -0
- package/lib/agent/src/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.js +81 -0
- package/lib/agent/src/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js +2 -2
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.d.ts +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js +2 -2
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js +2 -2
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +6 -6
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js +22 -7
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +5 -8
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js +13 -29
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.d.ts +2 -2
- package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.js +2 -8
- package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js +6 -49
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js +4 -2
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +5 -3
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.d.ts +13 -6
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js +206 -118
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.d.ts +2 -2
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.d.ts +2 -2
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js +24 -39
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +17 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts +20 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.d.ts +33 -73
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.d.ts +5 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.js +3 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.js.map +1 -0
- package/{src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.ts → lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.d.ts} +2 -13
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.js +3 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +33 -22
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteCodeTemplate.d.ts +31 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteCodeTemplate.js +86 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteCodeTemplate.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteDto.d.ts +4 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteDto.js +55 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteDto.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteImportStatements.d.ts +2 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteImportStatements.js +20 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteImportStatements.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteInputType.d.ts +30 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteInputType.js +73 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteInputType.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.d.ts +6 -2
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js +63 -69
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js.map +1 -1
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.d.ts +3 -1
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.js +25 -18
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.js.map +1 -1
- package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.js +5 -1
- package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.js.map +1 -1
- package/lib/agent/src/orchestrate/test/compile/getTestImportStatements.d.ts +2 -0
- package/lib/agent/src/orchestrate/test/compile/getTestImportStatements.js +19 -0
- package/lib/agent/src/orchestrate/test/compile/getTestImportStatements.js.map +1 -0
- package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.d.ts +1 -1
- package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.js +2 -0
- package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.js.map +1 -1
- package/lib/agent/src/orchestrate/test/compile/getTestTemplateCode.d.ts +2 -0
- package/lib/agent/src/orchestrate/test/compile/getTestTemplateCode.js +21 -0
- package/lib/agent/src/orchestrate/test/compile/getTestTemplateCode.js.map +1 -0
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.d.ts +2 -2
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js +16 -17
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js +5 -4
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js +21 -2
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTest.js +6 -0
- package/lib/agent/src/orchestrate/test/orchestrateTest.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.d.ts +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js +123 -75
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js +46 -40
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js +117 -45
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js.map +1 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +48 -45
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunctionFailure.d.ts +6 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunctionFailure.js +3 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunctionFailure.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.d.ts +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +13 -0
- package/lib/agent/src/orchestrate/test/utils/getReferenceIds.d.ts +5 -0
- package/lib/agent/src/orchestrate/test/utils/getReferenceIds.js +28 -0
- package/lib/agent/src/orchestrate/test/utils/getReferenceIds.js.map +1 -0
- package/lib/agent/src/structures/IAutoBeConfig.d.ts +2 -0
- package/lib/constants/AutoBeConfigConstant.d.ts +3 -0
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +27 -27
- package/lib/context/AutoBeContext.d.ts +1 -0
- package/lib/index.mjs +13871 -3912
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +6 -0
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +4 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.d.ts +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.d.ts +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +6 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +0 -38
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +48 -141
- package/lib/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +29 -23
- package/lib/orchestrate/interface/utils/JsonSchemaFactory.d.ts +9 -0
- package/lib/orchestrate/interface/utils/JsonSchemaNamingConvention.d.ts +5 -0
- package/lib/orchestrate/interface/utils/JsonSchemaValidator.d.ts +10 -0
- package/lib/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.d.ts +2 -0
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.d.ts +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +6 -6
- package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +5 -8
- package/lib/orchestrate/realize/internal/compileRealizeFiles.d.ts +2 -2
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.d.ts +13 -6
- package/lib/orchestrate/realize/orchestrateRealizeScenario.d.ts +2 -2
- package/lib/orchestrate/realize/orchestrateRealizeWrite.d.ts +2 -2
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +17 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts +20 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.d.ts +33 -73
- package/lib/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.d.ts +5 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.d.ts +36 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +33 -22
- package/lib/orchestrate/realize/utils/getRealizeWriteCodeTemplate.d.ts +31 -0
- package/lib/orchestrate/realize/utils/getRealizeWriteDto.d.ts +4 -0
- package/lib/orchestrate/realize/utils/getRealizeWriteImportStatements.d.ts +2 -0
- package/lib/orchestrate/realize/utils/getRealizeWriteInputType.d.ts +30 -0
- package/lib/orchestrate/realize/utils/replaceImportStatements.d.ts +6 -2
- package/lib/orchestrate/test/compile/completeTestCode.d.ts +3 -1
- package/lib/orchestrate/test/compile/getTestImportStatements.d.ts +2 -0
- package/lib/orchestrate/test/compile/getTestScenarioArtifacts.d.ts +1 -1
- package/lib/orchestrate/test/compile/getTestTemplateCode.d.ts +2 -0
- package/lib/orchestrate/test/histories/transformTestCorrectHistories.d.ts +2 -2
- package/lib/orchestrate/test/orchestrateTestCorrect.d.ts +1 -1
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +48 -45
- package/lib/orchestrate/test/structures/IAutoBeTestFunctionFailure.d.ts +6 -0
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.d.ts +1 -0
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +13 -0
- package/lib/orchestrate/test/utils/getReferenceIds.d.ts +5 -0
- package/lib/structures/IAutoBeConfig.d.ts +2 -0
- package/package.json +6 -6
- package/src/AutoBeAgent.ts +2 -0
- package/src/constants/AutoBeConfigConstant.ts +3 -0
- package/src/constants/AutoBeSystemPromptConstant.ts +27 -27
- package/src/context/AutoBeContext.ts +1 -0
- package/src/context/AutoBeTokenUsageComponent.ts +3 -3
- package/src/factory/consentFunctionCall.ts +2 -0
- package/src/factory/createAutoBeContext.ts +145 -136
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.ts +6 -0
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.ts +4 -0
- package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +19 -1
- package/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.ts +1 -4
- package/src/orchestrate/interface/orchestrateInterface.ts +15 -4
- package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +13 -5
- package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +58 -19
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +11 -11
- package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +13 -117
- package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +35 -93
- package/src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts +74 -97
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +0 -39
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.ts +50 -146
- package/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.ts +31 -27
- package/src/orchestrate/interface/utils/JsonSchemaFactory.ts +171 -0
- package/src/orchestrate/interface/utils/JsonSchemaNamingConvention.ts +83 -0
- package/src/orchestrate/interface/utils/JsonSchemaValidator.ts +66 -0
- package/src/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.ts +90 -0
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +1 -2
- package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +30 -15
- package/src/orchestrate/realize/histories/transformRealizeWriteHistories.ts +27 -49
- package/src/orchestrate/realize/internal/compileRealizeFiles.ts +4 -11
- package/src/orchestrate/realize/orchestrateRealize.ts +19 -75
- package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +1 -1
- package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +114 -25
- package/src/orchestrate/realize/orchestrateRealizeScenario.ts +2 -2
- package/src/orchestrate/realize/orchestrateRealizeWrite.ts +11 -15
- package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.ts +17 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.ts +20 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.ts +40 -74
- package/src/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.ts +9 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.ts +45 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.ts +33 -22
- package/src/orchestrate/realize/utils/getRealizeWriteCodeTemplate.ts +97 -0
- package/src/orchestrate/realize/utils/getRealizeWriteDto.ts +64 -0
- package/src/orchestrate/realize/utils/getRealizeWriteImportStatements.ts +29 -0
- package/src/orchestrate/realize/utils/getRealizeWriteInputType.ts +82 -0
- package/src/orchestrate/realize/utils/replaceImportStatements.ts +101 -111
- package/src/orchestrate/test/compile/completeTestCode.ts +18 -31
- package/src/orchestrate/test/compile/getTestExternalDeclarations.ts +12 -0
- package/src/orchestrate/test/compile/getTestImportStatements.ts +25 -0
- package/src/orchestrate/test/compile/getTestScenarioArtifacts.ts +6 -1
- package/src/orchestrate/test/compile/getTestTemplateCode.ts +25 -0
- package/src/orchestrate/test/histories/transformTestCorrectHistories.ts +26 -26
- package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +6 -5
- package/src/orchestrate/test/histories/transformTestWriteHistories.ts +19 -0
- package/src/orchestrate/test/orchestrateTest.ts +6 -0
- package/src/orchestrate/test/orchestrateTestCorrect.ts +44 -20
- package/src/orchestrate/test/orchestrateTestScenario.ts +52 -48
- package/src/orchestrate/test/orchestrateTestWrite.ts +20 -10
- package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +49 -46
- package/src/orchestrate/test/structures/IAutoBeTestFunctionFailure.ts +8 -0
- package/src/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.ts +1 -0
- package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +14 -0
- package/src/orchestrate/test/utils/getReferenceIds.ts +25 -0
- package/src/structures/IAutoBeConfig.ts +3 -0
- package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.d.ts +0 -7
- package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.js +0 -35
- package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +0 -38
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.js.map +0 -1
- package/lib/orchestrate/interface/utils/validateAuthorizationSchema.d.ts +0 -7
- package/lib/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +0 -38
- package/src/orchestrate/interface/utils/validateAuthorizationSchema.ts +0 -41
|
@@ -47,7 +47,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
48
|
exports.orchestrateInterfaceOperationsReview = orchestrateInterfaceOperationsReview;
|
|
49
49
|
const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport.js"));
|
|
50
|
-
const __typia_transform__llmApplicationFinalize = __importStar(require("typia/lib/internal/_llmApplicationFinalize.js"));
|
|
51
50
|
const typia_1 = __importDefault(require("typia"));
|
|
52
51
|
const uuid_1 = require("uuid");
|
|
53
52
|
const transformInterfaceOperationsReviewHistories_1 = require("./histories/transformInterfaceOperationsReviewHistories");
|
|
@@ -74,7 +73,7 @@ function orchestrateInterfaceOperationsReview(ctx, operations, progress) {
|
|
|
74
73
|
});
|
|
75
74
|
if (pointer.value === null) {
|
|
76
75
|
console.error("Failed to review operations.");
|
|
77
|
-
progress.completed
|
|
76
|
+
++progress.completed;
|
|
78
77
|
return [];
|
|
79
78
|
}
|
|
80
79
|
const content = pointer.value.content.map((op) => (Object.assign(Object.assign({}, op), { authorizationType: null })));
|
|
@@ -82,8 +81,8 @@ function orchestrateInterfaceOperationsReview(ctx, operations, progress) {
|
|
|
82
81
|
type: "interfaceOperationsReview",
|
|
83
82
|
id: (0, uuid_1.v7)(),
|
|
84
83
|
operations: content,
|
|
85
|
-
review: pointer.value.review,
|
|
86
|
-
plan: pointer.value.plan,
|
|
84
|
+
review: pointer.value.think.review,
|
|
85
|
+
plan: pointer.value.think.plan,
|
|
87
86
|
content,
|
|
88
87
|
tokenUsage,
|
|
89
88
|
created_at: new Date().toISOString(),
|
|
@@ -101,373 +100,7 @@ function orchestrateInterfaceOperationsReview(ctx, operations, progress) {
|
|
|
101
100
|
});
|
|
102
101
|
}
|
|
103
102
|
function createReviewController(props) {
|
|
104
|
-
const
|
|
105
|
-
const result = (() => { const _io0 = input => "string" === typeof input.review && "string" === typeof input.plan && (Array.isArray(input.content) && input.content.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io1 = input => "string" === typeof input.prisma_schemas && "string" === typeof input.model_name && (null === input.soft_delete_column || "string" === typeof input.soft_delete_column) && "string" === typeof input.description && ("string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name)) && "string" === typeof input.specification && "string" === typeof input.summary && ("string" === typeof input.path && RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path)) && (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.authorizationRole || "string" === typeof input.authorizationRole && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.authorizationRole) && 1 <= input.authorizationRole.length)) && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _io2 = 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 _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 => (() => {
|
|
106
|
-
if ("number" === input.type)
|
|
107
|
-
return _io4(input);
|
|
108
|
-
else if ("integer" === input.type)
|
|
109
|
-
return _io3(input);
|
|
110
|
-
else if ("string" === input.type)
|
|
111
|
-
return _io5(input);
|
|
112
|
-
else
|
|
113
|
-
return false;
|
|
114
|
-
})(); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.review || _report(_exceptionable, {
|
|
115
|
-
path: _path + ".review",
|
|
116
|
-
expected: "string",
|
|
117
|
-
value: input.review
|
|
118
|
-
}), "string" === typeof input.plan || _report(_exceptionable, {
|
|
119
|
-
path: _path + ".plan",
|
|
120
|
-
expected: "string",
|
|
121
|
-
value: input.plan
|
|
122
|
-
}), (Array.isArray(input.content) || _report(_exceptionable, {
|
|
123
|
-
path: _path + ".content",
|
|
124
|
-
expected: "Array<IAutoBeInterfaceOperationsReviewApplication.IOperation>",
|
|
125
|
-
value: input.content
|
|
126
|
-
})) && input.content.map((elem, _index3) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
127
|
-
path: _path + ".content[" + _index3 + "]",
|
|
128
|
-
expected: "IAutoBeInterfaceOperationsReviewApplication.IOperation",
|
|
129
|
-
value: elem
|
|
130
|
-
})) && _vo1(elem, _path + ".content[" + _index3 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
131
|
-
path: _path + ".content[" + _index3 + "]",
|
|
132
|
-
expected: "IAutoBeInterfaceOperationsReviewApplication.IOperation",
|
|
133
|
-
value: elem
|
|
134
|
-
})).every(flag => flag) || _report(_exceptionable, {
|
|
135
|
-
path: _path + ".content",
|
|
136
|
-
expected: "Array<IAutoBeInterfaceOperationsReviewApplication.IOperation>",
|
|
137
|
-
value: input.content
|
|
138
|
-
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.prisma_schemas || _report(_exceptionable, {
|
|
139
|
-
path: _path + ".prisma_schemas",
|
|
140
|
-
expected: "string",
|
|
141
|
-
value: input.prisma_schemas
|
|
142
|
-
}), "string" === typeof input.model_name || _report(_exceptionable, {
|
|
143
|
-
path: _path + ".model_name",
|
|
144
|
-
expected: "string",
|
|
145
|
-
value: input.model_name
|
|
146
|
-
}), null === input.soft_delete_column || "string" === typeof input.soft_delete_column || _report(_exceptionable, {
|
|
147
|
-
path: _path + ".soft_delete_column",
|
|
148
|
-
expected: "(null | string)",
|
|
149
|
-
value: input.soft_delete_column
|
|
150
|
-
}), "string" === typeof input.description || _report(_exceptionable, {
|
|
151
|
-
path: _path + ".description",
|
|
152
|
-
expected: "string",
|
|
153
|
-
value: input.description
|
|
154
|
-
}), "string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
|
|
155
|
-
path: _path + ".name",
|
|
156
|
-
expected: "string & CamelPattern",
|
|
157
|
-
value: input.name
|
|
158
|
-
})) || _report(_exceptionable, {
|
|
159
|
-
path: _path + ".name",
|
|
160
|
-
expected: "(string & CamelPattern)",
|
|
161
|
-
value: input.name
|
|
162
|
-
}), "string" === typeof input.specification || _report(_exceptionable, {
|
|
163
|
-
path: _path + ".specification",
|
|
164
|
-
expected: "string",
|
|
165
|
-
value: input.specification
|
|
166
|
-
}), "string" === typeof input.summary || _report(_exceptionable, {
|
|
167
|
-
path: _path + ".summary",
|
|
168
|
-
expected: "string",
|
|
169
|
-
value: input.summary
|
|
170
|
-
}), "string" === typeof input.path && (RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) || _report(_exceptionable, {
|
|
171
|
-
path: _path + ".path",
|
|
172
|
-
expected: "string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">",
|
|
173
|
-
value: input.path
|
|
174
|
-
})) || _report(_exceptionable, {
|
|
175
|
-
path: _path + ".path",
|
|
176
|
-
expected: "(string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">)",
|
|
177
|
-
value: input.path
|
|
178
|
-
}), (Array.isArray(input.parameters) || _report(_exceptionable, {
|
|
179
|
-
path: _path + ".parameters",
|
|
180
|
-
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
181
|
-
value: input.parameters
|
|
182
|
-
})) && input.parameters.map((elem, _index4) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
183
|
-
path: _path + ".parameters[" + _index4 + "]",
|
|
184
|
-
expected: "AutoBeOpenApi.IParameter",
|
|
185
|
-
value: elem
|
|
186
|
-
})) && _vo2(elem, _path + ".parameters[" + _index4 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
187
|
-
path: _path + ".parameters[" + _index4 + "]",
|
|
188
|
-
expected: "AutoBeOpenApi.IParameter",
|
|
189
|
-
value: elem
|
|
190
|
-
})).every(flag => flag) || _report(_exceptionable, {
|
|
191
|
-
path: _path + ".parameters",
|
|
192
|
-
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
193
|
-
value: input.parameters
|
|
194
|
-
}), null === input.requestBody || ("object" === typeof input.requestBody && null !== input.requestBody || _report(_exceptionable, {
|
|
195
|
-
path: _path + ".requestBody",
|
|
196
|
-
expected: "(AutoBeOpenApi.IRequestBody | null)",
|
|
197
|
-
value: input.requestBody
|
|
198
|
-
})) && _vo6(input.requestBody, _path + ".requestBody", true && _exceptionable) || _report(_exceptionable, {
|
|
199
|
-
path: _path + ".requestBody",
|
|
200
|
-
expected: "(AutoBeOpenApi.IRequestBody | null)",
|
|
201
|
-
value: input.requestBody
|
|
202
|
-
}), null === input.responseBody || ("object" === typeof input.responseBody && null !== input.responseBody || _report(_exceptionable, {
|
|
203
|
-
path: _path + ".responseBody",
|
|
204
|
-
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
205
|
-
value: input.responseBody
|
|
206
|
-
})) && _vo7(input.responseBody, _path + ".responseBody", true && _exceptionable) || _report(_exceptionable, {
|
|
207
|
-
path: _path + ".responseBody",
|
|
208
|
-
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
209
|
-
value: input.responseBody
|
|
210
|
-
}), null === input.authorizationRole || "string" === typeof input.authorizationRole && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.authorizationRole) || _report(_exceptionable, {
|
|
211
|
-
path: _path + ".authorizationRole",
|
|
212
|
-
expected: "string & CamelPattern",
|
|
213
|
-
value: input.authorizationRole
|
|
214
|
-
})) && (1 <= input.authorizationRole.length || _report(_exceptionable, {
|
|
215
|
-
path: _path + ".authorizationRole",
|
|
216
|
-
expected: "string & MinLength<1>",
|
|
217
|
-
value: input.authorizationRole
|
|
218
|
-
})) || _report(_exceptionable, {
|
|
219
|
-
path: _path + ".authorizationRole",
|
|
220
|
-
expected: "((string & CamelPattern & MinLength<1>) | null)",
|
|
221
|
-
value: input.authorizationRole
|
|
222
|
-
}), "get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method || _report(_exceptionable, {
|
|
223
|
-
path: _path + ".method",
|
|
224
|
-
expected: "(\"delete\" | \"get\" | \"patch\" | \"post\" | \"put\")",
|
|
225
|
-
value: input.method
|
|
226
|
-
})].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
|
|
227
|
-
path: _path + ".name",
|
|
228
|
-
expected: "string & CamelPattern",
|
|
229
|
-
value: input.name
|
|
230
|
-
})) || _report(_exceptionable, {
|
|
231
|
-
path: _path + ".name",
|
|
232
|
-
expected: "(string & CamelPattern)",
|
|
233
|
-
value: input.name
|
|
234
|
-
}), "string" === typeof input.description || _report(_exceptionable, {
|
|
235
|
-
path: _path + ".description",
|
|
236
|
-
expected: "string",
|
|
237
|
-
value: input.description
|
|
238
|
-
}), ("object" === typeof input.schema && null !== input.schema || _report(_exceptionable, {
|
|
239
|
-
path: _path + ".schema",
|
|
240
|
-
expected: "(AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IString)",
|
|
241
|
-
value: input.schema
|
|
242
|
-
})) && _vu0(input.schema, _path + ".schema", true && _exceptionable) || _report(_exceptionable, {
|
|
243
|
-
path: _path + ".schema",
|
|
244
|
-
expected: "(AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IString)",
|
|
245
|
-
value: input.schema
|
|
246
|
-
})].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, {
|
|
247
|
-
path: _path + ".minimum",
|
|
248
|
-
expected: "number & Type<\"int64\">",
|
|
249
|
-
value: input.minimum
|
|
250
|
-
})) || _report(_exceptionable, {
|
|
251
|
-
path: _path + ".minimum",
|
|
252
|
-
expected: "((number & Type<\"int64\">) | undefined)",
|
|
253
|
-
value: input.minimum
|
|
254
|
-
}), undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000 || _report(_exceptionable, {
|
|
255
|
-
path: _path + ".maximum",
|
|
256
|
-
expected: "number & Type<\"int64\">",
|
|
257
|
-
value: input.maximum
|
|
258
|
-
})) || _report(_exceptionable, {
|
|
259
|
-
path: _path + ".maximum",
|
|
260
|
-
expected: "((number & Type<\"int64\">) | undefined)",
|
|
261
|
-
value: input.maximum
|
|
262
|
-
}), undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || _report(_exceptionable, {
|
|
263
|
-
path: _path + ".exclusiveMinimum",
|
|
264
|
-
expected: "(number | undefined)",
|
|
265
|
-
value: input.exclusiveMinimum
|
|
266
|
-
}), undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || _report(_exceptionable, {
|
|
267
|
-
path: _path + ".exclusiveMaximum",
|
|
268
|
-
expected: "(number | undefined)",
|
|
269
|
-
value: input.exclusiveMaximum
|
|
270
|
-
}), undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 || _report(_exceptionable, {
|
|
271
|
-
path: _path + ".multipleOf",
|
|
272
|
-
expected: "number & Type<\"uint64\">",
|
|
273
|
-
value: input.multipleOf
|
|
274
|
-
})) && (0 < input.multipleOf || _report(_exceptionable, {
|
|
275
|
-
path: _path + ".multipleOf",
|
|
276
|
-
expected: "number & ExclusiveMinimum<0>",
|
|
277
|
-
value: input.multipleOf
|
|
278
|
-
})) || _report(_exceptionable, {
|
|
279
|
-
path: _path + ".multipleOf",
|
|
280
|
-
expected: "((number & Type<\"uint64\"> & ExclusiveMinimum<0>) | undefined)",
|
|
281
|
-
value: input.multipleOf
|
|
282
|
-
}), "integer" === input.type || _report(_exceptionable, {
|
|
283
|
-
path: _path + ".type",
|
|
284
|
-
expected: "\"integer\"",
|
|
285
|
-
value: input.type
|
|
286
|
-
})].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => [undefined === input.minimum || "number" === typeof input.minimum || _report(_exceptionable, {
|
|
287
|
-
path: _path + ".minimum",
|
|
288
|
-
expected: "(number | undefined)",
|
|
289
|
-
value: input.minimum
|
|
290
|
-
}), undefined === input.maximum || "number" === typeof input.maximum || _report(_exceptionable, {
|
|
291
|
-
path: _path + ".maximum",
|
|
292
|
-
expected: "(number | undefined)",
|
|
293
|
-
value: input.maximum
|
|
294
|
-
}), undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || _report(_exceptionable, {
|
|
295
|
-
path: _path + ".exclusiveMinimum",
|
|
296
|
-
expected: "(number | undefined)",
|
|
297
|
-
value: input.exclusiveMinimum
|
|
298
|
-
}), undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || _report(_exceptionable, {
|
|
299
|
-
path: _path + ".exclusiveMaximum",
|
|
300
|
-
expected: "(number | undefined)",
|
|
301
|
-
value: input.exclusiveMaximum
|
|
302
|
-
}), undefined === input.multipleOf || "number" === typeof input.multipleOf && (0 < input.multipleOf || _report(_exceptionable, {
|
|
303
|
-
path: _path + ".multipleOf",
|
|
304
|
-
expected: "number & ExclusiveMinimum<0>",
|
|
305
|
-
value: input.multipleOf
|
|
306
|
-
})) || _report(_exceptionable, {
|
|
307
|
-
path: _path + ".multipleOf",
|
|
308
|
-
expected: "((number & ExclusiveMinimum<0>) | undefined)",
|
|
309
|
-
value: input.multipleOf
|
|
310
|
-
}), "number" === input.type || _report(_exceptionable, {
|
|
311
|
-
path: _path + ".type",
|
|
312
|
-
expected: "\"number\"",
|
|
313
|
-
value: input.type
|
|
314
|
-
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [undefined === input.format || "string" === typeof input.format || _report(_exceptionable, {
|
|
315
|
-
path: _path + ".format",
|
|
316
|
-
expected: "(string | undefined)",
|
|
317
|
-
value: input.format
|
|
318
|
-
}), undefined === input.pattern || "string" === typeof input.pattern || _report(_exceptionable, {
|
|
319
|
-
path: _path + ".pattern",
|
|
320
|
-
expected: "(string | undefined)",
|
|
321
|
-
value: input.pattern
|
|
322
|
-
}), undefined === input.contentMediaType || "string" === typeof input.contentMediaType || _report(_exceptionable, {
|
|
323
|
-
path: _path + ".contentMediaType",
|
|
324
|
-
expected: "(string | undefined)",
|
|
325
|
-
value: input.contentMediaType
|
|
326
|
-
}), undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000 || _report(_exceptionable, {
|
|
327
|
-
path: _path + ".minLength",
|
|
328
|
-
expected: "number & Type<\"uint64\">",
|
|
329
|
-
value: input.minLength
|
|
330
|
-
})) || _report(_exceptionable, {
|
|
331
|
-
path: _path + ".minLength",
|
|
332
|
-
expected: "((number & Type<\"uint64\">) | undefined)",
|
|
333
|
-
value: input.minLength
|
|
334
|
-
}), undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000 || _report(_exceptionable, {
|
|
335
|
-
path: _path + ".maxLength",
|
|
336
|
-
expected: "number & Type<\"uint64\">",
|
|
337
|
-
value: input.maxLength
|
|
338
|
-
})) || _report(_exceptionable, {
|
|
339
|
-
path: _path + ".maxLength",
|
|
340
|
-
expected: "((number & Type<\"uint64\">) | undefined)",
|
|
341
|
-
value: input.maxLength
|
|
342
|
-
}), "string" === input.type || _report(_exceptionable, {
|
|
343
|
-
path: _path + ".type",
|
|
344
|
-
expected: "\"string\"",
|
|
345
|
-
value: input.type
|
|
346
|
-
})].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
347
|
-
path: _path + ".description",
|
|
348
|
-
expected: "string",
|
|
349
|
-
value: input.description
|
|
350
|
-
}), "string" === typeof input.typeName || _report(_exceptionable, {
|
|
351
|
-
path: _path + ".typeName",
|
|
352
|
-
expected: "string",
|
|
353
|
-
value: input.typeName
|
|
354
|
-
})].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
355
|
-
path: _path + ".description",
|
|
356
|
-
expected: "string",
|
|
357
|
-
value: input.description
|
|
358
|
-
}), "string" === typeof input.typeName || _report(_exceptionable, {
|
|
359
|
-
path: _path + ".typeName",
|
|
360
|
-
expected: "string",
|
|
361
|
-
value: input.typeName
|
|
362
|
-
})].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
363
|
-
if ("number" === input.type)
|
|
364
|
-
return _vo4(input, _path, true && _exceptionable);
|
|
365
|
-
else if ("integer" === input.type)
|
|
366
|
-
return _vo3(input, _path, true && _exceptionable);
|
|
367
|
-
else if ("string" === input.type)
|
|
368
|
-
return _vo5(input, _path, true && _exceptionable);
|
|
369
|
-
else
|
|
370
|
-
return _report(_exceptionable, {
|
|
371
|
-
path: _path,
|
|
372
|
-
expected: "(AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.IString)",
|
|
373
|
-
value: input
|
|
374
|
-
});
|
|
375
|
-
})(); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
376
|
-
if (false === __is(input)) {
|
|
377
|
-
errors = [];
|
|
378
|
-
_report = __typia_transform__validateReport._validateReport(errors);
|
|
379
|
-
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
380
|
-
path: _path + "",
|
|
381
|
-
expected: "IAutoBeInterfaceOperationsReviewApplication.IProps",
|
|
382
|
-
value: input
|
|
383
|
-
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
384
|
-
path: _path + "",
|
|
385
|
-
expected: "IAutoBeInterfaceOperationsReviewApplication.IProps",
|
|
386
|
-
value: input
|
|
387
|
-
}))(input, "$input", true);
|
|
388
|
-
const success = 0 === errors.length;
|
|
389
|
-
return success ? {
|
|
390
|
-
success,
|
|
391
|
-
data: input
|
|
392
|
-
} : {
|
|
393
|
-
success,
|
|
394
|
-
errors,
|
|
395
|
-
data: input
|
|
396
|
-
};
|
|
397
|
-
}
|
|
398
|
-
return {
|
|
399
|
-
success: true,
|
|
400
|
-
data: input
|
|
401
|
-
};
|
|
402
|
-
}; })()(next);
|
|
403
|
-
if (result.success === false)
|
|
404
|
-
return result;
|
|
405
|
-
const errors = [];
|
|
406
|
-
const models = props.prismaSchemas.flatMap((schema) => schema.models);
|
|
407
|
-
result.data.content.forEach((op, index) => {
|
|
408
|
-
// Check if summary or description mentions soft delete
|
|
409
|
-
const mentionsSoftDelete = (op.summary && /soft[\s-]?delet/i.test(op.summary)) ||
|
|
410
|
-
(op.description && /soft[\s-]?delet/i.test(op.description));
|
|
411
|
-
if (op.method === "delete") {
|
|
412
|
-
const model = models.find((model) => model.name === op.model_name);
|
|
413
|
-
if (mentionsSoftDelete) {
|
|
414
|
-
// If soft delete is mentioned but no soft_delete_column is specified
|
|
415
|
-
if (!op.soft_delete_column) {
|
|
416
|
-
// Check if any soft-delete capable column exists in the model
|
|
417
|
-
const hasSoftDeleteCapableColumn = model === null || model === void 0 ? void 0 : model.plainFields.some((field) => /delete|deleted|deleted_at|deletedAt|is_deleted|isDeleted/i.test(field.name));
|
|
418
|
-
if (hasSoftDeleteCapableColumn) {
|
|
419
|
-
errors.push({
|
|
420
|
-
expected: `Soft delete column to be specified or summary/description to not mention soft delete`,
|
|
421
|
-
value: "null",
|
|
422
|
-
description: `Mismatch: Operation mentions soft delete but soft_delete_column is not specified, while model has soft-delete capable columns`,
|
|
423
|
-
path: `$input.content[${index}].soft_delete_column`,
|
|
424
|
-
});
|
|
425
|
-
}
|
|
426
|
-
else {
|
|
427
|
-
errors.push({
|
|
428
|
-
expected: `Summary/description to not mention soft delete when model lacks soft-delete capability`,
|
|
429
|
-
value: `${op.summary || ""} ${op.description || ""}`,
|
|
430
|
-
description: `Mismatch: Operation mentions soft delete but model '${op.model_name}' has no soft-delete capable columns`,
|
|
431
|
-
path: `$input.content[${index}].summary || $input.content[${index}].description`,
|
|
432
|
-
});
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
else {
|
|
436
|
-
// If soft_delete_column is specified, check if it exists in the model
|
|
437
|
-
const column = model === null || model === void 0 ? void 0 : model.plainFields.find((el) => el.name === op.soft_delete_column);
|
|
438
|
-
if (!column) {
|
|
439
|
-
errors.push({
|
|
440
|
-
expected: `Field '${op.soft_delete_column}' to exist in model or operation to not mention soft delete`,
|
|
441
|
-
value: "undefined",
|
|
442
|
-
description: `Mismatch: Either the field '${op.soft_delete_column}' should exist in model '${op.model_name}', or the operation should not mention soft delete`,
|
|
443
|
-
path: `$input.content[${index}].soft_delete_column || $input.content[${index}].summary || $input.content[${index}].description`,
|
|
444
|
-
});
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
// Also check if soft_delete_column is specified without mentioning soft delete
|
|
449
|
-
if (op.soft_delete_column && !mentionsSoftDelete) {
|
|
450
|
-
errors.push({
|
|
451
|
-
expected: `Consistency between soft_delete_column and operation description`,
|
|
452
|
-
value: `soft_delete_column: ${op.soft_delete_column}`,
|
|
453
|
-
description: `Mismatch: soft_delete_column is specified but soft delete is not mentioned in summary/description`,
|
|
454
|
-
path: `$input.content[${index}]`,
|
|
455
|
-
});
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
});
|
|
459
|
-
// not implemented
|
|
460
|
-
if (errors.length !== 0) {
|
|
461
|
-
console.log(JSON.stringify(errors, null, 2));
|
|
462
|
-
return {
|
|
463
|
-
success: false,
|
|
464
|
-
errors,
|
|
465
|
-
data: next,
|
|
466
|
-
};
|
|
467
|
-
}
|
|
468
|
-
return result;
|
|
469
|
-
};
|
|
470
|
-
const application = collection[props.model === "chatgpt" ? "chatgpt" : "claude"](validate);
|
|
103
|
+
const application = collection[props.model === "chatgpt" ? "chatgpt" : "claude"];
|
|
471
104
|
return {
|
|
472
105
|
protocol: "class",
|
|
473
106
|
name: "review",
|
|
@@ -480,1304 +113,1304 @@ function createReviewController(props) {
|
|
|
480
113
|
};
|
|
481
114
|
}
|
|
482
115
|
const collection = {
|
|
483
|
-
chatgpt:
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
},
|
|
506
|
-
content: {
|
|
507
|
-
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.",
|
|
508
|
-
type: "array",
|
|
509
|
-
items: {
|
|
510
|
-
$ref: "#/$defs/IAutoBeInterfaceOperationsReviewApplication.IOperation"
|
|
511
|
-
}
|
|
116
|
+
chatgpt: {
|
|
117
|
+
model: "chatgpt",
|
|
118
|
+
options: {
|
|
119
|
+
reference: true,
|
|
120
|
+
strict: false,
|
|
121
|
+
separate: null
|
|
122
|
+
},
|
|
123
|
+
functions: [
|
|
124
|
+
{
|
|
125
|
+
name: "reviewOperations",
|
|
126
|
+
parameters: {
|
|
127
|
+
description: " Properties containing the thinking process (review & plan)\nand the 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 AutoBeInterfaceOperationsReviewEvent.\n\n### Description of {@link think} property:\n\n> Comprehensive thinking process for API operation review.\n> \n> Encapsulates the agent's analytical review findings and actionable\n> improvement plan. This structured thinking process ensures systematic\n> evaluation of API operations against AutoBE's quality standards before\n> generating the final enhanced operations.",
|
|
128
|
+
type: "object",
|
|
129
|
+
properties: {
|
|
130
|
+
think: {
|
|
131
|
+
$ref: "#/$defs/IAutoBeInterfaceOperationsReviewApplication.IThink"
|
|
132
|
+
},
|
|
133
|
+
content: {
|
|
134
|
+
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.",
|
|
135
|
+
type: "array",
|
|
136
|
+
items: {
|
|
137
|
+
$ref: "#/$defs/AutoBeOpenApi.IOperation"
|
|
512
138
|
}
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
required: [
|
|
142
|
+
"think",
|
|
143
|
+
"content"
|
|
144
|
+
],
|
|
145
|
+
additionalProperties: false,
|
|
146
|
+
$defs: {
|
|
147
|
+
"IAutoBeInterfaceOperationsReviewApplication.IThink": {
|
|
148
|
+
description: "Structured thinking process for comprehensive API operation review.\n\nCombines analytical review findings with actionable improvement planning\nto guide the systematic enhancement of API operations. This thinking\nstructure ensures all aspects of API quality are evaluated and addressed\nbefore producing the final operations.",
|
|
149
|
+
type: "object",
|
|
150
|
+
properties: {
|
|
151
|
+
review: {
|
|
152
|
+
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.",
|
|
153
|
+
type: "string"
|
|
154
|
+
},
|
|
155
|
+
plan: {
|
|
156
|
+
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.",
|
|
157
|
+
type: "string"
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
required: [
|
|
161
|
+
"review",
|
|
162
|
+
"plan"
|
|
163
|
+
]
|
|
513
164
|
},
|
|
514
|
-
|
|
515
|
-
"
|
|
516
|
-
"
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
anyOf: [
|
|
536
|
-
{
|
|
537
|
-
type: "null"
|
|
538
|
-
},
|
|
539
|
-
{
|
|
540
|
-
type: "string"
|
|
541
|
-
}
|
|
542
|
-
]
|
|
543
|
-
},
|
|
544
|
-
description: {
|
|
545
|
-
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**:\nDO NOT use terms like \"soft delete\", \"soft-delete\", or similar variations\nin this description UNLESS the operation actually implements soft deletion.\nThese keywords trigger validation logic that expects a corresponding\nsoft_delete_column to be specified. Only use these terms when you intend\nto implement soft deletion (marking records as deleted without removing\nthem from the database).\n\nExample of problematic description:\n\u274C \"This would normally be a soft-delete, but we intentionally perform\npermanent deletion here\" - This triggers soft delete validation despite\nbeing a hard delete operation.\n\n> MUST be written in English. Never use other languages.",
|
|
546
|
-
type: "string"
|
|
547
|
-
},
|
|
548
|
-
name: {
|
|
549
|
-
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.\n\n\n@pattern ^[a-z][a-zA-Z0-9]*$",
|
|
550
|
-
type: "string"
|
|
551
|
-
},
|
|
552
|
-
specification: {
|
|
553
|
-
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.",
|
|
554
|
-
type: "string"
|
|
555
|
-
},
|
|
556
|
-
summary: {
|
|
557
|
-
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**:\nDO NOT use terms like \"soft delete\", \"soft-delete\", or similar variations\nin this summary UNLESS the operation actually implements soft deletion.\nThese keywords trigger validation logic that expects a corresponding\nsoft_delete_column to be specified. Only use these terms when you intend\nto implement soft deletion (marking records as deleted without removing\nthem from the database).\n\n> MUST be written in English. Never use other languages",
|
|
558
|
-
type: "string"
|
|
559
|
-
},
|
|
560
|
-
path: {
|
|
561
|
-
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)\n\n\n@pattern ^\\/[a-zA-Z0-9\\/_{}.-]*$",
|
|
562
|
-
type: "string"
|
|
563
|
-
},
|
|
564
|
-
parameters: {
|
|
565
|
-
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`",
|
|
566
|
-
type: "array",
|
|
567
|
-
items: {
|
|
568
|
-
$ref: "#/$defs/AutoBeOpenApi.IParameter"
|
|
165
|
+
"AutoBeOpenApi.IOperation": {
|
|
166
|
+
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```",
|
|
167
|
+
type: "object",
|
|
168
|
+
properties: {
|
|
169
|
+
specification: {
|
|
170
|
+
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.",
|
|
171
|
+
type: "string"
|
|
172
|
+
},
|
|
173
|
+
authorizationType: {
|
|
174
|
+
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`",
|
|
175
|
+
anyOf: [
|
|
176
|
+
{
|
|
177
|
+
type: "null"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
type: "string",
|
|
181
|
+
"enum": [
|
|
182
|
+
"login",
|
|
183
|
+
"join",
|
|
184
|
+
"refresh"
|
|
185
|
+
]
|
|
569
186
|
}
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
},
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
{
|
|
586
|
-
type: "null"
|
|
587
|
-
},
|
|
588
|
-
{
|
|
589
|
-
$ref: "#/$defs/AutoBeOpenApi.IResponseBody"
|
|
590
|
-
}
|
|
591
|
-
]
|
|
592
|
-
},
|
|
593
|
-
authorizationRole: {
|
|
594
|
-
description: "Authorization role required to access this API operation.\n\nThis field specifies which user role is allowed to access this endpoint.\nThe role name must correspond exactly to the actual roles defined in your\nsystem's Prisma schema.\n\n## Naming Convention\n\nRole names MUST use camelCase.\n\n## Role-Based Path Convention\n\nWhen authorizationRole is specified, it should align with the path\nstructure:\n\n- If authorizationRole is \"admin\" \u2192 path might be \"/admin/resources/{id}\"\n- If authorizationRole is \"seller\" \u2192 path might be \"/seller/products\"\n- Special case: For user's own resources, use path prefix \"/my/\" regardless\n of role\n\n## Important Guidelines\n\n- Set to `null` for public endpoints that require no authentication\n- Set to specific role string for role-restricted endpoints\n- The role name MUST match exactly with the user type/role defined in the\n database\n- This role 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 role\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.",
|
|
595
|
-
anyOf: [
|
|
596
|
-
{
|
|
597
|
-
type: "null"
|
|
598
|
-
},
|
|
599
|
-
{
|
|
600
|
-
type: "string",
|
|
601
|
-
description: "@minLength 1\n@pattern ^[a-z][a-zA-Z0-9]*$"
|
|
602
|
-
}
|
|
603
|
-
]
|
|
604
|
-
},
|
|
605
|
-
method: {
|
|
606
|
-
description: "HTTP method of the API operation.\n\n**IMPORTANT**: Methods must be written in lowercase only (e.g., \"get\", not \"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",
|
|
607
|
-
type: "string",
|
|
608
|
-
"enum": [
|
|
609
|
-
"get",
|
|
610
|
-
"post",
|
|
611
|
-
"put",
|
|
612
|
-
"delete",
|
|
613
|
-
"patch"
|
|
614
|
-
]
|
|
187
|
+
]
|
|
188
|
+
},
|
|
189
|
+
description: {
|
|
190
|
+
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.",
|
|
191
|
+
type: "string"
|
|
192
|
+
},
|
|
193
|
+
summary: {
|
|
194
|
+
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",
|
|
195
|
+
type: "string"
|
|
196
|
+
},
|
|
197
|
+
parameters: {
|
|
198
|
+
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`",
|
|
199
|
+
type: "array",
|
|
200
|
+
items: {
|
|
201
|
+
$ref: "#/$defs/AutoBeOpenApi.IParameter"
|
|
615
202
|
}
|
|
616
203
|
},
|
|
617
|
-
|
|
618
|
-
"
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
"path",
|
|
626
|
-
"parameters",
|
|
627
|
-
"requestBody",
|
|
628
|
-
"responseBody",
|
|
629
|
-
"authorizationRole",
|
|
630
|
-
"method"
|
|
631
|
-
]
|
|
632
|
-
},
|
|
633
|
-
"AutoBeOpenApi.IParameter": {
|
|
634
|
-
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```",
|
|
635
|
-
type: "object",
|
|
636
|
-
properties: {
|
|
637
|
-
name: {
|
|
638
|
-
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.\n\n\n@pattern ^[a-z][a-zA-Z0-9]*$",
|
|
639
|
-
type: "string"
|
|
640
|
-
},
|
|
641
|
-
description: {
|
|
642
|
-
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.",
|
|
643
|
-
type: "string"
|
|
644
|
-
},
|
|
645
|
-
schema: {
|
|
646
|
-
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.",
|
|
647
|
-
anyOf: [
|
|
648
|
-
{
|
|
649
|
-
$ref: "#/$defs/AutoBeOpenApi.IJsonSchema.INumber"
|
|
650
|
-
},
|
|
651
|
-
{
|
|
652
|
-
$ref: "#/$defs/AutoBeOpenApi.IJsonSchema.IInteger"
|
|
653
|
-
},
|
|
654
|
-
{
|
|
655
|
-
$ref: "#/$defs/AutoBeOpenApi.IJsonSchema.IString"
|
|
656
|
-
}
|
|
657
|
-
],
|
|
658
|
-
"x-discriminator": {
|
|
659
|
-
propertyName: "type",
|
|
660
|
-
mapping: {
|
|
661
|
-
number: "#/$defs/AutoBeOpenApi.IJsonSchema.INumber",
|
|
662
|
-
integer: "#/$defs/AutoBeOpenApi.IJsonSchema.IInteger",
|
|
663
|
-
string: "#/$defs/AutoBeOpenApi.IJsonSchema.IString"
|
|
664
|
-
}
|
|
204
|
+
requestBody: {
|
|
205
|
+
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.",
|
|
206
|
+
anyOf: [
|
|
207
|
+
{
|
|
208
|
+
type: "null"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
$ref: "#/$defs/AutoBeOpenApi.IRequestBody"
|
|
665
212
|
}
|
|
666
|
-
|
|
213
|
+
]
|
|
214
|
+
},
|
|
215
|
+
responseBody: {
|
|
216
|
+
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.",
|
|
217
|
+
anyOf: [
|
|
218
|
+
{
|
|
219
|
+
type: "null"
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
$ref: "#/$defs/AutoBeOpenApi.IResponseBody"
|
|
223
|
+
}
|
|
224
|
+
]
|
|
225
|
+
},
|
|
226
|
+
authorizationRole: {
|
|
227
|
+
description: "Authorization role required to access this API operation.\n\nThis field specifies which user role is allowed to access this endpoint.\nThe role name must correspond exactly to the actual roles defined in your\nsystem's Prisma schema.\n\n## Naming Convention\n\nRole names MUST use camelCase.\n\n## Role-Based Path Convention\n\nWhen authorizationRole is specified, it should align with the path\nstructure:\n\n- If authorizationRole is \"admin\" \u2192 path might be \"/admin/resources/{id}\"\n- If authorizationRole is \"seller\" \u2192 path might be \"/seller/products\"\n- Special case: For user's own resources, use path prefix \"/my/\" regardless\n of role\n\n## Important Guidelines\n\n- Set to `null` for public endpoints that require no authentication\n- Set to specific role string for role-restricted endpoints\n- The role name MUST match exactly with the user type/role defined in the\n database\n- This role 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 role\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.",
|
|
228
|
+
anyOf: [
|
|
229
|
+
{
|
|
230
|
+
type: "null"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
type: "string",
|
|
234
|
+
description: "@minLength 1\n@pattern ^[a-z][a-zA-Z0-9]*$"
|
|
235
|
+
}
|
|
236
|
+
]
|
|
667
237
|
},
|
|
668
|
-
|
|
669
|
-
"name",
|
|
670
|
-
"
|
|
671
|
-
|
|
672
|
-
|
|
238
|
+
name: {
|
|
239
|
+
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.\n\n\n@pattern ^[a-z][a-zA-Z0-9]*$",
|
|
240
|
+
type: "string"
|
|
241
|
+
},
|
|
242
|
+
path: {
|
|
243
|
+
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)\n\n\n@pattern ^\\/[a-zA-Z0-9\\/_{}.-]*$",
|
|
244
|
+
type: "string"
|
|
245
|
+
},
|
|
246
|
+
method: {
|
|
247
|
+
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",
|
|
248
|
+
type: "string",
|
|
249
|
+
"enum": [
|
|
250
|
+
"get",
|
|
251
|
+
"post",
|
|
252
|
+
"put",
|
|
253
|
+
"delete",
|
|
254
|
+
"patch"
|
|
255
|
+
]
|
|
256
|
+
}
|
|
673
257
|
},
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
},
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
type:
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
258
|
+
required: [
|
|
259
|
+
"specification",
|
|
260
|
+
"authorizationType",
|
|
261
|
+
"description",
|
|
262
|
+
"summary",
|
|
263
|
+
"parameters",
|
|
264
|
+
"requestBody",
|
|
265
|
+
"responseBody",
|
|
266
|
+
"authorizationRole",
|
|
267
|
+
"name",
|
|
268
|
+
"path",
|
|
269
|
+
"method"
|
|
270
|
+
]
|
|
271
|
+
},
|
|
272
|
+
"AutoBeOpenApi.IParameter": {
|
|
273
|
+
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```",
|
|
274
|
+
type: "object",
|
|
275
|
+
properties: {
|
|
276
|
+
name: {
|
|
277
|
+
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.\n\n\n@pattern ^[a-z][a-zA-Z0-9]*$",
|
|
278
|
+
type: "string"
|
|
279
|
+
},
|
|
280
|
+
description: {
|
|
281
|
+
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.",
|
|
282
|
+
type: "string"
|
|
283
|
+
},
|
|
284
|
+
schema: {
|
|
285
|
+
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.",
|
|
286
|
+
anyOf: [
|
|
287
|
+
{
|
|
288
|
+
$ref: "#/$defs/AutoBeOpenApi.IJsonSchema.INumber"
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
$ref: "#/$defs/AutoBeOpenApi.IJsonSchema.IInteger"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
$ref: "#/$defs/AutoBeOpenApi.IJsonSchema.IString"
|
|
295
|
+
}
|
|
296
|
+
],
|
|
297
|
+
"x-discriminator": {
|
|
298
|
+
propertyName: "type",
|
|
299
|
+
mapping: {
|
|
300
|
+
number: "#/$defs/AutoBeOpenApi.IJsonSchema.INumber",
|
|
301
|
+
integer: "#/$defs/AutoBeOpenApi.IJsonSchema.IInteger",
|
|
302
|
+
string: "#/$defs/AutoBeOpenApi.IJsonSchema.IString"
|
|
303
|
+
}
|
|
704
304
|
}
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
required: [
|
|
308
|
+
"name",
|
|
309
|
+
"description",
|
|
310
|
+
"schema"
|
|
311
|
+
]
|
|
312
|
+
},
|
|
313
|
+
"AutoBeOpenApi.IJsonSchema.INumber": {
|
|
314
|
+
description: "Number (double) type info.",
|
|
315
|
+
type: "object",
|
|
316
|
+
properties: {
|
|
317
|
+
minimum: {
|
|
318
|
+
description: "Minimum value restriction.",
|
|
319
|
+
type: "number"
|
|
320
|
+
},
|
|
321
|
+
maximum: {
|
|
322
|
+
description: "Maximum value restriction.",
|
|
323
|
+
type: "number"
|
|
324
|
+
},
|
|
325
|
+
exclusiveMinimum: {
|
|
326
|
+
description: "Exclusive minimum value restriction.",
|
|
327
|
+
type: "number"
|
|
328
|
+
},
|
|
329
|
+
exclusiveMaximum: {
|
|
330
|
+
description: "Exclusive maximum value restriction.",
|
|
331
|
+
type: "number"
|
|
705
332
|
},
|
|
706
|
-
|
|
707
|
-
"
|
|
708
|
-
|
|
333
|
+
multipleOf: {
|
|
334
|
+
description: "Multiple of value restriction.\n\n\n@exclusiveMinimum 0",
|
|
335
|
+
type: "number"
|
|
336
|
+
},
|
|
337
|
+
type: {
|
|
338
|
+
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.",
|
|
339
|
+
type: "string",
|
|
340
|
+
"enum": [
|
|
341
|
+
"number"
|
|
342
|
+
]
|
|
343
|
+
}
|
|
709
344
|
},
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
},
|
|
726
|
-
exclusiveMaximum: {
|
|
727
|
-
description: "Exclusive maximum value restriction.",
|
|
728
|
-
type: "number"
|
|
729
|
-
},
|
|
730
|
-
multipleOf: {
|
|
731
|
-
description: "Multiple of value restriction.\n\n\n@exclusiveMinimum 0",
|
|
732
|
-
type: "integer"
|
|
733
|
-
},
|
|
734
|
-
type: {
|
|
735
|
-
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.",
|
|
736
|
-
type: "string",
|
|
737
|
-
"enum": [
|
|
738
|
-
"integer"
|
|
739
|
-
]
|
|
740
|
-
}
|
|
345
|
+
required: [
|
|
346
|
+
"type"
|
|
347
|
+
]
|
|
348
|
+
},
|
|
349
|
+
"AutoBeOpenApi.IJsonSchema.IInteger": {
|
|
350
|
+
description: "Integer type info.",
|
|
351
|
+
type: "object",
|
|
352
|
+
properties: {
|
|
353
|
+
minimum: {
|
|
354
|
+
description: "Minimum value restriction.",
|
|
355
|
+
type: "integer"
|
|
356
|
+
},
|
|
357
|
+
maximum: {
|
|
358
|
+
description: "Maximum value restriction.",
|
|
359
|
+
type: "integer"
|
|
741
360
|
},
|
|
742
|
-
|
|
743
|
-
"
|
|
744
|
-
|
|
361
|
+
exclusiveMinimum: {
|
|
362
|
+
description: "Exclusive minimum value restriction.",
|
|
363
|
+
type: "number"
|
|
364
|
+
},
|
|
365
|
+
exclusiveMaximum: {
|
|
366
|
+
description: "Exclusive maximum value restriction.",
|
|
367
|
+
type: "number"
|
|
368
|
+
},
|
|
369
|
+
multipleOf: {
|
|
370
|
+
description: "Multiple of value restriction.\n\n\n@exclusiveMinimum 0",
|
|
371
|
+
type: "integer"
|
|
372
|
+
},
|
|
373
|
+
type: {
|
|
374
|
+
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.",
|
|
375
|
+
type: "string",
|
|
376
|
+
"enum": [
|
|
377
|
+
"integer"
|
|
378
|
+
]
|
|
379
|
+
}
|
|
745
380
|
},
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
},
|
|
770
|
-
type: {
|
|
771
|
-
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.",
|
|
772
|
-
type: "string",
|
|
773
|
-
"enum": [
|
|
774
|
-
"string"
|
|
775
|
-
]
|
|
776
|
-
}
|
|
381
|
+
required: [
|
|
382
|
+
"type"
|
|
383
|
+
]
|
|
384
|
+
},
|
|
385
|
+
"AutoBeOpenApi.IJsonSchema.IString": {
|
|
386
|
+
description: "String type info.",
|
|
387
|
+
type: "object",
|
|
388
|
+
properties: {
|
|
389
|
+
format: {
|
|
390
|
+
description: "Format restriction.",
|
|
391
|
+
type: "string"
|
|
392
|
+
},
|
|
393
|
+
pattern: {
|
|
394
|
+
description: "Pattern restriction.",
|
|
395
|
+
type: "string"
|
|
396
|
+
},
|
|
397
|
+
contentMediaType: {
|
|
398
|
+
description: "Content media type restriction.",
|
|
399
|
+
type: "string"
|
|
400
|
+
},
|
|
401
|
+
minLength: {
|
|
402
|
+
description: "Minimum length restriction.\n\n\n@minimum 0",
|
|
403
|
+
type: "integer"
|
|
777
404
|
},
|
|
778
|
-
|
|
779
|
-
"
|
|
780
|
-
|
|
405
|
+
maxLength: {
|
|
406
|
+
description: "Maximum length restriction.\n\n\n@minimum 0",
|
|
407
|
+
type: "integer"
|
|
408
|
+
},
|
|
409
|
+
type: {
|
|
410
|
+
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.",
|
|
411
|
+
type: "string",
|
|
412
|
+
"enum": [
|
|
413
|
+
"string"
|
|
414
|
+
]
|
|
415
|
+
}
|
|
781
416
|
},
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
}
|
|
417
|
+
required: [
|
|
418
|
+
"type"
|
|
419
|
+
]
|
|
420
|
+
},
|
|
421
|
+
"AutoBeOpenApi.IRequestBody": {
|
|
422
|
+
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```",
|
|
423
|
+
type: "object",
|
|
424
|
+
properties: {
|
|
425
|
+
description: {
|
|
426
|
+
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.",
|
|
427
|
+
type: "string"
|
|
794
428
|
},
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
"
|
|
798
|
-
|
|
429
|
+
typeName: {
|
|
430
|
+
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```",
|
|
431
|
+
type: "string"
|
|
432
|
+
}
|
|
799
433
|
},
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
434
|
+
required: [
|
|
435
|
+
"description",
|
|
436
|
+
"typeName"
|
|
437
|
+
]
|
|
438
|
+
},
|
|
439
|
+
"AutoBeOpenApi.IResponseBody": {
|
|
440
|
+
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```",
|
|
441
|
+
type: "object",
|
|
442
|
+
properties: {
|
|
443
|
+
description: {
|
|
444
|
+
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.",
|
|
445
|
+
type: "string"
|
|
812
446
|
},
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
"
|
|
816
|
-
|
|
817
|
-
}
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
if ("number" === input.type)
|
|
823
|
-
return _io4(input);
|
|
824
|
-
else if ("integer" === input.type)
|
|
825
|
-
return _io3(input);
|
|
826
|
-
else if ("string" === input.type)
|
|
827
|
-
return _io5(input);
|
|
828
|
-
else
|
|
829
|
-
return false;
|
|
830
|
-
})(); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.review || _report(_exceptionable, {
|
|
831
|
-
path: _path + ".review",
|
|
832
|
-
expected: "string",
|
|
833
|
-
value: input.review
|
|
834
|
-
}), "string" === typeof input.plan || _report(_exceptionable, {
|
|
835
|
-
path: _path + ".plan",
|
|
836
|
-
expected: "string",
|
|
837
|
-
value: input.plan
|
|
838
|
-
}), (Array.isArray(input.content) || _report(_exceptionable, {
|
|
839
|
-
path: _path + ".content",
|
|
840
|
-
expected: "Array<IAutoBeInterfaceOperationsReviewApplication.IOperation>",
|
|
841
|
-
value: input.content
|
|
842
|
-
})) && input.content.map((elem, _index3) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
843
|
-
path: _path + ".content[" + _index3 + "]",
|
|
844
|
-
expected: "IAutoBeInterfaceOperationsReviewApplication.IOperation",
|
|
845
|
-
value: elem
|
|
846
|
-
})) && _vo1(elem, _path + ".content[" + _index3 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
847
|
-
path: _path + ".content[" + _index3 + "]",
|
|
848
|
-
expected: "IAutoBeInterfaceOperationsReviewApplication.IOperation",
|
|
849
|
-
value: elem
|
|
850
|
-
})).every(flag => flag) || _report(_exceptionable, {
|
|
851
|
-
path: _path + ".content",
|
|
852
|
-
expected: "Array<IAutoBeInterfaceOperationsReviewApplication.IOperation>",
|
|
853
|
-
value: input.content
|
|
854
|
-
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.prisma_schemas || _report(_exceptionable, {
|
|
855
|
-
path: _path + ".prisma_schemas",
|
|
856
|
-
expected: "string",
|
|
857
|
-
value: input.prisma_schemas
|
|
858
|
-
}), "string" === typeof input.model_name || _report(_exceptionable, {
|
|
859
|
-
path: _path + ".model_name",
|
|
860
|
-
expected: "string",
|
|
861
|
-
value: input.model_name
|
|
862
|
-
}), null === input.soft_delete_column || "string" === typeof input.soft_delete_column || _report(_exceptionable, {
|
|
863
|
-
path: _path + ".soft_delete_column",
|
|
864
|
-
expected: "(null | string)",
|
|
865
|
-
value: input.soft_delete_column
|
|
866
|
-
}), "string" === typeof input.description || _report(_exceptionable, {
|
|
867
|
-
path: _path + ".description",
|
|
868
|
-
expected: "string",
|
|
869
|
-
value: input.description
|
|
870
|
-
}), "string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
|
|
871
|
-
path: _path + ".name",
|
|
872
|
-
expected: "string & CamelPattern",
|
|
873
|
-
value: input.name
|
|
874
|
-
})) || _report(_exceptionable, {
|
|
875
|
-
path: _path + ".name",
|
|
876
|
-
expected: "(string & CamelPattern)",
|
|
877
|
-
value: input.name
|
|
878
|
-
}), "string" === typeof input.specification || _report(_exceptionable, {
|
|
879
|
-
path: _path + ".specification",
|
|
880
|
-
expected: "string",
|
|
881
|
-
value: input.specification
|
|
882
|
-
}), "string" === typeof input.summary || _report(_exceptionable, {
|
|
883
|
-
path: _path + ".summary",
|
|
884
|
-
expected: "string",
|
|
885
|
-
value: input.summary
|
|
886
|
-
}), "string" === typeof input.path && (RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) || _report(_exceptionable, {
|
|
887
|
-
path: _path + ".path",
|
|
888
|
-
expected: "string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">",
|
|
889
|
-
value: input.path
|
|
890
|
-
})) || _report(_exceptionable, {
|
|
891
|
-
path: _path + ".path",
|
|
892
|
-
expected: "(string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">)",
|
|
893
|
-
value: input.path
|
|
894
|
-
}), (Array.isArray(input.parameters) || _report(_exceptionable, {
|
|
895
|
-
path: _path + ".parameters",
|
|
896
|
-
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
897
|
-
value: input.parameters
|
|
898
|
-
})) && input.parameters.map((elem, _index4) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
899
|
-
path: _path + ".parameters[" + _index4 + "]",
|
|
900
|
-
expected: "AutoBeOpenApi.IParameter",
|
|
901
|
-
value: elem
|
|
902
|
-
})) && _vo2(elem, _path + ".parameters[" + _index4 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
903
|
-
path: _path + ".parameters[" + _index4 + "]",
|
|
904
|
-
expected: "AutoBeOpenApi.IParameter",
|
|
905
|
-
value: elem
|
|
906
|
-
})).every(flag => flag) || _report(_exceptionable, {
|
|
907
|
-
path: _path + ".parameters",
|
|
908
|
-
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
909
|
-
value: input.parameters
|
|
910
|
-
}), null === input.requestBody || ("object" === typeof input.requestBody && null !== input.requestBody || _report(_exceptionable, {
|
|
911
|
-
path: _path + ".requestBody",
|
|
912
|
-
expected: "(AutoBeOpenApi.IRequestBody | null)",
|
|
913
|
-
value: input.requestBody
|
|
914
|
-
})) && _vo6(input.requestBody, _path + ".requestBody", true && _exceptionable) || _report(_exceptionable, {
|
|
915
|
-
path: _path + ".requestBody",
|
|
916
|
-
expected: "(AutoBeOpenApi.IRequestBody | null)",
|
|
917
|
-
value: input.requestBody
|
|
918
|
-
}), null === input.responseBody || ("object" === typeof input.responseBody && null !== input.responseBody || _report(_exceptionable, {
|
|
919
|
-
path: _path + ".responseBody",
|
|
920
|
-
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
921
|
-
value: input.responseBody
|
|
922
|
-
})) && _vo7(input.responseBody, _path + ".responseBody", true && _exceptionable) || _report(_exceptionable, {
|
|
923
|
-
path: _path + ".responseBody",
|
|
924
|
-
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
925
|
-
value: input.responseBody
|
|
926
|
-
}), null === input.authorizationRole || "string" === typeof input.authorizationRole && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.authorizationRole) || _report(_exceptionable, {
|
|
927
|
-
path: _path + ".authorizationRole",
|
|
928
|
-
expected: "string & CamelPattern",
|
|
929
|
-
value: input.authorizationRole
|
|
930
|
-
})) && (1 <= input.authorizationRole.length || _report(_exceptionable, {
|
|
931
|
-
path: _path + ".authorizationRole",
|
|
932
|
-
expected: "string & MinLength<1>",
|
|
933
|
-
value: input.authorizationRole
|
|
934
|
-
})) || _report(_exceptionable, {
|
|
935
|
-
path: _path + ".authorizationRole",
|
|
936
|
-
expected: "((string & CamelPattern & MinLength<1>) | null)",
|
|
937
|
-
value: input.authorizationRole
|
|
938
|
-
}), "get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method || _report(_exceptionable, {
|
|
939
|
-
path: _path + ".method",
|
|
940
|
-
expected: "(\"delete\" | \"get\" | \"patch\" | \"post\" | \"put\")",
|
|
941
|
-
value: input.method
|
|
942
|
-
})].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
|
|
943
|
-
path: _path + ".name",
|
|
944
|
-
expected: "string & CamelPattern",
|
|
945
|
-
value: input.name
|
|
946
|
-
})) || _report(_exceptionable, {
|
|
947
|
-
path: _path + ".name",
|
|
948
|
-
expected: "(string & CamelPattern)",
|
|
949
|
-
value: input.name
|
|
950
|
-
}), "string" === typeof input.description || _report(_exceptionable, {
|
|
951
|
-
path: _path + ".description",
|
|
952
|
-
expected: "string",
|
|
953
|
-
value: input.description
|
|
954
|
-
}), ("object" === typeof input.schema && null !== input.schema || _report(_exceptionable, {
|
|
955
|
-
path: _path + ".schema",
|
|
956
|
-
expected: "(AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IString)",
|
|
957
|
-
value: input.schema
|
|
958
|
-
})) && _vu0(input.schema, _path + ".schema", true && _exceptionable) || _report(_exceptionable, {
|
|
959
|
-
path: _path + ".schema",
|
|
960
|
-
expected: "(AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IString)",
|
|
961
|
-
value: input.schema
|
|
962
|
-
})].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, {
|
|
963
|
-
path: _path + ".minimum",
|
|
964
|
-
expected: "number & Type<\"int64\">",
|
|
965
|
-
value: input.minimum
|
|
966
|
-
})) || _report(_exceptionable, {
|
|
967
|
-
path: _path + ".minimum",
|
|
968
|
-
expected: "((number & Type<\"int64\">) | undefined)",
|
|
969
|
-
value: input.minimum
|
|
970
|
-
}), undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000 || _report(_exceptionable, {
|
|
971
|
-
path: _path + ".maximum",
|
|
972
|
-
expected: "number & Type<\"int64\">",
|
|
973
|
-
value: input.maximum
|
|
974
|
-
})) || _report(_exceptionable, {
|
|
975
|
-
path: _path + ".maximum",
|
|
976
|
-
expected: "((number & Type<\"int64\">) | undefined)",
|
|
977
|
-
value: input.maximum
|
|
978
|
-
}), undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || _report(_exceptionable, {
|
|
979
|
-
path: _path + ".exclusiveMinimum",
|
|
980
|
-
expected: "(number | undefined)",
|
|
981
|
-
value: input.exclusiveMinimum
|
|
982
|
-
}), undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || _report(_exceptionable, {
|
|
983
|
-
path: _path + ".exclusiveMaximum",
|
|
984
|
-
expected: "(number | undefined)",
|
|
985
|
-
value: input.exclusiveMaximum
|
|
986
|
-
}), undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 || _report(_exceptionable, {
|
|
987
|
-
path: _path + ".multipleOf",
|
|
988
|
-
expected: "number & Type<\"uint64\">",
|
|
989
|
-
value: input.multipleOf
|
|
990
|
-
})) && (0 < input.multipleOf || _report(_exceptionable, {
|
|
991
|
-
path: _path + ".multipleOf",
|
|
992
|
-
expected: "number & ExclusiveMinimum<0>",
|
|
993
|
-
value: input.multipleOf
|
|
994
|
-
})) || _report(_exceptionable, {
|
|
995
|
-
path: _path + ".multipleOf",
|
|
996
|
-
expected: "((number & Type<\"uint64\"> & ExclusiveMinimum<0>) | undefined)",
|
|
997
|
-
value: input.multipleOf
|
|
998
|
-
}), "integer" === input.type || _report(_exceptionable, {
|
|
999
|
-
path: _path + ".type",
|
|
1000
|
-
expected: "\"integer\"",
|
|
1001
|
-
value: input.type
|
|
1002
|
-
})].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => [undefined === input.minimum || "number" === typeof input.minimum || _report(_exceptionable, {
|
|
1003
|
-
path: _path + ".minimum",
|
|
1004
|
-
expected: "(number | undefined)",
|
|
1005
|
-
value: input.minimum
|
|
1006
|
-
}), undefined === input.maximum || "number" === typeof input.maximum || _report(_exceptionable, {
|
|
1007
|
-
path: _path + ".maximum",
|
|
1008
|
-
expected: "(number | undefined)",
|
|
1009
|
-
value: input.maximum
|
|
1010
|
-
}), undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || _report(_exceptionable, {
|
|
1011
|
-
path: _path + ".exclusiveMinimum",
|
|
1012
|
-
expected: "(number | undefined)",
|
|
1013
|
-
value: input.exclusiveMinimum
|
|
1014
|
-
}), undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || _report(_exceptionable, {
|
|
1015
|
-
path: _path + ".exclusiveMaximum",
|
|
1016
|
-
expected: "(number | undefined)",
|
|
1017
|
-
value: input.exclusiveMaximum
|
|
1018
|
-
}), undefined === input.multipleOf || "number" === typeof input.multipleOf && (0 < input.multipleOf || _report(_exceptionable, {
|
|
1019
|
-
path: _path + ".multipleOf",
|
|
1020
|
-
expected: "number & ExclusiveMinimum<0>",
|
|
1021
|
-
value: input.multipleOf
|
|
1022
|
-
})) || _report(_exceptionable, {
|
|
1023
|
-
path: _path + ".multipleOf",
|
|
1024
|
-
expected: "((number & ExclusiveMinimum<0>) | undefined)",
|
|
1025
|
-
value: input.multipleOf
|
|
1026
|
-
}), "number" === input.type || _report(_exceptionable, {
|
|
1027
|
-
path: _path + ".type",
|
|
1028
|
-
expected: "\"number\"",
|
|
1029
|
-
value: input.type
|
|
1030
|
-
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [undefined === input.format || "string" === typeof input.format || _report(_exceptionable, {
|
|
1031
|
-
path: _path + ".format",
|
|
1032
|
-
expected: "(string | undefined)",
|
|
1033
|
-
value: input.format
|
|
1034
|
-
}), undefined === input.pattern || "string" === typeof input.pattern || _report(_exceptionable, {
|
|
1035
|
-
path: _path + ".pattern",
|
|
1036
|
-
expected: "(string | undefined)",
|
|
1037
|
-
value: input.pattern
|
|
1038
|
-
}), undefined === input.contentMediaType || "string" === typeof input.contentMediaType || _report(_exceptionable, {
|
|
1039
|
-
path: _path + ".contentMediaType",
|
|
1040
|
-
expected: "(string | undefined)",
|
|
1041
|
-
value: input.contentMediaType
|
|
1042
|
-
}), undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000 || _report(_exceptionable, {
|
|
1043
|
-
path: _path + ".minLength",
|
|
1044
|
-
expected: "number & Type<\"uint64\">",
|
|
1045
|
-
value: input.minLength
|
|
1046
|
-
})) || _report(_exceptionable, {
|
|
1047
|
-
path: _path + ".minLength",
|
|
1048
|
-
expected: "((number & Type<\"uint64\">) | undefined)",
|
|
1049
|
-
value: input.minLength
|
|
1050
|
-
}), undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000 || _report(_exceptionable, {
|
|
1051
|
-
path: _path + ".maxLength",
|
|
1052
|
-
expected: "number & Type<\"uint64\">",
|
|
1053
|
-
value: input.maxLength
|
|
1054
|
-
})) || _report(_exceptionable, {
|
|
1055
|
-
path: _path + ".maxLength",
|
|
1056
|
-
expected: "((number & Type<\"uint64\">) | undefined)",
|
|
1057
|
-
value: input.maxLength
|
|
1058
|
-
}), "string" === input.type || _report(_exceptionable, {
|
|
1059
|
-
path: _path + ".type",
|
|
1060
|
-
expected: "\"string\"",
|
|
1061
|
-
value: input.type
|
|
1062
|
-
})].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
1063
|
-
path: _path + ".description",
|
|
1064
|
-
expected: "string",
|
|
1065
|
-
value: input.description
|
|
1066
|
-
}), "string" === typeof input.typeName || _report(_exceptionable, {
|
|
1067
|
-
path: _path + ".typeName",
|
|
1068
|
-
expected: "string",
|
|
1069
|
-
value: input.typeName
|
|
1070
|
-
})].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
1071
|
-
path: _path + ".description",
|
|
1072
|
-
expected: "string",
|
|
1073
|
-
value: input.description
|
|
1074
|
-
}), "string" === typeof input.typeName || _report(_exceptionable, {
|
|
1075
|
-
path: _path + ".typeName",
|
|
1076
|
-
expected: "string",
|
|
1077
|
-
value: input.typeName
|
|
1078
|
-
})].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
1079
|
-
if ("number" === input.type)
|
|
1080
|
-
return _vo4(input, _path, true && _exceptionable);
|
|
1081
|
-
else if ("integer" === input.type)
|
|
1082
|
-
return _vo3(input, _path, true && _exceptionable);
|
|
1083
|
-
else if ("string" === input.type)
|
|
1084
|
-
return _vo5(input, _path, true && _exceptionable);
|
|
1085
|
-
else
|
|
1086
|
-
return _report(_exceptionable, {
|
|
1087
|
-
path: _path,
|
|
1088
|
-
expected: "(AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.IString)",
|
|
1089
|
-
value: input
|
|
1090
|
-
});
|
|
1091
|
-
})(); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
1092
|
-
if (false === __is(input)) {
|
|
1093
|
-
errors = [];
|
|
1094
|
-
_report = __typia_transform__validateReport._validateReport(errors);
|
|
1095
|
-
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
1096
|
-
path: _path + "",
|
|
1097
|
-
expected: "IAutoBeInterfaceOperationsReviewApplication.IProps",
|
|
1098
|
-
value: input
|
|
1099
|
-
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
1100
|
-
path: _path + "",
|
|
1101
|
-
expected: "IAutoBeInterfaceOperationsReviewApplication.IProps",
|
|
1102
|
-
value: input
|
|
1103
|
-
}))(input, "$input", true);
|
|
1104
|
-
const success = 0 === errors.length;
|
|
1105
|
-
return success ? {
|
|
1106
|
-
success,
|
|
1107
|
-
data: input
|
|
1108
|
-
} : {
|
|
1109
|
-
success,
|
|
1110
|
-
errors,
|
|
1111
|
-
data: input
|
|
1112
|
-
};
|
|
447
|
+
typeName: {
|
|
448
|
+
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```",
|
|
449
|
+
type: "string"
|
|
450
|
+
}
|
|
451
|
+
},
|
|
452
|
+
required: [
|
|
453
|
+
"description",
|
|
454
|
+
"typeName"
|
|
455
|
+
]
|
|
1113
456
|
}
|
|
1114
|
-
|
|
1115
|
-
|
|
457
|
+
}
|
|
458
|
+
},
|
|
459
|
+
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.",
|
|
460
|
+
validate: (() => { 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.authorizationRole || "string" === typeof input.authorizationRole && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.authorizationRole) && 1 <= input.authorizationRole.length)) && ("string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name)) && ("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 || "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 _io7 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io8 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _iu0 = input => (() => {
|
|
461
|
+
if ("number" === input.type)
|
|
462
|
+
return _io5(input);
|
|
463
|
+
else if ("integer" === input.type)
|
|
464
|
+
return _io4(input);
|
|
465
|
+
else if ("string" === input.type)
|
|
466
|
+
return _io6(input);
|
|
467
|
+
else
|
|
468
|
+
return false;
|
|
469
|
+
})(); const _vo0 = (input, _path, _exceptionable = true) => [("object" === typeof input.think && null !== input.think || _report(_exceptionable, {
|
|
470
|
+
path: _path + ".think",
|
|
471
|
+
expected: "IAutoBeInterfaceOperationsReviewApplication.IThink",
|
|
472
|
+
value: input.think
|
|
473
|
+
})) && _vo1(input.think, _path + ".think", true && _exceptionable) || _report(_exceptionable, {
|
|
474
|
+
path: _path + ".think",
|
|
475
|
+
expected: "IAutoBeInterfaceOperationsReviewApplication.IThink",
|
|
476
|
+
value: input.think
|
|
477
|
+
}), (Array.isArray(input.content) || _report(_exceptionable, {
|
|
478
|
+
path: _path + ".content",
|
|
479
|
+
expected: "Array<AutoBeOpenApi.IOperation>",
|
|
480
|
+
value: input.content
|
|
481
|
+
})) && input.content.map((elem, _index3) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
482
|
+
path: _path + ".content[" + _index3 + "]",
|
|
483
|
+
expected: "AutoBeOpenApi.IOperation",
|
|
484
|
+
value: elem
|
|
485
|
+
})) && _vo2(elem, _path + ".content[" + _index3 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
486
|
+
path: _path + ".content[" + _index3 + "]",
|
|
487
|
+
expected: "AutoBeOpenApi.IOperation",
|
|
488
|
+
value: elem
|
|
489
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
490
|
+
path: _path + ".content",
|
|
491
|
+
expected: "Array<AutoBeOpenApi.IOperation>",
|
|
492
|
+
value: input.content
|
|
493
|
+
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.review || _report(_exceptionable, {
|
|
494
|
+
path: _path + ".review",
|
|
495
|
+
expected: "string",
|
|
496
|
+
value: input.review
|
|
497
|
+
}), "string" === typeof input.plan || _report(_exceptionable, {
|
|
498
|
+
path: _path + ".plan",
|
|
499
|
+
expected: "string",
|
|
500
|
+
value: input.plan
|
|
501
|
+
})].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.specification || _report(_exceptionable, {
|
|
502
|
+
path: _path + ".specification",
|
|
503
|
+
expected: "string",
|
|
504
|
+
value: input.specification
|
|
505
|
+
}), null === input.authorizationType || "login" === input.authorizationType || "join" === input.authorizationType || "refresh" === input.authorizationType || _report(_exceptionable, {
|
|
506
|
+
path: _path + ".authorizationType",
|
|
507
|
+
expected: "(\"join\" | \"login\" | \"refresh\" | null)",
|
|
508
|
+
value: input.authorizationType
|
|
509
|
+
}), "string" === typeof input.description || _report(_exceptionable, {
|
|
510
|
+
path: _path + ".description",
|
|
511
|
+
expected: "string",
|
|
512
|
+
value: input.description
|
|
513
|
+
}), "string" === typeof input.summary || _report(_exceptionable, {
|
|
514
|
+
path: _path + ".summary",
|
|
515
|
+
expected: "string",
|
|
516
|
+
value: input.summary
|
|
517
|
+
}), (Array.isArray(input.parameters) || _report(_exceptionable, {
|
|
518
|
+
path: _path + ".parameters",
|
|
519
|
+
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
520
|
+
value: input.parameters
|
|
521
|
+
})) && input.parameters.map((elem, _index4) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
522
|
+
path: _path + ".parameters[" + _index4 + "]",
|
|
523
|
+
expected: "AutoBeOpenApi.IParameter",
|
|
524
|
+
value: elem
|
|
525
|
+
})) && _vo3(elem, _path + ".parameters[" + _index4 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
526
|
+
path: _path + ".parameters[" + _index4 + "]",
|
|
527
|
+
expected: "AutoBeOpenApi.IParameter",
|
|
528
|
+
value: elem
|
|
529
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
530
|
+
path: _path + ".parameters",
|
|
531
|
+
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
532
|
+
value: input.parameters
|
|
533
|
+
}), null === input.requestBody || ("object" === typeof input.requestBody && null !== input.requestBody || _report(_exceptionable, {
|
|
534
|
+
path: _path + ".requestBody",
|
|
535
|
+
expected: "(AutoBeOpenApi.IRequestBody | null)",
|
|
536
|
+
value: input.requestBody
|
|
537
|
+
})) && _vo7(input.requestBody, _path + ".requestBody", true && _exceptionable) || _report(_exceptionable, {
|
|
538
|
+
path: _path + ".requestBody",
|
|
539
|
+
expected: "(AutoBeOpenApi.IRequestBody | null)",
|
|
540
|
+
value: input.requestBody
|
|
541
|
+
}), null === input.responseBody || ("object" === typeof input.responseBody && null !== input.responseBody || _report(_exceptionable, {
|
|
542
|
+
path: _path + ".responseBody",
|
|
543
|
+
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
544
|
+
value: input.responseBody
|
|
545
|
+
})) && _vo8(input.responseBody, _path + ".responseBody", true && _exceptionable) || _report(_exceptionable, {
|
|
546
|
+
path: _path + ".responseBody",
|
|
547
|
+
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
548
|
+
value: input.responseBody
|
|
549
|
+
}), null === input.authorizationRole || "string" === typeof input.authorizationRole && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.authorizationRole) || _report(_exceptionable, {
|
|
550
|
+
path: _path + ".authorizationRole",
|
|
551
|
+
expected: "string & CamelPattern",
|
|
552
|
+
value: input.authorizationRole
|
|
553
|
+
})) && (1 <= input.authorizationRole.length || _report(_exceptionable, {
|
|
554
|
+
path: _path + ".authorizationRole",
|
|
555
|
+
expected: "string & MinLength<1>",
|
|
556
|
+
value: input.authorizationRole
|
|
557
|
+
})) || _report(_exceptionable, {
|
|
558
|
+
path: _path + ".authorizationRole",
|
|
559
|
+
expected: "((string & CamelPattern & MinLength<1>) | null)",
|
|
560
|
+
value: input.authorizationRole
|
|
561
|
+
}), "string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
|
|
562
|
+
path: _path + ".name",
|
|
563
|
+
expected: "string & CamelPattern",
|
|
564
|
+
value: input.name
|
|
565
|
+
})) || _report(_exceptionable, {
|
|
566
|
+
path: _path + ".name",
|
|
567
|
+
expected: "(string & CamelPattern)",
|
|
568
|
+
value: input.name
|
|
569
|
+
}), "string" === typeof input.path && (RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) || _report(_exceptionable, {
|
|
570
|
+
path: _path + ".path",
|
|
571
|
+
expected: "string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">",
|
|
572
|
+
value: input.path
|
|
573
|
+
})) || _report(_exceptionable, {
|
|
574
|
+
path: _path + ".path",
|
|
575
|
+
expected: "(string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">)",
|
|
576
|
+
value: input.path
|
|
577
|
+
}), "get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method || _report(_exceptionable, {
|
|
578
|
+
path: _path + ".method",
|
|
579
|
+
expected: "(\"delete\" | \"get\" | \"patch\" | \"post\" | \"put\")",
|
|
580
|
+
value: input.method
|
|
581
|
+
})].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, {
|
|
582
|
+
path: _path + ".name",
|
|
583
|
+
expected: "string & CamelPattern",
|
|
584
|
+
value: input.name
|
|
585
|
+
})) || _report(_exceptionable, {
|
|
586
|
+
path: _path + ".name",
|
|
587
|
+
expected: "(string & CamelPattern)",
|
|
588
|
+
value: input.name
|
|
589
|
+
}), "string" === typeof input.description || _report(_exceptionable, {
|
|
590
|
+
path: _path + ".description",
|
|
591
|
+
expected: "string",
|
|
592
|
+
value: input.description
|
|
593
|
+
}), ("object" === typeof input.schema && null !== input.schema || _report(_exceptionable, {
|
|
594
|
+
path: _path + ".schema",
|
|
595
|
+
expected: "(AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IString)",
|
|
596
|
+
value: input.schema
|
|
597
|
+
})) && _vu0(input.schema, _path + ".schema", true && _exceptionable) || _report(_exceptionable, {
|
|
598
|
+
path: _path + ".schema",
|
|
599
|
+
expected: "(AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IString)",
|
|
600
|
+
value: input.schema
|
|
601
|
+
})].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, {
|
|
602
|
+
path: _path + ".minimum",
|
|
603
|
+
expected: "number & Type<\"int64\">",
|
|
604
|
+
value: input.minimum
|
|
605
|
+
})) || _report(_exceptionable, {
|
|
606
|
+
path: _path + ".minimum",
|
|
607
|
+
expected: "((number & Type<\"int64\">) | undefined)",
|
|
608
|
+
value: input.minimum
|
|
609
|
+
}), undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000 || _report(_exceptionable, {
|
|
610
|
+
path: _path + ".maximum",
|
|
611
|
+
expected: "number & Type<\"int64\">",
|
|
612
|
+
value: input.maximum
|
|
613
|
+
})) || _report(_exceptionable, {
|
|
614
|
+
path: _path + ".maximum",
|
|
615
|
+
expected: "((number & Type<\"int64\">) | undefined)",
|
|
616
|
+
value: input.maximum
|
|
617
|
+
}), undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || _report(_exceptionable, {
|
|
618
|
+
path: _path + ".exclusiveMinimum",
|
|
619
|
+
expected: "(number | undefined)",
|
|
620
|
+
value: input.exclusiveMinimum
|
|
621
|
+
}), undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || _report(_exceptionable, {
|
|
622
|
+
path: _path + ".exclusiveMaximum",
|
|
623
|
+
expected: "(number | undefined)",
|
|
624
|
+
value: input.exclusiveMaximum
|
|
625
|
+
}), undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 || _report(_exceptionable, {
|
|
626
|
+
path: _path + ".multipleOf",
|
|
627
|
+
expected: "number & Type<\"uint64\">",
|
|
628
|
+
value: input.multipleOf
|
|
629
|
+
})) && (0 < input.multipleOf || _report(_exceptionable, {
|
|
630
|
+
path: _path + ".multipleOf",
|
|
631
|
+
expected: "number & ExclusiveMinimum<0>",
|
|
632
|
+
value: input.multipleOf
|
|
633
|
+
})) || _report(_exceptionable, {
|
|
634
|
+
path: _path + ".multipleOf",
|
|
635
|
+
expected: "((number & Type<\"uint64\"> & ExclusiveMinimum<0>) | undefined)",
|
|
636
|
+
value: input.multipleOf
|
|
637
|
+
}), "integer" === input.type || _report(_exceptionable, {
|
|
638
|
+
path: _path + ".type",
|
|
639
|
+
expected: "\"integer\"",
|
|
640
|
+
value: input.type
|
|
641
|
+
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [undefined === input.minimum || "number" === typeof input.minimum || _report(_exceptionable, {
|
|
642
|
+
path: _path + ".minimum",
|
|
643
|
+
expected: "(number | undefined)",
|
|
644
|
+
value: input.minimum
|
|
645
|
+
}), undefined === input.maximum || "number" === typeof input.maximum || _report(_exceptionable, {
|
|
646
|
+
path: _path + ".maximum",
|
|
647
|
+
expected: "(number | undefined)",
|
|
648
|
+
value: input.maximum
|
|
649
|
+
}), undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || _report(_exceptionable, {
|
|
650
|
+
path: _path + ".exclusiveMinimum",
|
|
651
|
+
expected: "(number | undefined)",
|
|
652
|
+
value: input.exclusiveMinimum
|
|
653
|
+
}), undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || _report(_exceptionable, {
|
|
654
|
+
path: _path + ".exclusiveMaximum",
|
|
655
|
+
expected: "(number | undefined)",
|
|
656
|
+
value: input.exclusiveMaximum
|
|
657
|
+
}), undefined === input.multipleOf || "number" === typeof input.multipleOf && (0 < input.multipleOf || _report(_exceptionable, {
|
|
658
|
+
path: _path + ".multipleOf",
|
|
659
|
+
expected: "number & ExclusiveMinimum<0>",
|
|
660
|
+
value: input.multipleOf
|
|
661
|
+
})) || _report(_exceptionable, {
|
|
662
|
+
path: _path + ".multipleOf",
|
|
663
|
+
expected: "((number & ExclusiveMinimum<0>) | undefined)",
|
|
664
|
+
value: input.multipleOf
|
|
665
|
+
}), "number" === input.type || _report(_exceptionable, {
|
|
666
|
+
path: _path + ".type",
|
|
667
|
+
expected: "\"number\"",
|
|
668
|
+
value: input.type
|
|
669
|
+
})].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => [undefined === input.format || "string" === typeof input.format || _report(_exceptionable, {
|
|
670
|
+
path: _path + ".format",
|
|
671
|
+
expected: "(string | undefined)",
|
|
672
|
+
value: input.format
|
|
673
|
+
}), undefined === input.pattern || "string" === typeof input.pattern || _report(_exceptionable, {
|
|
674
|
+
path: _path + ".pattern",
|
|
675
|
+
expected: "(string | undefined)",
|
|
676
|
+
value: input.pattern
|
|
677
|
+
}), undefined === input.contentMediaType || "string" === typeof input.contentMediaType || _report(_exceptionable, {
|
|
678
|
+
path: _path + ".contentMediaType",
|
|
679
|
+
expected: "(string | undefined)",
|
|
680
|
+
value: input.contentMediaType
|
|
681
|
+
}), undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000 || _report(_exceptionable, {
|
|
682
|
+
path: _path + ".minLength",
|
|
683
|
+
expected: "number & Type<\"uint64\">",
|
|
684
|
+
value: input.minLength
|
|
685
|
+
})) || _report(_exceptionable, {
|
|
686
|
+
path: _path + ".minLength",
|
|
687
|
+
expected: "((number & Type<\"uint64\">) | undefined)",
|
|
688
|
+
value: input.minLength
|
|
689
|
+
}), undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000 || _report(_exceptionable, {
|
|
690
|
+
path: _path + ".maxLength",
|
|
691
|
+
expected: "number & Type<\"uint64\">",
|
|
692
|
+
value: input.maxLength
|
|
693
|
+
})) || _report(_exceptionable, {
|
|
694
|
+
path: _path + ".maxLength",
|
|
695
|
+
expected: "((number & Type<\"uint64\">) | undefined)",
|
|
696
|
+
value: input.maxLength
|
|
697
|
+
}), "string" === input.type || _report(_exceptionable, {
|
|
698
|
+
path: _path + ".type",
|
|
699
|
+
expected: "\"string\"",
|
|
700
|
+
value: input.type
|
|
701
|
+
})].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
702
|
+
path: _path + ".description",
|
|
703
|
+
expected: "string",
|
|
704
|
+
value: input.description
|
|
705
|
+
}), "string" === typeof input.typeName || _report(_exceptionable, {
|
|
706
|
+
path: _path + ".typeName",
|
|
707
|
+
expected: "string",
|
|
708
|
+
value: input.typeName
|
|
709
|
+
})].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
710
|
+
path: _path + ".description",
|
|
711
|
+
expected: "string",
|
|
712
|
+
value: input.description
|
|
713
|
+
}), "string" === typeof input.typeName || _report(_exceptionable, {
|
|
714
|
+
path: _path + ".typeName",
|
|
715
|
+
expected: "string",
|
|
716
|
+
value: input.typeName
|
|
717
|
+
})].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
718
|
+
if ("number" === input.type)
|
|
719
|
+
return _vo5(input, _path, true && _exceptionable);
|
|
720
|
+
else if ("integer" === input.type)
|
|
721
|
+
return _vo4(input, _path, true && _exceptionable);
|
|
722
|
+
else if ("string" === input.type)
|
|
723
|
+
return _vo6(input, _path, true && _exceptionable);
|
|
724
|
+
else
|
|
725
|
+
return _report(_exceptionable, {
|
|
726
|
+
path: _path,
|
|
727
|
+
expected: "(AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.IString)",
|
|
728
|
+
value: input
|
|
729
|
+
});
|
|
730
|
+
})(); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
731
|
+
if (false === __is(input)) {
|
|
732
|
+
errors = [];
|
|
733
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
734
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
735
|
+
path: _path + "",
|
|
736
|
+
expected: "IAutoBeInterfaceOperationsReviewApplication.IProps",
|
|
737
|
+
value: input
|
|
738
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
739
|
+
path: _path + "",
|
|
740
|
+
expected: "IAutoBeInterfaceOperationsReviewApplication.IProps",
|
|
741
|
+
value: input
|
|
742
|
+
}))(input, "$input", true);
|
|
743
|
+
const success = 0 === errors.length;
|
|
744
|
+
return success ? {
|
|
745
|
+
success,
|
|
746
|
+
data: input
|
|
747
|
+
} : {
|
|
748
|
+
success,
|
|
749
|
+
errors,
|
|
1116
750
|
data: input
|
|
1117
751
|
};
|
|
1118
|
-
}
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
type: "string"
|
|
1150
|
-
},
|
|
1151
|
-
content: {
|
|
1152
|
-
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.",
|
|
1153
|
-
type: "array",
|
|
1154
|
-
items: {
|
|
1155
|
-
$ref: "#/$defs/IAutoBeInterfaceOperationsReviewApplication.IOperation"
|
|
1156
|
-
}
|
|
752
|
+
}
|
|
753
|
+
return {
|
|
754
|
+
success: true,
|
|
755
|
+
data: input
|
|
756
|
+
};
|
|
757
|
+
}; })()
|
|
758
|
+
}
|
|
759
|
+
]
|
|
760
|
+
},
|
|
761
|
+
claude: {
|
|
762
|
+
model: "claude",
|
|
763
|
+
options: {
|
|
764
|
+
reference: true,
|
|
765
|
+
separate: null
|
|
766
|
+
},
|
|
767
|
+
functions: [
|
|
768
|
+
{
|
|
769
|
+
name: "reviewOperations",
|
|
770
|
+
parameters: {
|
|
771
|
+
description: " Properties containing the thinking process (review & plan)\nand the 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 AutoBeInterfaceOperationsReviewEvent.",
|
|
772
|
+
type: "object",
|
|
773
|
+
properties: {
|
|
774
|
+
think: {
|
|
775
|
+
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.",
|
|
776
|
+
$ref: "#/$defs/IAutoBeInterfaceOperationsReviewApplication.IThink"
|
|
777
|
+
},
|
|
778
|
+
content: {
|
|
779
|
+
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.",
|
|
780
|
+
type: "array",
|
|
781
|
+
items: {
|
|
782
|
+
$ref: "#/$defs/AutoBeOpenApi.IOperation"
|
|
1157
783
|
}
|
|
784
|
+
}
|
|
785
|
+
},
|
|
786
|
+
required: [
|
|
787
|
+
"think",
|
|
788
|
+
"content"
|
|
789
|
+
],
|
|
790
|
+
additionalProperties: false,
|
|
791
|
+
$defs: {
|
|
792
|
+
"IAutoBeInterfaceOperationsReviewApplication.IThink": {
|
|
793
|
+
description: "Structured thinking process for comprehensive API operation review.\n\nCombines analytical review findings with actionable improvement planning\nto guide the systematic enhancement of API operations. This thinking\nstructure ensures all aspects of API quality are evaluated and addressed\nbefore producing the final operations.",
|
|
794
|
+
type: "object",
|
|
795
|
+
properties: {
|
|
796
|
+
review: {
|
|
797
|
+
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.",
|
|
798
|
+
type: "string"
|
|
799
|
+
},
|
|
800
|
+
plan: {
|
|
801
|
+
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.",
|
|
802
|
+
type: "string"
|
|
803
|
+
}
|
|
804
|
+
},
|
|
805
|
+
required: [
|
|
806
|
+
"review",
|
|
807
|
+
"plan"
|
|
808
|
+
]
|
|
1158
809
|
},
|
|
1159
|
-
|
|
1160
|
-
"
|
|
1161
|
-
"
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
{
|
|
1182
|
-
type: "null"
|
|
1183
|
-
},
|
|
1184
|
-
{
|
|
1185
|
-
type: "string"
|
|
1186
|
-
}
|
|
1187
|
-
]
|
|
1188
|
-
},
|
|
1189
|
-
description: {
|
|
1190
|
-
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**:\nDO NOT use terms like \"soft delete\", \"soft-delete\", or similar variations\nin this description UNLESS the operation actually implements soft deletion.\nThese keywords trigger validation logic that expects a corresponding\nsoft_delete_column to be specified. Only use these terms when you intend\nto implement soft deletion (marking records as deleted without removing\nthem from the database).\n\nExample of problematic description:\n\u274C \"This would normally be a soft-delete, but we intentionally perform\npermanent deletion here\" - This triggers soft delete validation despite\nbeing a hard delete operation.\n\n> MUST be written in English. Never use other languages.",
|
|
1191
|
-
type: "string"
|
|
1192
|
-
},
|
|
1193
|
-
name: {
|
|
1194
|
-
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.",
|
|
1195
|
-
type: "string",
|
|
1196
|
-
pattern: "^[a-z][a-zA-Z0-9]*$"
|
|
1197
|
-
},
|
|
1198
|
-
specification: {
|
|
1199
|
-
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.",
|
|
1200
|
-
type: "string"
|
|
1201
|
-
},
|
|
1202
|
-
summary: {
|
|
1203
|
-
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**:\nDO NOT use terms like \"soft delete\", \"soft-delete\", or similar variations\nin this summary UNLESS the operation actually implements soft deletion.\nThese keywords trigger validation logic that expects a corresponding\nsoft_delete_column to be specified. Only use these terms when you intend\nto implement soft deletion (marking records as deleted without removing\nthem from the database).\n\n> MUST be written in English. Never use other languages",
|
|
1204
|
-
type: "string"
|
|
1205
|
-
},
|
|
1206
|
-
path: {
|
|
1207
|
-
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)",
|
|
1208
|
-
type: "string",
|
|
1209
|
-
pattern: "^\\/[a-zA-Z0-9\\/_{}.-]*$"
|
|
1210
|
-
},
|
|
1211
|
-
parameters: {
|
|
1212
|
-
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`",
|
|
1213
|
-
type: "array",
|
|
1214
|
-
items: {
|
|
1215
|
-
$ref: "#/$defs/AutoBeOpenApi.IParameter"
|
|
810
|
+
"AutoBeOpenApi.IOperation": {
|
|
811
|
+
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```",
|
|
812
|
+
type: "object",
|
|
813
|
+
properties: {
|
|
814
|
+
specification: {
|
|
815
|
+
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.",
|
|
816
|
+
type: "string"
|
|
817
|
+
},
|
|
818
|
+
authorizationType: {
|
|
819
|
+
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`",
|
|
820
|
+
oneOf: [
|
|
821
|
+
{
|
|
822
|
+
type: "null"
|
|
823
|
+
},
|
|
824
|
+
{
|
|
825
|
+
"const": "login"
|
|
826
|
+
},
|
|
827
|
+
{
|
|
828
|
+
"const": "join"
|
|
829
|
+
},
|
|
830
|
+
{
|
|
831
|
+
"const": "refresh"
|
|
1216
832
|
}
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
},
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
{
|
|
1233
|
-
type: "null"
|
|
1234
|
-
},
|
|
1235
|
-
{
|
|
1236
|
-
$ref: "#/$defs/AutoBeOpenApi.IResponseBody"
|
|
1237
|
-
}
|
|
1238
|
-
]
|
|
1239
|
-
},
|
|
1240
|
-
authorizationRole: {
|
|
1241
|
-
description: "Authorization role required to access this API operation.\n\nThis field specifies which user role is allowed to access this endpoint.\nThe role name must correspond exactly to the actual roles defined in your\nsystem's Prisma schema.\n\n## Naming Convention\n\nRole names MUST use camelCase.\n\n## Role-Based Path Convention\n\nWhen authorizationRole is specified, it should align with the path\nstructure:\n\n- If authorizationRole is \"admin\" \u2192 path might be \"/admin/resources/{id}\"\n- If authorizationRole is \"seller\" \u2192 path might be \"/seller/products\"\n- Special case: For user's own resources, use path prefix \"/my/\" regardless\n of role\n\n## Important Guidelines\n\n- Set to `null` for public endpoints that require no authentication\n- Set to specific role string for role-restricted endpoints\n- The role name MUST match exactly with the user type/role defined in the\n database\n- This role 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 role\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.",
|
|
1242
|
-
oneOf: [
|
|
1243
|
-
{
|
|
1244
|
-
type: "null"
|
|
1245
|
-
},
|
|
1246
|
-
{
|
|
1247
|
-
type: "string",
|
|
1248
|
-
pattern: "^[a-z][a-zA-Z0-9]*$",
|
|
1249
|
-
minLength: 1
|
|
1250
|
-
}
|
|
1251
|
-
]
|
|
1252
|
-
},
|
|
1253
|
-
method: {
|
|
1254
|
-
description: "HTTP method of the API operation.\n\n**IMPORTANT**: Methods must be written in lowercase only (e.g., \"get\", not \"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",
|
|
1255
|
-
oneOf: [
|
|
1256
|
-
{
|
|
1257
|
-
"const": "get"
|
|
1258
|
-
},
|
|
1259
|
-
{
|
|
1260
|
-
"const": "post"
|
|
1261
|
-
},
|
|
1262
|
-
{
|
|
1263
|
-
"const": "put"
|
|
1264
|
-
},
|
|
1265
|
-
{
|
|
1266
|
-
"const": "delete"
|
|
1267
|
-
},
|
|
1268
|
-
{
|
|
1269
|
-
"const": "patch"
|
|
1270
|
-
}
|
|
1271
|
-
]
|
|
833
|
+
]
|
|
834
|
+
},
|
|
835
|
+
description: {
|
|
836
|
+
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.",
|
|
837
|
+
type: "string"
|
|
838
|
+
},
|
|
839
|
+
summary: {
|
|
840
|
+
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",
|
|
841
|
+
type: "string"
|
|
842
|
+
},
|
|
843
|
+
parameters: {
|
|
844
|
+
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`",
|
|
845
|
+
type: "array",
|
|
846
|
+
items: {
|
|
847
|
+
$ref: "#/$defs/AutoBeOpenApi.IParameter"
|
|
1272
848
|
}
|
|
1273
849
|
},
|
|
1274
|
-
|
|
1275
|
-
"
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
"path",
|
|
1283
|
-
"parameters",
|
|
1284
|
-
"requestBody",
|
|
1285
|
-
"responseBody",
|
|
1286
|
-
"authorizationRole",
|
|
1287
|
-
"method"
|
|
1288
|
-
]
|
|
1289
|
-
},
|
|
1290
|
-
"AutoBeOpenApi.IParameter": {
|
|
1291
|
-
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```",
|
|
1292
|
-
type: "object",
|
|
1293
|
-
properties: {
|
|
1294
|
-
name: {
|
|
1295
|
-
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.",
|
|
1296
|
-
type: "string",
|
|
1297
|
-
pattern: "^[a-z][a-zA-Z0-9]*$"
|
|
1298
|
-
},
|
|
1299
|
-
description: {
|
|
1300
|
-
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.",
|
|
1301
|
-
type: "string"
|
|
1302
|
-
},
|
|
1303
|
-
schema: {
|
|
1304
|
-
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.",
|
|
1305
|
-
oneOf: [
|
|
1306
|
-
{
|
|
1307
|
-
$ref: "#/$defs/AutoBeOpenApi.IJsonSchema.INumber"
|
|
1308
|
-
},
|
|
1309
|
-
{
|
|
1310
|
-
$ref: "#/$defs/AutoBeOpenApi.IJsonSchema.IInteger"
|
|
1311
|
-
},
|
|
1312
|
-
{
|
|
1313
|
-
$ref: "#/$defs/AutoBeOpenApi.IJsonSchema.IString"
|
|
1314
|
-
}
|
|
1315
|
-
],
|
|
1316
|
-
discriminator: {
|
|
1317
|
-
propertyName: "type",
|
|
1318
|
-
mapping: {
|
|
1319
|
-
number: "#/$defs/AutoBeOpenApi.IJsonSchema.INumber",
|
|
1320
|
-
integer: "#/$defs/AutoBeOpenApi.IJsonSchema.IInteger",
|
|
1321
|
-
string: "#/$defs/AutoBeOpenApi.IJsonSchema.IString"
|
|
1322
|
-
}
|
|
850
|
+
requestBody: {
|
|
851
|
+
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.",
|
|
852
|
+
oneOf: [
|
|
853
|
+
{
|
|
854
|
+
type: "null"
|
|
855
|
+
},
|
|
856
|
+
{
|
|
857
|
+
$ref: "#/$defs/AutoBeOpenApi.IRequestBody"
|
|
1323
858
|
}
|
|
1324
|
-
|
|
859
|
+
]
|
|
860
|
+
},
|
|
861
|
+
responseBody: {
|
|
862
|
+
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.",
|
|
863
|
+
oneOf: [
|
|
864
|
+
{
|
|
865
|
+
type: "null"
|
|
866
|
+
},
|
|
867
|
+
{
|
|
868
|
+
$ref: "#/$defs/AutoBeOpenApi.IResponseBody"
|
|
869
|
+
}
|
|
870
|
+
]
|
|
871
|
+
},
|
|
872
|
+
authorizationRole: {
|
|
873
|
+
description: "Authorization role required to access this API operation.\n\nThis field specifies which user role is allowed to access this endpoint.\nThe role name must correspond exactly to the actual roles defined in your\nsystem's Prisma schema.\n\n## Naming Convention\n\nRole names MUST use camelCase.\n\n## Role-Based Path Convention\n\nWhen authorizationRole is specified, it should align with the path\nstructure:\n\n- If authorizationRole is \"admin\" \u2192 path might be \"/admin/resources/{id}\"\n- If authorizationRole is \"seller\" \u2192 path might be \"/seller/products\"\n- Special case: For user's own resources, use path prefix \"/my/\" regardless\n of role\n\n## Important Guidelines\n\n- Set to `null` for public endpoints that require no authentication\n- Set to specific role string for role-restricted endpoints\n- The role name MUST match exactly with the user type/role defined in the\n database\n- This role 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 role\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.",
|
|
874
|
+
oneOf: [
|
|
875
|
+
{
|
|
876
|
+
type: "null"
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
type: "string",
|
|
880
|
+
pattern: "^[a-z][a-zA-Z0-9]*$",
|
|
881
|
+
minLength: 1
|
|
882
|
+
}
|
|
883
|
+
]
|
|
884
|
+
},
|
|
885
|
+
name: {
|
|
886
|
+
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.",
|
|
887
|
+
type: "string",
|
|
888
|
+
pattern: "^[a-z][a-zA-Z0-9]*$"
|
|
889
|
+
},
|
|
890
|
+
path: {
|
|
891
|
+
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)",
|
|
892
|
+
type: "string",
|
|
893
|
+
pattern: "^\\/[a-zA-Z0-9\\/_{}.-]*$"
|
|
1325
894
|
},
|
|
1326
|
-
|
|
1327
|
-
"
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
895
|
+
method: {
|
|
896
|
+
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",
|
|
897
|
+
oneOf: [
|
|
898
|
+
{
|
|
899
|
+
"const": "get"
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
"const": "post"
|
|
903
|
+
},
|
|
904
|
+
{
|
|
905
|
+
"const": "put"
|
|
906
|
+
},
|
|
907
|
+
{
|
|
908
|
+
"const": "delete"
|
|
909
|
+
},
|
|
910
|
+
{
|
|
911
|
+
"const": "patch"
|
|
912
|
+
}
|
|
913
|
+
]
|
|
914
|
+
}
|
|
1331
915
|
},
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
},
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
type:
|
|
1358
|
-
|
|
1359
|
-
|
|
916
|
+
required: [
|
|
917
|
+
"specification",
|
|
918
|
+
"authorizationType",
|
|
919
|
+
"description",
|
|
920
|
+
"summary",
|
|
921
|
+
"parameters",
|
|
922
|
+
"requestBody",
|
|
923
|
+
"responseBody",
|
|
924
|
+
"authorizationRole",
|
|
925
|
+
"name",
|
|
926
|
+
"path",
|
|
927
|
+
"method"
|
|
928
|
+
]
|
|
929
|
+
},
|
|
930
|
+
"AutoBeOpenApi.IParameter": {
|
|
931
|
+
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```",
|
|
932
|
+
type: "object",
|
|
933
|
+
properties: {
|
|
934
|
+
name: {
|
|
935
|
+
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.",
|
|
936
|
+
type: "string",
|
|
937
|
+
pattern: "^[a-z][a-zA-Z0-9]*$"
|
|
938
|
+
},
|
|
939
|
+
description: {
|
|
940
|
+
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.",
|
|
941
|
+
type: "string"
|
|
942
|
+
},
|
|
943
|
+
schema: {
|
|
944
|
+
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.",
|
|
945
|
+
oneOf: [
|
|
946
|
+
{
|
|
947
|
+
$ref: "#/$defs/AutoBeOpenApi.IJsonSchema.INumber"
|
|
948
|
+
},
|
|
949
|
+
{
|
|
950
|
+
$ref: "#/$defs/AutoBeOpenApi.IJsonSchema.IInteger"
|
|
951
|
+
},
|
|
952
|
+
{
|
|
953
|
+
$ref: "#/$defs/AutoBeOpenApi.IJsonSchema.IString"
|
|
954
|
+
}
|
|
955
|
+
],
|
|
956
|
+
discriminator: {
|
|
957
|
+
propertyName: "type",
|
|
958
|
+
mapping: {
|
|
959
|
+
number: "#/$defs/AutoBeOpenApi.IJsonSchema.INumber",
|
|
960
|
+
integer: "#/$defs/AutoBeOpenApi.IJsonSchema.IInteger",
|
|
961
|
+
string: "#/$defs/AutoBeOpenApi.IJsonSchema.IString"
|
|
962
|
+
}
|
|
1360
963
|
}
|
|
964
|
+
}
|
|
965
|
+
},
|
|
966
|
+
required: [
|
|
967
|
+
"name",
|
|
968
|
+
"description",
|
|
969
|
+
"schema"
|
|
970
|
+
]
|
|
971
|
+
},
|
|
972
|
+
"AutoBeOpenApi.IJsonSchema.INumber": {
|
|
973
|
+
description: "Number (double) type info.",
|
|
974
|
+
type: "object",
|
|
975
|
+
properties: {
|
|
976
|
+
minimum: {
|
|
977
|
+
description: "Minimum value restriction.",
|
|
978
|
+
type: "number"
|
|
979
|
+
},
|
|
980
|
+
maximum: {
|
|
981
|
+
description: "Maximum value restriction.",
|
|
982
|
+
type: "number"
|
|
983
|
+
},
|
|
984
|
+
exclusiveMinimum: {
|
|
985
|
+
description: "Exclusive minimum value restriction.",
|
|
986
|
+
type: "number"
|
|
987
|
+
},
|
|
988
|
+
exclusiveMaximum: {
|
|
989
|
+
description: "Exclusive maximum value restriction.",
|
|
990
|
+
type: "number"
|
|
991
|
+
},
|
|
992
|
+
multipleOf: {
|
|
993
|
+
description: "Multiple of value restriction.",
|
|
994
|
+
type: "number",
|
|
995
|
+
exclusiveMinimum: 0
|
|
1361
996
|
},
|
|
1362
|
-
|
|
1363
|
-
"type"
|
|
1364
|
-
|
|
997
|
+
type: {
|
|
998
|
+
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.",
|
|
999
|
+
"const": "number"
|
|
1000
|
+
}
|
|
1365
1001
|
},
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
},
|
|
1382
|
-
exclusiveMaximum: {
|
|
1383
|
-
description: "Exclusive maximum value restriction.",
|
|
1384
|
-
type: "number"
|
|
1385
|
-
},
|
|
1386
|
-
multipleOf: {
|
|
1387
|
-
description: "Multiple of value restriction.",
|
|
1388
|
-
type: "integer",
|
|
1389
|
-
exclusiveMinimum: 0
|
|
1390
|
-
},
|
|
1391
|
-
type: {
|
|
1392
|
-
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.",
|
|
1393
|
-
"const": "integer"
|
|
1394
|
-
}
|
|
1002
|
+
required: [
|
|
1003
|
+
"type"
|
|
1004
|
+
]
|
|
1005
|
+
},
|
|
1006
|
+
"AutoBeOpenApi.IJsonSchema.IInteger": {
|
|
1007
|
+
description: "Integer type info.",
|
|
1008
|
+
type: "object",
|
|
1009
|
+
properties: {
|
|
1010
|
+
minimum: {
|
|
1011
|
+
description: "Minimum value restriction.",
|
|
1012
|
+
type: "integer"
|
|
1013
|
+
},
|
|
1014
|
+
maximum: {
|
|
1015
|
+
description: "Maximum value restriction.",
|
|
1016
|
+
type: "integer"
|
|
1395
1017
|
},
|
|
1396
|
-
|
|
1397
|
-
"
|
|
1398
|
-
|
|
1018
|
+
exclusiveMinimum: {
|
|
1019
|
+
description: "Exclusive minimum value restriction.",
|
|
1020
|
+
type: "number"
|
|
1021
|
+
},
|
|
1022
|
+
exclusiveMaximum: {
|
|
1023
|
+
description: "Exclusive maximum value restriction.",
|
|
1024
|
+
type: "number"
|
|
1025
|
+
},
|
|
1026
|
+
multipleOf: {
|
|
1027
|
+
description: "Multiple of value restriction.",
|
|
1028
|
+
type: "integer",
|
|
1029
|
+
exclusiveMinimum: 0
|
|
1030
|
+
},
|
|
1031
|
+
type: {
|
|
1032
|
+
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.",
|
|
1033
|
+
"const": "integer"
|
|
1034
|
+
}
|
|
1399
1035
|
},
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
minimum: 0
|
|
1425
|
-
},
|
|
1426
|
-
type: {
|
|
1427
|
-
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.",
|
|
1428
|
-
"const": "string"
|
|
1429
|
-
}
|
|
1036
|
+
required: [
|
|
1037
|
+
"type"
|
|
1038
|
+
]
|
|
1039
|
+
},
|
|
1040
|
+
"AutoBeOpenApi.IJsonSchema.IString": {
|
|
1041
|
+
description: "String type info.",
|
|
1042
|
+
type: "object",
|
|
1043
|
+
properties: {
|
|
1044
|
+
format: {
|
|
1045
|
+
description: "Format restriction.",
|
|
1046
|
+
type: "string"
|
|
1047
|
+
},
|
|
1048
|
+
pattern: {
|
|
1049
|
+
description: "Pattern restriction.",
|
|
1050
|
+
type: "string"
|
|
1051
|
+
},
|
|
1052
|
+
contentMediaType: {
|
|
1053
|
+
description: "Content media type restriction.",
|
|
1054
|
+
type: "string"
|
|
1055
|
+
},
|
|
1056
|
+
minLength: {
|
|
1057
|
+
description: "Minimum length restriction.",
|
|
1058
|
+
type: "integer",
|
|
1059
|
+
minimum: 0
|
|
1430
1060
|
},
|
|
1431
|
-
|
|
1432
|
-
"
|
|
1433
|
-
|
|
1061
|
+
maxLength: {
|
|
1062
|
+
description: "Maximum length restriction.",
|
|
1063
|
+
type: "integer",
|
|
1064
|
+
minimum: 0
|
|
1065
|
+
},
|
|
1066
|
+
type: {
|
|
1067
|
+
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.",
|
|
1068
|
+
"const": "string"
|
|
1069
|
+
}
|
|
1434
1070
|
},
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
}
|
|
1071
|
+
required: [
|
|
1072
|
+
"type"
|
|
1073
|
+
]
|
|
1074
|
+
},
|
|
1075
|
+
"AutoBeOpenApi.IRequestBody": {
|
|
1076
|
+
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```",
|
|
1077
|
+
type: "object",
|
|
1078
|
+
properties: {
|
|
1079
|
+
description: {
|
|
1080
|
+
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.",
|
|
1081
|
+
type: "string"
|
|
1447
1082
|
},
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
"
|
|
1451
|
-
|
|
1083
|
+
typeName: {
|
|
1084
|
+
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```",
|
|
1085
|
+
type: "string"
|
|
1086
|
+
}
|
|
1452
1087
|
},
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1088
|
+
required: [
|
|
1089
|
+
"description",
|
|
1090
|
+
"typeName"
|
|
1091
|
+
]
|
|
1092
|
+
},
|
|
1093
|
+
"AutoBeOpenApi.IResponseBody": {
|
|
1094
|
+
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```",
|
|
1095
|
+
type: "object",
|
|
1096
|
+
properties: {
|
|
1097
|
+
description: {
|
|
1098
|
+
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.",
|
|
1099
|
+
type: "string"
|
|
1465
1100
|
},
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
"
|
|
1469
|
-
|
|
1470
|
-
}
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
if ("number" === input.type)
|
|
1476
|
-
return _io4(input);
|
|
1477
|
-
else if ("integer" === input.type)
|
|
1478
|
-
return _io3(input);
|
|
1479
|
-
else if ("string" === input.type)
|
|
1480
|
-
return _io5(input);
|
|
1481
|
-
else
|
|
1482
|
-
return false;
|
|
1483
|
-
})(); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.review || _report(_exceptionable, {
|
|
1484
|
-
path: _path + ".review",
|
|
1485
|
-
expected: "string",
|
|
1486
|
-
value: input.review
|
|
1487
|
-
}), "string" === typeof input.plan || _report(_exceptionable, {
|
|
1488
|
-
path: _path + ".plan",
|
|
1489
|
-
expected: "string",
|
|
1490
|
-
value: input.plan
|
|
1491
|
-
}), (Array.isArray(input.content) || _report(_exceptionable, {
|
|
1492
|
-
path: _path + ".content",
|
|
1493
|
-
expected: "Array<IAutoBeInterfaceOperationsReviewApplication.IOperation>",
|
|
1494
|
-
value: input.content
|
|
1495
|
-
})) && input.content.map((elem, _index3) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1496
|
-
path: _path + ".content[" + _index3 + "]",
|
|
1497
|
-
expected: "IAutoBeInterfaceOperationsReviewApplication.IOperation",
|
|
1498
|
-
value: elem
|
|
1499
|
-
})) && _vo1(elem, _path + ".content[" + _index3 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1500
|
-
path: _path + ".content[" + _index3 + "]",
|
|
1501
|
-
expected: "IAutoBeInterfaceOperationsReviewApplication.IOperation",
|
|
1502
|
-
value: elem
|
|
1503
|
-
})).every(flag => flag) || _report(_exceptionable, {
|
|
1504
|
-
path: _path + ".content",
|
|
1505
|
-
expected: "Array<IAutoBeInterfaceOperationsReviewApplication.IOperation>",
|
|
1506
|
-
value: input.content
|
|
1507
|
-
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.prisma_schemas || _report(_exceptionable, {
|
|
1508
|
-
path: _path + ".prisma_schemas",
|
|
1509
|
-
expected: "string",
|
|
1510
|
-
value: input.prisma_schemas
|
|
1511
|
-
}), "string" === typeof input.model_name || _report(_exceptionable, {
|
|
1512
|
-
path: _path + ".model_name",
|
|
1513
|
-
expected: "string",
|
|
1514
|
-
value: input.model_name
|
|
1515
|
-
}), null === input.soft_delete_column || "string" === typeof input.soft_delete_column || _report(_exceptionable, {
|
|
1516
|
-
path: _path + ".soft_delete_column",
|
|
1517
|
-
expected: "(null | string)",
|
|
1518
|
-
value: input.soft_delete_column
|
|
1519
|
-
}), "string" === typeof input.description || _report(_exceptionable, {
|
|
1520
|
-
path: _path + ".description",
|
|
1521
|
-
expected: "string",
|
|
1522
|
-
value: input.description
|
|
1523
|
-
}), "string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
|
|
1524
|
-
path: _path + ".name",
|
|
1525
|
-
expected: "string & CamelPattern",
|
|
1526
|
-
value: input.name
|
|
1527
|
-
})) || _report(_exceptionable, {
|
|
1528
|
-
path: _path + ".name",
|
|
1529
|
-
expected: "(string & CamelPattern)",
|
|
1530
|
-
value: input.name
|
|
1531
|
-
}), "string" === typeof input.specification || _report(_exceptionable, {
|
|
1532
|
-
path: _path + ".specification",
|
|
1533
|
-
expected: "string",
|
|
1534
|
-
value: input.specification
|
|
1535
|
-
}), "string" === typeof input.summary || _report(_exceptionable, {
|
|
1536
|
-
path: _path + ".summary",
|
|
1537
|
-
expected: "string",
|
|
1538
|
-
value: input.summary
|
|
1539
|
-
}), "string" === typeof input.path && (RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) || _report(_exceptionable, {
|
|
1540
|
-
path: _path + ".path",
|
|
1541
|
-
expected: "string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">",
|
|
1542
|
-
value: input.path
|
|
1543
|
-
})) || _report(_exceptionable, {
|
|
1544
|
-
path: _path + ".path",
|
|
1545
|
-
expected: "(string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">)",
|
|
1546
|
-
value: input.path
|
|
1547
|
-
}), (Array.isArray(input.parameters) || _report(_exceptionable, {
|
|
1548
|
-
path: _path + ".parameters",
|
|
1549
|
-
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
1550
|
-
value: input.parameters
|
|
1551
|
-
})) && input.parameters.map((elem, _index4) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1552
|
-
path: _path + ".parameters[" + _index4 + "]",
|
|
1553
|
-
expected: "AutoBeOpenApi.IParameter",
|
|
1554
|
-
value: elem
|
|
1555
|
-
})) && _vo2(elem, _path + ".parameters[" + _index4 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1556
|
-
path: _path + ".parameters[" + _index4 + "]",
|
|
1557
|
-
expected: "AutoBeOpenApi.IParameter",
|
|
1558
|
-
value: elem
|
|
1559
|
-
})).every(flag => flag) || _report(_exceptionable, {
|
|
1560
|
-
path: _path + ".parameters",
|
|
1561
|
-
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
1562
|
-
value: input.parameters
|
|
1563
|
-
}), null === input.requestBody || ("object" === typeof input.requestBody && null !== input.requestBody || _report(_exceptionable, {
|
|
1564
|
-
path: _path + ".requestBody",
|
|
1565
|
-
expected: "(AutoBeOpenApi.IRequestBody | null)",
|
|
1566
|
-
value: input.requestBody
|
|
1567
|
-
})) && _vo6(input.requestBody, _path + ".requestBody", true && _exceptionable) || _report(_exceptionable, {
|
|
1568
|
-
path: _path + ".requestBody",
|
|
1569
|
-
expected: "(AutoBeOpenApi.IRequestBody | null)",
|
|
1570
|
-
value: input.requestBody
|
|
1571
|
-
}), null === input.responseBody || ("object" === typeof input.responseBody && null !== input.responseBody || _report(_exceptionable, {
|
|
1572
|
-
path: _path + ".responseBody",
|
|
1573
|
-
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
1574
|
-
value: input.responseBody
|
|
1575
|
-
})) && _vo7(input.responseBody, _path + ".responseBody", true && _exceptionable) || _report(_exceptionable, {
|
|
1576
|
-
path: _path + ".responseBody",
|
|
1577
|
-
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
1578
|
-
value: input.responseBody
|
|
1579
|
-
}), null === input.authorizationRole || "string" === typeof input.authorizationRole && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.authorizationRole) || _report(_exceptionable, {
|
|
1580
|
-
path: _path + ".authorizationRole",
|
|
1581
|
-
expected: "string & CamelPattern",
|
|
1582
|
-
value: input.authorizationRole
|
|
1583
|
-
})) && (1 <= input.authorizationRole.length || _report(_exceptionable, {
|
|
1584
|
-
path: _path + ".authorizationRole",
|
|
1585
|
-
expected: "string & MinLength<1>",
|
|
1586
|
-
value: input.authorizationRole
|
|
1587
|
-
})) || _report(_exceptionable, {
|
|
1588
|
-
path: _path + ".authorizationRole",
|
|
1589
|
-
expected: "((string & CamelPattern & MinLength<1>) | null)",
|
|
1590
|
-
value: input.authorizationRole
|
|
1591
|
-
}), "get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method || _report(_exceptionable, {
|
|
1592
|
-
path: _path + ".method",
|
|
1593
|
-
expected: "(\"delete\" | \"get\" | \"patch\" | \"post\" | \"put\")",
|
|
1594
|
-
value: input.method
|
|
1595
|
-
})].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
|
|
1596
|
-
path: _path + ".name",
|
|
1597
|
-
expected: "string & CamelPattern",
|
|
1598
|
-
value: input.name
|
|
1599
|
-
})) || _report(_exceptionable, {
|
|
1600
|
-
path: _path + ".name",
|
|
1601
|
-
expected: "(string & CamelPattern)",
|
|
1602
|
-
value: input.name
|
|
1603
|
-
}), "string" === typeof input.description || _report(_exceptionable, {
|
|
1604
|
-
path: _path + ".description",
|
|
1605
|
-
expected: "string",
|
|
1606
|
-
value: input.description
|
|
1607
|
-
}), ("object" === typeof input.schema && null !== input.schema || _report(_exceptionable, {
|
|
1608
|
-
path: _path + ".schema",
|
|
1609
|
-
expected: "(AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IString)",
|
|
1610
|
-
value: input.schema
|
|
1611
|
-
})) && _vu0(input.schema, _path + ".schema", true && _exceptionable) || _report(_exceptionable, {
|
|
1612
|
-
path: _path + ".schema",
|
|
1613
|
-
expected: "(AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IString)",
|
|
1614
|
-
value: input.schema
|
|
1615
|
-
})].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, {
|
|
1616
|
-
path: _path + ".minimum",
|
|
1617
|
-
expected: "number & Type<\"int64\">",
|
|
1618
|
-
value: input.minimum
|
|
1619
|
-
})) || _report(_exceptionable, {
|
|
1620
|
-
path: _path + ".minimum",
|
|
1621
|
-
expected: "((number & Type<\"int64\">) | undefined)",
|
|
1622
|
-
value: input.minimum
|
|
1623
|
-
}), undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000 || _report(_exceptionable, {
|
|
1624
|
-
path: _path + ".maximum",
|
|
1625
|
-
expected: "number & Type<\"int64\">",
|
|
1626
|
-
value: input.maximum
|
|
1627
|
-
})) || _report(_exceptionable, {
|
|
1628
|
-
path: _path + ".maximum",
|
|
1629
|
-
expected: "((number & Type<\"int64\">) | undefined)",
|
|
1630
|
-
value: input.maximum
|
|
1631
|
-
}), undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || _report(_exceptionable, {
|
|
1632
|
-
path: _path + ".exclusiveMinimum",
|
|
1633
|
-
expected: "(number | undefined)",
|
|
1634
|
-
value: input.exclusiveMinimum
|
|
1635
|
-
}), undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || _report(_exceptionable, {
|
|
1636
|
-
path: _path + ".exclusiveMaximum",
|
|
1637
|
-
expected: "(number | undefined)",
|
|
1638
|
-
value: input.exclusiveMaximum
|
|
1639
|
-
}), undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 || _report(_exceptionable, {
|
|
1640
|
-
path: _path + ".multipleOf",
|
|
1641
|
-
expected: "number & Type<\"uint64\">",
|
|
1642
|
-
value: input.multipleOf
|
|
1643
|
-
})) && (0 < input.multipleOf || _report(_exceptionable, {
|
|
1644
|
-
path: _path + ".multipleOf",
|
|
1645
|
-
expected: "number & ExclusiveMinimum<0>",
|
|
1646
|
-
value: input.multipleOf
|
|
1647
|
-
})) || _report(_exceptionable, {
|
|
1648
|
-
path: _path + ".multipleOf",
|
|
1649
|
-
expected: "((number & Type<\"uint64\"> & ExclusiveMinimum<0>) | undefined)",
|
|
1650
|
-
value: input.multipleOf
|
|
1651
|
-
}), "integer" === input.type || _report(_exceptionable, {
|
|
1652
|
-
path: _path + ".type",
|
|
1653
|
-
expected: "\"integer\"",
|
|
1654
|
-
value: input.type
|
|
1655
|
-
})].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => [undefined === input.minimum || "number" === typeof input.minimum || _report(_exceptionable, {
|
|
1656
|
-
path: _path + ".minimum",
|
|
1657
|
-
expected: "(number | undefined)",
|
|
1658
|
-
value: input.minimum
|
|
1659
|
-
}), undefined === input.maximum || "number" === typeof input.maximum || _report(_exceptionable, {
|
|
1660
|
-
path: _path + ".maximum",
|
|
1661
|
-
expected: "(number | undefined)",
|
|
1662
|
-
value: input.maximum
|
|
1663
|
-
}), undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || _report(_exceptionable, {
|
|
1664
|
-
path: _path + ".exclusiveMinimum",
|
|
1665
|
-
expected: "(number | undefined)",
|
|
1666
|
-
value: input.exclusiveMinimum
|
|
1667
|
-
}), undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || _report(_exceptionable, {
|
|
1668
|
-
path: _path + ".exclusiveMaximum",
|
|
1669
|
-
expected: "(number | undefined)",
|
|
1670
|
-
value: input.exclusiveMaximum
|
|
1671
|
-
}), undefined === input.multipleOf || "number" === typeof input.multipleOf && (0 < input.multipleOf || _report(_exceptionable, {
|
|
1672
|
-
path: _path + ".multipleOf",
|
|
1673
|
-
expected: "number & ExclusiveMinimum<0>",
|
|
1674
|
-
value: input.multipleOf
|
|
1675
|
-
})) || _report(_exceptionable, {
|
|
1676
|
-
path: _path + ".multipleOf",
|
|
1677
|
-
expected: "((number & ExclusiveMinimum<0>) | undefined)",
|
|
1678
|
-
value: input.multipleOf
|
|
1679
|
-
}), "number" === input.type || _report(_exceptionable, {
|
|
1680
|
-
path: _path + ".type",
|
|
1681
|
-
expected: "\"number\"",
|
|
1682
|
-
value: input.type
|
|
1683
|
-
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [undefined === input.format || "string" === typeof input.format || _report(_exceptionable, {
|
|
1684
|
-
path: _path + ".format",
|
|
1685
|
-
expected: "(string | undefined)",
|
|
1686
|
-
value: input.format
|
|
1687
|
-
}), undefined === input.pattern || "string" === typeof input.pattern || _report(_exceptionable, {
|
|
1688
|
-
path: _path + ".pattern",
|
|
1689
|
-
expected: "(string | undefined)",
|
|
1690
|
-
value: input.pattern
|
|
1691
|
-
}), undefined === input.contentMediaType || "string" === typeof input.contentMediaType || _report(_exceptionable, {
|
|
1692
|
-
path: _path + ".contentMediaType",
|
|
1693
|
-
expected: "(string | undefined)",
|
|
1694
|
-
value: input.contentMediaType
|
|
1695
|
-
}), undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000 || _report(_exceptionable, {
|
|
1696
|
-
path: _path + ".minLength",
|
|
1697
|
-
expected: "number & Type<\"uint64\">",
|
|
1698
|
-
value: input.minLength
|
|
1699
|
-
})) || _report(_exceptionable, {
|
|
1700
|
-
path: _path + ".minLength",
|
|
1701
|
-
expected: "((number & Type<\"uint64\">) | undefined)",
|
|
1702
|
-
value: input.minLength
|
|
1703
|
-
}), undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000 || _report(_exceptionable, {
|
|
1704
|
-
path: _path + ".maxLength",
|
|
1705
|
-
expected: "number & Type<\"uint64\">",
|
|
1706
|
-
value: input.maxLength
|
|
1707
|
-
})) || _report(_exceptionable, {
|
|
1708
|
-
path: _path + ".maxLength",
|
|
1709
|
-
expected: "((number & Type<\"uint64\">) | undefined)",
|
|
1710
|
-
value: input.maxLength
|
|
1711
|
-
}), "string" === input.type || _report(_exceptionable, {
|
|
1712
|
-
path: _path + ".type",
|
|
1713
|
-
expected: "\"string\"",
|
|
1714
|
-
value: input.type
|
|
1715
|
-
})].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
1716
|
-
path: _path + ".description",
|
|
1717
|
-
expected: "string",
|
|
1718
|
-
value: input.description
|
|
1719
|
-
}), "string" === typeof input.typeName || _report(_exceptionable, {
|
|
1720
|
-
path: _path + ".typeName",
|
|
1721
|
-
expected: "string",
|
|
1722
|
-
value: input.typeName
|
|
1723
|
-
})].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
1724
|
-
path: _path + ".description",
|
|
1725
|
-
expected: "string",
|
|
1726
|
-
value: input.description
|
|
1727
|
-
}), "string" === typeof input.typeName || _report(_exceptionable, {
|
|
1728
|
-
path: _path + ".typeName",
|
|
1729
|
-
expected: "string",
|
|
1730
|
-
value: input.typeName
|
|
1731
|
-
})].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
1732
|
-
if ("number" === input.type)
|
|
1733
|
-
return _vo4(input, _path, true && _exceptionable);
|
|
1734
|
-
else if ("integer" === input.type)
|
|
1735
|
-
return _vo3(input, _path, true && _exceptionable);
|
|
1736
|
-
else if ("string" === input.type)
|
|
1737
|
-
return _vo5(input, _path, true && _exceptionable);
|
|
1738
|
-
else
|
|
1739
|
-
return _report(_exceptionable, {
|
|
1740
|
-
path: _path,
|
|
1741
|
-
expected: "(AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.IString)",
|
|
1742
|
-
value: input
|
|
1743
|
-
});
|
|
1744
|
-
})(); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
1745
|
-
if (false === __is(input)) {
|
|
1746
|
-
errors = [];
|
|
1747
|
-
_report = __typia_transform__validateReport._validateReport(errors);
|
|
1748
|
-
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
1749
|
-
path: _path + "",
|
|
1750
|
-
expected: "IAutoBeInterfaceOperationsReviewApplication.IProps",
|
|
1751
|
-
value: input
|
|
1752
|
-
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
1753
|
-
path: _path + "",
|
|
1754
|
-
expected: "IAutoBeInterfaceOperationsReviewApplication.IProps",
|
|
1755
|
-
value: input
|
|
1756
|
-
}))(input, "$input", true);
|
|
1757
|
-
const success = 0 === errors.length;
|
|
1758
|
-
return success ? {
|
|
1759
|
-
success,
|
|
1760
|
-
data: input
|
|
1761
|
-
} : {
|
|
1762
|
-
success,
|
|
1763
|
-
errors,
|
|
1764
|
-
data: input
|
|
1765
|
-
};
|
|
1101
|
+
typeName: {
|
|
1102
|
+
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```",
|
|
1103
|
+
type: "string"
|
|
1104
|
+
}
|
|
1105
|
+
},
|
|
1106
|
+
required: [
|
|
1107
|
+
"description",
|
|
1108
|
+
"typeName"
|
|
1109
|
+
]
|
|
1766
1110
|
}
|
|
1767
|
-
|
|
1768
|
-
|
|
1111
|
+
}
|
|
1112
|
+
},
|
|
1113
|
+
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.",
|
|
1114
|
+
validate: (() => { 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.authorizationRole || "string" === typeof input.authorizationRole && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.authorizationRole) && 1 <= input.authorizationRole.length)) && ("string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name)) && ("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 || "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 _io7 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io8 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _iu0 = input => (() => {
|
|
1115
|
+
if ("number" === input.type)
|
|
1116
|
+
return _io5(input);
|
|
1117
|
+
else if ("integer" === input.type)
|
|
1118
|
+
return _io4(input);
|
|
1119
|
+
else if ("string" === input.type)
|
|
1120
|
+
return _io6(input);
|
|
1121
|
+
else
|
|
1122
|
+
return false;
|
|
1123
|
+
})(); const _vo0 = (input, _path, _exceptionable = true) => [("object" === typeof input.think && null !== input.think || _report(_exceptionable, {
|
|
1124
|
+
path: _path + ".think",
|
|
1125
|
+
expected: "IAutoBeInterfaceOperationsReviewApplication.IThink",
|
|
1126
|
+
value: input.think
|
|
1127
|
+
})) && _vo1(input.think, _path + ".think", true && _exceptionable) || _report(_exceptionable, {
|
|
1128
|
+
path: _path + ".think",
|
|
1129
|
+
expected: "IAutoBeInterfaceOperationsReviewApplication.IThink",
|
|
1130
|
+
value: input.think
|
|
1131
|
+
}), (Array.isArray(input.content) || _report(_exceptionable, {
|
|
1132
|
+
path: _path + ".content",
|
|
1133
|
+
expected: "Array<AutoBeOpenApi.IOperation>",
|
|
1134
|
+
value: input.content
|
|
1135
|
+
})) && input.content.map((elem, _index3) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1136
|
+
path: _path + ".content[" + _index3 + "]",
|
|
1137
|
+
expected: "AutoBeOpenApi.IOperation",
|
|
1138
|
+
value: elem
|
|
1139
|
+
})) && _vo2(elem, _path + ".content[" + _index3 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1140
|
+
path: _path + ".content[" + _index3 + "]",
|
|
1141
|
+
expected: "AutoBeOpenApi.IOperation",
|
|
1142
|
+
value: elem
|
|
1143
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
1144
|
+
path: _path + ".content",
|
|
1145
|
+
expected: "Array<AutoBeOpenApi.IOperation>",
|
|
1146
|
+
value: input.content
|
|
1147
|
+
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.review || _report(_exceptionable, {
|
|
1148
|
+
path: _path + ".review",
|
|
1149
|
+
expected: "string",
|
|
1150
|
+
value: input.review
|
|
1151
|
+
}), "string" === typeof input.plan || _report(_exceptionable, {
|
|
1152
|
+
path: _path + ".plan",
|
|
1153
|
+
expected: "string",
|
|
1154
|
+
value: input.plan
|
|
1155
|
+
})].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.specification || _report(_exceptionable, {
|
|
1156
|
+
path: _path + ".specification",
|
|
1157
|
+
expected: "string",
|
|
1158
|
+
value: input.specification
|
|
1159
|
+
}), null === input.authorizationType || "login" === input.authorizationType || "join" === input.authorizationType || "refresh" === input.authorizationType || _report(_exceptionable, {
|
|
1160
|
+
path: _path + ".authorizationType",
|
|
1161
|
+
expected: "(\"join\" | \"login\" | \"refresh\" | null)",
|
|
1162
|
+
value: input.authorizationType
|
|
1163
|
+
}), "string" === typeof input.description || _report(_exceptionable, {
|
|
1164
|
+
path: _path + ".description",
|
|
1165
|
+
expected: "string",
|
|
1166
|
+
value: input.description
|
|
1167
|
+
}), "string" === typeof input.summary || _report(_exceptionable, {
|
|
1168
|
+
path: _path + ".summary",
|
|
1169
|
+
expected: "string",
|
|
1170
|
+
value: input.summary
|
|
1171
|
+
}), (Array.isArray(input.parameters) || _report(_exceptionable, {
|
|
1172
|
+
path: _path + ".parameters",
|
|
1173
|
+
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
1174
|
+
value: input.parameters
|
|
1175
|
+
})) && input.parameters.map((elem, _index4) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1176
|
+
path: _path + ".parameters[" + _index4 + "]",
|
|
1177
|
+
expected: "AutoBeOpenApi.IParameter",
|
|
1178
|
+
value: elem
|
|
1179
|
+
})) && _vo3(elem, _path + ".parameters[" + _index4 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1180
|
+
path: _path + ".parameters[" + _index4 + "]",
|
|
1181
|
+
expected: "AutoBeOpenApi.IParameter",
|
|
1182
|
+
value: elem
|
|
1183
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
1184
|
+
path: _path + ".parameters",
|
|
1185
|
+
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
1186
|
+
value: input.parameters
|
|
1187
|
+
}), null === input.requestBody || ("object" === typeof input.requestBody && null !== input.requestBody || _report(_exceptionable, {
|
|
1188
|
+
path: _path + ".requestBody",
|
|
1189
|
+
expected: "(AutoBeOpenApi.IRequestBody | null)",
|
|
1190
|
+
value: input.requestBody
|
|
1191
|
+
})) && _vo7(input.requestBody, _path + ".requestBody", true && _exceptionable) || _report(_exceptionable, {
|
|
1192
|
+
path: _path + ".requestBody",
|
|
1193
|
+
expected: "(AutoBeOpenApi.IRequestBody | null)",
|
|
1194
|
+
value: input.requestBody
|
|
1195
|
+
}), null === input.responseBody || ("object" === typeof input.responseBody && null !== input.responseBody || _report(_exceptionable, {
|
|
1196
|
+
path: _path + ".responseBody",
|
|
1197
|
+
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
1198
|
+
value: input.responseBody
|
|
1199
|
+
})) && _vo8(input.responseBody, _path + ".responseBody", true && _exceptionable) || _report(_exceptionable, {
|
|
1200
|
+
path: _path + ".responseBody",
|
|
1201
|
+
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
1202
|
+
value: input.responseBody
|
|
1203
|
+
}), null === input.authorizationRole || "string" === typeof input.authorizationRole && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.authorizationRole) || _report(_exceptionable, {
|
|
1204
|
+
path: _path + ".authorizationRole",
|
|
1205
|
+
expected: "string & CamelPattern",
|
|
1206
|
+
value: input.authorizationRole
|
|
1207
|
+
})) && (1 <= input.authorizationRole.length || _report(_exceptionable, {
|
|
1208
|
+
path: _path + ".authorizationRole",
|
|
1209
|
+
expected: "string & MinLength<1>",
|
|
1210
|
+
value: input.authorizationRole
|
|
1211
|
+
})) || _report(_exceptionable, {
|
|
1212
|
+
path: _path + ".authorizationRole",
|
|
1213
|
+
expected: "((string & CamelPattern & MinLength<1>) | null)",
|
|
1214
|
+
value: input.authorizationRole
|
|
1215
|
+
}), "string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
|
|
1216
|
+
path: _path + ".name",
|
|
1217
|
+
expected: "string & CamelPattern",
|
|
1218
|
+
value: input.name
|
|
1219
|
+
})) || _report(_exceptionable, {
|
|
1220
|
+
path: _path + ".name",
|
|
1221
|
+
expected: "(string & CamelPattern)",
|
|
1222
|
+
value: input.name
|
|
1223
|
+
}), "string" === typeof input.path && (RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) || _report(_exceptionable, {
|
|
1224
|
+
path: _path + ".path",
|
|
1225
|
+
expected: "string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">",
|
|
1226
|
+
value: input.path
|
|
1227
|
+
})) || _report(_exceptionable, {
|
|
1228
|
+
path: _path + ".path",
|
|
1229
|
+
expected: "(string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">)",
|
|
1230
|
+
value: input.path
|
|
1231
|
+
}), "get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method || _report(_exceptionable, {
|
|
1232
|
+
path: _path + ".method",
|
|
1233
|
+
expected: "(\"delete\" | \"get\" | \"patch\" | \"post\" | \"put\")",
|
|
1234
|
+
value: input.method
|
|
1235
|
+
})].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, {
|
|
1236
|
+
path: _path + ".name",
|
|
1237
|
+
expected: "string & CamelPattern",
|
|
1238
|
+
value: input.name
|
|
1239
|
+
})) || _report(_exceptionable, {
|
|
1240
|
+
path: _path + ".name",
|
|
1241
|
+
expected: "(string & CamelPattern)",
|
|
1242
|
+
value: input.name
|
|
1243
|
+
}), "string" === typeof input.description || _report(_exceptionable, {
|
|
1244
|
+
path: _path + ".description",
|
|
1245
|
+
expected: "string",
|
|
1246
|
+
value: input.description
|
|
1247
|
+
}), ("object" === typeof input.schema && null !== input.schema || _report(_exceptionable, {
|
|
1248
|
+
path: _path + ".schema",
|
|
1249
|
+
expected: "(AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IString)",
|
|
1250
|
+
value: input.schema
|
|
1251
|
+
})) && _vu0(input.schema, _path + ".schema", true && _exceptionable) || _report(_exceptionable, {
|
|
1252
|
+
path: _path + ".schema",
|
|
1253
|
+
expected: "(AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IString)",
|
|
1254
|
+
value: input.schema
|
|
1255
|
+
})].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, {
|
|
1256
|
+
path: _path + ".minimum",
|
|
1257
|
+
expected: "number & Type<\"int64\">",
|
|
1258
|
+
value: input.minimum
|
|
1259
|
+
})) || _report(_exceptionable, {
|
|
1260
|
+
path: _path + ".minimum",
|
|
1261
|
+
expected: "((number & Type<\"int64\">) | undefined)",
|
|
1262
|
+
value: input.minimum
|
|
1263
|
+
}), undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000 || _report(_exceptionable, {
|
|
1264
|
+
path: _path + ".maximum",
|
|
1265
|
+
expected: "number & Type<\"int64\">",
|
|
1266
|
+
value: input.maximum
|
|
1267
|
+
})) || _report(_exceptionable, {
|
|
1268
|
+
path: _path + ".maximum",
|
|
1269
|
+
expected: "((number & Type<\"int64\">) | undefined)",
|
|
1270
|
+
value: input.maximum
|
|
1271
|
+
}), undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || _report(_exceptionable, {
|
|
1272
|
+
path: _path + ".exclusiveMinimum",
|
|
1273
|
+
expected: "(number | undefined)",
|
|
1274
|
+
value: input.exclusiveMinimum
|
|
1275
|
+
}), undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || _report(_exceptionable, {
|
|
1276
|
+
path: _path + ".exclusiveMaximum",
|
|
1277
|
+
expected: "(number | undefined)",
|
|
1278
|
+
value: input.exclusiveMaximum
|
|
1279
|
+
}), undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 || _report(_exceptionable, {
|
|
1280
|
+
path: _path + ".multipleOf",
|
|
1281
|
+
expected: "number & Type<\"uint64\">",
|
|
1282
|
+
value: input.multipleOf
|
|
1283
|
+
})) && (0 < input.multipleOf || _report(_exceptionable, {
|
|
1284
|
+
path: _path + ".multipleOf",
|
|
1285
|
+
expected: "number & ExclusiveMinimum<0>",
|
|
1286
|
+
value: input.multipleOf
|
|
1287
|
+
})) || _report(_exceptionable, {
|
|
1288
|
+
path: _path + ".multipleOf",
|
|
1289
|
+
expected: "((number & Type<\"uint64\"> & ExclusiveMinimum<0>) | undefined)",
|
|
1290
|
+
value: input.multipleOf
|
|
1291
|
+
}), "integer" === input.type || _report(_exceptionable, {
|
|
1292
|
+
path: _path + ".type",
|
|
1293
|
+
expected: "\"integer\"",
|
|
1294
|
+
value: input.type
|
|
1295
|
+
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [undefined === input.minimum || "number" === typeof input.minimum || _report(_exceptionable, {
|
|
1296
|
+
path: _path + ".minimum",
|
|
1297
|
+
expected: "(number | undefined)",
|
|
1298
|
+
value: input.minimum
|
|
1299
|
+
}), undefined === input.maximum || "number" === typeof input.maximum || _report(_exceptionable, {
|
|
1300
|
+
path: _path + ".maximum",
|
|
1301
|
+
expected: "(number | undefined)",
|
|
1302
|
+
value: input.maximum
|
|
1303
|
+
}), undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || _report(_exceptionable, {
|
|
1304
|
+
path: _path + ".exclusiveMinimum",
|
|
1305
|
+
expected: "(number | undefined)",
|
|
1306
|
+
value: input.exclusiveMinimum
|
|
1307
|
+
}), undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || _report(_exceptionable, {
|
|
1308
|
+
path: _path + ".exclusiveMaximum",
|
|
1309
|
+
expected: "(number | undefined)",
|
|
1310
|
+
value: input.exclusiveMaximum
|
|
1311
|
+
}), undefined === input.multipleOf || "number" === typeof input.multipleOf && (0 < input.multipleOf || _report(_exceptionable, {
|
|
1312
|
+
path: _path + ".multipleOf",
|
|
1313
|
+
expected: "number & ExclusiveMinimum<0>",
|
|
1314
|
+
value: input.multipleOf
|
|
1315
|
+
})) || _report(_exceptionable, {
|
|
1316
|
+
path: _path + ".multipleOf",
|
|
1317
|
+
expected: "((number & ExclusiveMinimum<0>) | undefined)",
|
|
1318
|
+
value: input.multipleOf
|
|
1319
|
+
}), "number" === input.type || _report(_exceptionable, {
|
|
1320
|
+
path: _path + ".type",
|
|
1321
|
+
expected: "\"number\"",
|
|
1322
|
+
value: input.type
|
|
1323
|
+
})].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => [undefined === input.format || "string" === typeof input.format || _report(_exceptionable, {
|
|
1324
|
+
path: _path + ".format",
|
|
1325
|
+
expected: "(string | undefined)",
|
|
1326
|
+
value: input.format
|
|
1327
|
+
}), undefined === input.pattern || "string" === typeof input.pattern || _report(_exceptionable, {
|
|
1328
|
+
path: _path + ".pattern",
|
|
1329
|
+
expected: "(string | undefined)",
|
|
1330
|
+
value: input.pattern
|
|
1331
|
+
}), undefined === input.contentMediaType || "string" === typeof input.contentMediaType || _report(_exceptionable, {
|
|
1332
|
+
path: _path + ".contentMediaType",
|
|
1333
|
+
expected: "(string | undefined)",
|
|
1334
|
+
value: input.contentMediaType
|
|
1335
|
+
}), undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000 || _report(_exceptionable, {
|
|
1336
|
+
path: _path + ".minLength",
|
|
1337
|
+
expected: "number & Type<\"uint64\">",
|
|
1338
|
+
value: input.minLength
|
|
1339
|
+
})) || _report(_exceptionable, {
|
|
1340
|
+
path: _path + ".minLength",
|
|
1341
|
+
expected: "((number & Type<\"uint64\">) | undefined)",
|
|
1342
|
+
value: input.minLength
|
|
1343
|
+
}), undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000 || _report(_exceptionable, {
|
|
1344
|
+
path: _path + ".maxLength",
|
|
1345
|
+
expected: "number & Type<\"uint64\">",
|
|
1346
|
+
value: input.maxLength
|
|
1347
|
+
})) || _report(_exceptionable, {
|
|
1348
|
+
path: _path + ".maxLength",
|
|
1349
|
+
expected: "((number & Type<\"uint64\">) | undefined)",
|
|
1350
|
+
value: input.maxLength
|
|
1351
|
+
}), "string" === input.type || _report(_exceptionable, {
|
|
1352
|
+
path: _path + ".type",
|
|
1353
|
+
expected: "\"string\"",
|
|
1354
|
+
value: input.type
|
|
1355
|
+
})].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
1356
|
+
path: _path + ".description",
|
|
1357
|
+
expected: "string",
|
|
1358
|
+
value: input.description
|
|
1359
|
+
}), "string" === typeof input.typeName || _report(_exceptionable, {
|
|
1360
|
+
path: _path + ".typeName",
|
|
1361
|
+
expected: "string",
|
|
1362
|
+
value: input.typeName
|
|
1363
|
+
})].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
1364
|
+
path: _path + ".description",
|
|
1365
|
+
expected: "string",
|
|
1366
|
+
value: input.description
|
|
1367
|
+
}), "string" === typeof input.typeName || _report(_exceptionable, {
|
|
1368
|
+
path: _path + ".typeName",
|
|
1369
|
+
expected: "string",
|
|
1370
|
+
value: input.typeName
|
|
1371
|
+
})].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
1372
|
+
if ("number" === input.type)
|
|
1373
|
+
return _vo5(input, _path, true && _exceptionable);
|
|
1374
|
+
else if ("integer" === input.type)
|
|
1375
|
+
return _vo4(input, _path, true && _exceptionable);
|
|
1376
|
+
else if ("string" === input.type)
|
|
1377
|
+
return _vo6(input, _path, true && _exceptionable);
|
|
1378
|
+
else
|
|
1379
|
+
return _report(_exceptionable, {
|
|
1380
|
+
path: _path,
|
|
1381
|
+
expected: "(AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.IString)",
|
|
1382
|
+
value: input
|
|
1383
|
+
});
|
|
1384
|
+
})(); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
1385
|
+
if (false === __is(input)) {
|
|
1386
|
+
errors = [];
|
|
1387
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
1388
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
1389
|
+
path: _path + "",
|
|
1390
|
+
expected: "IAutoBeInterfaceOperationsReviewApplication.IProps",
|
|
1391
|
+
value: input
|
|
1392
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
1393
|
+
path: _path + "",
|
|
1394
|
+
expected: "IAutoBeInterfaceOperationsReviewApplication.IProps",
|
|
1395
|
+
value: input
|
|
1396
|
+
}))(input, "$input", true);
|
|
1397
|
+
const success = 0 === errors.length;
|
|
1398
|
+
return success ? {
|
|
1399
|
+
success,
|
|
1400
|
+
data: input
|
|
1401
|
+
} : {
|
|
1402
|
+
success,
|
|
1403
|
+
errors,
|
|
1769
1404
|
data: input
|
|
1770
1405
|
};
|
|
1771
|
-
}
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
return application;
|
|
1781
|
-
})(),
|
|
1406
|
+
}
|
|
1407
|
+
return {
|
|
1408
|
+
success: true,
|
|
1409
|
+
data: input
|
|
1410
|
+
};
|
|
1411
|
+
}; })()
|
|
1412
|
+
}
|
|
1413
|
+
]
|
|
1414
|
+
},
|
|
1782
1415
|
};
|
|
1783
1416
|
//# sourceMappingURL=orchestrateInterfaceOperationsReview.js.map
|