@techspokes/typescript-wsdl-client 1.1.4 → 1.1.8
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/README.md +81 -35
- package/dist/app/generateApp.d.ts +0 -1
- package/dist/app/generateApp.js +8 -6
- package/dist/app/generateCheckedApp.d.ts +38 -0
- package/dist/app/generateCheckedApp.js +108 -0
- package/dist/checkedPipeline.d.ts +155 -0
- package/dist/checkedPipeline.js +448 -0
- package/dist/checkedPlanning.d.ts +123 -0
- package/dist/checkedPlanning.js +245 -0
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +123 -5
- package/dist/client/checkedDirectRuntime.d.ts +96 -0
- package/dist/client/checkedDirectRuntime.js +43 -0
- package/dist/client/directClientRuntime.d.ts +74 -0
- package/dist/client/directClientRuntime.js +165 -0
- package/dist/client/directClientVersion.d.ts +6 -0
- package/dist/client/directClientVersion.js +6 -0
- package/dist/client/generateClient.d.ts +0 -1
- package/dist/client/generateClient.js +26 -12
- package/dist/client/generateDirectClient.d.ts +32 -0
- package/dist/client/generateDirectClient.js +268 -0
- package/dist/client/generateOperations.d.ts +0 -1
- package/dist/client/generateTypes.d.ts +0 -1
- package/dist/client/generateUtils.d.ts +0 -1
- package/dist/client/generateUtils.js +3 -1
- package/dist/compiler/applicationGroups.d.ts +53 -0
- package/dist/compiler/applicationGroups.js +403 -0
- package/dist/compiler/buildCanonicalGraph.d.ts +6 -0
- package/dist/compiler/buildCanonicalGraph.js +381 -0
- package/dist/compiler/canonicalGraph.d.ts +197 -0
- package/dist/compiler/canonicalGraph.js +37 -0
- package/dist/compiler/catalogErrors.d.ts +17 -0
- package/dist/compiler/catalogErrors.js +86 -0
- package/dist/compiler/catalogProvenance.d.ts +14 -0
- package/dist/compiler/catalogProvenance.js +229 -0
- package/dist/compiler/checkedAssessment.d.ts +90 -0
- package/dist/compiler/checkedAssessment.js +300 -0
- package/dist/compiler/checkedComponentSource.d.ts +16 -0
- package/dist/compiler/checkedComponentSource.js +31 -0
- package/dist/compiler/checkedSourcePreparation.d.ts +72 -0
- package/dist/compiler/checkedSourcePreparation.js +202 -0
- package/dist/compiler/complexTypeContent.d.ts +58 -0
- package/dist/compiler/complexTypeContent.js +558 -0
- package/dist/compiler/componentCorrespondence.d.ts +32 -0
- package/dist/compiler/componentCorrespondence.js +140 -0
- package/dist/compiler/componentRecordProjection.d.ts +109 -0
- package/dist/compiler/componentRecordProjection.js +319 -0
- package/dist/compiler/componentSoapPreparation.d.ts +20 -0
- package/dist/compiler/componentSoapPreparation.js +36 -0
- package/dist/compiler/composeCanonicalGraph.d.ts +68 -0
- package/dist/compiler/composeCanonicalGraph.js +252 -0
- package/dist/compiler/dataOwnership.d.ts +21 -0
- package/dist/compiler/dataOwnership.js +167 -0
- package/dist/compiler/datatypeValues.d.ts +46 -0
- package/dist/compiler/datatypeValues.js +275 -0
- package/dist/compiler/directCodec.d.ts +116 -0
- package/dist/compiler/directCodec.js +377 -0
- package/dist/compiler/directExecutionPolicy.d.ts +9 -0
- package/dist/compiler/directExecutionPolicy.js +17 -0
- package/dist/compiler/directOperation.d.ts +114 -0
- package/dist/compiler/directOperation.js +373 -0
- package/dist/compiler/directSoap.d.ts +66 -0
- package/dist/compiler/directSoap.js +391 -0
- package/dist/compiler/directSoapSource.d.ts +38 -0
- package/dist/compiler/directSoapSource.js +233 -0
- package/dist/compiler/directSourceCapsule.d.ts +169 -0
- package/dist/compiler/directSourceCapsule.js +727 -0
- package/dist/compiler/directStructure.d.ts +128 -0
- package/dist/compiler/directStructure.js +543 -0
- package/dist/compiler/directStructurePlan.d.ts +149 -0
- package/dist/compiler/directStructurePlan.js +623 -0
- package/dist/compiler/directValues.d.ts +128 -0
- package/dist/compiler/directValues.js +1116 -0
- package/dist/compiler/finiteRe01Construction.d.ts +69 -0
- package/dist/compiler/finiteRe01Construction.js +422 -0
- package/dist/compiler/finiteRe01Verification.d.ts +218 -0
- package/dist/compiler/finiteRe01Verification.js +1217 -0
- package/dist/compiler/generateCatalog.d.ts +0 -1
- package/dist/compiler/graphTraversal.d.ts +10 -0
- package/dist/compiler/graphTraversal.js +37 -0
- package/dist/compiler/hypotheticalScopedIdentity.d.ts +22 -0
- package/dist/compiler/hypotheticalScopedIdentity.js +81 -0
- package/dist/compiler/occurrenceAnalysis.d.ts +66 -0
- package/dist/compiler/occurrenceAnalysis.js +316 -0
- package/dist/compiler/originalSourceMembership.d.ts +5 -0
- package/dist/compiler/originalSourceMembership.js +31 -0
- package/dist/compiler/particleAttribution.d.ts +16 -0
- package/dist/compiler/particleAttribution.js +494 -0
- package/dist/compiler/particleDeclarationConsistency.d.ts +23 -0
- package/dist/compiler/particleDeclarationConsistency.js +206 -0
- package/dist/compiler/particleExtension.d.ts +21 -0
- package/dist/compiler/particleExtension.js +123 -0
- package/dist/compiler/particleLocalAssessment.d.ts +19 -0
- package/dist/compiler/particleLocalAssessment.js +92 -0
- package/dist/compiler/particleRestriction.d.ts +23 -0
- package/dist/compiler/particleRestriction.js +494 -0
- package/dist/compiler/particleSemanticView.d.ts +51 -0
- package/dist/compiler/particleSemanticView.js +310 -0
- package/dist/compiler/particleWildcardRelation.d.ts +87 -0
- package/dist/compiler/particleWildcardRelation.js +143 -0
- package/dist/compiler/projectionScalar.d.ts +32 -0
- package/dist/compiler/projectionScalar.js +184 -0
- package/dist/compiler/re01CandidateAssignments.d.ts +95 -0
- package/dist/compiler/re01CandidateAssignments.js +341 -0
- package/dist/compiler/re01CandidateCorrespondence.d.ts +85 -0
- package/dist/compiler/re01CandidateCorrespondence.js +701 -0
- package/dist/compiler/re01TypeProperties.d.ts +70 -0
- package/dist/compiler/re01TypeProperties.js +120 -0
- package/dist/compiler/re01TypePropertyValidation.d.ts +22 -0
- package/dist/compiler/re01TypePropertyValidation.js +161 -0
- package/dist/compiler/resolveCanonicalGraph.d.ts +41 -0
- package/dist/compiler/resolveCanonicalGraph.js +240 -0
- package/dist/compiler/scalarSchemaAssessment.d.ts +424 -0
- package/dist/compiler/scalarSchemaAssessment.js +5198 -0
- package/dist/compiler/schemaAttributeGroupProperties.d.ts +16 -0
- package/dist/compiler/schemaAttributeGroupProperties.js +53 -0
- package/dist/compiler/schemaAttributeProperties.d.ts +9 -0
- package/dist/compiler/schemaAttributeProperties.js +11 -0
- package/dist/compiler/schemaAttributeUses.d.ts +110 -0
- package/dist/compiler/schemaAttributeUses.js +798 -0
- package/dist/compiler/schemaBinaryWordReconstruction.d.ts +9 -0
- package/dist/compiler/schemaBinaryWordReconstruction.js +33 -0
- package/dist/compiler/schemaBuiltinFacets.d.ts +13 -0
- package/dist/compiler/schemaBuiltinFacets.js +51 -0
- package/dist/compiler/schemaCalendarImages.d.ts +7 -0
- package/dist/compiler/schemaCalendarImages.js +204 -0
- package/dist/compiler/schemaCalendarLanguage.d.ts +10 -0
- package/dist/compiler/schemaCalendarLanguage.js +227 -0
- package/dist/compiler/schemaCompiler.d.ts +0 -1
- package/dist/compiler/schemaComponentEquality.d.ts +27 -0
- package/dist/compiler/schemaComponentEquality.js +446 -0
- package/dist/compiler/schemaConstructionAssessment.d.ts +79 -0
- package/dist/compiler/schemaConstructionAssessment.js +745 -0
- package/dist/compiler/schemaDatatypeValues.d.ts +3 -0
- package/dist/compiler/schemaDatatypeValues.js +2 -0
- package/dist/compiler/schemaDecimalLanguage.d.ts +6 -0
- package/dist/compiler/schemaDecimalLanguage.js +102 -0
- package/dist/compiler/schemaDeclarationPrimitives.d.ts +39 -0
- package/dist/compiler/schemaDeclarationPrimitives.js +211 -0
- package/dist/compiler/schemaDocumentSyntax.d.ts +54 -0
- package/dist/compiler/schemaDocumentSyntax.js +294 -0
- package/dist/compiler/schemaDurationLanguage.d.ts +10 -0
- package/dist/compiler/schemaDurationLanguage.js +170 -0
- package/dist/compiler/schemaElementInstance.d.ts +30 -0
- package/dist/compiler/schemaElementInstance.js +45 -0
- package/dist/compiler/schemaElementProperties.d.ts +15 -0
- package/dist/compiler/schemaElementProperties.js +23 -0
- package/dist/compiler/schemaEndpointWordCapacity.d.ts +35 -0
- package/dist/compiler/schemaEndpointWordCapacity.js +39 -0
- package/dist/compiler/schemaExactCalendar.d.ts +72 -0
- package/dist/compiler/schemaExactCalendar.js +264 -0
- package/dist/compiler/schemaFacetAnnotation.d.ts +31 -0
- package/dist/compiler/schemaFacetAnnotation.js +199 -0
- package/dist/compiler/schemaGeneratedScalarShape.d.ts +34 -0
- package/dist/compiler/schemaGeneratedScalarShape.js +178 -0
- package/dist/compiler/schemaIdentityConstraints.d.ts +72 -0
- package/dist/compiler/schemaIdentityConstraints.js +362 -0
- package/dist/compiler/schemaIeeeLanguage.d.ts +42 -0
- package/dist/compiler/schemaIeeeLanguage.js +759 -0
- package/dist/compiler/schemaIntegerImages.d.ts +10 -0
- package/dist/compiler/schemaIntegerImages.js +113 -0
- package/dist/compiler/schemaLexicalPredicates.d.ts +28 -0
- package/dist/compiler/schemaLexicalPredicates.js +63 -0
- package/dist/compiler/schemaNotationProperties.d.ts +31 -0
- package/dist/compiler/schemaNotationProperties.js +84 -0
- package/dist/compiler/schemaNumericImageConditions.d.ts +23 -0
- package/dist/compiler/schemaNumericImageConditions.js +66 -0
- package/dist/compiler/schemaParticleWildcardProperties.d.ts +19 -0
- package/dist/compiler/schemaParticleWildcardProperties.js +43 -0
- package/dist/compiler/schemaPattern.d.ts +1061 -0
- package/dist/compiler/schemaPattern.js +581 -0
- package/dist/compiler/schemaRegularLanguage.d.ts +66 -0
- package/dist/compiler/schemaRegularLanguage.js +1166 -0
- package/dist/compiler/schemaScalarContext.d.ts +85 -0
- package/dist/compiler/schemaScalarContext.js +78 -0
- package/dist/compiler/schemaScalarKernel.d.ts +181 -0
- package/dist/compiler/schemaScalarKernel.js +391 -0
- package/dist/compiler/schemaScalarWitnesses.d.ts +5 -0
- package/dist/compiler/schemaScalarWitnesses.js +118 -0
- package/dist/compiler/schemaSimpleTypeProperties.d.ts +94 -0
- package/dist/compiler/schemaSimpleTypeProperties.js +103 -0
- package/dist/compiler/schemaSourceGrammar.d.ts +26 -0
- package/dist/compiler/schemaSourceGrammar.js +290 -0
- package/dist/compiler/schemaSourceLexical.d.ts +3 -0
- package/dist/compiler/schemaSourceLexical.js +12 -0
- package/dist/compiler/schemaSourceValues.d.ts +50 -0
- package/dist/compiler/schemaSourceValues.js +225 -0
- package/dist/compiler/schemaSourceWildcards.d.ts +27 -0
- package/dist/compiler/schemaSourceWildcards.js +249 -0
- package/dist/compiler/schemaSymbolicSequences.d.ts +15 -0
- package/dist/compiler/schemaSymbolicSequences.js +99 -0
- package/dist/compiler/schemaSymbolicValueSets.d.ts +31 -0
- package/dist/compiler/schemaSymbolicValueSets.js +149 -0
- package/dist/compiler/schemaSyntaxAssessment.d.ts +24 -0
- package/dist/compiler/schemaSyntaxAssessment.js +361 -0
- package/dist/compiler/schemaTemporalAliases.d.ts +5 -0
- package/dist/compiler/schemaTemporalAliases.js +195 -0
- package/dist/compiler/schemaTokenImages.d.ts +8 -0
- package/dist/compiler/schemaTokenImages.js +142 -0
- package/dist/compiler/schemaTypeIdentity.d.ts +38 -0
- package/dist/compiler/schemaTypeIdentity.js +80 -0
- package/dist/compiler/schemaTypeRelations.d.ts +37 -0
- package/dist/compiler/schemaTypeRelations.js +576 -0
- package/dist/compiler/schemaUri.d.ts +12 -0
- package/dist/compiler/schemaUri.js +103 -0
- package/dist/compiler/schemaValueContext.d.ts +25 -0
- package/dist/compiler/schemaValueContext.js +1 -0
- package/dist/compiler/schemaValueImages.d.ts +9 -0
- package/dist/compiler/schemaValueImages.js +142 -0
- package/dist/compiler/schemaValueSequences.d.ts +14 -0
- package/dist/compiler/schemaValueSequences.js +19 -0
- package/dist/compiler/semanticBudget.d.ts +67 -0
- package/dist/compiler/semanticBudget.js +193 -0
- package/dist/compiler/semanticCatalog.d.ts +121 -0
- package/dist/compiler/semanticCatalog.js +160 -0
- package/dist/compiler/semanticContext.d.ts +183 -0
- package/dist/compiler/semanticContext.js +1207 -0
- package/dist/compiler/semanticTypeDependencies.d.ts +7 -0
- package/dist/compiler/semanticTypeDependencies.js +64 -0
- package/dist/compiler/semanticTypeReference.d.ts +23 -0
- package/dist/compiler/semanticTypeReference.js +36 -0
- package/dist/compiler/shapeResolver.d.ts +1 -1
- package/dist/compiler/shapeResolver.js +7 -9
- package/dist/compiler/soapHeaders.d.ts +16 -0
- package/dist/compiler/soapHeaders.js +42 -0
- package/dist/compiler/sourceSchemaBinding.d.ts +25 -0
- package/dist/compiler/sourceSchemaBinding.js +39 -0
- package/dist/compiler/standardSchemaComponents.d.ts +71 -0
- package/dist/compiler/standardSchemaComponents.js +74 -0
- package/dist/compiler/standardSchemaConstruction.d.ts +20 -0
- package/dist/compiler/standardSchemaConstruction.js +34 -0
- package/dist/compiler/structuralCompanions.d.ts +15 -0
- package/dist/compiler/structuralCompanions.js +232 -0
- package/dist/compiler/validateSemanticGraph.d.ts +4 -0
- package/dist/compiler/validateSemanticGraph.js +376 -0
- package/dist/compiler/wildcardAlgebra.d.ts +25 -0
- package/dist/compiler/wildcardAlgebra.js +155 -0
- package/dist/compiler/wsdlPolicyRequirements.d.ts +43 -0
- package/dist/compiler/wsdlPolicyRequirements.js +239 -0
- package/dist/config.d.ts +0 -1
- package/dist/gateway/generateCheckedGateway.d.ts +32 -0
- package/dist/gateway/generateCheckedGateway.js +293 -0
- package/dist/gateway/generateGateway.d.ts +0 -1
- package/dist/gateway/generateGateway.js +2 -2
- package/dist/gateway/generators.d.ts +0 -1
- package/dist/gateway/helpers.d.ts +0 -1
- package/dist/generation/componentShape.d.ts +14 -0
- package/dist/generation/componentShape.js +269 -0
- package/dist/generation/preamble.d.ts +0 -1
- package/dist/generation/sourceLayout.d.ts +13 -0
- package/dist/generation/sourceLayout.js +40 -0
- package/dist/generation/writeGeneratedSource.d.ts +0 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +3 -0
- package/dist/loader/fetch.d.ts +0 -1
- package/dist/loader/orderedSyntax.d.ts +84 -0
- package/dist/loader/orderedSyntax.js +222 -0
- package/dist/loader/resolutionDepth.d.ts +6 -0
- package/dist/loader/resolutionDepth.js +65 -0
- package/dist/loader/schemaInput.d.ts +80 -0
- package/dist/loader/schemaInput.js +249 -0
- package/dist/loader/schemaResources.d.ts +60 -0
- package/dist/loader/schemaResources.js +333 -0
- package/dist/loader/wsdlLoader.d.ts +0 -1
- package/dist/openapi/casing.d.ts +0 -1
- package/dist/openapi/generateOpenAPI.d.ts +0 -1
- package/dist/openapi/generateOpenAPI.js +2 -2
- package/dist/openapi/generatePaths.d.ts +0 -1
- package/dist/openapi/generateSchemas.d.ts +0 -1
- package/dist/openapi/security.d.ts +0 -1
- package/dist/pipeline.d.ts +6 -2
- package/dist/pipeline.js +13 -0
- package/dist/test/generateCheckedTests.d.ts +17 -0
- package/dist/test/generateCheckedTests.js +60 -0
- package/dist/test/generateTests.d.ts +0 -1
- package/dist/test/generateTests.js +2 -2
- package/dist/test/generators.d.ts +0 -1
- package/dist/test/mockData.d.ts +0 -1
- package/dist/test/mockData.js +20 -14
- package/dist/util/attributeWildcards.d.ts +0 -1
- package/dist/util/builder.d.ts +0 -1
- package/dist/util/catalogMeta.d.ts +0 -1
- package/dist/util/checkedCliDiagnostics.d.ts +11 -0
- package/dist/util/checkedCliDiagnostics.js +22 -0
- package/dist/util/cli.d.ts +0 -1
- package/dist/util/errors.d.ts +0 -1
- package/dist/util/imports.d.ts +0 -1
- package/dist/util/runtimeSource.d.ts +0 -1
- package/dist/util/runtimeSource.js +3 -5
- package/dist/util/securityConfig.d.ts +0 -1
- package/dist/util/streamConfig.d.ts +0 -1
- package/dist/util/tools.d.ts +0 -1
- package/dist/util/xmlWhitespace.d.ts +2 -0
- package/dist/util/xmlWhitespace.js +4 -0
- package/dist/xsd/primitives.d.ts +0 -1
- package/docs/agent-skill.md +2 -0
- package/docs/api-reference.md +1 -1
- package/docs/checked-gateway.md +210 -0
- package/docs/checked-generation.md +161 -0
- package/docs/cli-reference.md +43 -1
- package/docs/concepts.md +136 -1
- package/docs/configuration.md +5 -1
- package/docs/corpus.md +33 -0
- package/docs/direct-values.md +311 -0
- package/docs/examples/checked-forecast.wsdl +19 -0
- package/docs/gateway-guide.md +1 -1
- package/docs/generated-code.md +10 -5
- package/docs/mapping-contract.md +114 -0
- package/docs/migration-playbook.md +1 -1
- package/docs/output-anatomy.md +1 -1
- package/docs/start-here.md +8 -2
- package/docs/supported-patterns.md +17 -5
- package/docs/testing.md +117 -31
- package/llms.txt +7 -7
- package/package.json +79 -25
- package/src/generation/preambles/direct-client/typescript.preamble +3 -0
- package/src/runtime/checkedGatewayHost.tpl.txt +157 -0
- package/src/runtime/streamXml.ts +1 -1
- package/dist/app/generateApp.d.ts.map +0 -1
- package/dist/cli.d.ts.map +0 -1
- package/dist/client/generateClient.d.ts.map +0 -1
- package/dist/client/generateOperations.d.ts.map +0 -1
- package/dist/client/generateTypes.d.ts.map +0 -1
- package/dist/client/generateUtils.d.ts.map +0 -1
- package/dist/compiler/generateCatalog.d.ts.map +0 -1
- package/dist/compiler/schemaCompiler.d.ts.map +0 -1
- package/dist/compiler/shapeResolver.d.ts.map +0 -1
- package/dist/config.d.ts.map +0 -1
- package/dist/gateway/generateGateway.d.ts.map +0 -1
- package/dist/gateway/generators.d.ts.map +0 -1
- package/dist/gateway/helpers.d.ts.map +0 -1
- package/dist/generation/preamble.d.ts.map +0 -1
- package/dist/generation/writeGeneratedSource.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/loader/fetch.d.ts.map +0 -1
- package/dist/loader/wsdlLoader.d.ts.map +0 -1
- package/dist/openapi/casing.d.ts.map +0 -1
- package/dist/openapi/generateOpenAPI.d.ts.map +0 -1
- package/dist/openapi/generatePaths.d.ts.map +0 -1
- package/dist/openapi/generateSchemas.d.ts.map +0 -1
- package/dist/openapi/security.d.ts.map +0 -1
- package/dist/pipeline.d.ts.map +0 -1
- package/dist/runtime/jsonArray.d.ts +0 -24
- package/dist/runtime/jsonArray.d.ts.map +0 -1
- package/dist/runtime/jsonArray.js +0 -52
- package/dist/runtime/ndjson.d.ts +0 -24
- package/dist/runtime/ndjson.d.ts.map +0 -1
- package/dist/runtime/ndjson.js +0 -30
- package/dist/runtime/streamXml.d.ts +0 -45
- package/dist/runtime/streamXml.d.ts.map +0 -1
- package/dist/runtime/streamXml.js +0 -212
- package/dist/test/generateTests.d.ts.map +0 -1
- package/dist/test/generators.d.ts.map +0 -1
- package/dist/test/mockData.d.ts.map +0 -1
- package/dist/util/attributeWildcards.d.ts.map +0 -1
- package/dist/util/builder.d.ts.map +0 -1
- package/dist/util/catalogMeta.d.ts.map +0 -1
- package/dist/util/cli.d.ts.map +0 -1
- package/dist/util/errors.d.ts.map +0 -1
- package/dist/util/imports.d.ts.map +0 -1
- package/dist/util/runtimeSource.d.ts.map +0 -1
- package/dist/util/securityConfig.d.ts.map +0 -1
- package/dist/util/streamConfig.d.ts.map +0 -1
- package/dist/util/tools.d.ts.map +0 -1
- package/dist/xsd/primitives.d.ts.map +0 -1
- package/docs/AGENTS.md +0 -47
- package/docs/README.md +0 -56
- package/docs/architecture.md +0 -149
- package/docs/decisions/001-test-generation.md +0 -36
- package/docs/decisions/002-streamable-responses.md +0 -330
- package/docs/file-naming-and-path-organization.md +0 -213
- package/docs/releases/README.md +0 -94
- package/docs/releases/v0.20.0.md +0 -22
- package/docs/releases/v0.21.0.md +0 -30
- package/docs/releases/v0.22.0.md +0 -30
- package/docs/releases/v0.23.0.md +0 -31
- package/docs/releases/v0.24.0.md +0 -38
- package/docs/releases/v0.25.0.md +0 -31
- package/docs/releases/v0.25.2.md +0 -32
- package/docs/releases/v0.26.0.md +0 -32
- package/docs/releases/v0.27.0.md +0 -31
- package/docs/releases/v0.28.0.md +0 -32
- package/docs/releases/v0.29.0.md +0 -32
- package/docs/releases/v0.30.0.md +0 -30
- package/docs/releases/v0.30.1.md +0 -31
- package/docs/releases/v0.30.2.md +0 -30
- package/docs/releases/v0.30.3.md +0 -33
- package/docs/releases/v0.31.0.md +0 -33
- package/docs/releases/v0.32.0.md +0 -33
- package/docs/releases/v0.33.0.md +0 -34
- package/docs/releases/v0.34.0.md +0 -30
- package/docs/releases/v0.35.0.md +0 -33
- package/docs/releases/v0.36.0.md +0 -32
- package/docs/releases/v0.37.0.md +0 -33
- package/docs/releases/v0.38.0.md +0 -35
- package/docs/releases/v0.39.0.md +0 -35
- package/docs/releases/v0.40.0.md +0 -45
- package/docs/releases/v0.40.1.md +0 -34
- package/docs/releases/v1.0.0.md +0 -42
- package/docs/releases/v1.0.1.md +0 -38
- package/docs/releases/v1.0.2.md +0 -51
- package/docs/releases/v1.0.3.md +0 -37
- package/docs/releases/v1.0.4.md +0 -45
- package/docs/releases/v1.0.5.md +0 -41
- package/docs/releases/v1.0.6.md +0 -35
- package/docs/releases/v1.0.7.md +0 -36
- package/docs/releases/v1.1.0.md +0 -42
- package/docs/releases/v1.1.1.md +0 -44
- package/docs/releases/v1.1.2.md +0 -42
- package/docs/releases/v1.1.3.md +0 -36
- package/docs/releases/v1.1.4.md +0 -36
- package/docs/roadmap/README.md +0 -107
- package/docs/roadmap/v1.0-capability-conformance-framework.md +0 -582
- package/docs/roadmap/v1.0-choice-union-mode.md +0 -90
- package/docs/roadmap/v1.0-contract-audit.md +0 -75
- package/docs/roadmap/v1.0-json-array-streaming.md +0 -101
- package/docs/roadmap/v1.0-openapi-fastify-compatibility.md +0 -99
- package/docs/roadmap/v1.0-release-candidate-gates.md +0 -92
- package/docs/roadmap/v1.0-wsdl-coverage-matrix.md +0 -200
- package/docs/roadmap/v1.0-xs-anyattribute-wildcard-bag.md +0 -932
- package/src/runtime/jsonArray.ts +0 -55
- package/src/runtime/ndjson.ts +0 -32
package/docs/generated-code.md
CHANGED
|
@@ -4,6 +4,10 @@ Guide to using the TypeScript SOAP clients and types generated by wsdl-tsc.
|
|
|
4
4
|
|
|
5
5
|
See [README](../README.md) for quick start and [Concepts](concepts.md) for type modeling details.
|
|
6
6
|
|
|
7
|
+
## Installed package definitions
|
|
8
|
+
|
|
9
|
+
The generator package ships TypeScript declarations for its public ESM API. Definition lookup resolves to those packaged `.d.ts` files; original implementation source and declaration maps are not shipped for public API source navigation. Installed package smoke checks this definition resolution using the consumer's TypeScript language service; editor-specific UI behavior is not asserted.
|
|
10
|
+
|
|
7
11
|
## Generated Preambles and ESLint
|
|
8
12
|
|
|
9
13
|
Every newly written TypeScript client, gateway, app, and generated-test file starts with `/* eslint-disable */`. This includes conditional streaming/security helpers, stub routes, and gateway typecheck fixtures. CLI and programmatic generation use the same defaults with no new flags or required arguments.
|
|
@@ -162,7 +166,7 @@ Because `records` is single-pass, each response can be iterated once. Headers ca
|
|
|
162
166
|
|
|
163
167
|
Streaming requires the `saxes` runtime dependency. The generated app scaffold pins `saxes ^6.0.0` automatically; consumers that integrate the generated client into their own project must install it explicitly.
|
|
164
168
|
|
|
165
|
-
See [Stream Configuration](configuration.md#stream-configuration) for how to opt specific operations in, and [ADR-002](decisions/002-streamable-responses.md) for the rationale and terminal-error policy.
|
|
169
|
+
See [Stream Configuration](configuration.md#stream-configuration) for how to opt specific operations in, and [ADR-002](https://github.com/TechSpokes/typescript-wsdl-client/blob/main/docs/decisions/002-streamable-responses.md) for the rationale and terminal-error policy.
|
|
166
170
|
|
|
167
171
|
## Attributes and Text Content
|
|
168
172
|
|
|
@@ -293,10 +297,11 @@ import type { WeatherOperations } from "./client/operations.js";
|
|
|
293
297
|
|
|
294
298
|
const mock: WeatherOperations = {
|
|
295
299
|
GetCityWeatherByZIP: async (args) => ({
|
|
296
|
-
response: { GetCityWeatherByZIPResult: { Success: true } },
|
|
300
|
+
response: { GetCityWeatherByZIPResult: { Success: true, WeatherID: 0 } },
|
|
297
301
|
headers: {},
|
|
298
302
|
}),
|
|
299
|
-
|
|
303
|
+
GetCityForecastByZIP: async () => ({ response: {}, headers: {} }),
|
|
304
|
+
GetWeatherInformation: async () => ({ response: {}, headers: {} }),
|
|
300
305
|
};
|
|
301
306
|
```
|
|
302
307
|
|
|
@@ -306,6 +311,6 @@ The gateway plugin accepts any `WeatherOperations` implementation, so you can pa
|
|
|
306
311
|
app.register(weatherGateway, { client: mock });
|
|
307
312
|
```
|
|
308
313
|
|
|
309
|
-
For stream operations, mock implementations return an async-iterable `records` field. See
|
|
314
|
+
For stream operations, mock implementations return an async-iterable `records` field. See [generated test mocks](testing.md#mock-client) for the full pattern with async generators.
|
|
310
315
|
|
|
311
|
-
See [
|
|
316
|
+
See [consumer testing guidance](testing.md#for-consumer-projects) for setup, legacy and checked test commands, ownership and verification limits.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Checked XML/JSON Mapping Contract
|
|
2
|
+
|
|
3
|
+
Source-derived JSON representation for checked generation. See the root [README](../README.md) and [checked gateway guide](checked-gateway.md) for supported scope and configuration.
|
|
4
|
+
|
|
5
|
+
The checked gateway guide defines executed support. Selected future forms are labeled below; describing a JSON shape does not enable a missing source or runtime capability.
|
|
6
|
+
|
|
7
|
+
## Selected keyed mapping contract
|
|
8
|
+
|
|
9
|
+
Names are JSON keys. Derive identity facts from the exact source mapping whenever a slot uniquely identifies them, including qualified attributes inside a fallback channel. Known records/scalars/arrays and reconstructible application groups remain ordinary values; source occurrence bounds choose arrays for compact slots, while each ordered entry is exactly one element occurrence. JSON property insertion order never controls source-fixed XML order. Existing scalar encodings, lexical witnesses and native duties remain authoritative.
|
|
10
|
+
|
|
11
|
+
Keyed child entries keep familiar field names, text objects make every ordered entry an object without a kind discriminator, direct URI holders handle actual identity choices, and scoped binding deltas avoid repeated full maps. Attribute entries preserve same-name/different-namespace identities without inventing a key-escaping syntax. Existing supported projections do not acquire redundant descriptors; the repository's [exploratory comparison](https://github.com/TechSpokes/typescript-wsdl-client/blob/main/research/docs/v1.0-xml-json-mapping.md#bounded-primary-source-comparison) records the alternative forms considered.
|
|
12
|
+
|
|
13
|
+
### Content and recursion
|
|
14
|
+
|
|
15
|
+
New mixed/open `$content` is an ordered array of objects. Each object has exactly one own property: either `$value` with a text string, or an ordinary child-name key whose value follows that child's selected mapping. No metadata siblings are allowed on an outer entry. Preserve significant spaces; coalesce adjacent text entries and remove zero-length text entries. Do not collapse repeated occurrences across intervening text. An XSD list scalar array is distinct from element repetitions.
|
|
16
|
+
|
|
17
|
+
```xml
|
|
18
|
+
<p xmlns="urn:msg" id="7">Hello <b>world</b>!</p>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{"id":"7","$content":[{"$value":"Hello "},{"b":"world"},{"$value":"!"}]}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Here the source declares b as string. A mixed structured b instead has its own `$content`, even when one instance is text-only. Source identity/assessment selects the grammar, not object appearance. Metadata around a scalar encoding v uses a holder with `$value:v`, including object/array scalar encodings; never merge scalar fields into element metadata. A record keeps its own fields. An ordered holder cannot also expose peer child/group fields or a scalar `$value`; source-mapped attributes may accompany it.
|
|
26
|
+
|
|
27
|
+
### Namespaces have separate owners
|
|
28
|
+
|
|
29
|
+
`$namespace` is the actual element/attribute/type namespace URI at this location. It does not declare a prefix, set a default binding or cause descendants to inherit element identity. Derive it when the exact source mapping fixes identity; otherwise supply it explicitly, including an empty URI for a no-namespace unknown element. Each child key is its XML name without the prefix unless an established source mapping defines an application alias.
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{"$content":[{"code":{"$namespace":"urn:vendor","$value":"A"}},{"code":{"$namespace":"urn:billing","$value":"B"}}]}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
`$namespaces` contains prefix bindings introduced/rebound on this node. Descendants inherit an immutable effective context and apply their local changes; parents and siblings stay unchanged. The first source-defined retained-context boundary captures otherwise unavailable effective bindings; subsequent nodes retain only deltas. A source-known intermediate node retains a delta when a descendant needs it. Prefix keys are data: `""` denotes the default binding and xml is implicit. Default reset uses `{"":""}`; XML Namespaces 1.0 does not permit deleting nonempty prefixes. Redundant deltas normalize away; apparently unused bindings in unassessed data are not pruned.
|
|
36
|
+
|
|
37
|
+
Element identity and default binding can differ: `<e:extra xmlns:e="urn:open" xmlns="urn:values">Thing</e:extra>` identifies the element in urn:open while a typed QName Thing resolves in urn:values. A child rebinding p changes its applicable lexical scope, not its element URI. Plain unassessed `p:Thing` remains a string; neither object appearance nor a colon grants QName semantics.
|
|
38
|
+
|
|
39
|
+
For assessed data without retained context, the codec can allocate compatible prefixes from actual identities. It must preserve protected effective contexts for unassessed lexical data and lexical witnesses. Reject combinations that cannot coexist in XML, including a no-namespace element retaining a nonempty default or a namespaced attribute lacking an available nonempty prefix in a protected scope. JSON shape alone does not establish these codec duties. Fresh reconstruction uses complete JSON, source mapping and inherited context; arbitrary extracted-subtree portability is not promised.
|
|
40
|
+
|
|
41
|
+
### Attribute channel
|
|
42
|
+
|
|
43
|
+
Existing unambiguous source-mapped peer attributes retain their shape. When a source mapping requires the new fallback, `$attributes` is an array of one-name entries, not an array of generic name/value descriptors. At a uniquely mapped key, a bare scalar derives its complete identity from that source slot, including a qualified namespace; redundant identity holders are rejected.
|
|
44
|
+
|
|
45
|
+
A closed source with one qualified code attribute and one code child can therefore use `{"$attributes":[{"code":"attribute"}],"code":"child"}`. For an open/unresolved key without a unique mapped identity, a bare scalar denotes an unqualified attribute and a qualified identity uses `{$namespace:nonemptyURI,$value:scalar}`. Empty-URI holders are rejected in that open grammar rather than being a second spelling.
|
|
46
|
+
|
|
47
|
+
A source key whose permitted identities remain ambiguous requires the explicit namespace selection needed to distinguish them; its generated mapping/schema declares that domain. Unknown attributes retain lexical strings; typed values use their selected scalar encodings. The bag never infers attribute identity from the default element namespace.
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{"$attributes":[{"id":"attribute"},{"id":{"$namespace":"urn:vendor","$value":"external"}}],"id":"child"}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
The container preserves two attributes with the same name from different namespaces without inventing escaping rules or aliases. Source-owned slot attribution determines whether an identity is already fixed; object appearance does not override that attribution. Attribute order is not semantic; canonical output sorts by expanded identity. Duplicate expanded attributes, duplicate peer/bag identities, undeclared attributes and invalid values fail. A selected type uses one placement consistently across nil/non-nil instances. No attribute holder owns children, `$nil` or `$type`.
|
|
54
|
+
|
|
55
|
+
### Open values, type and nil
|
|
56
|
+
|
|
57
|
+
Genuinely unassessed elements always use ordered holders, including empty/text-only instances, with their required identity and retained context. They do not become guessed scalar types. Native assessment applies independently to each location: strict/lax/skip cannot be selected by a JSON flag. Raw unassessed xsi:nil/xsi:type stay lexical attributes in the XSI namespace, not semantic `$nil`/`$type`. Missing declarations are not repaired by an open representation.
|
|
58
|
+
|
|
59
|
+
The selected research shape for a future assessed dynamic type is the flat XML identity `{$type:{$name:"Dog",$namespace:"urn:animals"}}`. Assessed dynamic `$type` execution and its `$name` identity field remain unsupported by the generated checked pipeline; this shape is not an accepted capability switch. A child entry already has its name as its key, and no `$localName`, `$kind`, `$text` or `$element` alias is allocated.
|
|
60
|
+
|
|
61
|
+
Display type/schema aliases do not rename an XML type. Any future implementation must establish native existence, derivation and attribute duties before admitting the selected research shape.
|
|
62
|
+
|
|
63
|
+
The explicit nil contract below remains authoritative. Identity/type/context metadata can accompany nil only when that exact source mapping declares the necessary combination and implements its native duties; it is not admitted by the nil marker alone. Nil forbids every text/child/group content field, even empty content. Neither semantic xsi processing nor QName scalar assessment is guessed from familiar names.
|
|
64
|
+
|
|
65
|
+
### Compatibility, HTTP shape and implementation proof
|
|
66
|
+
|
|
67
|
+
New grammar selection is per exact source declaration/type/assessment mapping. Legacy, accepted component scalar/record/array/simple/ordered values and checkedDirectRuntimeV1 remain unchanged. A reused already-accepted ordered descendant inside a new mixed parent retains its old entry grammar in both directions; the implementation dispatches through its existing mapping. Unifying those old public shapes requires a separate migration decision, not a new mode introduced here.
|
|
68
|
+
|
|
69
|
+
HTTP schemas describe actual JSON fields and source-selected recursive alternatives, with closed one-property entries, text string slots, namespace strings, flat type identity and nil/attribute/content exclusions. Named structured choice alternatives reference their union, or an array of it for repetition. Use oneOf only where JSON alternatives are disjoint. Native owners enforce names, bindings, particles/correlation, scalar/default/fixed/type/nil duties and SOAP construction. Serialization must independently preserve every accepted field. Reject unknown metadata and invalid combinations without mutation, coercion, default insertion or field removal; legal __proto__/constructor names remain safe own data properties.
|
|
70
|
+
|
|
71
|
+
The [keyed prototype](https://github.com/TechSpokes/typescript-wsdl-client/blob/main/research/tests/xml-json-mapping/keyed-mapping.ts) and [independent examples](https://github.com/TechSpokes/typescript-wsdl-client/blob/main/research/tests/xml-json-mapping/keyed-mapping.test.ts) reuse the earlier parser/syntax inverse and its fixture-specific source facts. They exercise mixed/nested text, order and namespace collisions, scopes/defaults/siblings, attribute collisions, raw xsi values, safe names, flat type and explicit nil, with malformed-input and realizability controls. The [qualified attribute fixture](https://github.com/TechSpokes/typescript-wsdl-client/blob/main/research/tests/xml-json-mapping/keyed-attributes.xsd) supplies a closed same-name attribute/child case whose qualified attribute identity is independently checked through native source attribute assessment; unassessed data with the same root name must retain its open grammar.
|
|
72
|
+
|
|
73
|
+
The [HTTP structure sketches](https://github.com/TechSpokes/typescript-wsdl-client/blob/main/research/tests/xml-json-mapping/keyed-schema.test.ts) execute recursive JSON Schema examples and rejection/non-mutation cases. They are not a generic source-to-DTO generator or production native validation; existing native projection/scalar controls and nil examples remain separate evidence. The old public candidate grammar is historical; its fixture-specific conversion helpers remain dependencies of the research adapter, not an independent new inverse.
|
|
74
|
+
|
|
75
|
+
The [checked nil implementation](checked-gateway.md#nil-values) and [keyed execution](checked-gateway.md#mixed-namespaced-and-open-values) supply the supported nil/mixed/open slices and preserve them through HTTP. Scalar/context validation and HTTP-shape generation retain their separate native duties. Application groups and configured aliases are described below and in the checked gateway guide.
|
|
76
|
+
|
|
77
|
+
## Selected nil contract
|
|
78
|
+
|
|
79
|
+
Checked nil values use one explicit object, preserving attributes and the distinction between absent, empty and nil elements. This contract does not change legacy, accepted non-nil component values or `checkedDirectRuntimeV1`; the [checked nil reference](checked-gateway.md#nil-values) records supported configuration and limits.
|
|
80
|
+
|
|
81
|
+
| Case | JSON rule |
|
|
82
|
+
|---|---|
|
|
83
|
+
| Absent optional element | Omit its property; omission is not nil |
|
|
84
|
+
| Present nil without attributes | `{"$nil":true}` |
|
|
85
|
+
| Present nil with attributes | `{"$nil":true,"id":"7"}` for an applicable mapped string attribute `id` |
|
|
86
|
+
| Empty non-nil | Retain the ordinary source-selected value, such as `""`, `{"$value":""}` or an empty permitted record |
|
|
87
|
+
| Nil repeated item | Put the explicit nil object at that item's position in the declared array |
|
|
88
|
+
| Nil wrapper | Put the explicit nil object at the wrapper element's property; it contains no items |
|
|
89
|
+
|
|
90
|
+
Both accepted input and canonical output use the explicit object; plain `null` is rejected, including as an array item. `$nil` is exactly Boolean `true`, never false, a string or a caller-selected assessment policy. XML `xsi:nil="true"` and `"1"` project to this same marker after native lexical assessment. XML false/zero uses the ordinary non-nil projection with no `$nil`; reconstruction of nil uses a permitted canonical true lexical form. Property order does not control XML order.
|
|
91
|
+
|
|
92
|
+
The only newly allocated nil metadata is `$nil`. Additional fields are exactly the applicable attribute properties already defined by the selected source mapping, using their existing scalar encodings and identities. Required attributes remain required on nil elements; optional/default/fixed attributes follow the shared native assessment and adopted augmentation rules, not Ajv defaults. Empty string attributes are data and remain subject to their type. Do not invent a new nil attribute bag or rename existing scalar descriptors. Contextual attribute families, attribute collisions/wildcards and dynamic types require their actual native owners and an explicit compatible shape before emission; the nil marker alone does not establish those capabilities or silently narrow #421's acceptance.
|
|
93
|
+
|
|
94
|
+
Nil objects prohibit all element/text/group content fields, including `$value`, `$content`, synthetic choice containers and ordinary child properties, even when their supplied values are empty or null. Reject unknown metadata, undeclared/invalid attributes, sparse/malformed arrays and object/array substitutions without mutation or silent field removal. `$type` and `$namespaces` are not implicitly accepted by this nil contract. A later independently selected contextual/type contract must explicitly describe its combination with nil; callers cannot enable it with extra keys.
|
|
95
|
+
|
|
96
|
+
Each object's XML element identity comes from its selected declaration/position; `$nil` never emits an XML child. Nillability, nil/content legality, attribute use and applicable fixed/default/scalar duties remain native checks, at the actual item or wrapper element. Genuinely unassessed lexical xsi attributes are not promoted to semantic nil by familiar spelling. No checked failure may fall back to legacy conversion, and no missing native duty may be hidden by weakening validation.
|
|
97
|
+
|
|
98
|
+
For the example with optional string attribute `id`, TypeScript is `{ $nil: true; id?: string }`. Its HTTP schema is concrete:
|
|
99
|
+
|
|
100
|
+
```json
|
|
101
|
+
{"type":"object","required":["$nil"],"additionalProperties":false,"properties":{"$nil":{"const":true},"id":{"type":"string"}}}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Include `id` in `required` where the source requires it. Compose this nil schema with the ordinary non-nil schema for a nillable element, with exactly-one composition only when the JSON alternatives are disjoint. Optionality belongs to the containing property and item versus wrapper nillability belongs to the corresponding element position. Every accepted attribute must survive response serialization; HTTP structure validation does not replace native XML checks. No discriminator, response envelope or new runtime mode is introduced.
|
|
105
|
+
|
|
106
|
+
The [explicit nil contract examples](https://github.com/TechSpokes/typescript-wsdl-client/blob/main/research/tests/xml-json-mapping/nil-contract.test.ts) exercise independent hand JSON, true/one XML lexicals, attribute-preserving fresh syntax reconstruction, canonical explicit output, absent/empty/item/wrapper distinctions and malformed combinations. They reuse the existing parser and research inverse for a fixture with string `id`; they do not implement native nillability, complete attribute semantics or generated HTTP/SOAP execution. The old null-based tests remain historical candidate evidence, not accepted aliases.
|
|
107
|
+
|
|
108
|
+
The implementation consumes this contract through existing source planning, projection/inverse, codec and HTTP-shape generation, preserving shared resource and error boundaries. Its [codec controls](https://github.com/TechSpokes/typescript-wsdl-client/blob/main/test/unit/direct-projection-nil.test.ts) and [installed gateway checks](https://github.com/TechSpokes/typescript-wsdl-client/blob/main/test/helpers/checkedGatewayInstalledProcess.ts) supply independent request/response/fault, serialized HTTP and owned-SOAP evidence, including non-nillable/content-bearing refusals and attribute/default/fixed duties.
|
|
109
|
+
|
|
110
|
+
## Application groups
|
|
111
|
+
|
|
112
|
+
Checked generation implements opt-in source-derived application groups and definition-scoped configured names. [Configuration and compatibility](checked-gateway.md#application-groups-and-configured-names), [the production fixture](https://github.com/TechSpokes/typescript-wsdl-client/blob/main/test/conformance/fixtures/assessment/application-groups.wsdl), [native inverse controls](https://github.com/TechSpokes/typescript-wsdl-client/blob/main/test/unit/application-groups.test.ts) and [pipeline/reload evidence](https://github.com/TechSpokes/typescript-wsdl-client/blob/main/test/integration/checked-application-groups.test.ts) provide regression evidence; installed HTTP/SOAP checks cover both defaults and configured aliases. Wider native source, dynamic-type and protocol duties retain their documented limits.
|
|
113
|
+
|
|
114
|
+
Reconstructible singleton/repeated/nested choices, repeated sequences, independent sites, cross-record named-group reuse and finite recursive references share the source-owned mapping. Empty-capable and ambiguous records retain ordered normalization; mixed/open records keep their selected owner. Inventory tokens include a selected-record shape guard and survive physical relocation, unrelated declaration reorder and alias changes; relevant source edits require copying fresh targets.
|
|
@@ -89,7 +89,7 @@ npx wsdl-tsc pipeline \
|
|
|
89
89
|
--init-app
|
|
90
90
|
```
|
|
91
91
|
|
|
92
|
-
The opted-in operations now return `StreamOperationResponse<RecordType>` on the client, serve `application/x-ndjson` by default on the gateway, and advertise the record schema in OpenAPI via `x-wsdl-tsc-stream`. Set `format: "json-array"` for `application/json` array streaming. Operations not listed in the config are unchanged. See [Stream Configuration](configuration.md#stream-configuration) for the full file reference and [ADR-002](decisions/002-streamable-responses.md) for the terminal-error policy.
|
|
92
|
+
The opted-in operations now return `StreamOperationResponse<RecordType>` on the client, serve `application/x-ndjson` by default on the gateway, and advertise the record schema in OpenAPI via `x-wsdl-tsc-stream`. Set `format: "json-array"` for `application/json` array streaming. Operations not listed in the config are unchanged. See [Stream Configuration](configuration.md#stream-configuration) for the full file reference and [ADR-002](https://github.com/TechSpokes/typescript-wsdl-client/blob/main/docs/decisions/002-streamable-responses.md) for the terminal-error policy.
|
|
93
93
|
|
|
94
94
|
## Step 3: Generate the REST Gateway
|
|
95
95
|
|
package/docs/output-anatomy.md
CHANGED
|
@@ -49,7 +49,7 @@ Contains runtime metadata and helper functions. Includes `unwrapArrayWrappers()`
|
|
|
49
49
|
|
|
50
50
|
### Stream Operations
|
|
51
51
|
|
|
52
|
-
When `--stream-config` opts an operation into streaming (see [ADR-002](decisions/002-streamable-responses.md)), the client emits additional surfaces alongside the buffered ones. Buffered operations in the same client are unaffected.
|
|
52
|
+
When `--stream-config` opts an operation into streaming (see [ADR-002](https://github.com/TechSpokes/typescript-wsdl-client/blob/main/docs/decisions/002-streamable-responses.md)), the client emits additional surfaces alongside the buffered ones. Buffered operations in the same client are unaffected.
|
|
53
53
|
|
|
54
54
|
`operations.ts` gains a `StreamOperationResponse<RecordType>` type that stream methods return instead of the buffered `{ response, headers, responseRaw, requestRaw }` shape:
|
|
55
55
|
|
package/docs/start-here.md
CHANGED
|
@@ -64,6 +64,12 @@ The gateway transforms JSON HTTP requests into SOAP calls and returns JSON respo
|
|
|
64
64
|
|
|
65
65
|
Next: [Gateway Guide](gateway-guide.md) for integration details, then [Migration Playbook](migration-playbook.md) for the full modernization workflow
|
|
66
66
|
|
|
67
|
+
### I want to try source-backed checked generation
|
|
68
|
+
|
|
69
|
+
From version 1.1.6, `pipeline --model checked-components-v1` opts into the checked component preview. It derives unambiguous selections and supported structured mappings from a WSDL file or URL, acquires declared dependencies, and emits a client, OpenAPI, gateway, app and tests. The existing pipeline remains the default when `--model` is omitted.
|
|
70
|
+
|
|
71
|
+
Start with [Try Opt-in Checked Generation](checked-generation.md) for a bundled installed trial, endpoint configuration, missing-schema recovery and feedback instructions. Supported contracts get native request/response/fault checks; unsupported capabilities refuse rather than bypassing validation. This preview is buffered and separate from the legacy streaming workflow below.
|
|
72
|
+
|
|
67
73
|
### I need to stream large SOAP responses
|
|
68
74
|
|
|
69
75
|
Some SOAP services return payloads that are too large or too slow to buffer in memory. Opt selected operations into streaming with a small JSON config and the `--stream-config` flag. Operations not listed keep their buffered behavior, so existing output stays byte-for-byte unchanged.
|
|
@@ -96,7 +102,7 @@ Stream operations return `StreamOperationResponse<RecordType>` on the client (`r
|
|
|
96
102
|
|
|
97
103
|
Set `"format": "json-array"` in the stream config when downstream clients need one `application/json` array document instead of NDJSON lines.
|
|
98
104
|
|
|
99
|
-
Next: [ADR-002: Streamable Responses](decisions/002-streamable-responses.md) for rationale and terminal-error policy, then [Stream Configuration](configuration.md#stream-configuration) for the full file reference.
|
|
105
|
+
Next: [ADR-002: Streamable Responses](https://github.com/TechSpokes/typescript-wsdl-client/blob/main/docs/decisions/002-streamable-responses.md) for rationale and terminal-error policy, then [Stream Configuration](configuration.md#stream-configuration) for the full file reference.
|
|
100
106
|
|
|
101
107
|
### I want an AI agent to help in my project
|
|
102
108
|
|
|
@@ -120,5 +126,5 @@ For more on scope boundaries, see the "When NOT to Use This" section of the [REA
|
|
|
120
126
|
| Plan a full SOAP-to-REST migration | [Migration Playbook](migration-playbook.md) |
|
|
121
127
|
| Set up testing for generated code | [Testing Guide](testing.md) |
|
|
122
128
|
| Review all CLI flags | [CLI Reference](cli-reference.md) |
|
|
123
|
-
| Opt specific operations into response streaming | [ADR-002](decisions/002-streamable-responses.md) and [Stream Configuration](configuration.md#stream-configuration) |
|
|
129
|
+
| Opt specific operations into response streaming | [ADR-002](https://github.com/TechSpokes/typescript-wsdl-client/blob/main/docs/decisions/002-streamable-responses.md) and [Stream Configuration](configuration.md#stream-configuration) |
|
|
124
130
|
| Install package-specific agent guidance | [Agent Skill Artifact](agent-skill.md) |
|
|
@@ -2,13 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
This document lists the WSDL and XSD features handled by the generator, along with current limitations. For modeling details, see [Core Concepts](concepts.md).
|
|
4
4
|
|
|
5
|
+
The matrix describes the existing legacy generator. The unreleased opt-in [checked gateway preview](checked-gateway.md) has a separate, narrower source/value/binding contract and installed HTTP/SOAP evidence; these legacy rows do not imply checked-model support. Synthetic preview success establishes no real-provider or general-XSD coverage.
|
|
6
|
+
|
|
7
|
+
The qualified checked domain includes [keyed mixed, namespace-collision and source-permitted open values](checked-gateway.md#mixed-namespaced-and-open-values), with production conformance and installed request/response/fault evidence. Native strict/lax/skip checks remain distinct from schema-source wildcard checks and from the legacy rows below.
|
|
8
|
+
|
|
5
9
|
## Capability Evidence Matrix
|
|
6
10
|
|
|
7
11
|
The rows below are backed by committed conformance fixtures under `test/conformance/fixtures/`. Status means the current product contract, not the full standards surface.
|
|
8
12
|
|
|
13
|
+
The [S06 research handoff](https://github.com/TechSpokes/typescript-wsdl-client/blob/main/research/docs/content-model-s06-research-handoff.md) records separate attribute, derivation, wildcard and calendar evidence.
|
|
14
|
+
Candidate interpretations and test-only prototypes do not certify production assessment or change these public capability rows.
|
|
15
|
+
|
|
9
16
|
<!-- support-matrix:start -->
|
|
10
17
|
| Capability ID | Status | Public contract |
|
|
11
18
|
|---|---|---|
|
|
19
|
+
| `declared-derivation-boundaries` | research | Legacy compilation characterizes omitted groups, appended restriction content and named recursive references; faithful resolution/composition remain internal. |
|
|
20
|
+
| `content-model-boundaries` | research | Characterization records current projection limits; it does not claim faithful content-model support. |
|
|
21
|
+
| `content-model-invalid-all` | research | Legacy compiler acceptance is characterized separately from independent schema rejection. |
|
|
12
22
|
| `sequence-occurrence-wrappers` | supported | Wrapping sequences with nonzero maxima propagate element bounds and optionality without crossing choice or all boundaries. |
|
|
13
23
|
| `weather-document-literal-soap` | supported | The canonical weather WSDL compiles through client, OpenAPI, gateway, generated-test, and app artifacts with document-literal SOAP operations. |
|
|
14
24
|
| `sequence-baseline-complex` | supported | Complex type sequences support nested complex references, repeated elements, optional fields, and all-optional request wrappers. |
|
|
@@ -37,11 +47,10 @@ Wrapping sequence bounds propagate through uninterrupted sequence ancestry to el
|
|
|
37
47
|
|
|
38
48
|
Generated clients normalize present, non-null singleton responses into arrays for repeated element properties. Real SOAP transport regressions cover singleton and multiple items, omitted optional request fields, and gateway serialization with wrapper flattening enabled and disabled. Regenerate clients to receive this runtime correction; omitted optional response properties remain absent.
|
|
39
49
|
|
|
40
|
-
- Complex types with `<xs:sequence>`, `<xs:all>`, and `<xs:choice>` compositors,
|
|
50
|
+
- Complex types with nested `<xs:sequence>`, `<xs:all>`, and `<xs:choice>` compositors, subject to the projection limits above
|
|
41
51
|
- Simple content with attributes using the `$value` pattern to preserve text content alongside attribute properties
|
|
42
52
|
- Named simple type restrictions and enumerations emitted as TypeScript aliases and OpenAPI scalar schemas
|
|
43
53
|
- Named `xs:union` simple types emitted as TypeScript alias unions and OpenAPI `oneOf` schemas
|
|
44
|
-
- Type inheritance through `<xs:extension>` and `<xs:restriction>` on both simple and complex content
|
|
45
54
|
- Nested XSD imports across multiple schema files with relative and absolute URI resolution
|
|
46
55
|
- Multiple namespaces with deterministic collision resolution via PascalCase uniqueness
|
|
47
56
|
- `<xs:choice>` elements modeled as parallel optional alternatives by default
|
|
@@ -49,7 +58,6 @@ Generated clients normalize present, non-null singleton responses into arrays fo
|
|
|
49
58
|
- Optional and nillable fields using `minOccurs`, `maxOccurs`, and `nillable` attributes
|
|
50
59
|
- `ArrayOf*` wrapper types with automatic unwrapping in OpenAPI and runtime bridging in gateway code
|
|
51
60
|
- WSDL/XSD documentation annotations propagated into TypeScript JSDoc comments and OpenAPI descriptions
|
|
52
|
-
- Circular type references detected and broken with minimal stub types
|
|
53
61
|
- Multiple WSDL ports and bindings; the first SOAP binding is selected, all ports are documented in service metadata
|
|
54
62
|
- SOAP 1.1 and SOAP 1.2 binding detection
|
|
55
63
|
- Streamable SOAP responses, opt-in per operation via `--stream-config` (ADR-002): client exposes `AsyncIterable<RecordType>`, gateway emits NDJSON or JSON array streams with backpressure, OpenAPI advertises the record schema via `x-wsdl-tsc-stream`
|
|
@@ -98,7 +106,11 @@ The compiler scans inline policies for UsernameToken, TransportBinding, and X509
|
|
|
98
106
|
|
|
99
107
|
### xs:group and xs:attributeGroup
|
|
100
108
|
|
|
101
|
-
|
|
109
|
+
The `declared-derivation-boundaries` fixture characterizes the legacy default: its named group elements and attribute-group uses are omitted from the containing compiled type. General group support is therefore unqualified. Internal [reference resolution](https://github.com/TechSpokes/typescript-wsdl-client/blob/main/docs/content-model-resolution.md) preserves complete group definitions and separate use-site bounds; [companion reuse](https://github.com/TechSpokes/typescript-wsdl-client/blob/main/docs/content-model-companions.md) carries their required closures. These internal results do not establish public generation support.
|
|
110
|
+
|
|
111
|
+
### Extension and restriction
|
|
112
|
+
|
|
113
|
+
The same executable fixture distinguishes current legacy behavior: extension appends local properties, but restriction also appends them and empty restriction retains base content. A prohibited optional attribute remains in legacy metadata. Faithful restriction, attribute composition and immutable sibling behavior are covered by internal [derivation tests](https://github.com/TechSpokes/typescript-wsdl-client/blob/main/docs/content-model-composition.md), with full legality assessment assigned to #179. Public faithful derivation support remains unqualified.
|
|
102
114
|
|
|
103
115
|
### xs:list
|
|
104
116
|
|
|
@@ -127,7 +139,7 @@ Gateway generation measures the `$ref` graph depth for each operation response.
|
|
|
127
139
|
|
|
128
140
|
### Circular references
|
|
129
141
|
|
|
130
|
-
|
|
142
|
+
The S05 characterization fixture preserves named self and mutual recursive references in legacy metadata. This does not establish complete graph resolution, forbidden-cycle diagnostics or faithful runtime handling. Internal S05 resolution and companion traversal retain complete immutable declarations and terminate on recursive values; those guarantees are not yet activated in public emitters.
|
|
131
143
|
|
|
132
144
|
### First binding selection
|
|
133
145
|
|
package/docs/testing.md
CHANGED
|
@@ -2,19 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
Guide to running and writing tests for wsdl-tsc development and for testing generated code in consumer projects.
|
|
4
4
|
|
|
5
|
-
See [README](../README.md) for quick start and [CONTRIBUTING](
|
|
5
|
+
See [README](../README.md) for quick start and [CONTRIBUTING](https://github.com/TechSpokes/typescript-wsdl-client/blob/main/CONTRIBUTING.md) for development setup.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Consumer projects should start at [For Consumer Projects](#for-consumer-projects), then choose the legacy [Generated Test Suite](#generated-test-suite) or checked scaffold workflow. The repository-maintenance sections below require a clone and its development dependencies; installing the npm package does not install repository scripts, Vitest projects or the shared verification lock.
|
|
8
8
|
|
|
9
9
|
## Test Architecture
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Repository tests verify observable contracts and regressions, diagnose behavior and support confident changes. Choose the smallest meaningful check, retaining representative installed-package and independent SOAP wire/reference checks when those boundaries matter.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
2. Snapshot tests: Baseline comparisons for all generated pipeline output
|
|
15
|
-
3. Integration tests: End-to-end gateway tests using Fastify's `inject()` with mock clients
|
|
13
|
+
Scope and resource cost are separate. `test/unit/tools.test.ts` exercises small utility contracts, while `test/unit/client-choice-union-types.test.ts` launches TypeScript compilation and `test/unit/schema-loading-budgets.test.ts` exercises large inputs. A unit-folder label does not imply pure or inexpensive execution; snapshots are an assertion technique, used here to compare generated output baselines.
|
|
16
14
|
|
|
17
|
-
|
|
15
|
+
Tests use [Vitest](https://vitest.dev/). Mock gateway integration uses Fastify injection, while conformance builds consumer-style projects and installed qualification installs tarballs and runs generated projects. Independent reference tests check XML/schema and SOAP wire observations against separately specified expectations; mocks alone cannot establish those contracts.
|
|
16
|
+
|
|
17
|
+
The [main configuration](https://github.com/TechSpokes/typescript-wsdl-client/blob/main/vitest.config.ts) runs `fast` first with half the available workers and a 30-second default test allowance; it leaves the fast hook allowance at Vitest's default (10 seconds). `workflows` follows with two workers and two-minute test/hook defaults for all integration, conformance and named expensive unit files. The [stage configuration](https://github.com/TechSpokes/typescript-wsdl-client/blob/main/vitest.conformance.config.ts) uses two workers and two-minute test/hook defaults; explicit longer test and cleanup-hook overrides, such as installed checked-gateway qualification, remain effective.
|
|
18
|
+
|
|
19
|
+
These are safety cutoffs, not performance acceptance criteria. Report slow tests separately; legitimate expensive work needs measured headroom, potentially several times ordinary runtime under load. Split independent behaviors for diagnosis without multiplying costly installation or setup, and preserve product byte, I/O and SOAP limits as separate contracts.
|
|
18
20
|
|
|
19
21
|
## Running Tests
|
|
20
22
|
|
|
@@ -24,6 +26,7 @@ npm run test:unit # Unit tests only
|
|
|
24
26
|
npm run test:snap # Snapshot tests only
|
|
25
27
|
npm run test:integration # Integration tests only
|
|
26
28
|
npm run test:conformance # WSDL capability conformance tests only
|
|
29
|
+
npm run test:installed # Installed consumer qualification
|
|
27
30
|
npm run test:watch # Watch mode for development
|
|
28
31
|
```
|
|
29
32
|
|
|
@@ -33,9 +36,55 @@ For the full CI pipeline including smoke tests:
|
|
|
33
36
|
npm run ci
|
|
34
37
|
```
|
|
35
38
|
|
|
39
|
+
Use a file and test-name filter for a focused check, or select a delivered project:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npm test -- test/unit/tools.test.ts -t pascal
|
|
43
|
+
npm test -- --project fast
|
|
44
|
+
npm run test:conformance:gateway
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
For interactive debugging, disabling the individual test timeout does not disable hook deadlines or the guarded wrapper's 45-minute outer deadline:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npm test -- test/unit/tools.test.ts --test-timeout=0 --no-file-parallelism
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Prefer the guarded public commands: `npm test`, `npm run ci`, `npm run test:unit`, `npm run test:integration`, `npm run test:corpus`, `npm run test:installed` and `npm run test:conformance`. Their corresponding `:run` targets are internal, unguarded implementation commands. Direct Vitest, `test:snap`, watch, capability-stage, reference, platform and hosted CI commands are not all wrapped; the guard is not a machine-wide scheduler.
|
|
54
|
+
|
|
55
|
+
### Verification orchestration
|
|
56
|
+
|
|
57
|
+
Inspect the current scripts before choosing commands. `ci` runs the reference launcher, build/typechecks, package/docs validation, broad Vitest including conformance and installed tests, smoke generation and installed package smoke. `test:installed`, `test:corpus` and standalone conformance overlap parts of that coverage; hosted quick and compatibility jobs are narrower signals.
|
|
58
|
+
|
|
59
|
+
Use focused tests during development, then give one owner responsibility for final candidate verification and its evidence. When standalone conformance is required, finish it and its cleanup before starting final CI, or run the two in the opposite order. Preserve both required commands; an overlapping standalone installed run adds contention rather than independent evidence for work already running inside CI.
|
|
60
|
+
|
|
61
|
+
Read-only inspection and genuinely independent bounded checks may run in parallel when capacity permits. Coordinate expensive builds, package installs and qualification across agents and worktrees because they share CPU and memory. A worktree isolates its files but does not reserve machine resources.
|
|
62
|
+
|
|
63
|
+
The [verification wrapper](https://github.com/TechSpokes/typescript-wsdl-client/blob/main/scripts/run-verification.ts) shares an owner across worktrees through `tmp/conformance/verification/active.json` beneath the common Git directory's parent. A live owner causes refusal; wait for it or ask its coordinator to cancel and await owned-child cleanup. Quiet output or an expired tool wait does not authorize replacing a run.
|
|
64
|
+
|
|
65
|
+
Each guarded attempt prints its unique `attempt-*` directory and records `context.json`, `command.log` and `result.json`. Gateway qualification writes `checked-gateway-installed/progress.ndjson` there; schema loading writes `schema-loading/measurements.json` there. CI also copies a newly written `tmp/conformance/product-tests.json` into the attempt directory; interrupted runs may leave incomplete evidence.
|
|
66
|
+
|
|
67
|
+
Other writers and unguarded invocations can still use fixed paths, including gateway/schema-loading fallback paths under `tmp/conformance/` and the hosted `installed-tests.json` report. Do not assume all evidence is immutable. Preserve failed evidence before paths are reused, wait for termination and cleanup, and remove only task-owned outputs after delivery.
|
|
68
|
+
|
|
69
|
+
For a stale lock, read the specific `active.json` owner's PID, command and working directory, then inspect actual process state, including possible PID reuse and surviving owned children. Only after confirming the owner has stopped and cleanup is complete, remove that specific lock and start a deliberate replacement. There is no automatic stale-lock reclamation; never remove a live owner's lock, kill unrelated work or broadly clean `tmp/` to recover.
|
|
70
|
+
|
|
71
|
+
Record the candidate, command, environment and evidence limits when reusing matching results. A fresh independent reviewer reads the coherent diff and relevant results, then approves or returns actionable findings; coordinate additional expensive checks through the verification owner. Copied source snapshots, review-report files and repeated unchanged reviews are unnecessary.
|
|
72
|
+
|
|
73
|
+
#### Deadlines and failures
|
|
74
|
+
|
|
75
|
+
Keep the outer tool allowance long enough for the command and cleanup; polling a quiet command is not a new test attempt. The enclosing test or batch watchdog must account for its sequential work, while each child-stage deadline bounds that child. Cancellation must reach owned work and await cleanup; product byte, node, work and transport budgets enforce separate runtime contracts.
|
|
76
|
+
|
|
77
|
+
A test runner can mark a test failed even when the behavior it checked was correct. For example, loading 64 MiB successfully and rejecting one extra byte can both pass but take about 32 seconds together, exceeding a test runner's 30-second allowance. The verification attempt still failed; retain the command, candidate, competing work and measurements before deciding whether product behavior, test composition or orchestration needs correction.
|
|
78
|
+
|
|
79
|
+
Inspect active processes and progress before diagnosing a quiet run as stalled; incomplete execution establishes no passing gate. Explain failures using the concrete checks, expected and observed outcomes, delivery impact and next necessary action. If the explanation is unclear, investigate until you understand the result, then explain the facts and their meaning for the user's task; avoid redundant status messages while providing every necessary explanation.
|
|
80
|
+
|
|
81
|
+
Review how expensive tests group work, not just their subprocesses. Independent acceptance and refusal checks should have separate test cases when combining them makes one ordinary allowance cover two complete workloads. Preserve both checks, their expected outcomes and the product limits; a passing isolated run alone does not establish that every similar test has been audited or that shared-machine contention has been resolved.
|
|
82
|
+
|
|
83
|
+
Correct the identified cause before a deliberate rerun. Keep the failed attempt visible, rerun affected checks and any unfinished required gates after cleanup, and reuse unchanged evidence without claiming an uninterrupted full-gate pass. Avoid automatic retries, global timeout increases, assertion weakening or product-budget changes to obtain a pass. An independent reviewer assesses the candidate and its evidence; coordinate any additional expensive reproduction with the verification owner rather than duplicating a running gate.
|
|
84
|
+
|
|
36
85
|
## Node Support Policy
|
|
37
86
|
|
|
38
|
-
The package supports Node.js >= 24.0.0. CI runs
|
|
87
|
+
The package supports Node.js >= 24.0.0. Hosted CI runs quick checks on Node 24 and a narrower compatibility smoke on Node 26. Separate installed-product jobs cover Linux and Windows on both lines, with platform checks, Windows reference/feasibility checks and standalone Linux Node 24 conformance; these signals complement broad local CI and do not replace release preflight.
|
|
39
88
|
|
|
40
89
|
## Temporary Workspaces
|
|
41
90
|
|
|
@@ -51,7 +100,7 @@ Keep new repository-owned temporary writers under the closest existing subfolder
|
|
|
51
100
|
|
|
52
101
|
## Unit Tests
|
|
53
102
|
|
|
54
|
-
|
|
103
|
+
The unit directory includes small function checks, filesystem work, compilation and resource workflows. Select by the behavior and actual setup, not the folder name:
|
|
55
104
|
|
|
56
105
|
- `tools.test.ts`: `pascal()`, `resolveQName()`, `explodePascal()`, `pascalToSnakeCase()`, `normalizeArray()`, `getChildrenWithLocalName()`, `getFirstWithLocalName()`
|
|
57
106
|
- `casing.test.ts`: `toPathSegment()` with kebab, asis, and lower styles
|
|
@@ -104,7 +153,7 @@ Always review the diff before committing updated snapshots.
|
|
|
104
153
|
|
|
105
154
|
## Integration Tests
|
|
106
155
|
|
|
107
|
-
|
|
156
|
+
For manual legacy gateway tests, the mock pattern below checks HTTP route behavior without proving live SOAP interoperability:
|
|
108
157
|
|
|
109
158
|
1. Running the pipeline in `beforeAll` to generate gateway code
|
|
110
159
|
2. Dynamically importing the generated plugin
|
|
@@ -113,7 +162,7 @@ Integration tests verify the generated gateway works end-to-end by:
|
|
|
113
162
|
|
|
114
163
|
### Mock Client Pattern
|
|
115
164
|
|
|
116
|
-
The generated `operations.ts` provides a typed interface for creating test doubles:
|
|
165
|
+
The legacy generated `operations.ts` provides a typed interface for creating test doubles. The following fragments assume the Weather fixture's generated client and gateway; adapt imports and operation names to your consumer project:
|
|
117
166
|
|
|
118
167
|
```typescript
|
|
119
168
|
import type { WeatherOperations } from "../client/operations.js";
|
|
@@ -124,6 +173,7 @@ function createMockClient(): WeatherOperations {
|
|
|
124
173
|
response: {
|
|
125
174
|
GetCityWeatherByZIPResult: {
|
|
126
175
|
Success: true,
|
|
176
|
+
WeatherID: 0,
|
|
127
177
|
ResponseText: "City Found",
|
|
128
178
|
State: "NY",
|
|
129
179
|
City: "New York",
|
|
@@ -137,7 +187,7 @@ function createMockClient(): WeatherOperations {
|
|
|
137
187
|
GetCityForecastByZIPResult: {
|
|
138
188
|
Success: true,
|
|
139
189
|
ResponseText: "Forecast Found",
|
|
140
|
-
// Use SOAP wrapper shape
|
|
190
|
+
// Use SOAP wrapper shape; unwrapArrayWrappers() handles conversion
|
|
141
191
|
ForecastResult: { Forecast: [] },
|
|
142
192
|
},
|
|
143
193
|
},
|
|
@@ -145,7 +195,7 @@ function createMockClient(): WeatherOperations {
|
|
|
145
195
|
}),
|
|
146
196
|
GetWeatherInformation: async (args) => ({
|
|
147
197
|
response: {
|
|
148
|
-
// Use SOAP wrapper shape
|
|
198
|
+
// Use SOAP wrapper shape; unwrapArrayWrappers() handles conversion
|
|
149
199
|
GetWeatherInformationResult: { WeatherDescription: [] },
|
|
150
200
|
},
|
|
151
201
|
headers: {},
|
|
@@ -154,10 +204,12 @@ function createMockClient(): WeatherOperations {
|
|
|
154
204
|
}
|
|
155
205
|
```
|
|
156
206
|
|
|
157
|
-
Each method returns the same `{ response, headers }` shape as the real SOAP client. Use the wrapper object structure matching TypeScript types
|
|
207
|
+
Each method returns the same `{ response, headers }` shape as the real SOAP client. Use the wrapper object structure matching TypeScript types; the generated `unwrapArrayWrappers()` function handles conversion to the flat array shape expected by JSON schemas.
|
|
158
208
|
|
|
159
209
|
### Using the Mock with Fastify
|
|
160
210
|
|
|
211
|
+
This fragment assumes your test imports `expect` and the generated `weatherGateway` plugin and defines `createMockClient()` above. Close the Fastify instance in test cleanup.
|
|
212
|
+
|
|
161
213
|
```typescript
|
|
162
214
|
import Fastify from "fastify";
|
|
163
215
|
|
|
@@ -180,7 +232,7 @@ expect(res.json().status).toBe("SUCCESS");
|
|
|
180
232
|
|
|
181
233
|
### Dynamic Import of Generated Code
|
|
182
234
|
|
|
183
|
-
|
|
235
|
+
When generating into a temporary directory during a test, Vitest's Vite module resolution handles TypeScript imports, JSON import attributes and bare specifiers from the project's `node_modules`. This fragment assumes `join`, `outDir` and the generated gateway directory are already defined:
|
|
184
236
|
|
|
185
237
|
```typescript
|
|
186
238
|
import { pathToFileURL } from "node:url";
|
|
@@ -212,14 +264,23 @@ When `--openapi-flatten-array-wrappers false` is used, ArrayOf* types are emitte
|
|
|
212
264
|
|
|
213
265
|
### Error Details Serialization
|
|
214
266
|
|
|
215
|
-
|
|
267
|
+
Connection and timeout errors carry an object in `details`, matching the error schema. Generated gateway tests exercise the serialized 503/504 responses through Fastify; direct `classifyError()` tests additionally check classification. Keep both responsibilities covered rather than bypassing HTTP serialization when it exposes a mismatch.
|
|
216
268
|
|
|
217
269
|
## Generated Test Suite
|
|
218
270
|
|
|
219
|
-
|
|
271
|
+
For legacy generation, `--test-dir` emits runnable Vitest mock-route and runtime checks. They verify generated HTTP behavior against generated fixtures, not all service semantics. For checked generation use the separate [consumer workflow](#for-consumer-projects).
|
|
220
272
|
|
|
221
273
|
### Generating Tests
|
|
222
274
|
|
|
275
|
+
Run from an ESM consumer project on Node.js >= 24 with an existing `package.json` and your local `service.wsdl` plus its schema dependencies. Install generator, test and runtime dependencies there; the package does not supply this repository's npm scripts:
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
npm install --save-dev @techspokes/typescript-wsdl-client typescript @types/node vitest
|
|
279
|
+
npm install soap fastify fastify-plugin saxes
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
Generate matched artifacts with explicit paths:
|
|
283
|
+
|
|
223
284
|
```bash
|
|
224
285
|
npx wsdl-tsc pipeline \
|
|
225
286
|
--wsdl-source service.wsdl \
|
|
@@ -252,13 +313,21 @@ npx wsdl-tsc pipeline \
|
|
|
252
313
|
|
|
253
314
|
### Running Generated Tests
|
|
254
315
|
|
|
316
|
+
From the same consumer project root:
|
|
317
|
+
|
|
255
318
|
```bash
|
|
256
319
|
npx vitest run --config ./.generated/tests/vitest.config.ts
|
|
257
320
|
```
|
|
258
321
|
|
|
322
|
+
The emitted config roots discovery at the test directory, includes `gateway/**/*.test.ts` and `runtime/**/*.test.ts`, and sets a 30-second test timeout. It does not emit this repository's `fast`/`workflows` projects, worker bounds or lock. Adapt runner allowances to your workload, and run your project's TypeScript check with generated client/gateway files included; Vitest execution alone does not typecheck them.
|
|
323
|
+
|
|
324
|
+
An optional legacy app scaffold supplies `start` and `dev`, not `test` or `typecheck`, and does not add Vitest. Install test dependencies where the test files can resolve them and use the explicit config command above or your existing project scripts. See [TypeScript Configuration](troubleshooting.md#typescript-configuration) for consumer compiler setup.
|
|
325
|
+
|
|
259
326
|
### Skip-if-Exists Behavior
|
|
260
327
|
|
|
261
|
-
Test files that already exist are skipped by default.
|
|
328
|
+
Test files that already exist are skipped by default. Customize them as consumer-owned scaffolds; `--force-test` deliberately overwrites existing emitted files. Preserve customizations before refreshing tests after contract changes; skipped files are not automatically updated to match regenerated artifacts.
|
|
329
|
+
|
|
330
|
+
Generated test files receive an [editable scaffold preamble](generated-code.md#generated-preambles-and-eslint). Remove its ESLint suppression when adopting the tests as maintained source, and keep maintained tests outside disposable or globally ignored output. Regenerate client/gateway artifacts from inputs and configuration; app scaffolds have separate `--force-init` protection.
|
|
262
331
|
|
|
263
332
|
### Mock Client
|
|
264
333
|
|
|
@@ -269,7 +338,7 @@ import { createMockClient } from "./helpers/mock-client.js";
|
|
|
269
338
|
|
|
270
339
|
const client = createMockClient({
|
|
271
340
|
GetCityWeatherByZIP: async () => ({
|
|
272
|
-
response: { GetCityWeatherByZIPResult: { Success: false, WeatherID: 0 } },
|
|
341
|
+
response: { GetCityWeatherByZIPResult: { Success: false, WeatherID: 0, ResponseText: "Not found" } },
|
|
273
342
|
headers: {},
|
|
274
343
|
}),
|
|
275
344
|
});
|
|
@@ -277,7 +346,7 @@ const client = createMockClient({
|
|
|
277
346
|
|
|
278
347
|
Mock responses use the pre-unwrap SOAP wrapper shape. The generated `unwrapArrayWrappers()` function handles conversion at runtime.
|
|
279
348
|
|
|
280
|
-
For operations opted in via `--stream-config`, the mock returns `records: AsyncIterable<RecordType>` via a small `asyncIterableOf` helper. Generated happy-path tests assert on the configured content type; NDJSON tests parse record lines, and JSON array tests parse the response body once as an array.
|
|
349
|
+
For operations opted in via `--stream-config`, the mock returns `records: AsyncIterable<RecordType>` via a small `asyncIterableOf` helper. Generated happy-path tests assert on the configured content type; NDJSON tests parse record lines, and JSON array tests parse the response body once as an array. The following contextual fragment assumes your generated helper has a `UnitDescriptiveInfoStream` operation with `Id`/`Name` records; a multi-record iterable exercises record handling, while backpressure needs a separate slow-consumer check:
|
|
281
350
|
|
|
282
351
|
```typescript
|
|
283
352
|
const client = createMockClient({
|
|
@@ -293,18 +362,35 @@ const client = createMockClient({
|
|
|
293
362
|
|
|
294
363
|
## For Consumer Projects
|
|
295
364
|
|
|
296
|
-
|
|
365
|
+
Choose tests for your integration's observable contracts and regressions. Start with the smallest meaningful check in your project's existing runner; using this generator does not require adopting the generator repository's CI or test configuration. The npm-shipped guide contains maintainer sections for reference, but repository scripts, shared locks and release gates do not apply to consumer projects.
|
|
366
|
+
|
|
367
|
+
### Choose legacy or checked generation
|
|
368
|
+
|
|
369
|
+
Legacy is the default. Follow [Generated Test Suite](#generated-test-suite) for complete dependency, WSDL, output and run commands. For manual tests, generate the same client/gateway outputs, import the operations interface, inject a typed mock into the gateway plugin and assert HTTP responses with Fastify injection or your existing HTTP stack; see [Integration Tests](#integration-tests) for contextual Weather fragments.
|
|
370
|
+
|
|
371
|
+
The legacy operations interface is a TypeScript seam without a runtime `soap` import; executing the real client still needs `soap`. Keep useful mock response and streaming scenarios when integrating tests into another runner.
|
|
372
|
+
|
|
373
|
+
For opt-in `checked-components-v1`, use Node.js >= 24 and a consumer project with the generator installed as a development dependency. This complete example uses the bundled synthetic contract and places client, gateway, OpenAPI and tests inside the generated app:
|
|
374
|
+
|
|
375
|
+
```bash
|
|
376
|
+
npm install --save-dev @techspokes/typescript-wsdl-client
|
|
377
|
+
npx wsdl-tsc pipeline --model checked-components-v1 --wsdl-source node_modules/@techspokes/typescript-wsdl-client/docs/examples/checked-forecast.wsdl --client-dir .generated/forecast/client --openapi-file .generated/forecast/openapi.json --gateway-dir .generated/forecast/gateway --gateway-service-name forecast --gateway-version-prefix v1 --init-app --app-dir .generated/forecast --test-dir .generated/forecast/test
|
|
378
|
+
cd .generated/forecast
|
|
379
|
+
npm install
|
|
380
|
+
npm run typecheck
|
|
381
|
+
npm test
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
Checked tests require app generation and emit `test/checked-scaffold.test.ts` at these paths, without a separate Vitest config. The checked app's package provides Vitest, TypeScript and runtime dependencies plus `typecheck`, `test`, `build` and `start` scripts; `npm test` runs `vitest run` with normal consumer discovery/defaults. It does not inherit this repository's project groups or lock. See [checked generation](checked-generation.md#check-and-start-the-generated-project) for build/start steps and how to substitute your source.
|
|
385
|
+
|
|
386
|
+
### What generated checks establish
|
|
387
|
+
|
|
388
|
+
Legacy mock checks exercise route validation, envelopes, error serialization and runtime helpers. Checked scaffold checks exercise health, selected OpenAPI and invalid-request refusal without upstream dispatch, using a loopback placeholder and empty endpoint restrictions. Neither proves independent SOAP wire compatibility, provider behavior or business acceptance, and neither authorizes production transactions.
|
|
297
389
|
|
|
298
|
-
|
|
299
|
-
2. Run `npx vitest run --config ./tests/vitest.config.ts` to verify everything works
|
|
300
|
-
3. Customize generated tests as needed (they won't be overwritten on regeneration)
|
|
390
|
+
Add independent expected request/response and fault fixtures for owned test services where SOAP interoperability matters, then obtain provider/business acceptance separately. Do not derive every expected answer from the same generated implementation. Choose authorized endpoints and operations before making real calls; the bundled checked contract has no running backend.
|
|
301
391
|
|
|
302
|
-
|
|
392
|
+
### Regeneration and customization
|
|
303
393
|
|
|
304
|
-
|
|
305
|
-
2. Import the operations interface from `operations.ts`
|
|
306
|
-
3. Create a mock client implementing the interface
|
|
307
|
-
4. Register the generated gateway plugin with your mock client
|
|
308
|
-
5. Use Fastify's `inject()` to test routes without a running server
|
|
394
|
+
Keep generator/runtime versions, source snapshots, client, gateway and OpenAPI artifacts matched. Test and app scaffolds preserve existing files unless `--force-test` or `--force-init` respectively is selected; inspect and merge intended changes rather than bypassing protection. Remove the editable scaffold's ESLint suppression when adopting maintained source, and retain maintained tests outside disposable generated output.
|
|
309
395
|
|
|
310
|
-
|
|
396
|
+
Run the consumer project's typecheck and tests after regeneration. Reuse matching evidence with its source/artifact identity, command, environment and limits; a passing scaffold test is only evidence for the behavior it exercises.
|