@typespec/http-client-js 0.1.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/.testignore +2 -0
- package/LICENSE +21 -0
- package/README.md +26 -0
- package/babel.config.js +4 -0
- package/dist/src/components/client-context/client-context-declaration.d.ts +8 -0
- package/dist/src/components/client-context/client-context-declaration.d.ts.map +1 -0
- package/dist/src/components/client-context/client-context-declaration.js +21 -0
- package/dist/src/components/client-context/client-context-declaration.js.map +1 -0
- package/dist/src/components/client-context/client-context-factory.d.ts +8 -0
- package/dist/src/components/client-context/client-context-factory.d.ts.map +1 -0
- package/dist/src/components/client-context/client-context-factory.js +154 -0
- package/dist/src/components/client-context/client-context-factory.js.map +1 -0
- package/dist/src/components/client-context/client-context-options.d.ts +8 -0
- package/dist/src/components/client-context/client-context-options.d.ts.map +1 -0
- package/dist/src/components/client-context/client-context-options.js +42 -0
- package/dist/src/components/client-context/client-context-options.js.map +1 -0
- package/dist/src/components/client-context/client-context.d.ts +8 -0
- package/dist/src/components/client-context/client-context.d.ts.map +1 -0
- package/dist/src/components/client-context/client-context.js +33 -0
- package/dist/src/components/client-context/client-context.js.map +1 -0
- package/dist/src/components/client-context/parametrized-endpoint.d.ts +9 -0
- package/dist/src/components/client-context/parametrized-endpoint.d.ts.map +1 -0
- package/dist/src/components/client-context/parametrized-endpoint.js +48 -0
- package/dist/src/components/client-context/parametrized-endpoint.js.map +1 -0
- package/dist/src/components/client-directory.d.ts +11 -0
- package/dist/src/components/client-directory.d.ts.map +1 -0
- package/dist/src/components/client-directory.js +39 -0
- package/dist/src/components/client-directory.js.map +1 -0
- package/dist/src/components/client-operation.d.ts +11 -0
- package/dist/src/components/client-operation.d.ts.map +1 -0
- package/dist/src/components/client-operation.js +74 -0
- package/dist/src/components/client-operation.js.map +1 -0
- package/dist/src/components/client.d.ts +15 -0
- package/dist/src/components/client.d.ts.map +1 -0
- package/dist/src/components/client.js +153 -0
- package/dist/src/components/client.js.map +1 -0
- package/dist/src/components/encoding-provider.d.ts +8 -0
- package/dist/src/components/encoding-provider.d.ts.map +1 -0
- package/dist/src/components/encoding-provider.js +17 -0
- package/dist/src/components/encoding-provider.js.map +1 -0
- package/dist/src/components/external-packages/ts-http-runtime.d.ts +13 -0
- package/dist/src/components/external-packages/ts-http-runtime.d.ts.map +1 -0
- package/dist/src/components/external-packages/ts-http-runtime.js +11 -0
- package/dist/src/components/external-packages/ts-http-runtime.js.map +1 -0
- package/dist/src/components/external-packages/uri-template.d.ts +4 -0
- package/dist/src/components/external-packages/uri-template.d.ts.map +1 -0
- package/dist/src/components/external-packages/uri-template.js +11 -0
- package/dist/src/components/external-packages/uri-template.js.map +1 -0
- package/dist/src/components/http-request-options.d.ts +25 -0
- package/dist/src/components/http-request-options.d.ts.map +1 -0
- package/dist/src/components/http-request-options.js +74 -0
- package/dist/src/components/http-request-options.js.map +1 -0
- package/dist/src/components/http-request-parameters-expression.d.ts +10 -0
- package/dist/src/components/http-request-parameters-expression.d.ts.map +1 -0
- package/dist/src/components/http-request-parameters-expression.js +62 -0
- package/dist/src/components/http-request-parameters-expression.js.map +1 -0
- package/dist/src/components/http-request.d.ts +16 -0
- package/dist/src/components/http-request.d.ts.map +1 -0
- package/dist/src/components/http-request.js +70 -0
- package/dist/src/components/http-request.js.map +1 -0
- package/dist/src/components/http-response.d.ts +14 -0
- package/dist/src/components/http-response.d.ts.map +1 -0
- package/dist/src/components/http-response.js +61 -0
- package/dist/src/components/http-response.js.map +1 -0
- package/dist/src/components/models.d.ts +5 -0
- package/dist/src/components/models.d.ts.map +1 -0
- package/dist/src/components/models.js +41 -0
- package/dist/src/components/models.js.map +1 -0
- package/dist/src/components/operation-options.d.ts +8 -0
- package/dist/src/components/operation-options.d.ts.map +1 -0
- package/dist/src/components/operation-options.js +41 -0
- package/dist/src/components/operation-options.js.map +1 -0
- package/dist/src/components/operation-parameters.d.ts +9 -0
- package/dist/src/components/operation-parameters.d.ts.map +1 -0
- package/dist/src/components/operation-parameters.js +33 -0
- package/dist/src/components/operation-parameters.js.map +1 -0
- package/dist/src/components/output.d.ts +6 -0
- package/dist/src/components/output.d.ts.map +1 -0
- package/dist/src/components/output.js +35 -0
- package/dist/src/components/output.js.map +1 -0
- package/dist/src/components/serializers.d.ts +5 -0
- package/dist/src/components/serializers.d.ts.map +1 -0
- package/dist/src/components/serializers.js +43 -0
- package/dist/src/components/serializers.js.map +1 -0
- package/dist/src/components/static-helpers/bytes-encoding.d.ts +6 -0
- package/dist/src/components/static-helpers/bytes-encoding.d.ts.map +1 -0
- package/dist/src/components/static-helpers/bytes-encoding.js +68 -0
- package/dist/src/components/static-helpers/bytes-encoding.js.map +1 -0
- package/dist/src/components/static-helpers/interfaces.d.ts +5 -0
- package/dist/src/components/static-helpers/interfaces.d.ts.map +1 -0
- package/dist/src/components/static-helpers/interfaces.js +41 -0
- package/dist/src/components/static-helpers/interfaces.js.map +1 -0
- package/dist/src/components/static-helpers/multipart-helpers.d.ts +8 -0
- package/dist/src/components/static-helpers/multipart-helpers.d.ts.map +1 -0
- package/dist/src/components/static-helpers/multipart-helpers.js +83 -0
- package/dist/src/components/static-helpers/multipart-helpers.js.map +1 -0
- package/dist/src/components/static-helpers/rest-error.d.ts +5 -0
- package/dist/src/components/static-helpers/rest-error.d.ts.map +1 -0
- package/dist/src/components/static-helpers/rest-error.js +127 -0
- package/dist/src/components/static-helpers/rest-error.js.map +1 -0
- package/dist/src/components/testing/client-options.d.ts +8 -0
- package/dist/src/components/testing/client-options.d.ts.map +1 -0
- package/dist/src/components/testing/client-options.js +27 -0
- package/dist/src/components/testing/client-options.js.map +1 -0
- package/dist/src/components/transforms/content-type-encoding-provider.d.ts +7 -0
- package/dist/src/components/transforms/content-type-encoding-provider.d.ts.map +1 -0
- package/dist/src/components/transforms/content-type-encoding-provider.js +25 -0
- package/dist/src/components/transforms/content-type-encoding-provider.js.map +1 -0
- package/dist/src/components/transforms/data-transform.d.ts +9 -0
- package/dist/src/components/transforms/data-transform.d.ts.map +1 -0
- package/dist/src/components/transforms/data-transform.js +31 -0
- package/dist/src/components/transforms/data-transform.js.map +1 -0
- package/dist/src/components/transforms/json/json-array-transform.d.ts +15 -0
- package/dist/src/components/transforms/json/json-array-transform.d.ts.map +1 -0
- package/dist/src/components/transforms/json/json-array-transform.js +71 -0
- package/dist/src/components/transforms/json/json-array-transform.js.map +1 -0
- package/dist/src/components/transforms/json/json-model-additional-properties-transform.d.ts +9 -0
- package/dist/src/components/transforms/json/json-model-additional-properties-transform.d.ts.map +1 -0
- package/dist/src/components/transforms/json/json-model-additional-properties-transform.js +35 -0
- package/dist/src/components/transforms/json/json-model-additional-properties-transform.js.map +1 -0
- package/dist/src/components/transforms/json/json-model-base-transform.d.ts +9 -0
- package/dist/src/components/transforms/json/json-model-base-transform.d.ts.map +1 -0
- package/dist/src/components/transforms/json/json-model-base-transform.js +13 -0
- package/dist/src/components/transforms/json/json-model-base-transform.js.map +1 -0
- package/dist/src/components/transforms/json/json-model-property-transform.d.ts +9 -0
- package/dist/src/components/transforms/json/json-model-property-transform.d.ts.map +1 -0
- package/dist/src/components/transforms/json/json-model-property-transform.js +44 -0
- package/dist/src/components/transforms/json/json-model-property-transform.js.map +1 -0
- package/dist/src/components/transforms/json/json-model-transform.d.ts +15 -0
- package/dist/src/components/transforms/json/json-model-transform.d.ts.map +1 -0
- package/dist/src/components/transforms/json/json-model-transform.js +96 -0
- package/dist/src/components/transforms/json/json-model-transform.js.map +1 -0
- package/dist/src/components/transforms/json/json-record-transform.d.ts +15 -0
- package/dist/src/components/transforms/json/json-record-transform.d.ts.map +1 -0
- package/dist/src/components/transforms/json/json-record-transform.js +71 -0
- package/dist/src/components/transforms/json/json-record-transform.js.map +1 -0
- package/dist/src/components/transforms/json/json-transform-discriminator.d.ts +16 -0
- package/dist/src/components/transforms/json/json-transform-discriminator.d.ts.map +1 -0
- package/dist/src/components/transforms/json/json-transform-discriminator.js +82 -0
- package/dist/src/components/transforms/json/json-transform-discriminator.js.map +1 -0
- package/dist/src/components/transforms/json/json-transform.d.ts +14 -0
- package/dist/src/components/transforms/json/json-transform.d.ts.map +1 -0
- package/dist/src/components/transforms/json/json-transform.js +149 -0
- package/dist/src/components/transforms/json/json-transform.js.map +1 -0
- package/dist/src/components/transforms/json/union-transform.d.ts +15 -0
- package/dist/src/components/transforms/json/union-transform.d.ts.map +1 -0
- package/dist/src/components/transforms/json/union-transform.js +67 -0
- package/dist/src/components/transforms/json/union-transform.js.map +1 -0
- package/dist/src/components/transforms/json/utils/transport-namer.d.ts +3 -0
- package/dist/src/components/transforms/json/utils/transport-namer.d.ts.map +1 -0
- package/dist/src/components/transforms/json/utils/transport-namer.js +13 -0
- package/dist/src/components/transforms/json/utils/transport-namer.js.map +1 -0
- package/dist/src/components/transforms/multipart/array-part-transform.d.ts +8 -0
- package/dist/src/components/transforms/multipart/array-part-transform.d.ts.map +1 -0
- package/dist/src/components/transforms/multipart/array-part-transform.js +29 -0
- package/dist/src/components/transforms/multipart/array-part-transform.js.map +1 -0
- package/dist/src/components/transforms/multipart/file-part-transform.d.ts +8 -0
- package/dist/src/components/transforms/multipart/file-part-transform.d.ts.map +1 -0
- package/dist/src/components/transforms/multipart/file-part-transform.js +40 -0
- package/dist/src/components/transforms/multipart/file-part-transform.js.map +1 -0
- package/dist/src/components/transforms/multipart/multipart-transform.d.ts +7 -0
- package/dist/src/components/transforms/multipart/multipart-transform.d.ts.map +1 -0
- package/dist/src/components/transforms/multipart/multipart-transform.js +26 -0
- package/dist/src/components/transforms/multipart/multipart-transform.js.map +1 -0
- package/dist/src/components/transforms/multipart/part-transform.d.ts +8 -0
- package/dist/src/components/transforms/multipart/part-transform.d.ts.map +1 -0
- package/dist/src/components/transforms/multipart/part-transform.js +35 -0
- package/dist/src/components/transforms/multipart/part-transform.js.map +1 -0
- package/dist/src/components/transforms/multipart/simple-part-transform.d.ts +8 -0
- package/dist/src/components/transforms/multipart/simple-part-transform.d.ts.map +1 -0
- package/dist/src/components/transforms/multipart/simple-part-transform.js +48 -0
- package/dist/src/components/transforms/multipart/simple-part-transform.js.map +1 -0
- package/dist/src/components/transforms/operation-transform-declaration.d.ts +17 -0
- package/dist/src/components/transforms/operation-transform-declaration.d.ts.map +1 -0
- package/dist/src/components/transforms/operation-transform-declaration.js +74 -0
- package/dist/src/components/transforms/operation-transform-declaration.js.map +1 -0
- package/dist/src/components/transforms/operation-transform-expression.d.ts +6 -0
- package/dist/src/components/transforms/operation-transform-expression.d.ts.map +1 -0
- package/dist/src/components/transforms/operation-transform-expression.js +60 -0
- package/dist/src/components/transforms/operation-transform-expression.js.map +1 -0
- package/dist/src/components/transforms/scalar-transform.d.ts +15 -0
- package/dist/src/components/transforms/scalar-transform.d.ts.map +1 -0
- package/dist/src/components/transforms/scalar-transform.js +317 -0
- package/dist/src/components/transforms/scalar-transform.js.map +1 -0
- package/dist/src/components/transforms/transform-name-policy.d.ts +71 -0
- package/dist/src/components/transforms/transform-name-policy.d.ts.map +1 -0
- package/dist/src/components/transforms/transform-name-policy.js +111 -0
- package/dist/src/components/transforms/transform-name-policy.js.map +1 -0
- package/dist/src/components/utils/unpack-model-property.d.ts +8 -0
- package/dist/src/components/utils/unpack-model-property.d.ts.map +1 -0
- package/dist/src/components/utils/unpack-model-property.js +33 -0
- package/dist/src/components/utils/unpack-model-property.js.map +1 -0
- package/dist/src/components/utils/url-template.d.ts +7 -0
- package/dist/src/components/utils/url-template.d.ts.map +1 -0
- package/dist/src/components/utils/url-template.js +23 -0
- package/dist/src/components/utils/url-template.js.map +1 -0
- package/dist/src/context/encoding/encoding-context.d.ts +6 -0
- package/dist/src/context/encoding/encoding-context.d.ts.map +1 -0
- package/dist/src/context/encoding/encoding-context.js +20 -0
- package/dist/src/context/encoding/encoding-context.js.map +1 -0
- package/dist/src/context/encoding/types.d.ts +6 -0
- package/dist/src/context/encoding/types.d.ts.map +1 -0
- package/dist/src/context/encoding/types.js +1 -0
- package/dist/src/context/encoding/types.js.map +1 -0
- package/dist/src/emitter.d.ts +8 -0
- package/dist/src/emitter.d.ts.map +1 -0
- package/dist/src/emitter.js +68 -0
- package/dist/src/emitter.js.map +1 -0
- package/dist/src/index.d.ts +5 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +5 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/lib.d.ts +206 -0
- package/dist/src/lib.d.ts.map +1 -0
- package/dist/src/lib.js +107 -0
- package/dist/src/lib.js.map +1 -0
- package/dist/src/testing/index.d.ts +3 -0
- package/dist/src/testing/index.d.ts.map +1 -0
- package/dist/src/testing/index.js +8 -0
- package/dist/src/testing/index.js.map +1 -0
- package/dist/src/utils/client-discovery.d.ts +7 -0
- package/dist/src/utils/client-discovery.d.ts.map +1 -0
- package/dist/src/utils/client-discovery.js +26 -0
- package/dist/src/utils/client-discovery.js.map +1 -0
- package/dist/src/utils/multipart.d.ts +3 -0
- package/dist/src/utils/multipart.d.ts.map +1 -0
- package/dist/src/utils/multipart.js +26 -0
- package/dist/src/utils/multipart.js.map +1 -0
- package/dist/src/utils/operations.d.ts +3 -0
- package/dist/src/utils/operations.d.ts.map +1 -0
- package/dist/src/utils/operations.js +11 -0
- package/dist/src/utils/operations.js.map +1 -0
- package/dist/src/utils/parameters.d.ts +14 -0
- package/dist/src/utils/parameters.d.ts.map +1 -0
- package/dist/src/utils/parameters.js +98 -0
- package/dist/src/utils/parameters.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/eng/scripts/calculate-coverage.js +36 -0
- package/eng/scripts/emit-e2e.js +329 -0
- package/eng/scripts/run-e2e-tests.js +162 -0
- package/eng/scripts/tspconfig.yaml +6 -0
- package/eng/scripts/upload-spector-results.js +120 -0
- package/package.json +83 -0
- package/src/components/client-context/client-context-declaration.tsx +19 -0
- package/src/components/client-context/client-context-factory.tsx +142 -0
- package/src/components/client-context/client-context-options.tsx +28 -0
- package/src/components/client-context/client-context.tsx +21 -0
- package/src/components/client-context/parametrized-endpoint.tsx +39 -0
- package/src/components/client-directory.tsx +40 -0
- package/src/components/client-operation.tsx +52 -0
- package/src/components/client.tsx +137 -0
- package/src/components/encoding-provider.tsx +19 -0
- package/src/components/external-packages/ts-http-runtime.ts +22 -0
- package/src/components/external-packages/uri-template.ts +11 -0
- package/src/components/http-request-options.tsx +69 -0
- package/src/components/http-request-parameters-expression.tsx +69 -0
- package/src/components/http-request.tsx +58 -0
- package/src/components/http-response.tsx +68 -0
- package/src/components/models.tsx +29 -0
- package/src/components/operation-options.tsx +26 -0
- package/src/components/operation-parameters.tsx +43 -0
- package/src/components/output.tsx +26 -0
- package/src/components/serializers.tsx +47 -0
- package/src/components/static-helpers/bytes-encoding.tsx +41 -0
- package/src/components/static-helpers/interfaces.tsx +26 -0
- package/src/components/static-helpers/multipart-helpers.tsx +59 -0
- package/src/components/static-helpers/rest-error.tsx +61 -0
- package/src/components/testing/client-options.tsx +32 -0
- package/src/components/transforms/content-type-encoding-provider.tsx +28 -0
- package/src/components/transforms/data-transform.tsx +39 -0
- package/src/components/transforms/json/json-array-transform.tsx +83 -0
- package/src/components/transforms/json/json-model-additional-properties-transform.tsx +47 -0
- package/src/components/transforms/json/json-model-base-transform.tsx +19 -0
- package/src/components/transforms/json/json-model-property-transform.tsx +41 -0
- package/src/components/transforms/json/json-model-transform.tsx +87 -0
- package/src/components/transforms/json/json-record-transform.tsx +84 -0
- package/src/components/transforms/json/json-transform-discriminator.tsx +114 -0
- package/src/components/transforms/json/json-transform.tsx +113 -0
- package/src/components/transforms/json/union-transform.tsx +73 -0
- package/src/components/transforms/json/utils/transport-namer.ts +12 -0
- package/src/components/transforms/multipart/array-part-transform.tsx +40 -0
- package/src/components/transforms/multipart/file-part-transform.tsx +44 -0
- package/src/components/transforms/multipart/multipart-transform.tsx +32 -0
- package/src/components/transforms/multipart/part-transform.tsx +22 -0
- package/src/components/transforms/multipart/simple-part-transform.tsx +49 -0
- package/src/components/transforms/operation-transform-declaration.tsx +64 -0
- package/src/components/transforms/operation-transform-expression.tsx +54 -0
- package/src/components/transforms/scalar-transform.tsx +289 -0
- package/src/components/transforms/transform-name-policy.ts +133 -0
- package/src/components/utils/unpack-model-property.ts +31 -0
- package/src/components/utils/url-template.tsx +21 -0
- package/src/context/encoding/encoding-context.tsx +26 -0
- package/src/context/encoding/types.ts +6 -0
- package/src/emitter.tsx +53 -0
- package/src/index.ts +5 -0
- package/src/lib.ts +108 -0
- package/src/testing/index.ts +8 -0
- package/src/utils/client-discovery.ts +28 -0
- package/src/utils/multipart.ts +28 -0
- package/src/utils/operations.ts +14 -0
- package/src/utils/parameters.tsx +129 -0
- package/test/e2e/assets/image.jpg +0 -0
- package/test/e2e/assets/image.png +0 -0
- package/test/e2e/http/authentication/api-key/main.test.ts +38 -0
- package/test/e2e/http/authentication/oauth2/main.test.ts +41 -0
- package/test/e2e/http/authentication/union/main.test.ts +29 -0
- package/test/e2e/http/encode/bytes/main.test.ts +191 -0
- package/test/e2e/http/encode/datetime/main.test.ts +176 -0
- package/test/e2e/http/encode/duration/main.test.ts +126 -0
- package/test/e2e/http/encode/numeric/main.test.ts +26 -0
- package/test/e2e/http/parameters/basic/main.test.ts +35 -0
- package/test/e2e/http/parameters/body-optionality/main.test.ts +43 -0
- package/test/e2e/http/parameters/collection-format/main.test.ts +45 -0
- package/test/e2e/http/parameters/spread/main.test.ts +56 -0
- package/test/e2e/http/payload/content-negotiation/main.test.ts +40 -0
- package/test/e2e/http/payload/json-merge-patch/main.test.ts +122 -0
- package/test/e2e/http/payload/media-type/main.test.ts +28 -0
- package/test/e2e/http/payload/multipart/main.test.ts +164 -0
- package/test/e2e/http/payload/pageable/main.test.ts +24 -0
- package/test/e2e/http/payload/xml/main.test.ts +287 -0
- package/test/e2e/http/routes/main.test.ts +284 -0
- package/test/e2e/http/serialization/encoded-name/json/main.test.ts +20 -0
- package/test/e2e/http/server/endpoint/not-defined/main.test.ts +11 -0
- package/test/e2e/http/server/path/multiple/main.test.ts +22 -0
- package/test/e2e/http/server/path/single/main.test.ts +11 -0
- package/test/e2e/http/server/versions/not-versioned/main.test.ts +22 -0
- package/test/e2e/http/server/versions/versioned/main.test.ts +28 -0
- package/test/e2e/http/special-headers/conditional-request/main.test.ts +35 -0
- package/test/e2e/http/special-headers/repeatability/main.test.ts +18 -0
- package/test/e2e/http/special-words/main.test.ts +434 -0
- package/test/e2e/http/type/array/array.test.ts +256 -0
- package/test/e2e/http/type/dictionary/main.test.ts +229 -0
- package/test/e2e/http/type/enum/extensible/main.test.ts +34 -0
- package/test/e2e/http/type/enum/fixed/main.test.ts +29 -0
- package/test/e2e/http/type/model/empty/main.test.ts +21 -0
- package/test/e2e/http/type/model/inheritance/enum-discriminator/main.test.ts +51 -0
- package/test/e2e/http/type/model/inheritance/nested-discriminator/main.test.ts +168 -0
- package/test/e2e/http/type/model/inheritance/not-discriminated/main.test.ts +42 -0
- package/test/e2e/http/type/model/inheritance/recursive/main.test.ts +46 -0
- package/test/e2e/http/type/model/inheritance/single-discriminator/main.test.ts +101 -0
- package/test/e2e/http/type/model/visibility/main.test.ts +64 -0
- package/test/e2e/http/type/property/additional-properties/main.test.ts +185 -0
- package/test/e2e/http/type/property/additional-properties/spreads.test.ts +470 -0
- package/test/e2e/http/type/property/nullable/main.test.ts +275 -0
- package/test/e2e/http/type/property/optionality/main.test.ts +256 -0
- package/test/e2e/http/type/property/value-types/main.test.ts +193 -0
- package/test/e2e/http/type/scalar/main.test.ts +133 -0
- package/test/e2e/http/type/scalar/scalar.test.ts +95 -0
- package/test/e2e/http/type/union/main.test.ts +207 -0
- package/test/e2e/http/versioning/added/main.test.ts +61 -0
- package/test/e2e/http/versioning/madeOptional/main.test.ts +34 -0
- package/test/e2e/http/versioning/removed/main.test.ts +75 -0
- package/test/e2e/http/versioning/renamedFrom/main.test.ts +52 -0
- package/test/e2e/http/versioning/returnTypeChangedFrom/main.test.ts +22 -0
- package/test/e2e/http/versioning/typeChangedFrom/main.test.ts +31 -0
- package/test/scenarios/additional-properties/extends.md +71 -0
- package/test/scenarios/additional-properties/is.md +46 -0
- package/test/scenarios/additional-properties/spread.md +72 -0
- package/test/scenarios/auth/basic_auth.md +67 -0
- package/test/scenarios/auth/bearer.md +67 -0
- package/test/scenarios/auth/client_parameters.md +68 -0
- package/test/scenarios/auth/client_structure.md +38 -0
- package/test/scenarios/auth/key_credential.md +67 -0
- package/test/scenarios/auth/sub_client_override.md +114 -0
- package/test/scenarios/client/client_context.md +36 -0
- package/test/scenarios/client/dotted_namespace.md +30 -0
- package/test/scenarios/client/global_namespace.md +74 -0
- package/test/scenarios/client/multiple_top_level_clients.md +74 -0
- package/test/scenarios/client/nested_client.md +106 -0
- package/test/scenarios/client/wrapping_namespace.md +43 -0
- package/test/scenarios/encoding/bytes_body.md +48 -0
- package/test/scenarios/encoding/bytes_json_property.md +60 -0
- package/test/scenarios/encoding/bytes_nullable.md +153 -0
- package/test/scenarios/encoding/header_bytes.md +142 -0
- package/test/scenarios/encoding/header_date.md +236 -0
- package/test/scenarios/encoding/model_with_bytes_property.md +50 -0
- package/test/scenarios/encoding/query_bytes.md +46 -0
- package/test/scenarios/encoding/query_date.md +236 -0
- package/test/scenarios/http-operations/basic-request.md +162 -0
- package/test/scenarios/http-operations/basic-response.md +246 -0
- package/test/scenarios/http-operations/basic.md +134 -0
- package/test/scenarios/http-operations/constant-header.md +37 -0
- package/test/scenarios/http-operations/create-operation.md +62 -0
- package/test/scenarios/http-operations/on_response.md +56 -0
- package/test/scenarios/http-operations/optional-request-body.md +55 -0
- package/test/scenarios/http-operations/path-parameter-in-model.md +59 -0
- package/test/scenarios/http-operations/path-parameter.md +54 -0
- package/test/scenarios/http-operations/scalar-payload.md +63 -0
- package/test/scenarios/http-operations/with-parameters.md +85 -0
- package/test/scenarios/models/array-properties.md +47 -0
- package/test/scenarios/models/basic.md +118 -0
- package/test/scenarios/models/dictionary-properties.md +44 -0
- package/test/scenarios/models/inheritance_2_discriminators.md +370 -0
- package/test/scenarios/models/inheritance_discriminator.md +92 -0
- package/test/scenarios/models/inline-models.md +29 -0
- package/test/scenarios/models/model_additional_properties.md +79 -0
- package/test/scenarios/models/model_extends.md +101 -0
- package/test/scenarios/models/model_spread.md +65 -0
- package/test/scenarios/models/nested_property.md +45 -0
- package/test/scenarios/models/property_references_property.md +156 -0
- package/test/scenarios/multipart/anonymous_part.md +57 -0
- package/test/scenarios/multipart/file.md +166 -0
- package/test/scenarios/multipart/file_content_type.md +67 -0
- package/test/scenarios/multipart/simple_part.md +69 -0
- package/test/scenarios/operation-parameters/body_root_anonymous.md +92 -0
- package/test/scenarios/operation-parameters/constant_as_optional.md +59 -0
- package/test/scenarios/operation-parameters/default_value_as_optional.md +59 -0
- package/test/scenarios/operation-parameters/no_content_type.md +67 -0
- package/test/scenarios/operation-parameters/no_parameters.md +55 -0
- package/test/scenarios/operation-parameters/only_optional.md +67 -0
- package/test/scenarios/operation-parameters/only_required.md +63 -0
- package/test/scenarios/operation-parameters/reserved_names.md +65 -0
- package/test/scenarios/operation-parameters/spread_body.md +75 -0
- package/test/scenarios/operation-parameters/spread_with_nested.md +87 -0
- package/test/scenarios/operation-parameters/union_body.md +92 -0
- package/test/scenarios/operation-parameters/with_body_property.md +72 -0
- package/test/scenarios/operation-parameters/with_body_root.md +74 -0
- package/test/scenarios/serializers/arrays.md +199 -0
- package/test/scenarios/serializers/basic_model.md +115 -0
- package/test/scenarios/serializers/basic_model_wire_name.md +50 -0
- package/test/scenarios/serializers/discriminated_union.md +86 -0
- package/test/scenarios/serializers/discriminated_union_spread.md +119 -0
- package/test/scenarios/serializers/model_date_time.md +65 -0
- package/test/scenarios/serializers/multipart.md +66 -0
- package/test/scenarios/serializers/polymorphic_single_level_inheritance.md +164 -0
- package/test/scenarios/serializers/record.md +101 -0
- package/test/scenarios/serializers/scalars.md +33 -0
- package/test/scenarios/serializers/spread.md +75 -0
- package/test/scenarios/serializers/string_union.md +61 -0
- package/test/scenarios/server/default_url.md +45 -0
- package/test/scenarios/server/multiple-parameters.md +57 -0
- package/test/scenarios/server/no-server.md +37 -0
- package/test/scenarios/server/parametrized-endpoint.md +53 -0
- package/test/scenarios.test.ts +18 -0
- package/test/test-host.ts +76 -0
- package/tsconfig.json +16 -0
- package/tsconfig.test.json +7 -0
- package/vitest.config.js +23 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { describe, it } from "vitest";
|
|
2
|
+
import { ConditionalRequestClient } from "../../../generated/special-headers/conditional-request/src/index.js";
|
|
3
|
+
|
|
4
|
+
describe("SpecialHeaders.ConditionalRequest", () => {
|
|
5
|
+
const client = new ConditionalRequestClient({
|
|
6
|
+
allowInsecureConnection: true,
|
|
7
|
+
retryOptions: {
|
|
8
|
+
maxRetries: 0,
|
|
9
|
+
},
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
// mockapi issue Double quotes
|
|
13
|
+
it.skip("should send a request with If-Match header defined", async () => {
|
|
14
|
+
await client.postIfMatch({ ifMatch: "valid" });
|
|
15
|
+
// Assert successful request
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
// mockapi issue Double quotes
|
|
19
|
+
it.skip("should send a request with If-None-Match header defined", async () => {
|
|
20
|
+
await client.postIfNoneMatch({ ifNoneMatch: "invalid" });
|
|
21
|
+
// Assert successful request
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it("should send a request with If-Modified-Since header defined", async () => {
|
|
25
|
+
const date = new Date("Fri, 26 Aug 2022 14:38:00 GMT");
|
|
26
|
+
await client.headIfModifiedSince({ ifModifiedSince: date });
|
|
27
|
+
// Assert successful request
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
it("should send a request with If-Unmodified-Since header defined", async () => {
|
|
31
|
+
const date = new Date("Fri, 26 Aug 2022 14:38:00 GMT");
|
|
32
|
+
await client.postIfUnmodifiedSince({ ifUnmodifiedSince: date });
|
|
33
|
+
// Assert successful request
|
|
34
|
+
});
|
|
35
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { describe, it } from "vitest";
|
|
2
|
+
import { RepeatabilityClient } from "../../../generated/special-headers/repeatability/src/index.js";
|
|
3
|
+
|
|
4
|
+
describe("SpecialHeaders.Repeatability", () => {
|
|
5
|
+
const client = new RepeatabilityClient({
|
|
6
|
+
allowInsecureConnection: true,
|
|
7
|
+
retryOptions: {
|
|
8
|
+
maxRetries: 0,
|
|
9
|
+
},
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it("should recognize Repeatability-Request-ID and Repeatability-First-Sent headers", async () => {
|
|
13
|
+
const repeatabilityRequestID = "2378d9bc-1726-11ee-be56-0242ac120002";
|
|
14
|
+
const repeatabilityFirstSent = new Date("Tue, 15 Nov 2022 12:45:26 GMT");
|
|
15
|
+
|
|
16
|
+
await client.immediateSuccess(repeatabilityRequestID, repeatabilityFirstSent);
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1,434 @@
|
|
|
1
|
+
import { describe, it } from "vitest";
|
|
2
|
+
import {
|
|
3
|
+
ModelPropertiesClient,
|
|
4
|
+
ModelsClient,
|
|
5
|
+
OperationsClient,
|
|
6
|
+
ParametersClient,
|
|
7
|
+
} from "../../generated/special-words/src/index.js";
|
|
8
|
+
|
|
9
|
+
describe("SpecialWords", () => {
|
|
10
|
+
describe("OperationsClient", () => {
|
|
11
|
+
const client = new OperationsClient({ allowInsecureConnection: true });
|
|
12
|
+
|
|
13
|
+
it("should handle operation 'and'", async () => {
|
|
14
|
+
await client.and();
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
it("should handle operation 'as'", async () => {
|
|
18
|
+
await client.as_();
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it("should handle operation 'assert'", async () => {
|
|
22
|
+
await client.assert();
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
it("should handle operation 'async'", async () => {
|
|
26
|
+
await client.async();
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
it("should handle operation 'await'", async () => {
|
|
30
|
+
await client.await_();
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it("should handle operation 'break'", async () => {
|
|
34
|
+
await client.break_();
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it("should handle operation 'class'", async () => {
|
|
38
|
+
await client.class_();
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
it("should handle operation 'constructor'", async () => {
|
|
42
|
+
await client.constructor_2();
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
it("should handle operation 'continue'", async () => {
|
|
46
|
+
await client.continue_();
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it("should handle operation 'def'", async () => {
|
|
50
|
+
await client.def();
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
it("should handle operation 'del'", async () => {
|
|
54
|
+
await client.del();
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
it("should handle operation 'elif'", async () => {
|
|
58
|
+
await client.elif();
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
it("should handle operation 'else'", async () => {
|
|
62
|
+
await client.else_();
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
it("should handle operation 'except'", async () => {
|
|
66
|
+
await client.except();
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
it("should handle operation 'exec'", async () => {
|
|
70
|
+
await client.exec();
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
it("should handle operation 'finally'", async () => {
|
|
74
|
+
await client.finally_();
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
it("should handle operation 'for'", async () => {
|
|
78
|
+
await client.for_();
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
it("should handle operation 'from'", async () => {
|
|
82
|
+
await client.from();
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
it("should handle operation 'global'", async () => {
|
|
86
|
+
await client.global();
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
it("should handle operation 'if'", async () => {
|
|
90
|
+
await client.if_();
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
it("should handle operation 'import'", async () => {
|
|
94
|
+
await client.import_();
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
it("should handle operation 'in'", async () => {
|
|
98
|
+
await client.in_();
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
it("should handle operation 'is'", async () => {
|
|
102
|
+
await client.is();
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
it("should handle operation 'lambda'", async () => {
|
|
106
|
+
await client.lambda();
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
it("should handle operation 'not'", async () => {
|
|
110
|
+
await client.not();
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
it("should handle operation 'or'", async () => {
|
|
114
|
+
await client.or();
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
it("should handle operation 'pass'", async () => {
|
|
118
|
+
await client.pass();
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
it("should handle operation 'raise'", async () => {
|
|
122
|
+
await client.raise();
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
it("should handle operation 'return'", async () => {
|
|
126
|
+
await client.return_();
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
it("should handle operation 'try'", async () => {
|
|
130
|
+
await client.try_();
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
it("should handle operation 'while'", async () => {
|
|
134
|
+
await client.while_();
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
it("should handle operation 'with'", async () => {
|
|
138
|
+
await client.with_();
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
it("should handle operation 'yield'", async () => {
|
|
142
|
+
await client.yield_();
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
describe("ParametersClient", () => {
|
|
147
|
+
const client = new ParametersClient({ allowInsecureConnection: true });
|
|
148
|
+
|
|
149
|
+
it("should handle parameter 'and'", async () => {
|
|
150
|
+
await client.withAnd("ok");
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
it("should handle parameter 'as'", async () => {
|
|
154
|
+
await client.withAs("ok");
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
it("should handle parameter 'assert'", async () => {
|
|
158
|
+
await client.withAssert("ok");
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
it("should handle parameter 'async'", async () => {
|
|
162
|
+
await client.withAsync("ok");
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
it("should handle parameter 'await'", async () => {
|
|
166
|
+
await client.withAwait("ok");
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
it("should handle parameter 'break'", async () => {
|
|
170
|
+
await client.withBreak("ok");
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
it("should handle parameter 'class'", async () => {
|
|
174
|
+
await client.withClass("ok");
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
it("should handle parameter 'constructor'", async () => {
|
|
178
|
+
await client.withConstructor("ok");
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
it("should handle parameter 'continue'", async () => {
|
|
182
|
+
await client.withContinue("ok");
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
it("should handle parameter 'def'", async () => {
|
|
186
|
+
await client.withDef("ok");
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
it("should handle parameter 'del'", async () => {
|
|
190
|
+
await client.withDel("ok");
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
it("should handle parameter 'elif'", async () => {
|
|
194
|
+
await client.withElif("ok");
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
it("should handle parameter 'else'", async () => {
|
|
198
|
+
await client.withElse("ok");
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
it("should handle parameter 'except'", async () => {
|
|
202
|
+
await client.withExcept("ok");
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
it("should handle parameter 'exec'", async () => {
|
|
206
|
+
await client.withExec("ok");
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
it("should handle parameter 'finally'", async () => {
|
|
210
|
+
await client.withFinally("ok");
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
it("should handle parameter 'for'", async () => {
|
|
214
|
+
await client.withFor("ok");
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
it("should handle parameter 'from'", async () => {
|
|
218
|
+
await client.withFrom("ok");
|
|
219
|
+
});
|
|
220
|
+
|
|
221
|
+
it("should handle parameter 'global'", async () => {
|
|
222
|
+
await client.withGlobal("ok");
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
it("should handle parameter 'if'", async () => {
|
|
226
|
+
await client.withIf("ok");
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
it("should handle parameter 'import'", async () => {
|
|
230
|
+
await client.withImport("ok");
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
it("should handle parameter 'in'", async () => {
|
|
234
|
+
await client.withIn("ok");
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
it("should handle parameter 'is'", async () => {
|
|
238
|
+
await client.withIs("ok");
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
it("should handle parameter 'lambda'", async () => {
|
|
242
|
+
await client.withLambda("ok");
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
it("should handle parameter 'not'", async () => {
|
|
246
|
+
await client.withNot("ok");
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
it("should handle parameter 'or'", async () => {
|
|
250
|
+
await client.withOr("ok");
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
it("should handle parameter 'pass'", async () => {
|
|
254
|
+
await client.withPass("ok");
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
it("should handle parameter 'raise'", async () => {
|
|
258
|
+
await client.withRaise("ok");
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
it("should handle parameter 'return'", async () => {
|
|
262
|
+
await client.withReturn("ok");
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
it("should handle parameter 'try'", async () => {
|
|
266
|
+
await client.withTry("ok");
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
it("should handle parameter 'while'", async () => {
|
|
270
|
+
await client.withWhile("ok");
|
|
271
|
+
});
|
|
272
|
+
|
|
273
|
+
it("should handle parameter 'with'", async () => {
|
|
274
|
+
await client.withWith("ok");
|
|
275
|
+
});
|
|
276
|
+
|
|
277
|
+
it("should handle parameter 'yield'", async () => {
|
|
278
|
+
await client.withYield("ok");
|
|
279
|
+
});
|
|
280
|
+
|
|
281
|
+
it("should handle parameter 'cancellationToken'", async () => {
|
|
282
|
+
await client.withCancellationToken("ok");
|
|
283
|
+
});
|
|
284
|
+
});
|
|
285
|
+
|
|
286
|
+
describe("ModelsClient", () => {
|
|
287
|
+
const client = new ModelsClient({ allowInsecureConnection: true });
|
|
288
|
+
|
|
289
|
+
it("should handle model 'and'", async () => {
|
|
290
|
+
await client.withAnd({ name: "ok" });
|
|
291
|
+
});
|
|
292
|
+
|
|
293
|
+
it("should handle model 'as'", async () => {
|
|
294
|
+
await client.withAs({ name: "ok" });
|
|
295
|
+
});
|
|
296
|
+
|
|
297
|
+
it("should handle model 'assert'", async () => {
|
|
298
|
+
await client.withAssert({ name: "ok" });
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
it("should handle model 'async'", async () => {
|
|
302
|
+
await client.withAsync({ name: "ok" });
|
|
303
|
+
});
|
|
304
|
+
|
|
305
|
+
it("should handle model 'await'", async () => {
|
|
306
|
+
await client.withAwait({ name: "ok" });
|
|
307
|
+
});
|
|
308
|
+
|
|
309
|
+
it("should handle model 'break'", async () => {
|
|
310
|
+
await client.withBreak({ name: "ok" });
|
|
311
|
+
});
|
|
312
|
+
|
|
313
|
+
it("should handle model 'class'", async () => {
|
|
314
|
+
await client.withClass({ name: "ok" });
|
|
315
|
+
});
|
|
316
|
+
|
|
317
|
+
it("should handle model 'constructor'", async () => {
|
|
318
|
+
await client.withConstructor({ name: "ok" });
|
|
319
|
+
});
|
|
320
|
+
|
|
321
|
+
it("should handle model 'continue'", async () => {
|
|
322
|
+
await client.withContinue({ name: "ok" });
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
it("should handle model 'def'", async () => {
|
|
326
|
+
await client.withDef({ name: "ok" });
|
|
327
|
+
});
|
|
328
|
+
|
|
329
|
+
it("should handle model 'del'", async () => {
|
|
330
|
+
await client.withDel({ name: "ok" });
|
|
331
|
+
});
|
|
332
|
+
|
|
333
|
+
it("should handle model 'elif'", async () => {
|
|
334
|
+
await client.withElif({ name: "ok" });
|
|
335
|
+
});
|
|
336
|
+
|
|
337
|
+
it("should handle model 'else'", async () => {
|
|
338
|
+
await client.withElse({ name: "ok" });
|
|
339
|
+
});
|
|
340
|
+
|
|
341
|
+
it("should handle model 'except'", async () => {
|
|
342
|
+
await client.withExcept({ name: "ok" });
|
|
343
|
+
});
|
|
344
|
+
|
|
345
|
+
it("should handle model 'exec'", async () => {
|
|
346
|
+
await client.withExec({ name: "ok" });
|
|
347
|
+
});
|
|
348
|
+
|
|
349
|
+
it("should handle model 'finally'", async () => {
|
|
350
|
+
await client.withFinally({ name: "ok" });
|
|
351
|
+
});
|
|
352
|
+
|
|
353
|
+
it("should handle model 'for'", async () => {
|
|
354
|
+
await client.withFor({ name: "ok" });
|
|
355
|
+
});
|
|
356
|
+
|
|
357
|
+
it("should handle model 'from'", async () => {
|
|
358
|
+
await client.withFrom({ name: "ok" });
|
|
359
|
+
});
|
|
360
|
+
|
|
361
|
+
it("should handle model 'global'", async () => {
|
|
362
|
+
await client.withGlobal({ name: "ok" });
|
|
363
|
+
});
|
|
364
|
+
|
|
365
|
+
it("should handle model 'if'", async () => {
|
|
366
|
+
await client.withIf({ name: "ok" });
|
|
367
|
+
});
|
|
368
|
+
|
|
369
|
+
it("should handle model 'import'", async () => {
|
|
370
|
+
await client.withImport({ name: "ok" });
|
|
371
|
+
});
|
|
372
|
+
|
|
373
|
+
it("should handle model 'in'", async () => {
|
|
374
|
+
await client.withIn({ name: "ok" });
|
|
375
|
+
});
|
|
376
|
+
|
|
377
|
+
it("should handle model 'is'", async () => {
|
|
378
|
+
await client.withIs({ name: "ok" });
|
|
379
|
+
});
|
|
380
|
+
|
|
381
|
+
it("should handle model 'lambda'", async () => {
|
|
382
|
+
await client.withLambda({ name: "ok" });
|
|
383
|
+
});
|
|
384
|
+
|
|
385
|
+
it("should handle model 'not'", async () => {
|
|
386
|
+
await client.withNot({ name: "ok" });
|
|
387
|
+
});
|
|
388
|
+
|
|
389
|
+
it("should handle model 'or'", async () => {
|
|
390
|
+
await client.withOr({ name: "ok" });
|
|
391
|
+
});
|
|
392
|
+
|
|
393
|
+
it("should handle model 'pass'", async () => {
|
|
394
|
+
await client.withPass({ name: "ok" });
|
|
395
|
+
});
|
|
396
|
+
|
|
397
|
+
it("should handle model 'raise'", async () => {
|
|
398
|
+
await client.withRaise({ name: "ok" });
|
|
399
|
+
});
|
|
400
|
+
|
|
401
|
+
it("should handle model 'return'", async () => {
|
|
402
|
+
await client.withReturn({ name: "ok" });
|
|
403
|
+
});
|
|
404
|
+
|
|
405
|
+
it("should handle model 'try'", async () => {
|
|
406
|
+
await client.withTry({ name: "ok" });
|
|
407
|
+
});
|
|
408
|
+
|
|
409
|
+
it("should handle model 'while'", async () => {
|
|
410
|
+
await client.withWhile({ name: "ok" });
|
|
411
|
+
});
|
|
412
|
+
|
|
413
|
+
it("should handle model 'with'", async () => {
|
|
414
|
+
await client.withWith({ name: "ok" });
|
|
415
|
+
});
|
|
416
|
+
|
|
417
|
+
it("should handle model 'yield'", async () => {
|
|
418
|
+
await client.withYield({ name: "ok" });
|
|
419
|
+
});
|
|
420
|
+
});
|
|
421
|
+
|
|
422
|
+
describe("ModelPropertiesClient", () => {
|
|
423
|
+
const client = new ModelPropertiesClient({
|
|
424
|
+
allowInsecureConnection: true,
|
|
425
|
+
retryOptions: {
|
|
426
|
+
maxRetries: 1,
|
|
427
|
+
},
|
|
428
|
+
});
|
|
429
|
+
|
|
430
|
+
it("should handle property same as the model name", async () => {
|
|
431
|
+
await client.sameAsModel({ sameAsModel: "ok" });
|
|
432
|
+
});
|
|
433
|
+
});
|
|
434
|
+
});
|