@autobe/agent 0.26.0 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/AutoBeAgent.d.ts +2 -1
- package/lib/AutoBeAgent.js +27 -7
- package/lib/AutoBeAgent.js.map +1 -1
- package/lib/AutoBeMockAgent.js +2 -4
- package/lib/AutoBeMockAgent.js.map +1 -1
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +11 -11
- package/lib/context/AutoBeContext.d.ts +4 -1
- package/lib/context/AutoBeTokenUsage.d.ts +1 -1
- package/lib/context/AutoBeTokenUsage.js.map +1 -1
- package/lib/context/assertSchemaModel.d.ts +1 -1
- package/lib/context/assertSchemaModel.js +4 -7
- package/lib/context/assertSchemaModel.js.map +1 -1
- package/lib/factory/AutoBeFunctionCallingMetricFactory.d.ts +7 -0
- package/lib/factory/AutoBeFunctionCallingMetricFactory.js +35 -0
- package/lib/factory/AutoBeFunctionCallingMetricFactory.js.map +1 -0
- package/lib/factory/AutoBeProcessAggregateFactory.d.ts +13 -0
- package/lib/factory/AutoBeProcessAggregateFactory.js +100 -0
- package/lib/factory/AutoBeProcessAggregateFactory.js.map +1 -0
- package/lib/factory/createAutoBeContext.d.ts +2 -1
- package/lib/factory/createAutoBeContext.js +78 -27
- package/lib/factory/createAutoBeContext.js.map +1 -1
- package/lib/index.mjs +24065 -12997
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyze.js +1 -0
- package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeReview.js +166 -87
- package/lib/orchestrate/analyze/orchestrateAnalyzeReview.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js +639 -322
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js +146 -76
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -1
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +17 -52
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +25 -22
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +7 -23
- package/lib/orchestrate/common/orchestrateCommonCorrectCasting.d.ts +2 -1
- package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js +168 -4
- package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js.map +1 -1
- package/lib/{factory/createAutoBeApplication.d.ts → orchestrate/facade/createAutoBeFacadeController.d.ts} +2 -2
- package/lib/orchestrate/facade/createAutoBeFacadeController.js +1308 -0
- package/lib/orchestrate/facade/createAutoBeFacadeController.js.map +1 -0
- package/lib/orchestrate/facade/histories/IAutoBeFacadeApplication.js.map +1 -0
- package/lib/orchestrate/facade/histories/IAutoBeFacadeApplicationProps.js.map +1 -0
- package/lib/orchestrate/facade/histories/IAutoBeFacadeApplicationResult.js.map +1 -0
- package/lib/orchestrate/facade/{transformFacadeStateMessage.d.ts → structures/transformFacadeStateMessage.d.ts} +1 -1
- package/lib/orchestrate/facade/structures/transformFacadeStateMessage.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js +2 -2
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js +3 -2
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +2 -2
- package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterface.d.ts +1 -1
- package/lib/orchestrate/interface/orchestrateInterface.js +15 -8
- package/lib/orchestrate/interface/orchestrateInterface.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js +874 -49
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js +1858 -67
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +251 -133
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.d.ts +0 -6
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.js +257 -135
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.js +341 -227
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +761 -49
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.js +911 -50
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.js +207 -4
- package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.js +109 -2
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.d.ts +5 -3
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js +1904 -77
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js +1858 -67
- package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -1
- package/lib/orchestrate/interface/utils/JsonSchemaFactory.js +23 -23
- package/lib/orchestrate/prisma/orchestratePrisma.d.ts +1 -1
- package/lib/orchestrate/prisma/orchestratePrisma.js +1 -0
- package/lib/orchestrate/prisma/orchestratePrisma.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js +391 -197
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +1168 -591
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaReview.js +1186 -600
- package/lib/orchestrate/prisma/orchestratePrismaReview.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.js +6 -3
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js +2 -2
- package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealize.d.ts +1 -1
- package/lib/orchestrate/realize/orchestrateRealize.js +2 -1
- package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js +362 -180
- package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +399 -199
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.js +133 -4
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeCorrectCasting.js +171 -7
- package/lib/orchestrate/realize/orchestrateRealizeCorrectCasting.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeWrite.js +132 -3
- package/lib/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
- package/lib/orchestrate/realize/utils/replaceImportStatements.js +0 -85
- package/lib/orchestrate/realize/utils/replaceImportStatements.js.map +1 -1
- package/lib/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTest.d.ts +1 -1
- package/lib/orchestrate/test/orchestrateTest.js +2 -1
- package/lib/orchestrate/test/orchestrateTest.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestCorrect.js +134 -3
- package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js +169 -4
- package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestScenario.js +257 -4
- package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestScenarioReview.js +283 -4
- package/lib/orchestrate/test/orchestrateTestScenarioReview.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestWrite.js +141 -3
- package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -1
- package/lib/utils/TokenUsageComputer.d.ts +5 -0
- package/lib/utils/TokenUsageComputer.js +29 -0
- package/lib/utils/TokenUsageComputer.js.map +1 -0
- package/package.json +10 -10
- package/src/AutoBeAgent.ts +40 -6
- package/src/AutoBeMockAgent.ts +2 -4
- package/src/constants/AutoBeSystemPromptConstant.ts +11 -11
- package/src/context/AutoBeContext.ts +8 -0
- package/src/context/AutoBeTokenUsage.ts +1 -1
- package/src/context/assertSchemaModel.ts +5 -8
- package/src/factory/AutoBeFunctionCallingMetricFactory.ts +44 -0
- package/src/factory/AutoBeProcessAggregateFactory.ts +141 -0
- package/src/factory/createAutoBeContext.ts +96 -36
- package/src/orchestrate/analyze/orchestrateAnalyze.ts +1 -0
- package/src/orchestrate/analyze/orchestrateAnalyzeReview.ts +9 -10
- package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +15 -10
- package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +10 -11
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.ts +19 -54
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.ts +25 -22
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.ts +8 -24
- package/src/orchestrate/common/orchestrateCommonCorrectCasting.ts +20 -3
- package/src/orchestrate/facade/createAutoBeFacadeController.ts +136 -0
- package/src/orchestrate/facade/{transformFacadeStateMessage.ts → structures/transformFacadeStateMessage.ts} +2 -2
- package/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.ts +1 -0
- package/src/orchestrate/interface/orchestrateInterface.ts +17 -6
- package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +13 -2
- package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +13 -2
- package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +16 -11
- package/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.ts +16 -13
- package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +19 -15
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +13 -2
- package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +16 -2
- package/src/orchestrate/interface/orchestrateInterfacePrerequisites.ts +13 -2
- package/src/orchestrate/interface/orchestrateInterfaceSchemaRename.ts +11 -2
- package/src/orchestrate/interface/orchestrateInterfaceSchemaReview.ts +24 -16
- package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +13 -2
- package/src/orchestrate/prisma/orchestratePrisma.ts +2 -1
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +15 -10
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +9 -10
- package/src/orchestrate/prisma/orchestratePrismaReview.ts +9 -11
- package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +2 -1
- package/src/orchestrate/realize/orchestrateRealize.ts +3 -2
- package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +15 -10
- package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +15 -10
- package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +14 -3
- package/src/orchestrate/realize/orchestrateRealizeCorrectCasting.ts +21 -6
- package/src/orchestrate/realize/orchestrateRealizeWrite.ts +13 -2
- package/src/orchestrate/realize/utils/replaceImportStatements.ts +0 -90
- package/src/orchestrate/test/experimental/orchestrateTestWrite.ast +5 -1
- package/src/orchestrate/test/histories/transformTestWriteHistories.ts +1 -1
- package/src/orchestrate/test/orchestrateTest.ts +3 -2
- package/src/orchestrate/test/orchestrateTestCorrect.ts +14 -2
- package/src/orchestrate/test/orchestrateTestCorrectInvalidRequest.ts +21 -3
- package/src/orchestrate/test/orchestrateTestScenario.ts +13 -2
- package/src/orchestrate/test/orchestrateTestScenarioReview.ts +13 -2
- package/src/orchestrate/test/orchestrateTestWrite.ts +13 -2
- package/src/utils/TokenUsageComputer.ts +35 -0
- package/lib/context/IAutoBeFacadeApplication.js.map +0 -1
- package/lib/context/IAutoBeFacadeApplicationProps.js.map +0 -1
- package/lib/context/IAutoBeFacadeApplicationResult.js.map +0 -1
- package/lib/factory/createAutoBeApplication.js +0 -942
- package/lib/factory/createAutoBeApplication.js.map +0 -1
- package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +0 -1
- package/src/factory/createAutoBeApplication.ts +0 -123
- /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplication.d.ts +0 -0
- /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplication.js +0 -0
- /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationProps.d.ts +0 -0
- /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationProps.js +0 -0
- /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationResult.d.ts +0 -0
- /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationResult.js +0 -0
- /package/lib/orchestrate/facade/{transformFacadeStateMessage.js → structures/transformFacadeStateMessage.js} +0 -0
- /package/src/{context → orchestrate/facade/histories}/IAutoBeFacadeApplication.ts +0 -0
- /package/src/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationProps.ts +0 -0
- /package/src/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationResult.ts +0 -0
|
@@ -84,7 +84,7 @@ function process(ctx, props) {
|
|
|
84
84
|
const pointer = {
|
|
85
85
|
value: null,
|
|
86
86
|
};
|
|
87
|
-
const { tokenUsage } = yield ctx.conversate({
|
|
87
|
+
const { metric, tokenUsage } = yield ctx.conversate({
|
|
88
88
|
source: "interfaceAuthorization",
|
|
89
89
|
histories: (0, transformInterfaceAuthorizationsHistories_1.transformInterfaceAuthorizationsHistories)({
|
|
90
90
|
state: ctx.state(),
|
|
@@ -109,6 +109,7 @@ function process(ctx, props) {
|
|
|
109
109
|
id: (0, uuid_1.v7)(),
|
|
110
110
|
operations: pointer.value.operations,
|
|
111
111
|
completed: ++props.progress.completed,
|
|
112
|
+
metric,
|
|
112
113
|
tokenUsage,
|
|
113
114
|
created_at: new Date().toISOString(),
|
|
114
115
|
step: (_b = (_a = ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0,
|
|
@@ -119,7 +120,7 @@ function process(ctx, props) {
|
|
|
119
120
|
function createController(props) {
|
|
120
121
|
(0, assertSchemaModel_1.assertSchemaModel)(props.model);
|
|
121
122
|
const validate = (next) => {
|
|
122
|
-
const result = (() => { const _io0 = input => Array.isArray(input.operations) && (1 <= input.operations.length && input.operations.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io1 = 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 && _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.authorizationActor || "string" === typeof input.authorizationActor && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.authorizationActor) && 1 <= input.authorizationActor.length)) && ("string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name)) && (Array.isArray(input.prerequisites) && input.prerequisites.every(elem => "object" === typeof elem && null !== elem && _io8(elem))) && ("string" === typeof input.path && RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path)) && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _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 ||
|
|
123
|
+
const result = (() => { const _iv4 = new Set(["date-time", "password", "regex", "uuid", "email", "hostname", "idn-email", "idn-hostname", "iri", "iri-reference", "ipv4", "ipv6", "uri", "uri-reference", "uri-template", "url", "date", "time", "duration", "json-pointer", "relative-json-pointer"]); const _vv8 = new Set(["date-time", "password", "regex", "uuid", "email", "hostname", "idn-email", "idn-hostname", "iri", "iri-reference", "ipv4", "ipv6", "uri", "uri-reference", "uri-template", "url", "date", "time", "duration", "json-pointer", "relative-json-pointer"]); const _io0 = input => Array.isArray(input.operations) && (1 <= input.operations.length && input.operations.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io1 = 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 && _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.authorizationActor || "string" === typeof input.authorizationActor && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.authorizationActor) && 1 <= input.authorizationActor.length)) && ("string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name)) && (Array.isArray(input.prerequisites) && input.prerequisites.every(elem => "object" === typeof elem && null !== elem && _io8(elem))) && ("string" === typeof input.path && RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path)) && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _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 || true === _iv4.has(input.format)) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type; const _io6 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io7 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io8 = input => "object" === typeof input.endpoint && null !== input.endpoint && _io9(input.endpoint) && "string" === typeof input.description; const _io9 = input => "string" === typeof input.path && RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _iu0 = input => (() => {
|
|
123
124
|
if ("number" === input.type)
|
|
124
125
|
return _io4(input);
|
|
125
126
|
else if ("integer" === input.type)
|
|
@@ -136,12 +137,12 @@ function createController(props) {
|
|
|
136
137
|
path: _path + ".operations",
|
|
137
138
|
expected: "Array<> & MinItems<1>",
|
|
138
139
|
value: input.operations
|
|
139
|
-
})) && input.operations.map((elem,
|
|
140
|
-
path: _path + ".operations[" +
|
|
140
|
+
})) && input.operations.map((elem, _index5) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
141
|
+
path: _path + ".operations[" + _index5 + "]",
|
|
141
142
|
expected: "AutoBeOpenApi.IOperation",
|
|
142
143
|
value: elem
|
|
143
|
-
})) && _vo1(elem, _path + ".operations[" +
|
|
144
|
-
path: _path + ".operations[" +
|
|
144
|
+
})) && _vo1(elem, _path + ".operations[" + _index5 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
145
|
+
path: _path + ".operations[" + _index5 + "]",
|
|
145
146
|
expected: "AutoBeOpenApi.IOperation",
|
|
146
147
|
value: elem
|
|
147
148
|
})).every(flag => flag)) || _report(_exceptionable, {
|
|
@@ -168,12 +169,12 @@ function createController(props) {
|
|
|
168
169
|
path: _path + ".parameters",
|
|
169
170
|
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
170
171
|
value: input.parameters
|
|
171
|
-
})) && input.parameters.map((elem,
|
|
172
|
-
path: _path + ".parameters[" +
|
|
172
|
+
})) && input.parameters.map((elem, _index6) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
173
|
+
path: _path + ".parameters[" + _index6 + "]",
|
|
173
174
|
expected: "AutoBeOpenApi.IParameter",
|
|
174
175
|
value: elem
|
|
175
|
-
})) && _vo2(elem, _path + ".parameters[" +
|
|
176
|
-
path: _path + ".parameters[" +
|
|
176
|
+
})) && _vo2(elem, _path + ".parameters[" + _index6 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
177
|
+
path: _path + ".parameters[" + _index6 + "]",
|
|
177
178
|
expected: "AutoBeOpenApi.IParameter",
|
|
178
179
|
value: elem
|
|
179
180
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -220,12 +221,12 @@ function createController(props) {
|
|
|
220
221
|
path: _path + ".prerequisites",
|
|
221
222
|
expected: "Array<AutoBeOpenApi.IPrerequisite>",
|
|
222
223
|
value: input.prerequisites
|
|
223
|
-
})) && input.prerequisites.map((elem,
|
|
224
|
-
path: _path + ".prerequisites[" +
|
|
224
|
+
})) && input.prerequisites.map((elem, _index7) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
225
|
+
path: _path + ".prerequisites[" + _index7 + "]",
|
|
225
226
|
expected: "AutoBeOpenApi.IPrerequisite",
|
|
226
227
|
value: elem
|
|
227
|
-
})) && _vo8(elem, _path + ".prerequisites[" +
|
|
228
|
-
path: _path + ".prerequisites[" +
|
|
228
|
+
})) && _vo8(elem, _path + ".prerequisites[" + _index7 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
229
|
+
path: _path + ".prerequisites[" + _index7 + "]",
|
|
229
230
|
expected: "AutoBeOpenApi.IPrerequisite",
|
|
230
231
|
value: elem
|
|
231
232
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -332,9 +333,9 @@ function createController(props) {
|
|
|
332
333
|
path: _path + ".type",
|
|
333
334
|
expected: "\"number\"",
|
|
334
335
|
value: input.type
|
|
335
|
-
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [undefined === input.format ||
|
|
336
|
+
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [undefined === input.format || true === _vv8.has(input.format) || _report(_exceptionable, {
|
|
336
337
|
path: _path + ".format",
|
|
337
|
-
expected: "(
|
|
338
|
+
expected: "(\"date\" | \"date-time\" | \"duration\" | \"email\" | \"hostname\" | \"idn-email\" | \"idn-hostname\" | \"ipv4\" | \"ipv6\" | \"iri\" | \"iri-reference\" | \"json-pointer\" | \"password\" | \"regex\" | \"relative-json-pointer\" | \"time\" | \"uri\" | \"uri-reference\" | \"uri-template\" | \"url\" | \"uuid\" | undefined)",
|
|
338
339
|
value: input.format
|
|
339
340
|
}), undefined === input.pattern || "string" === typeof input.pattern || _report(_exceptionable, {
|
|
340
341
|
path: _path + ".pattern",
|
|
@@ -526,7 +527,11 @@ function createController(props) {
|
|
|
526
527
|
}
|
|
527
528
|
return result;
|
|
528
529
|
};
|
|
529
|
-
const application = collection[props.model === "chatgpt"
|
|
530
|
+
const application = collection[props.model === "chatgpt"
|
|
531
|
+
? "chatgpt"
|
|
532
|
+
: props.model === "gemini"
|
|
533
|
+
? "gemini"
|
|
534
|
+
: "claude"](validate);
|
|
530
535
|
return {
|
|
531
536
|
protocol: "class",
|
|
532
537
|
name: "Create Authorization Interface",
|
|
@@ -801,7 +806,30 @@ const collection = {
|
|
|
801
806
|
properties: {
|
|
802
807
|
format: {
|
|
803
808
|
description: "Format restriction.",
|
|
804
|
-
type: "string"
|
|
809
|
+
type: "string",
|
|
810
|
+
"enum": [
|
|
811
|
+
"date-time",
|
|
812
|
+
"password",
|
|
813
|
+
"regex",
|
|
814
|
+
"uuid",
|
|
815
|
+
"email",
|
|
816
|
+
"hostname",
|
|
817
|
+
"idn-email",
|
|
818
|
+
"idn-hostname",
|
|
819
|
+
"iri",
|
|
820
|
+
"iri-reference",
|
|
821
|
+
"ipv4",
|
|
822
|
+
"ipv6",
|
|
823
|
+
"uri",
|
|
824
|
+
"uri-reference",
|
|
825
|
+
"uri-template",
|
|
826
|
+
"url",
|
|
827
|
+
"date",
|
|
828
|
+
"time",
|
|
829
|
+
"duration",
|
|
830
|
+
"json-pointer",
|
|
831
|
+
"relative-json-pointer"
|
|
832
|
+
]
|
|
805
833
|
},
|
|
806
834
|
pattern: {
|
|
807
835
|
description: "Pattern restriction.",
|
|
@@ -868,10 +896,11 @@ const collection = {
|
|
|
868
896
|
]
|
|
869
897
|
},
|
|
870
898
|
"AutoBeOpenApi.IPrerequisite": {
|
|
871
|
-
description: "Prerequisite API operation dependency.\n\n`IPrerequisite` defines a dependency relationship between API operations,\nspecifying that certain endpoints must be successfully called before the\ncurrent operation can proceed. This ensures proper resource validation,\nstate checking, and data availability in complex API workflows.\n\n## CRITICAL WARNING: Authentication is NOT a Prerequisite\n\n**NEVER use prerequisites for authentication or authorization checks!**\n\nPrerequisites are ONLY for business logic dependencies such as:\n\n- Checking if a resource exists\n- Verifying resource state\n- Loading required data\n\nDo NOT create prerequisites for:\n\n- Login/authentication endpoints\n- Token validation\n- Permission checks\n- User authorization verification\n\nAuthentication is handled separately via the `authorizationActor` field on\nthe operation itself. Mixing authentication with business prerequisites\ncreates confusion and incorrect test scenarios.\n\n## Core Concept\n\nPrerequisites create an execution dependency graph for API operations. They\nexplicitly declare which APIs must succeed before attempting the current\noperation, preventing invalid states and ensuring data consistency.\n\n## Structure\n\nEach prerequisite consists of:\n\n1. **endpoint**: The API endpoint that must be called first\n2. **description**: Clear explanation of why this prerequisite is required\n\n## Common Use Cases\n\n### 1. Resource Existence Validation\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/users/{userId}\", \"method\": \"get\" },\n \"description\": \"User must exist before updating their profile\"\n}\n```\n\n### 2. Parent-Child Relationships\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/posts/{postId}\", \"method\": \"get\" },\n \"description\": \"Post must exist before adding comments\"\n}\n```\n\n### 3. State Prerequisites\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/orders/{orderId}/status\", \"method\": \"get\" },\n \"description\": \"Order must be in 'confirmed' state before shipping\"\n}\n```\n\n### 4. Business Logic Dependencies\n\n```typescript\n{\n \"endpoint\": {\n \"path\": \"/inventory/{productId}/stock\",\n \"method\": \"get\"\n },\n \"description\": \"Product must have sufficient stock before creating order\"\n}\n```\n\n## Implementation Guidelines\n\n1. **Clear Descriptions**: Always explain WHY the prerequisite is needed\n2. **Minimal Dependencies**: Only include truly necessary prerequisites\n3. **Logical Order**: If multiple prerequisites exist, order them logically\n4. **Error Context**: Description should help understand failure scenarios\n5. **No Authentication**: Prerequisites must NEVER be authentication checks\n\n## Test Generation Usage\n\nThe Test Agent utilizes prerequisites to:\n\n- Set up test data in the correct sequence\n- Generate realistic test scenarios\n- Create both positive and negative test cases\n- Ensure proper cleanup in reverse dependency order\n\n## Best Practices\n\n- Keep prerequisite chains as short as possible for performance\n- Consider caching prerequisite results when safe to do so\n- Ensure prerequisite descriptions are specific, not generic\n- Validate that circular dependencies don't exist\n- Document any side effects of prerequisite calls\n- NEVER use for authentication/authorization validation
|
|
899
|
+
description: "Prerequisite API operation dependency.\n\n`IPrerequisite` defines a dependency relationship between API operations,\nspecifying that certain endpoints must be successfully called before the\ncurrent operation can proceed. This ensures proper resource validation,\nstate checking, and data availability in complex API workflows.\n\n## CRITICAL WARNING: Authentication is NOT a Prerequisite\n\n**NEVER use prerequisites for authentication or authorization checks!**\n\nPrerequisites are ONLY for business logic dependencies such as:\n\n- Checking if a resource exists\n- Verifying resource state\n- Loading required data\n\nDo NOT create prerequisites for:\n\n- Login/authentication endpoints\n- Token validation\n- Permission checks\n- User authorization verification\n\nAuthentication is handled separately via the `authorizationActor` field on\nthe operation itself. Mixing authentication with business prerequisites\ncreates confusion and incorrect test scenarios.\n\n## Core Concept\n\nPrerequisites create an execution dependency graph for API operations. They\nexplicitly declare which APIs must succeed before attempting the current\noperation, preventing invalid states and ensuring data consistency.\n\n## Structure\n\nEach prerequisite consists of:\n\n1. **endpoint**: The API endpoint that must be called first\n2. **description**: Clear explanation of why this prerequisite is required\n\n## Common Use Cases\n\n### 1. Resource Existence Validation\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/users/{userId}\", \"method\": \"get\" },\n \"description\": \"User must exist before updating their profile\"\n}\n```\n\n### 2. Parent-Child Relationships\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/posts/{postId}\", \"method\": \"get\" },\n \"description\": \"Post must exist before adding comments\"\n}\n```\n\n### 3. State Prerequisites\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/orders/{orderId}/status\", \"method\": \"get\" },\n \"description\": \"Order must be in 'confirmed' state before shipping\"\n}\n```\n\n### 4. Business Logic Dependencies\n\n```typescript\n{\n \"endpoint\": {\n \"path\": \"/inventory/{productId}/stock\",\n \"method\": \"get\"\n },\n \"description\": \"Product must have sufficient stock before creating order\"\n}\n```\n\n## Implementation Guidelines\n\n1. **Clear Descriptions**: Always explain WHY the prerequisite is needed\n2. **Minimal Dependencies**: Only include truly necessary prerequisites\n3. **Logical Order**: If multiple prerequisites exist, order them logically\n4. **Error Context**: Description should help understand failure scenarios\n5. **No Authentication**: Prerequisites must NEVER be authentication checks\n\n## Test Generation Usage\n\nThe Test Agent utilizes prerequisites to:\n\n- Set up test data in the correct sequence\n- Generate realistic test scenarios\n- Create both positive and negative test cases\n- Ensure proper cleanup in reverse dependency order\n\n## Best Practices\n\n- Keep prerequisite chains as short as possible for performance\n- Consider caching prerequisite results when safe to do so\n- Ensure prerequisite descriptions are specific, not generic\n- Validate that circular dependencies don't exist\n- Document any side effects of prerequisite calls\n- NEVER use for authentication/authorization validation",
|
|
872
900
|
type: "object",
|
|
873
901
|
properties: {
|
|
874
902
|
endpoint: {
|
|
903
|
+
description: "The API endpoint that must be called before the main operation.\n\nThis specifies the exact HTTP method and path of the prerequisite API.\nThe endpoint must be a valid operation defined elsewhere in the API\nspecification. Path parameters in the prerequisite endpoint can reference\nthe same parameters available in the main operation.",
|
|
875
904
|
$ref: "#/$defs/AutoBeOpenApi.IEndpoint"
|
|
876
905
|
},
|
|
877
906
|
description: {
|
|
@@ -912,7 +941,7 @@ const collection = {
|
|
|
912
941
|
}
|
|
913
942
|
},
|
|
914
943
|
description: "Creates an authorization Operations for the given roles\n\nThis method generates an OpenAPI interface that defines the authorization\nrequirements for the given roles. It ensures that the interface reflects\nthe correct permissions and access levels for each role.",
|
|
915
|
-
validate: (() => { const _io0 = input => Array.isArray(input.operations) && (1 <= input.operations.length && input.operations.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io1 = 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 && _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.authorizationActor || "string" === typeof input.authorizationActor && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.authorizationActor) && 1 <= input.authorizationActor.length)) && ("string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name)) && (Array.isArray(input.prerequisites) && input.prerequisites.every(elem => "object" === typeof elem && null !== elem && _io8(elem))) && ("string" === typeof input.path && RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path)) && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _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 ||
|
|
944
|
+
validate: (() => { const _iv4 = new Set(["date-time", "password", "regex", "uuid", "email", "hostname", "idn-email", "idn-hostname", "iri", "iri-reference", "ipv4", "ipv6", "uri", "uri-reference", "uri-template", "url", "date", "time", "duration", "json-pointer", "relative-json-pointer"]); const _vv8 = new Set(["date-time", "password", "regex", "uuid", "email", "hostname", "idn-email", "idn-hostname", "iri", "iri-reference", "ipv4", "ipv6", "uri", "uri-reference", "uri-template", "url", "date", "time", "duration", "json-pointer", "relative-json-pointer"]); const _io0 = input => Array.isArray(input.operations) && (1 <= input.operations.length && input.operations.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io1 = 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 && _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.authorizationActor || "string" === typeof input.authorizationActor && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.authorizationActor) && 1 <= input.authorizationActor.length)) && ("string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name)) && (Array.isArray(input.prerequisites) && input.prerequisites.every(elem => "object" === typeof elem && null !== elem && _io8(elem))) && ("string" === typeof input.path && RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path)) && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _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 || true === _iv4.has(input.format)) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type; const _io6 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io7 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io8 = input => "object" === typeof input.endpoint && null !== input.endpoint && _io9(input.endpoint) && "string" === typeof input.description; const _io9 = input => "string" === typeof input.path && RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _iu0 = input => (() => {
|
|
916
945
|
if ("number" === input.type)
|
|
917
946
|
return _io4(input);
|
|
918
947
|
else if ("integer" === input.type)
|
|
@@ -929,12 +958,12 @@ const collection = {
|
|
|
929
958
|
path: _path + ".operations",
|
|
930
959
|
expected: "Array<> & MinItems<1>",
|
|
931
960
|
value: input.operations
|
|
932
|
-
})) && input.operations.map((elem,
|
|
933
|
-
path: _path + ".operations[" +
|
|
961
|
+
})) && input.operations.map((elem, _index5) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
962
|
+
path: _path + ".operations[" + _index5 + "]",
|
|
934
963
|
expected: "AutoBeOpenApi.IOperation",
|
|
935
964
|
value: elem
|
|
936
|
-
})) && _vo1(elem, _path + ".operations[" +
|
|
937
|
-
path: _path + ".operations[" +
|
|
965
|
+
})) && _vo1(elem, _path + ".operations[" + _index5 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
966
|
+
path: _path + ".operations[" + _index5 + "]",
|
|
938
967
|
expected: "AutoBeOpenApi.IOperation",
|
|
939
968
|
value: elem
|
|
940
969
|
})).every(flag => flag)) || _report(_exceptionable, {
|
|
@@ -961,12 +990,12 @@ const collection = {
|
|
|
961
990
|
path: _path + ".parameters",
|
|
962
991
|
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
963
992
|
value: input.parameters
|
|
964
|
-
})) && input.parameters.map((elem,
|
|
965
|
-
path: _path + ".parameters[" +
|
|
993
|
+
})) && input.parameters.map((elem, _index6) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
994
|
+
path: _path + ".parameters[" + _index6 + "]",
|
|
966
995
|
expected: "AutoBeOpenApi.IParameter",
|
|
967
996
|
value: elem
|
|
968
|
-
})) && _vo2(elem, _path + ".parameters[" +
|
|
969
|
-
path: _path + ".parameters[" +
|
|
997
|
+
})) && _vo2(elem, _path + ".parameters[" + _index6 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
998
|
+
path: _path + ".parameters[" + _index6 + "]",
|
|
970
999
|
expected: "AutoBeOpenApi.IParameter",
|
|
971
1000
|
value: elem
|
|
972
1001
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -1013,12 +1042,12 @@ const collection = {
|
|
|
1013
1042
|
path: _path + ".prerequisites",
|
|
1014
1043
|
expected: "Array<AutoBeOpenApi.IPrerequisite>",
|
|
1015
1044
|
value: input.prerequisites
|
|
1016
|
-
})) && input.prerequisites.map((elem,
|
|
1017
|
-
path: _path + ".prerequisites[" +
|
|
1045
|
+
})) && input.prerequisites.map((elem, _index7) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1046
|
+
path: _path + ".prerequisites[" + _index7 + "]",
|
|
1018
1047
|
expected: "AutoBeOpenApi.IPrerequisite",
|
|
1019
1048
|
value: elem
|
|
1020
|
-
})) && _vo8(elem, _path + ".prerequisites[" +
|
|
1021
|
-
path: _path + ".prerequisites[" +
|
|
1049
|
+
})) && _vo8(elem, _path + ".prerequisites[" + _index7 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1050
|
+
path: _path + ".prerequisites[" + _index7 + "]",
|
|
1022
1051
|
expected: "AutoBeOpenApi.IPrerequisite",
|
|
1023
1052
|
value: elem
|
|
1024
1053
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -1125,9 +1154,9 @@ const collection = {
|
|
|
1125
1154
|
path: _path + ".type",
|
|
1126
1155
|
expected: "\"number\"",
|
|
1127
1156
|
value: input.type
|
|
1128
|
-
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [undefined === input.format ||
|
|
1157
|
+
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [undefined === input.format || true === _vv8.has(input.format) || _report(_exceptionable, {
|
|
1129
1158
|
path: _path + ".format",
|
|
1130
|
-
expected: "(
|
|
1159
|
+
expected: "(\"date\" | \"date-time\" | \"duration\" | \"email\" | \"hostname\" | \"idn-email\" | \"idn-hostname\" | \"ipv4\" | \"ipv6\" | \"iri\" | \"iri-reference\" | \"json-pointer\" | \"password\" | \"regex\" | \"relative-json-pointer\" | \"time\" | \"uri\" | \"uri-reference\" | \"uri-template\" | \"url\" | \"uuid\" | undefined)",
|
|
1131
1160
|
value: input.format
|
|
1132
1161
|
}), undefined === input.pattern || "string" === typeof input.pattern || _report(_exceptionable, {
|
|
1133
1162
|
path: _path + ".pattern",
|
|
@@ -1520,7 +1549,71 @@ const collection = {
|
|
|
1520
1549
|
properties: {
|
|
1521
1550
|
format: {
|
|
1522
1551
|
description: "Format restriction.",
|
|
1523
|
-
|
|
1552
|
+
oneOf: [
|
|
1553
|
+
{
|
|
1554
|
+
"const": "date-time"
|
|
1555
|
+
},
|
|
1556
|
+
{
|
|
1557
|
+
"const": "password"
|
|
1558
|
+
},
|
|
1559
|
+
{
|
|
1560
|
+
"const": "regex"
|
|
1561
|
+
},
|
|
1562
|
+
{
|
|
1563
|
+
"const": "uuid"
|
|
1564
|
+
},
|
|
1565
|
+
{
|
|
1566
|
+
"const": "email"
|
|
1567
|
+
},
|
|
1568
|
+
{
|
|
1569
|
+
"const": "hostname"
|
|
1570
|
+
},
|
|
1571
|
+
{
|
|
1572
|
+
"const": "idn-email"
|
|
1573
|
+
},
|
|
1574
|
+
{
|
|
1575
|
+
"const": "idn-hostname"
|
|
1576
|
+
},
|
|
1577
|
+
{
|
|
1578
|
+
"const": "iri"
|
|
1579
|
+
},
|
|
1580
|
+
{
|
|
1581
|
+
"const": "iri-reference"
|
|
1582
|
+
},
|
|
1583
|
+
{
|
|
1584
|
+
"const": "ipv4"
|
|
1585
|
+
},
|
|
1586
|
+
{
|
|
1587
|
+
"const": "ipv6"
|
|
1588
|
+
},
|
|
1589
|
+
{
|
|
1590
|
+
"const": "uri"
|
|
1591
|
+
},
|
|
1592
|
+
{
|
|
1593
|
+
"const": "uri-reference"
|
|
1594
|
+
},
|
|
1595
|
+
{
|
|
1596
|
+
"const": "uri-template"
|
|
1597
|
+
},
|
|
1598
|
+
{
|
|
1599
|
+
"const": "url"
|
|
1600
|
+
},
|
|
1601
|
+
{
|
|
1602
|
+
"const": "date"
|
|
1603
|
+
},
|
|
1604
|
+
{
|
|
1605
|
+
"const": "time"
|
|
1606
|
+
},
|
|
1607
|
+
{
|
|
1608
|
+
"const": "duration"
|
|
1609
|
+
},
|
|
1610
|
+
{
|
|
1611
|
+
"const": "json-pointer"
|
|
1612
|
+
},
|
|
1613
|
+
{
|
|
1614
|
+
"const": "relative-json-pointer"
|
|
1615
|
+
}
|
|
1616
|
+
]
|
|
1524
1617
|
},
|
|
1525
1618
|
pattern: {
|
|
1526
1619
|
description: "Pattern restriction.",
|
|
@@ -1641,7 +1734,7 @@ const collection = {
|
|
|
1641
1734
|
}
|
|
1642
1735
|
},
|
|
1643
1736
|
description: "Creates an authorization Operations for the given roles\n\nThis method generates an OpenAPI interface that defines the authorization\nrequirements for the given roles. It ensures that the interface reflects\nthe correct permissions and access levels for each role.",
|
|
1644
|
-
validate: (() => { const _io0 = input => Array.isArray(input.operations) && (1 <= input.operations.length && input.operations.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io1 = 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 && _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.authorizationActor || "string" === typeof input.authorizationActor && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.authorizationActor) && 1 <= input.authorizationActor.length)) && ("string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name)) && (Array.isArray(input.prerequisites) && input.prerequisites.every(elem => "object" === typeof elem && null !== elem && _io8(elem))) && ("string" === typeof input.path && RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path)) && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _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 ||
|
|
1737
|
+
validate: (() => { const _iv4 = new Set(["date-time", "password", "regex", "uuid", "email", "hostname", "idn-email", "idn-hostname", "iri", "iri-reference", "ipv4", "ipv6", "uri", "uri-reference", "uri-template", "url", "date", "time", "duration", "json-pointer", "relative-json-pointer"]); const _vv8 = new Set(["date-time", "password", "regex", "uuid", "email", "hostname", "idn-email", "idn-hostname", "iri", "iri-reference", "ipv4", "ipv6", "uri", "uri-reference", "uri-template", "url", "date", "time", "duration", "json-pointer", "relative-json-pointer"]); const _io0 = input => Array.isArray(input.operations) && (1 <= input.operations.length && input.operations.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io1 = 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 && _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.authorizationActor || "string" === typeof input.authorizationActor && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.authorizationActor) && 1 <= input.authorizationActor.length)) && ("string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name)) && (Array.isArray(input.prerequisites) && input.prerequisites.every(elem => "object" === typeof elem && null !== elem && _io8(elem))) && ("string" === typeof input.path && RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path)) && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _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 || true === _iv4.has(input.format)) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type; const _io6 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io7 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io8 = input => "object" === typeof input.endpoint && null !== input.endpoint && _io9(input.endpoint) && "string" === typeof input.description; const _io9 = input => "string" === typeof input.path && RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _iu0 = input => (() => {
|
|
1645
1738
|
if ("number" === input.type)
|
|
1646
1739
|
return _io4(input);
|
|
1647
1740
|
else if ("integer" === input.type)
|
|
@@ -1658,12 +1751,12 @@ const collection = {
|
|
|
1658
1751
|
path: _path + ".operations",
|
|
1659
1752
|
expected: "Array<> & MinItems<1>",
|
|
1660
1753
|
value: input.operations
|
|
1661
|
-
})) && input.operations.map((elem,
|
|
1662
|
-
path: _path + ".operations[" +
|
|
1754
|
+
})) && input.operations.map((elem, _index5) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1755
|
+
path: _path + ".operations[" + _index5 + "]",
|
|
1663
1756
|
expected: "AutoBeOpenApi.IOperation",
|
|
1664
1757
|
value: elem
|
|
1665
|
-
})) && _vo1(elem, _path + ".operations[" +
|
|
1666
|
-
path: _path + ".operations[" +
|
|
1758
|
+
})) && _vo1(elem, _path + ".operations[" + _index5 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1759
|
+
path: _path + ".operations[" + _index5 + "]",
|
|
1667
1760
|
expected: "AutoBeOpenApi.IOperation",
|
|
1668
1761
|
value: elem
|
|
1669
1762
|
})).every(flag => flag)) || _report(_exceptionable, {
|
|
@@ -1690,12 +1783,12 @@ const collection = {
|
|
|
1690
1783
|
path: _path + ".parameters",
|
|
1691
1784
|
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
1692
1785
|
value: input.parameters
|
|
1693
|
-
})) && input.parameters.map((elem,
|
|
1694
|
-
path: _path + ".parameters[" +
|
|
1786
|
+
})) && input.parameters.map((elem, _index6) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1787
|
+
path: _path + ".parameters[" + _index6 + "]",
|
|
1695
1788
|
expected: "AutoBeOpenApi.IParameter",
|
|
1696
1789
|
value: elem
|
|
1697
|
-
})) && _vo2(elem, _path + ".parameters[" +
|
|
1698
|
-
path: _path + ".parameters[" +
|
|
1790
|
+
})) && _vo2(elem, _path + ".parameters[" + _index6 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1791
|
+
path: _path + ".parameters[" + _index6 + "]",
|
|
1699
1792
|
expected: "AutoBeOpenApi.IParameter",
|
|
1700
1793
|
value: elem
|
|
1701
1794
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -1742,12 +1835,12 @@ const collection = {
|
|
|
1742
1835
|
path: _path + ".prerequisites",
|
|
1743
1836
|
expected: "Array<AutoBeOpenApi.IPrerequisite>",
|
|
1744
1837
|
value: input.prerequisites
|
|
1745
|
-
})) && input.prerequisites.map((elem,
|
|
1746
|
-
path: _path + ".prerequisites[" +
|
|
1838
|
+
})) && input.prerequisites.map((elem, _index7) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1839
|
+
path: _path + ".prerequisites[" + _index7 + "]",
|
|
1747
1840
|
expected: "AutoBeOpenApi.IPrerequisite",
|
|
1748
1841
|
value: elem
|
|
1749
|
-
})) && _vo8(elem, _path + ".prerequisites[" +
|
|
1750
|
-
path: _path + ".prerequisites[" +
|
|
1842
|
+
})) && _vo8(elem, _path + ".prerequisites[" + _index7 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1843
|
+
path: _path + ".prerequisites[" + _index7 + "]",
|
|
1751
1844
|
expected: "AutoBeOpenApi.IPrerequisite",
|
|
1752
1845
|
value: elem
|
|
1753
1846
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -1854,9 +1947,741 @@ const collection = {
|
|
|
1854
1947
|
path: _path + ".type",
|
|
1855
1948
|
expected: "\"number\"",
|
|
1856
1949
|
value: input.type
|
|
1857
|
-
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [undefined === input.format ||
|
|
1950
|
+
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [undefined === input.format || true === _vv8.has(input.format) || _report(_exceptionable, {
|
|
1858
1951
|
path: _path + ".format",
|
|
1952
|
+
expected: "(\"date\" | \"date-time\" | \"duration\" | \"email\" | \"hostname\" | \"idn-email\" | \"idn-hostname\" | \"ipv4\" | \"ipv6\" | \"iri\" | \"iri-reference\" | \"json-pointer\" | \"password\" | \"regex\" | \"relative-json-pointer\" | \"time\" | \"uri\" | \"uri-reference\" | \"uri-template\" | \"url\" | \"uuid\" | undefined)",
|
|
1953
|
+
value: input.format
|
|
1954
|
+
}), undefined === input.pattern || "string" === typeof input.pattern || _report(_exceptionable, {
|
|
1955
|
+
path: _path + ".pattern",
|
|
1859
1956
|
expected: "(string | undefined)",
|
|
1957
|
+
value: input.pattern
|
|
1958
|
+
}), undefined === input.contentMediaType || "string" === typeof input.contentMediaType || _report(_exceptionable, {
|
|
1959
|
+
path: _path + ".contentMediaType",
|
|
1960
|
+
expected: "(string | undefined)",
|
|
1961
|
+
value: input.contentMediaType
|
|
1962
|
+
}), undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000 || _report(_exceptionable, {
|
|
1963
|
+
path: _path + ".minLength",
|
|
1964
|
+
expected: "number & Type<\"uint64\">",
|
|
1965
|
+
value: input.minLength
|
|
1966
|
+
})) || _report(_exceptionable, {
|
|
1967
|
+
path: _path + ".minLength",
|
|
1968
|
+
expected: "((number & Type<\"uint64\">) | undefined)",
|
|
1969
|
+
value: input.minLength
|
|
1970
|
+
}), undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000 || _report(_exceptionable, {
|
|
1971
|
+
path: _path + ".maxLength",
|
|
1972
|
+
expected: "number & Type<\"uint64\">",
|
|
1973
|
+
value: input.maxLength
|
|
1974
|
+
})) || _report(_exceptionable, {
|
|
1975
|
+
path: _path + ".maxLength",
|
|
1976
|
+
expected: "((number & Type<\"uint64\">) | undefined)",
|
|
1977
|
+
value: input.maxLength
|
|
1978
|
+
}), "string" === input.type || _report(_exceptionable, {
|
|
1979
|
+
path: _path + ".type",
|
|
1980
|
+
expected: "\"string\"",
|
|
1981
|
+
value: input.type
|
|
1982
|
+
})].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
1983
|
+
path: _path + ".description",
|
|
1984
|
+
expected: "string",
|
|
1985
|
+
value: input.description
|
|
1986
|
+
}), "string" === typeof input.typeName || _report(_exceptionable, {
|
|
1987
|
+
path: _path + ".typeName",
|
|
1988
|
+
expected: "string",
|
|
1989
|
+
value: input.typeName
|
|
1990
|
+
})].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
1991
|
+
path: _path + ".description",
|
|
1992
|
+
expected: "string",
|
|
1993
|
+
value: input.description
|
|
1994
|
+
}), "string" === typeof input.typeName || _report(_exceptionable, {
|
|
1995
|
+
path: _path + ".typeName",
|
|
1996
|
+
expected: "string",
|
|
1997
|
+
value: input.typeName
|
|
1998
|
+
})].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => [("object" === typeof input.endpoint && null !== input.endpoint || _report(_exceptionable, {
|
|
1999
|
+
path: _path + ".endpoint",
|
|
2000
|
+
expected: "AutoBeOpenApi.IEndpoint",
|
|
2001
|
+
value: input.endpoint
|
|
2002
|
+
})) && _vo9(input.endpoint, _path + ".endpoint", true && _exceptionable) || _report(_exceptionable, {
|
|
2003
|
+
path: _path + ".endpoint",
|
|
2004
|
+
expected: "AutoBeOpenApi.IEndpoint",
|
|
2005
|
+
value: input.endpoint
|
|
2006
|
+
}), "string" === typeof input.description || _report(_exceptionable, {
|
|
2007
|
+
path: _path + ".description",
|
|
2008
|
+
expected: "string",
|
|
2009
|
+
value: input.description
|
|
2010
|
+
})].every(flag => flag); const _vo9 = (input, _path, _exceptionable = true) => ["string" === typeof input.path && (RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) || _report(_exceptionable, {
|
|
2011
|
+
path: _path + ".path",
|
|
2012
|
+
expected: "string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">",
|
|
2013
|
+
value: input.path
|
|
2014
|
+
})) || _report(_exceptionable, {
|
|
2015
|
+
path: _path + ".path",
|
|
2016
|
+
expected: "(string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">)",
|
|
2017
|
+
value: input.path
|
|
2018
|
+
}), "get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method || _report(_exceptionable, {
|
|
2019
|
+
path: _path + ".method",
|
|
2020
|
+
expected: "(\"delete\" | \"get\" | \"patch\" | \"post\" | \"put\")",
|
|
2021
|
+
value: input.method
|
|
2022
|
+
})].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
2023
|
+
if ("number" === input.type)
|
|
2024
|
+
return _vo4(input, _path, true && _exceptionable);
|
|
2025
|
+
else if ("integer" === input.type)
|
|
2026
|
+
return _vo3(input, _path, true && _exceptionable);
|
|
2027
|
+
else if ("string" === input.type)
|
|
2028
|
+
return _vo5(input, _path, true && _exceptionable);
|
|
2029
|
+
else
|
|
2030
|
+
return _report(_exceptionable, {
|
|
2031
|
+
path: _path,
|
|
2032
|
+
expected: "(AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.IString)",
|
|
2033
|
+
value: input
|
|
2034
|
+
});
|
|
2035
|
+
})(); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
2036
|
+
if (false === __is(input)) {
|
|
2037
|
+
errors = [];
|
|
2038
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
2039
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
2040
|
+
path: _path + "",
|
|
2041
|
+
expected: "IAutoBeInterfaceAuthorizationsApplication.IProps",
|
|
2042
|
+
value: input
|
|
2043
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
2044
|
+
path: _path + "",
|
|
2045
|
+
expected: "IAutoBeInterfaceAuthorizationsApplication.IProps",
|
|
2046
|
+
value: input
|
|
2047
|
+
}))(input, "$input", true);
|
|
2048
|
+
const success = 0 === errors.length;
|
|
2049
|
+
return success ? {
|
|
2050
|
+
success,
|
|
2051
|
+
data: input
|
|
2052
|
+
} : {
|
|
2053
|
+
success,
|
|
2054
|
+
errors,
|
|
2055
|
+
data: input
|
|
2056
|
+
};
|
|
2057
|
+
}
|
|
2058
|
+
return {
|
|
2059
|
+
success: true,
|
|
2060
|
+
data: input
|
|
2061
|
+
};
|
|
2062
|
+
}; })()
|
|
2063
|
+
}
|
|
2064
|
+
]
|
|
2065
|
+
};
|
|
2066
|
+
__typia_transform__llmApplicationFinalize._llmApplicationFinalize(application, Object.assign(Object.assign({}, {
|
|
2067
|
+
validate: {
|
|
2068
|
+
makeOperations: validate,
|
|
2069
|
+
},
|
|
2070
|
+
}), { equals: false }));
|
|
2071
|
+
return application;
|
|
2072
|
+
})(),
|
|
2073
|
+
gemini: (validate) => (() => {
|
|
2074
|
+
const application = {
|
|
2075
|
+
model: "gemini",
|
|
2076
|
+
options: {
|
|
2077
|
+
reference: true,
|
|
2078
|
+
separate: null
|
|
2079
|
+
},
|
|
2080
|
+
functions: [
|
|
2081
|
+
{
|
|
2082
|
+
name: "makeOperations",
|
|
2083
|
+
parameters: {
|
|
2084
|
+
description: "Current Type: {@link IAutoBeInterfaceAuthorizationsApplication.IProps}",
|
|
2085
|
+
type: "object",
|
|
2086
|
+
properties: {
|
|
2087
|
+
operations: {
|
|
2088
|
+
description: "Array of API operations to generate authorization operation for.\n\nEach operation in this array must include:\n\n- Specification: Detailed API specification with clear purpose and\n functionality\n- Path: Resource-centric URL path (e.g., \"/resources/{resourceId}\")\n- Method: HTTP method (get, post, put, delete, patch)\n- Description: Extremely detailed multi-paragraph description referencing\n Prisma schema comments\n- Summary: Concise one-sentence summary of the endpoint\n- Parameters: Array of all necessary parameters with descriptions and\n schema definitions\n- RequestBody: For POST/PUT/PATCH methods, with typeName referencing\n components.schemas\n- ResponseBody: With typeName referencing appropriate response type\n\nAll operations must follow strict quality standards:\n\n1. Detailed descriptions referencing Prisma schema comments\n2. Accurate parameter definitions matching path parameters\n3. Appropriate request/response body type references\n4. Consistent patterns for CRUD operations\n\nFor list retrievals (typically PATCH), include pagination, search, and\nsorting. For detail retrieval (GET), return a single resource. For\ncreation (POST), use .ICreate request body. For modification (PUT), use\n.IUpdate request body.\n\n\n@minItems 1",
|
|
2089
|
+
type: "array",
|
|
2090
|
+
items: {
|
|
2091
|
+
$ref: "#/$defs/AutoBeOpenApi.IOperation"
|
|
2092
|
+
}
|
|
2093
|
+
}
|
|
2094
|
+
},
|
|
2095
|
+
required: [
|
|
2096
|
+
"operations"
|
|
2097
|
+
],
|
|
2098
|
+
additionalProperties: false,
|
|
2099
|
+
$defs: {
|
|
2100
|
+
"AutoBeOpenApi.IOperation": {
|
|
2101
|
+
description: "Operation of the Restful API.\n\nThis interface defines a single API endpoint with its HTTP {@link method},\n{@link path}, {@link parameters path parameters},\n{@link requestBody request body}, and {@link responseBody} structure. It\ncorresponds to an individual operation in the paths section of an OpenAPI\ndocument.\n\nEach operation requires a detailed explanation of its purpose through the\nreason and description fields, making it clear why the API was designed and\nhow it should be used.\n\nAll request bodies and responses for this operation must be object types\nand must reference named types defined in the components section. The\ncontent-type is always `application/json`. For file upload/download\noperations, use `string & tags.Format<\"uri\">` in the appropriate schema\ninstead of binary data formats.\n\nIn OpenAPI, this might represent:\n\n```json\n{\n \"/shoppings/customers/orders\": {\n \"post\": {\n \"description\": \"Create a new order application from shopping cart...\",\n \"parameters\": [...],\n \"requestBody\": {...},\n \"responses\": {...},\n ...\n }\n }\n}\n```",
|
|
2102
|
+
type: "object",
|
|
2103
|
+
properties: {
|
|
2104
|
+
specification: {
|
|
2105
|
+
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.",
|
|
2106
|
+
type: "string"
|
|
2107
|
+
},
|
|
2108
|
+
authorizationType: {
|
|
2109
|
+
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`",
|
|
2110
|
+
anyOf: [
|
|
2111
|
+
{
|
|
2112
|
+
type: "null"
|
|
2113
|
+
},
|
|
2114
|
+
{
|
|
2115
|
+
type: "string",
|
|
2116
|
+
"enum": [
|
|
2117
|
+
"login",
|
|
2118
|
+
"join",
|
|
2119
|
+
"refresh"
|
|
2120
|
+
]
|
|
2121
|
+
}
|
|
2122
|
+
]
|
|
2123
|
+
},
|
|
2124
|
+
description: {
|
|
2125
|
+
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.",
|
|
2126
|
+
type: "string"
|
|
2127
|
+
},
|
|
2128
|
+
summary: {
|
|
2129
|
+
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",
|
|
2130
|
+
type: "string"
|
|
2131
|
+
},
|
|
2132
|
+
parameters: {
|
|
2133
|
+
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`",
|
|
2134
|
+
type: "array",
|
|
2135
|
+
items: {
|
|
2136
|
+
$ref: "#/$defs/AutoBeOpenApi.IParameter"
|
|
2137
|
+
}
|
|
2138
|
+
},
|
|
2139
|
+
requestBody: {
|
|
2140
|
+
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.",
|
|
2141
|
+
anyOf: [
|
|
2142
|
+
{
|
|
2143
|
+
type: "null"
|
|
2144
|
+
},
|
|
2145
|
+
{
|
|
2146
|
+
$ref: "#/$defs/AutoBeOpenApi.IRequestBody"
|
|
2147
|
+
}
|
|
2148
|
+
]
|
|
2149
|
+
},
|
|
2150
|
+
responseBody: {
|
|
2151
|
+
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.",
|
|
2152
|
+
anyOf: [
|
|
2153
|
+
{
|
|
2154
|
+
type: "null"
|
|
2155
|
+
},
|
|
2156
|
+
{
|
|
2157
|
+
$ref: "#/$defs/AutoBeOpenApi.IResponseBody"
|
|
2158
|
+
}
|
|
2159
|
+
]
|
|
2160
|
+
},
|
|
2161
|
+
authorizationActor: {
|
|
2162
|
+
description: "Authorization actor required to access this API operation.\n\nThis field specifies which user actor is allowed to access this endpoint.\nThe actor name must correspond exactly to the actual actors defined in\nyour system's Prisma schema.\n\n## Naming Convention\n\nActor names MUST use camelCase.\n\n## Actor-Based Path Convention\n\nWhen authorizationActor is specified, it should align with the path\nstructure:\n\n- If authorizationActor is \"admin\" \u2192 path might be \"/admin/resources/{id}\"\n- If authorizationActor is \"seller\" \u2192 path might be \"/seller/products\"\n- Special case: For user's own resources, use path prefix \"/my/\" regardless\n of actor\n\n## Important Guidelines\n\n- Set to `null` for public endpoints that require no authentication\n- Set to specific actor string for actor-restricted endpoints\n- The actor name MUST match exactly with the user type/actor defined in the\n database\n- This actor will be used by the Realize Agent to generate appropriate\n decorator and authorization logic in the provider functions\n- The controller will apply the corresponding authentication decorator\n based on this actor\n\n## Examples\n\n- `null` - Public endpoint, no authentication required\n- `\"user\"` - Any authenticated user can access\n- `\"admin\"` - Only admin users can access\n- `\"seller\"` - Only seller users can access\n- `\"moderator\"` - Only moderator users can access\n\nNote: The actual authentication/authorization implementation will be\nhandled by decorators at the controller level, and the provider function\nwill receive the authenticated user object with the appropriate type.",
|
|
2163
|
+
anyOf: [
|
|
2164
|
+
{
|
|
2165
|
+
type: "null"
|
|
2166
|
+
},
|
|
2167
|
+
{
|
|
2168
|
+
type: "string",
|
|
2169
|
+
description: "@minLength 1\n@pattern ^[a-z][a-zA-Z0-9]*$"
|
|
2170
|
+
}
|
|
2171
|
+
]
|
|
2172
|
+
},
|
|
2173
|
+
name: {
|
|
2174
|
+
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]*$",
|
|
2175
|
+
type: "string"
|
|
2176
|
+
},
|
|
2177
|
+
prerequisites: {
|
|
2178
|
+
description: "Prerequisites for this API operation.\n\nThe `prerequisites` field defines API operations that must be\nsuccessfully executed before this operation can be performed. This\ncreates an explicit dependency chain between API endpoints, ensuring\nproper execution order and data availability.\n\n## CRITICAL WARNING: Authentication Prerequisites\n\n**NEVER include authentication-related operations as prerequisites!**\nAuthentication is handled separately through the `authorizationActor`\nfield and should NOT be part of the prerequisite chain. Do NOT add\nprerequisites for:\n\n- Login endpoints\n- Token validation endpoints\n- User authentication checks\n- Permission verification endpoints\n\nPrerequisites are ONLY for business logic dependencies, NOT for\nauthentication/authorization.\n\n## Purpose and Use Cases\n\nPrerequisites are essential for operations that depend on:\n\n1. **Existence Validation**: Ensuring resources exist before manipulation\n2. **State Requirements**: Verifying resources are in the correct state\n3. **Data Dependencies**: Loading necessary data for the current operation\n4. **Business Logic Constraints**: Enforcing domain-specific rules\n\n## Execution Flow\n\nWhen an operation has prerequisites:\n\n1. Each prerequisite API must be called first in the specified order\n2. Prerequisites must return successful responses (2xx status codes)\n3. Only after all prerequisites succeed can the main operation proceed\n4. If any prerequisite fails, the operation should not be attempted\n\n## Common Patterns\n\n### Resource Existence Check\n\n```typescript\n// Before updating an order item, ensure the order exists\nprerequisites: [\n {\n endpoint: { path: \"/orders/{orderId}\", method: \"get\" },\n description: \"Order must exist in the system\",\n },\n];\n```\n\n### State Validation\n\n```typescript\n// Before processing payment, ensure order is in correct state\nprerequisites: [\n {\n endpoint: { path: \"/orders/{orderId}/status\", method: \"get\" },\n description: \"Order must be in 'pending_payment' status\",\n },\n];\n```\n\n### Hierarchical Dependencies\n\n```typescript\n// Before accessing a deeply nested resource\nprerequisites: [\n {\n endpoint: { path: \"/projects/{projectId}\", method: \"get\" },\n description: \"Project must exist\",\n },\n {\n endpoint: {\n path: \"/projects/{projectId}/tasks/{taskId}\",\n method: \"get\",\n },\n description: \"Task must exist within the project\",\n },\n];\n```\n\n## Important Guidelines\n\n1. **Order Matters**: Prerequisites are executed in array order\n2. **Parameter Inheritance**: Path parameters from prerequisites can be used\n in the main operation\n3. **Error Handling**: Failed prerequisites should prevent main operation\n4. **Performance**: Consider caching prerequisite results when appropriate\n5. **Documentation**: Each prerequisite must have a clear description\n explaining why it's required\n6. **No Authentication**: NEVER use prerequisites for authentication checks\n\n## Test Generation Impact\n\nThe Test Agent uses prerequisites to:\n\n- Generate proper test setup sequences\n- Create valid test data in the correct order\n- Ensure test scenarios follow realistic workflows\n- Validate error handling when prerequisites fail",
|
|
2179
|
+
type: "array",
|
|
2180
|
+
items: {
|
|
2181
|
+
$ref: "#/$defs/AutoBeOpenApi.IPrerequisite"
|
|
2182
|
+
}
|
|
2183
|
+
},
|
|
2184
|
+
path: {
|
|
2185
|
+
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\\/_{}.-]*$",
|
|
2186
|
+
type: "string"
|
|
2187
|
+
},
|
|
2188
|
+
method: {
|
|
2189
|
+
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",
|
|
2190
|
+
type: "string",
|
|
2191
|
+
"enum": [
|
|
2192
|
+
"get",
|
|
2193
|
+
"post",
|
|
2194
|
+
"put",
|
|
2195
|
+
"delete",
|
|
2196
|
+
"patch"
|
|
2197
|
+
]
|
|
2198
|
+
}
|
|
2199
|
+
},
|
|
2200
|
+
required: [
|
|
2201
|
+
"specification",
|
|
2202
|
+
"authorizationType",
|
|
2203
|
+
"description",
|
|
2204
|
+
"summary",
|
|
2205
|
+
"parameters",
|
|
2206
|
+
"requestBody",
|
|
2207
|
+
"responseBody",
|
|
2208
|
+
"authorizationActor",
|
|
2209
|
+
"name",
|
|
2210
|
+
"prerequisites",
|
|
2211
|
+
"path",
|
|
2212
|
+
"method"
|
|
2213
|
+
]
|
|
2214
|
+
},
|
|
2215
|
+
"AutoBeOpenApi.IParameter": {
|
|
2216
|
+
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```",
|
|
2217
|
+
type: "object",
|
|
2218
|
+
properties: {
|
|
2219
|
+
name: {
|
|
2220
|
+
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]*$",
|
|
2221
|
+
type: "string"
|
|
2222
|
+
},
|
|
2223
|
+
description: {
|
|
2224
|
+
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.",
|
|
2225
|
+
type: "string"
|
|
2226
|
+
},
|
|
2227
|
+
schema: {
|
|
2228
|
+
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.",
|
|
2229
|
+
anyOf: [
|
|
2230
|
+
{
|
|
2231
|
+
$ref: "#/$defs/AutoBeOpenApi.IJsonSchema.INumber"
|
|
2232
|
+
},
|
|
2233
|
+
{
|
|
2234
|
+
$ref: "#/$defs/AutoBeOpenApi.IJsonSchema.IInteger"
|
|
2235
|
+
},
|
|
2236
|
+
{
|
|
2237
|
+
$ref: "#/$defs/AutoBeOpenApi.IJsonSchema.IString"
|
|
2238
|
+
}
|
|
2239
|
+
],
|
|
2240
|
+
"x-discriminator": {
|
|
2241
|
+
propertyName: "type",
|
|
2242
|
+
mapping: {
|
|
2243
|
+
number: "#/$defs/AutoBeOpenApi.IJsonSchema.INumber",
|
|
2244
|
+
integer: "#/$defs/AutoBeOpenApi.IJsonSchema.IInteger",
|
|
2245
|
+
string: "#/$defs/AutoBeOpenApi.IJsonSchema.IString"
|
|
2246
|
+
}
|
|
2247
|
+
}
|
|
2248
|
+
}
|
|
2249
|
+
},
|
|
2250
|
+
required: [
|
|
2251
|
+
"name",
|
|
2252
|
+
"description",
|
|
2253
|
+
"schema"
|
|
2254
|
+
]
|
|
2255
|
+
},
|
|
2256
|
+
"AutoBeOpenApi.IJsonSchema.INumber": {
|
|
2257
|
+
description: "Number (double) type info.",
|
|
2258
|
+
type: "object",
|
|
2259
|
+
properties: {
|
|
2260
|
+
minimum: {
|
|
2261
|
+
description: "Minimum value restriction.",
|
|
2262
|
+
type: "number"
|
|
2263
|
+
},
|
|
2264
|
+
maximum: {
|
|
2265
|
+
description: "Maximum value restriction.",
|
|
2266
|
+
type: "number"
|
|
2267
|
+
},
|
|
2268
|
+
exclusiveMinimum: {
|
|
2269
|
+
description: "Exclusive minimum value restriction.",
|
|
2270
|
+
type: "number"
|
|
2271
|
+
},
|
|
2272
|
+
exclusiveMaximum: {
|
|
2273
|
+
description: "Exclusive maximum value restriction.",
|
|
2274
|
+
type: "number"
|
|
2275
|
+
},
|
|
2276
|
+
multipleOf: {
|
|
2277
|
+
description: "Multiple of value restriction.\n\n\n@exclusiveMinimum 0",
|
|
2278
|
+
type: "number"
|
|
2279
|
+
},
|
|
2280
|
+
type: {
|
|
2281
|
+
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.",
|
|
2282
|
+
type: "string",
|
|
2283
|
+
"enum": [
|
|
2284
|
+
"number"
|
|
2285
|
+
]
|
|
2286
|
+
}
|
|
2287
|
+
},
|
|
2288
|
+
required: [
|
|
2289
|
+
"type"
|
|
2290
|
+
]
|
|
2291
|
+
},
|
|
2292
|
+
"AutoBeOpenApi.IJsonSchema.IInteger": {
|
|
2293
|
+
description: "Integer type info.",
|
|
2294
|
+
type: "object",
|
|
2295
|
+
properties: {
|
|
2296
|
+
minimum: {
|
|
2297
|
+
description: "Minimum value restriction.",
|
|
2298
|
+
type: "integer"
|
|
2299
|
+
},
|
|
2300
|
+
maximum: {
|
|
2301
|
+
description: "Maximum value restriction.",
|
|
2302
|
+
type: "integer"
|
|
2303
|
+
},
|
|
2304
|
+
exclusiveMinimum: {
|
|
2305
|
+
description: "Exclusive minimum value restriction.",
|
|
2306
|
+
type: "number"
|
|
2307
|
+
},
|
|
2308
|
+
exclusiveMaximum: {
|
|
2309
|
+
description: "Exclusive maximum value restriction.",
|
|
2310
|
+
type: "number"
|
|
2311
|
+
},
|
|
2312
|
+
multipleOf: {
|
|
2313
|
+
description: "Multiple of value restriction.\n\n\n@exclusiveMinimum 0",
|
|
2314
|
+
type: "integer"
|
|
2315
|
+
},
|
|
2316
|
+
type: {
|
|
2317
|
+
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.",
|
|
2318
|
+
type: "string",
|
|
2319
|
+
"enum": [
|
|
2320
|
+
"integer"
|
|
2321
|
+
]
|
|
2322
|
+
}
|
|
2323
|
+
},
|
|
2324
|
+
required: [
|
|
2325
|
+
"type"
|
|
2326
|
+
]
|
|
2327
|
+
},
|
|
2328
|
+
"AutoBeOpenApi.IJsonSchema.IString": {
|
|
2329
|
+
description: "String type info.",
|
|
2330
|
+
type: "object",
|
|
2331
|
+
properties: {
|
|
2332
|
+
format: {
|
|
2333
|
+
description: "Format restriction.",
|
|
2334
|
+
type: "string",
|
|
2335
|
+
"enum": [
|
|
2336
|
+
"date-time",
|
|
2337
|
+
"password",
|
|
2338
|
+
"regex",
|
|
2339
|
+
"uuid",
|
|
2340
|
+
"email",
|
|
2341
|
+
"hostname",
|
|
2342
|
+
"idn-email",
|
|
2343
|
+
"idn-hostname",
|
|
2344
|
+
"iri",
|
|
2345
|
+
"iri-reference",
|
|
2346
|
+
"ipv4",
|
|
2347
|
+
"ipv6",
|
|
2348
|
+
"uri",
|
|
2349
|
+
"uri-reference",
|
|
2350
|
+
"uri-template",
|
|
2351
|
+
"url",
|
|
2352
|
+
"date",
|
|
2353
|
+
"time",
|
|
2354
|
+
"duration",
|
|
2355
|
+
"json-pointer",
|
|
2356
|
+
"relative-json-pointer"
|
|
2357
|
+
]
|
|
2358
|
+
},
|
|
2359
|
+
pattern: {
|
|
2360
|
+
description: "Pattern restriction.",
|
|
2361
|
+
type: "string"
|
|
2362
|
+
},
|
|
2363
|
+
contentMediaType: {
|
|
2364
|
+
description: "Content media type restriction.",
|
|
2365
|
+
type: "string"
|
|
2366
|
+
},
|
|
2367
|
+
minLength: {
|
|
2368
|
+
description: "Minimum length restriction.\n\n\n@minimum 0",
|
|
2369
|
+
type: "integer"
|
|
2370
|
+
},
|
|
2371
|
+
maxLength: {
|
|
2372
|
+
description: "Maximum length restriction.\n\n\n@minimum 0",
|
|
2373
|
+
type: "integer"
|
|
2374
|
+
},
|
|
2375
|
+
type: {
|
|
2376
|
+
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.",
|
|
2377
|
+
type: "string",
|
|
2378
|
+
"enum": [
|
|
2379
|
+
"string"
|
|
2380
|
+
]
|
|
2381
|
+
}
|
|
2382
|
+
},
|
|
2383
|
+
required: [
|
|
2384
|
+
"type"
|
|
2385
|
+
]
|
|
2386
|
+
},
|
|
2387
|
+
"AutoBeOpenApi.IRequestBody": {
|
|
2388
|
+
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```",
|
|
2389
|
+
type: "object",
|
|
2390
|
+
properties: {
|
|
2391
|
+
description: {
|
|
2392
|
+
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.",
|
|
2393
|
+
type: "string"
|
|
2394
|
+
},
|
|
2395
|
+
typeName: {
|
|
2396
|
+
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```",
|
|
2397
|
+
type: "string"
|
|
2398
|
+
}
|
|
2399
|
+
},
|
|
2400
|
+
required: [
|
|
2401
|
+
"description",
|
|
2402
|
+
"typeName"
|
|
2403
|
+
]
|
|
2404
|
+
},
|
|
2405
|
+
"AutoBeOpenApi.IResponseBody": {
|
|
2406
|
+
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```",
|
|
2407
|
+
type: "object",
|
|
2408
|
+
properties: {
|
|
2409
|
+
description: {
|
|
2410
|
+
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.",
|
|
2411
|
+
type: "string"
|
|
2412
|
+
},
|
|
2413
|
+
typeName: {
|
|
2414
|
+
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```",
|
|
2415
|
+
type: "string"
|
|
2416
|
+
}
|
|
2417
|
+
},
|
|
2418
|
+
required: [
|
|
2419
|
+
"description",
|
|
2420
|
+
"typeName"
|
|
2421
|
+
]
|
|
2422
|
+
},
|
|
2423
|
+
"AutoBeOpenApi.IPrerequisite": {
|
|
2424
|
+
description: "Prerequisite API operation dependency.\n\n`IPrerequisite` defines a dependency relationship between API operations,\nspecifying that certain endpoints must be successfully called before the\ncurrent operation can proceed. This ensures proper resource validation,\nstate checking, and data availability in complex API workflows.\n\n## CRITICAL WARNING: Authentication is NOT a Prerequisite\n\n**NEVER use prerequisites for authentication or authorization checks!**\n\nPrerequisites are ONLY for business logic dependencies such as:\n\n- Checking if a resource exists\n- Verifying resource state\n- Loading required data\n\nDo NOT create prerequisites for:\n\n- Login/authentication endpoints\n- Token validation\n- Permission checks\n- User authorization verification\n\nAuthentication is handled separately via the `authorizationActor` field on\nthe operation itself. Mixing authentication with business prerequisites\ncreates confusion and incorrect test scenarios.\n\n## Core Concept\n\nPrerequisites create an execution dependency graph for API operations. They\nexplicitly declare which APIs must succeed before attempting the current\noperation, preventing invalid states and ensuring data consistency.\n\n## Structure\n\nEach prerequisite consists of:\n\n1. **endpoint**: The API endpoint that must be called first\n2. **description**: Clear explanation of why this prerequisite is required\n\n## Common Use Cases\n\n### 1. Resource Existence Validation\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/users/{userId}\", \"method\": \"get\" },\n \"description\": \"User must exist before updating their profile\"\n}\n```\n\n### 2. Parent-Child Relationships\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/posts/{postId}\", \"method\": \"get\" },\n \"description\": \"Post must exist before adding comments\"\n}\n```\n\n### 3. State Prerequisites\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/orders/{orderId}/status\", \"method\": \"get\" },\n \"description\": \"Order must be in 'confirmed' state before shipping\"\n}\n```\n\n### 4. Business Logic Dependencies\n\n```typescript\n{\n \"endpoint\": {\n \"path\": \"/inventory/{productId}/stock\",\n \"method\": \"get\"\n },\n \"description\": \"Product must have sufficient stock before creating order\"\n}\n```\n\n## Implementation Guidelines\n\n1. **Clear Descriptions**: Always explain WHY the prerequisite is needed\n2. **Minimal Dependencies**: Only include truly necessary prerequisites\n3. **Logical Order**: If multiple prerequisites exist, order them logically\n4. **Error Context**: Description should help understand failure scenarios\n5. **No Authentication**: Prerequisites must NEVER be authentication checks\n\n## Test Generation Usage\n\nThe Test Agent utilizes prerequisites to:\n\n- Set up test data in the correct sequence\n- Generate realistic test scenarios\n- Create both positive and negative test cases\n- Ensure proper cleanup in reverse dependency order\n\n## Best Practices\n\n- Keep prerequisite chains as short as possible for performance\n- Consider caching prerequisite results when safe to do so\n- Ensure prerequisite descriptions are specific, not generic\n- Validate that circular dependencies don't exist\n- Document any side effects of prerequisite calls\n- NEVER use for authentication/authorization validation",
|
|
2425
|
+
type: "object",
|
|
2426
|
+
properties: {
|
|
2427
|
+
endpoint: {
|
|
2428
|
+
description: "The API endpoint that must be called before the main operation.\n\nThis specifies the exact HTTP method and path of the prerequisite API.\nThe endpoint must be a valid operation defined elsewhere in the API\nspecification. Path parameters in the prerequisite endpoint can reference\nthe same parameters available in the main operation.",
|
|
2429
|
+
$ref: "#/$defs/AutoBeOpenApi.IEndpoint"
|
|
2430
|
+
},
|
|
2431
|
+
description: {
|
|
2432
|
+
description: "Clear description of why this prerequisite is required.\n\nThis description should explain:\n\n- What validation or check this prerequisite performs\n- What state or condition must be satisfied\n- What happens if this prerequisite fails\n- Any specific data from the prerequisite used by the main operation\n\nThe description helps developers understand the dependency relationship\nand aids in debugging when prerequisites fail.\n\nGuidelines for good descriptions:\n\n- Be specific about the requirement (e.g., \"must be in 'active' state\")\n- Explain business logic constraints (e.g., \"budget must not be exceeded\")\n- Explain data dependencies (e.g., \"provides pricing information needed\")\n- Keep it concise but complete\n\n> MUST be written in English. Never use other languages.",
|
|
2433
|
+
type: "string"
|
|
2434
|
+
}
|
|
2435
|
+
},
|
|
2436
|
+
required: [
|
|
2437
|
+
"endpoint",
|
|
2438
|
+
"description"
|
|
2439
|
+
]
|
|
2440
|
+
},
|
|
2441
|
+
"AutoBeOpenApi.IEndpoint": {
|
|
2442
|
+
description: "API endpoint information.",
|
|
2443
|
+
type: "object",
|
|
2444
|
+
properties: {
|
|
2445
|
+
path: {
|
|
2446
|
+
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\\/_{}.-]*$",
|
|
2447
|
+
type: "string"
|
|
2448
|
+
},
|
|
2449
|
+
method: {
|
|
2450
|
+
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",
|
|
2451
|
+
type: "string",
|
|
2452
|
+
"enum": [
|
|
2453
|
+
"get",
|
|
2454
|
+
"post",
|
|
2455
|
+
"put",
|
|
2456
|
+
"delete",
|
|
2457
|
+
"patch"
|
|
2458
|
+
]
|
|
2459
|
+
}
|
|
2460
|
+
},
|
|
2461
|
+
required: [
|
|
2462
|
+
"path",
|
|
2463
|
+
"method"
|
|
2464
|
+
]
|
|
2465
|
+
}
|
|
2466
|
+
}
|
|
2467
|
+
},
|
|
2468
|
+
description: "Creates an authorization Operations for the given roles\n\nThis method generates an OpenAPI interface that defines the authorization\nrequirements for the given roles. It ensures that the interface reflects\nthe correct permissions and access levels for each role.",
|
|
2469
|
+
validate: (() => { const _iv4 = new Set(["date-time", "password", "regex", "uuid", "email", "hostname", "idn-email", "idn-hostname", "iri", "iri-reference", "ipv4", "ipv6", "uri", "uri-reference", "uri-template", "url", "date", "time", "duration", "json-pointer", "relative-json-pointer"]); const _vv8 = new Set(["date-time", "password", "regex", "uuid", "email", "hostname", "idn-email", "idn-hostname", "iri", "iri-reference", "ipv4", "ipv6", "uri", "uri-reference", "uri-template", "url", "date", "time", "duration", "json-pointer", "relative-json-pointer"]); const _io0 = input => Array.isArray(input.operations) && (1 <= input.operations.length && input.operations.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io1 = 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 && _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.authorizationActor || "string" === typeof input.authorizationActor && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.authorizationActor) && 1 <= input.authorizationActor.length)) && ("string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name)) && (Array.isArray(input.prerequisites) && input.prerequisites.every(elem => "object" === typeof elem && null !== elem && _io8(elem))) && ("string" === typeof input.path && RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path)) && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _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 || true === _iv4.has(input.format)) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type; const _io6 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io7 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io8 = input => "object" === typeof input.endpoint && null !== input.endpoint && _io9(input.endpoint) && "string" === typeof input.description; const _io9 = input => "string" === typeof input.path && RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _iu0 = input => (() => {
|
|
2470
|
+
if ("number" === input.type)
|
|
2471
|
+
return _io4(input);
|
|
2472
|
+
else if ("integer" === input.type)
|
|
2473
|
+
return _io3(input);
|
|
2474
|
+
else if ("string" === input.type)
|
|
2475
|
+
return _io5(input);
|
|
2476
|
+
else
|
|
2477
|
+
return false;
|
|
2478
|
+
})(); const _vo0 = (input, _path, _exceptionable = true) => [(Array.isArray(input.operations) || _report(_exceptionable, {
|
|
2479
|
+
path: _path + ".operations",
|
|
2480
|
+
expected: "(Array<AutoBeOpenApi.IOperation> & MinItems<1>)",
|
|
2481
|
+
value: input.operations
|
|
2482
|
+
})) && ((1 <= input.operations.length || _report(_exceptionable, {
|
|
2483
|
+
path: _path + ".operations",
|
|
2484
|
+
expected: "Array<> & MinItems<1>",
|
|
2485
|
+
value: input.operations
|
|
2486
|
+
})) && input.operations.map((elem, _index5) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
2487
|
+
path: _path + ".operations[" + _index5 + "]",
|
|
2488
|
+
expected: "AutoBeOpenApi.IOperation",
|
|
2489
|
+
value: elem
|
|
2490
|
+
})) && _vo1(elem, _path + ".operations[" + _index5 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
2491
|
+
path: _path + ".operations[" + _index5 + "]",
|
|
2492
|
+
expected: "AutoBeOpenApi.IOperation",
|
|
2493
|
+
value: elem
|
|
2494
|
+
})).every(flag => flag)) || _report(_exceptionable, {
|
|
2495
|
+
path: _path + ".operations",
|
|
2496
|
+
expected: "(Array<AutoBeOpenApi.IOperation> & MinItems<1>)",
|
|
2497
|
+
value: input.operations
|
|
2498
|
+
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.specification || _report(_exceptionable, {
|
|
2499
|
+
path: _path + ".specification",
|
|
2500
|
+
expected: "string",
|
|
2501
|
+
value: input.specification
|
|
2502
|
+
}), null === input.authorizationType || "login" === input.authorizationType || "join" === input.authorizationType || "refresh" === input.authorizationType || _report(_exceptionable, {
|
|
2503
|
+
path: _path + ".authorizationType",
|
|
2504
|
+
expected: "(\"join\" | \"login\" | \"refresh\" | null)",
|
|
2505
|
+
value: input.authorizationType
|
|
2506
|
+
}), "string" === typeof input.description || _report(_exceptionable, {
|
|
2507
|
+
path: _path + ".description",
|
|
2508
|
+
expected: "string",
|
|
2509
|
+
value: input.description
|
|
2510
|
+
}), "string" === typeof input.summary || _report(_exceptionable, {
|
|
2511
|
+
path: _path + ".summary",
|
|
2512
|
+
expected: "string",
|
|
2513
|
+
value: input.summary
|
|
2514
|
+
}), (Array.isArray(input.parameters) || _report(_exceptionable, {
|
|
2515
|
+
path: _path + ".parameters",
|
|
2516
|
+
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
2517
|
+
value: input.parameters
|
|
2518
|
+
})) && input.parameters.map((elem, _index6) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
2519
|
+
path: _path + ".parameters[" + _index6 + "]",
|
|
2520
|
+
expected: "AutoBeOpenApi.IParameter",
|
|
2521
|
+
value: elem
|
|
2522
|
+
})) && _vo2(elem, _path + ".parameters[" + _index6 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
2523
|
+
path: _path + ".parameters[" + _index6 + "]",
|
|
2524
|
+
expected: "AutoBeOpenApi.IParameter",
|
|
2525
|
+
value: elem
|
|
2526
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
2527
|
+
path: _path + ".parameters",
|
|
2528
|
+
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
2529
|
+
value: input.parameters
|
|
2530
|
+
}), null === input.requestBody || ("object" === typeof input.requestBody && null !== input.requestBody || _report(_exceptionable, {
|
|
2531
|
+
path: _path + ".requestBody",
|
|
2532
|
+
expected: "(AutoBeOpenApi.IRequestBody | null)",
|
|
2533
|
+
value: input.requestBody
|
|
2534
|
+
})) && _vo6(input.requestBody, _path + ".requestBody", true && _exceptionable) || _report(_exceptionable, {
|
|
2535
|
+
path: _path + ".requestBody",
|
|
2536
|
+
expected: "(AutoBeOpenApi.IRequestBody | null)",
|
|
2537
|
+
value: input.requestBody
|
|
2538
|
+
}), null === input.responseBody || ("object" === typeof input.responseBody && null !== input.responseBody || _report(_exceptionable, {
|
|
2539
|
+
path: _path + ".responseBody",
|
|
2540
|
+
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
2541
|
+
value: input.responseBody
|
|
2542
|
+
})) && _vo7(input.responseBody, _path + ".responseBody", true && _exceptionable) || _report(_exceptionable, {
|
|
2543
|
+
path: _path + ".responseBody",
|
|
2544
|
+
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
2545
|
+
value: input.responseBody
|
|
2546
|
+
}), null === input.authorizationActor || "string" === typeof input.authorizationActor && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.authorizationActor) || _report(_exceptionable, {
|
|
2547
|
+
path: _path + ".authorizationActor",
|
|
2548
|
+
expected: "string & CamelCasePattern",
|
|
2549
|
+
value: input.authorizationActor
|
|
2550
|
+
})) && (1 <= input.authorizationActor.length || _report(_exceptionable, {
|
|
2551
|
+
path: _path + ".authorizationActor",
|
|
2552
|
+
expected: "string & MinLength<1>",
|
|
2553
|
+
value: input.authorizationActor
|
|
2554
|
+
})) || _report(_exceptionable, {
|
|
2555
|
+
path: _path + ".authorizationActor",
|
|
2556
|
+
expected: "((string & CamelCasePattern & MinLength<1>) | null)",
|
|
2557
|
+
value: input.authorizationActor
|
|
2558
|
+
}), "string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
|
|
2559
|
+
path: _path + ".name",
|
|
2560
|
+
expected: "string & CamelCasePattern",
|
|
2561
|
+
value: input.name
|
|
2562
|
+
})) || _report(_exceptionable, {
|
|
2563
|
+
path: _path + ".name",
|
|
2564
|
+
expected: "(string & CamelCasePattern)",
|
|
2565
|
+
value: input.name
|
|
2566
|
+
}), (Array.isArray(input.prerequisites) || _report(_exceptionable, {
|
|
2567
|
+
path: _path + ".prerequisites",
|
|
2568
|
+
expected: "Array<AutoBeOpenApi.IPrerequisite>",
|
|
2569
|
+
value: input.prerequisites
|
|
2570
|
+
})) && input.prerequisites.map((elem, _index7) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
2571
|
+
path: _path + ".prerequisites[" + _index7 + "]",
|
|
2572
|
+
expected: "AutoBeOpenApi.IPrerequisite",
|
|
2573
|
+
value: elem
|
|
2574
|
+
})) && _vo8(elem, _path + ".prerequisites[" + _index7 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
2575
|
+
path: _path + ".prerequisites[" + _index7 + "]",
|
|
2576
|
+
expected: "AutoBeOpenApi.IPrerequisite",
|
|
2577
|
+
value: elem
|
|
2578
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
2579
|
+
path: _path + ".prerequisites",
|
|
2580
|
+
expected: "Array<AutoBeOpenApi.IPrerequisite>",
|
|
2581
|
+
value: input.prerequisites
|
|
2582
|
+
}), "string" === typeof input.path && (RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) || _report(_exceptionable, {
|
|
2583
|
+
path: _path + ".path",
|
|
2584
|
+
expected: "string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">",
|
|
2585
|
+
value: input.path
|
|
2586
|
+
})) || _report(_exceptionable, {
|
|
2587
|
+
path: _path + ".path",
|
|
2588
|
+
expected: "(string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">)",
|
|
2589
|
+
value: input.path
|
|
2590
|
+
}), "get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method || _report(_exceptionable, {
|
|
2591
|
+
path: _path + ".method",
|
|
2592
|
+
expected: "(\"delete\" | \"get\" | \"patch\" | \"post\" | \"put\")",
|
|
2593
|
+
value: input.method
|
|
2594
|
+
})].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, {
|
|
2595
|
+
path: _path + ".name",
|
|
2596
|
+
expected: "string & CamelCasePattern",
|
|
2597
|
+
value: input.name
|
|
2598
|
+
})) || _report(_exceptionable, {
|
|
2599
|
+
path: _path + ".name",
|
|
2600
|
+
expected: "(string & CamelCasePattern)",
|
|
2601
|
+
value: input.name
|
|
2602
|
+
}), "string" === typeof input.description || _report(_exceptionable, {
|
|
2603
|
+
path: _path + ".description",
|
|
2604
|
+
expected: "string",
|
|
2605
|
+
value: input.description
|
|
2606
|
+
}), ("object" === typeof input.schema && null !== input.schema || _report(_exceptionable, {
|
|
2607
|
+
path: _path + ".schema",
|
|
2608
|
+
expected: "(AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IString)",
|
|
2609
|
+
value: input.schema
|
|
2610
|
+
})) && _vu0(input.schema, _path + ".schema", true && _exceptionable) || _report(_exceptionable, {
|
|
2611
|
+
path: _path + ".schema",
|
|
2612
|
+
expected: "(AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IString)",
|
|
2613
|
+
value: input.schema
|
|
2614
|
+
})].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, {
|
|
2615
|
+
path: _path + ".minimum",
|
|
2616
|
+
expected: "number & Type<\"int64\">",
|
|
2617
|
+
value: input.minimum
|
|
2618
|
+
})) || _report(_exceptionable, {
|
|
2619
|
+
path: _path + ".minimum",
|
|
2620
|
+
expected: "((number & Type<\"int64\">) | undefined)",
|
|
2621
|
+
value: input.minimum
|
|
2622
|
+
}), undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000 || _report(_exceptionable, {
|
|
2623
|
+
path: _path + ".maximum",
|
|
2624
|
+
expected: "number & Type<\"int64\">",
|
|
2625
|
+
value: input.maximum
|
|
2626
|
+
})) || _report(_exceptionable, {
|
|
2627
|
+
path: _path + ".maximum",
|
|
2628
|
+
expected: "((number & Type<\"int64\">) | undefined)",
|
|
2629
|
+
value: input.maximum
|
|
2630
|
+
}), undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || _report(_exceptionable, {
|
|
2631
|
+
path: _path + ".exclusiveMinimum",
|
|
2632
|
+
expected: "(number | undefined)",
|
|
2633
|
+
value: input.exclusiveMinimum
|
|
2634
|
+
}), undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || _report(_exceptionable, {
|
|
2635
|
+
path: _path + ".exclusiveMaximum",
|
|
2636
|
+
expected: "(number | undefined)",
|
|
2637
|
+
value: input.exclusiveMaximum
|
|
2638
|
+
}), undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 || _report(_exceptionable, {
|
|
2639
|
+
path: _path + ".multipleOf",
|
|
2640
|
+
expected: "number & Type<\"uint64\">",
|
|
2641
|
+
value: input.multipleOf
|
|
2642
|
+
})) && (0 < input.multipleOf || _report(_exceptionable, {
|
|
2643
|
+
path: _path + ".multipleOf",
|
|
2644
|
+
expected: "number & ExclusiveMinimum<0>",
|
|
2645
|
+
value: input.multipleOf
|
|
2646
|
+
})) || _report(_exceptionable, {
|
|
2647
|
+
path: _path + ".multipleOf",
|
|
2648
|
+
expected: "((number & Type<\"uint64\"> & ExclusiveMinimum<0>) | undefined)",
|
|
2649
|
+
value: input.multipleOf
|
|
2650
|
+
}), "integer" === input.type || _report(_exceptionable, {
|
|
2651
|
+
path: _path + ".type",
|
|
2652
|
+
expected: "\"integer\"",
|
|
2653
|
+
value: input.type
|
|
2654
|
+
})].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => [undefined === input.minimum || "number" === typeof input.minimum || _report(_exceptionable, {
|
|
2655
|
+
path: _path + ".minimum",
|
|
2656
|
+
expected: "(number | undefined)",
|
|
2657
|
+
value: input.minimum
|
|
2658
|
+
}), undefined === input.maximum || "number" === typeof input.maximum || _report(_exceptionable, {
|
|
2659
|
+
path: _path + ".maximum",
|
|
2660
|
+
expected: "(number | undefined)",
|
|
2661
|
+
value: input.maximum
|
|
2662
|
+
}), undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || _report(_exceptionable, {
|
|
2663
|
+
path: _path + ".exclusiveMinimum",
|
|
2664
|
+
expected: "(number | undefined)",
|
|
2665
|
+
value: input.exclusiveMinimum
|
|
2666
|
+
}), undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || _report(_exceptionable, {
|
|
2667
|
+
path: _path + ".exclusiveMaximum",
|
|
2668
|
+
expected: "(number | undefined)",
|
|
2669
|
+
value: input.exclusiveMaximum
|
|
2670
|
+
}), undefined === input.multipleOf || "number" === typeof input.multipleOf && (0 < input.multipleOf || _report(_exceptionable, {
|
|
2671
|
+
path: _path + ".multipleOf",
|
|
2672
|
+
expected: "number & ExclusiveMinimum<0>",
|
|
2673
|
+
value: input.multipleOf
|
|
2674
|
+
})) || _report(_exceptionable, {
|
|
2675
|
+
path: _path + ".multipleOf",
|
|
2676
|
+
expected: "((number & ExclusiveMinimum<0>) | undefined)",
|
|
2677
|
+
value: input.multipleOf
|
|
2678
|
+
}), "number" === input.type || _report(_exceptionable, {
|
|
2679
|
+
path: _path + ".type",
|
|
2680
|
+
expected: "\"number\"",
|
|
2681
|
+
value: input.type
|
|
2682
|
+
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [undefined === input.format || true === _vv8.has(input.format) || _report(_exceptionable, {
|
|
2683
|
+
path: _path + ".format",
|
|
2684
|
+
expected: "(\"date\" | \"date-time\" | \"duration\" | \"email\" | \"hostname\" | \"idn-email\" | \"idn-hostname\" | \"ipv4\" | \"ipv6\" | \"iri\" | \"iri-reference\" | \"json-pointer\" | \"password\" | \"regex\" | \"relative-json-pointer\" | \"time\" | \"uri\" | \"uri-reference\" | \"uri-template\" | \"url\" | \"uuid\" | undefined)",
|
|
1860
2685
|
value: input.format
|
|
1861
2686
|
}), undefined === input.pattern || "string" === typeof input.pattern || _report(_exceptionable, {
|
|
1862
2687
|
path: _path + ".pattern",
|