@typespec/http-specs 0.37.2
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/CHANGELOG.md +1 -0
- package/LICENSE +21 -0
- package/README.md +36 -0
- package/assets/image.jpg +0 -0
- package/assets/image.png +0 -0
- package/dist/specs/authentication/api-key/mockapi.d.ts +3 -0
- package/dist/specs/authentication/api-key/mockapi.d.ts.map +1 -0
- package/dist/specs/authentication/api-key/mockapi.js +45 -0
- package/dist/specs/authentication/api-key/mockapi.js.map +1 -0
- package/dist/specs/authentication/commonapi.d.ts +9 -0
- package/dist/specs/authentication/commonapi.d.ts.map +1 -0
- package/dist/specs/authentication/commonapi.js +19 -0
- package/dist/specs/authentication/commonapi.js.map +1 -0
- package/dist/specs/authentication/http/custom/mockapi.d.ts +3 -0
- package/dist/specs/authentication/http/custom/mockapi.d.ts.map +1 -0
- package/dist/specs/authentication/http/custom/mockapi.js +45 -0
- package/dist/specs/authentication/http/custom/mockapi.js.map +1 -0
- package/dist/specs/authentication/oauth2/mockapi.d.ts +3 -0
- package/dist/specs/authentication/oauth2/mockapi.d.ts.map +1 -0
- package/dist/specs/authentication/oauth2/mockapi.js +42 -0
- package/dist/specs/authentication/oauth2/mockapi.js.map +1 -0
- package/dist/specs/authentication/union/mockapi.d.ts +3 -0
- package/dist/specs/authentication/union/mockapi.d.ts.map +1 -0
- package/dist/specs/authentication/union/mockapi.js +37 -0
- package/dist/specs/authentication/union/mockapi.js.map +1 -0
- package/dist/specs/encode/bytes/mockapi.d.ts +3 -0
- package/dist/specs/encode/bytes/mockapi.d.ts.map +1 -0
- package/dist/specs/encode/bytes/mockapi.js +179 -0
- package/dist/specs/encode/bytes/mockapi.js.map +1 -0
- package/dist/specs/encode/datetime/mockapi.d.ts +3 -0
- package/dist/specs/encode/datetime/mockapi.d.ts.map +1 -0
- package/dist/specs/encode/datetime/mockapi.js +160 -0
- package/dist/specs/encode/datetime/mockapi.js.map +1 -0
- package/dist/specs/encode/duration/mockapi.d.ts +3 -0
- package/dist/specs/encode/duration/mockapi.d.ts.map +1 -0
- package/dist/specs/encode/duration/mockapi.js +116 -0
- package/dist/specs/encode/duration/mockapi.js.map +1 -0
- package/dist/specs/encode/numeric/mockapi.d.ts +3 -0
- package/dist/specs/encode/numeric/mockapi.d.ts.map +1 -0
- package/dist/specs/encode/numeric/mockapi.js +29 -0
- package/dist/specs/encode/numeric/mockapi.js.map +1 -0
- package/dist/specs/helper.d.ts +3 -0
- package/dist/specs/helper.d.ts.map +1 -0
- package/dist/specs/helper.js +7 -0
- package/dist/specs/helper.js.map +1 -0
- package/dist/specs/parameters/basic/mockapi.d.ts +3 -0
- package/dist/specs/parameters/basic/mockapi.d.ts.map +1 -0
- package/dist/specs/parameters/basic/mockapi.js +24 -0
- package/dist/specs/parameters/basic/mockapi.js.map +1 -0
- package/dist/specs/parameters/body-optionality/mockapi.d.ts +3 -0
- package/dist/specs/parameters/body-optionality/mockapi.d.ts.map +1 -0
- package/dist/specs/parameters/body-optionality/mockapi.js +62 -0
- package/dist/specs/parameters/body-optionality/mockapi.js.map +1 -0
- package/dist/specs/parameters/collection-format/mockapi.d.ts +3 -0
- package/dist/specs/parameters/collection-format/mockapi.d.ts.map +1 -0
- package/dist/specs/parameters/collection-format/mockapi.js +106 -0
- package/dist/specs/parameters/collection-format/mockapi.js.map +1 -0
- package/dist/specs/parameters/spread/mockapi.d.ts +3 -0
- package/dist/specs/parameters/spread/mockapi.d.ts.map +1 -0
- package/dist/specs/parameters/spread/mockapi.js +206 -0
- package/dist/specs/parameters/spread/mockapi.js.map +1 -0
- package/dist/specs/payload/json-merge-patch/mockapi.d.ts +40 -0
- package/dist/specs/payload/json-merge-patch/mockapi.d.ts.map +1 -0
- package/dist/specs/payload/json-merge-patch/mockapi.js +141 -0
- package/dist/specs/payload/json-merge-patch/mockapi.js.map +1 -0
- package/dist/specs/payload/media-type/mockapi.d.ts +3 -0
- package/dist/specs/payload/media-type/mockapi.d.ts.map +1 -0
- package/dist/specs/payload/media-type/mockapi.js +84 -0
- package/dist/specs/payload/media-type/mockapi.js.map +1 -0
- package/dist/specs/payload/multipart/mockapi.d.ts +3 -0
- package/dist/specs/payload/multipart/mockapi.d.ts.map +1 -0
- package/dist/specs/payload/multipart/mockapi.js +153 -0
- package/dist/specs/payload/multipart/mockapi.js.map +1 -0
- package/dist/specs/payload/xml/mockapi.d.ts +15 -0
- package/dist/specs/payload/xml/mockapi.d.ts.map +1 -0
- package/dist/specs/payload/xml/mockapi.js +189 -0
- package/dist/specs/payload/xml/mockapi.js.map +1 -0
- package/dist/specs/routes/mockapi.d.ts +3 -0
- package/dist/specs/routes/mockapi.d.ts.map +1 -0
- package/dist/specs/routes/mockapi.js +63 -0
- package/dist/specs/routes/mockapi.js.map +1 -0
- package/dist/specs/serialization/encoded-name/json/mockapi.d.ts +3 -0
- package/dist/specs/serialization/encoded-name/json/mockapi.d.ts.map +1 -0
- package/dist/specs/serialization/encoded-name/json/mockapi.js +32 -0
- package/dist/specs/serialization/encoded-name/json/mockapi.js.map +1 -0
- package/dist/specs/server/endpoint/not-defined/mockapi.d.ts +3 -0
- package/dist/specs/server/endpoint/not-defined/mockapi.d.ts.map +1 -0
- package/dist/specs/server/endpoint/not-defined/mockapi.js +15 -0
- package/dist/specs/server/endpoint/not-defined/mockapi.js.map +1 -0
- package/dist/specs/server/path/multiple/mockapi.d.ts +3 -0
- package/dist/specs/server/path/multiple/mockapi.d.ts.map +1 -0
- package/dist/specs/server/path/multiple/mockapi.js +27 -0
- package/dist/specs/server/path/multiple/mockapi.js.map +1 -0
- package/dist/specs/server/path/single/mockapi.d.ts +3 -0
- package/dist/specs/server/path/single/mockapi.d.ts.map +1 -0
- package/dist/specs/server/path/single/mockapi.js +15 -0
- package/dist/specs/server/path/single/mockapi.js.map +1 -0
- package/dist/specs/server/versions/not-versioned/mockapi.d.ts +3 -0
- package/dist/specs/server/versions/not-versioned/mockapi.d.ts.map +1 -0
- package/dist/specs/server/versions/not-versioned/mockapi.js +46 -0
- package/dist/specs/server/versions/not-versioned/mockapi.js.map +1 -0
- package/dist/specs/server/versions/versioned/mockapi.d.ts +3 -0
- package/dist/specs/server/versions/versioned/mockapi.d.ts.map +1 -0
- package/dist/specs/server/versions/versioned/mockapi.js +47 -0
- package/dist/specs/server/versions/versioned/mockapi.js.map +1 -0
- package/dist/specs/special-headers/conditional-request/mockapi.d.ts +3 -0
- package/dist/specs/special-headers/conditional-request/mockapi.d.ts.map +1 -0
- package/dist/specs/special-headers/conditional-request/mockapi.js +79 -0
- package/dist/specs/special-headers/conditional-request/mockapi.js.map +1 -0
- package/dist/specs/special-headers/repeatability/mockapi.d.ts +3 -0
- package/dist/specs/special-headers/repeatability/mockapi.d.ts.map +1 -0
- package/dist/specs/special-headers/repeatability/mockapi.js +36 -0
- package/dist/specs/special-headers/repeatability/mockapi.js.map +1 -0
- package/dist/specs/special-words/dec.d.ts +22 -0
- package/dist/specs/special-words/dec.d.ts.map +1 -0
- package/dist/specs/special-words/dec.js +37 -0
- package/dist/specs/special-words/dec.js.map +1 -0
- package/dist/specs/special-words/mockapi.d.ts +3 -0
- package/dist/specs/special-words/mockapi.d.ts.map +1 -0
- package/dist/specs/special-words/mockapi.js +246 -0
- package/dist/specs/special-words/mockapi.js.map +1 -0
- package/dist/specs/type/array/mockapi.d.ts +3 -0
- package/dist/specs/type/array/mockapi.d.ts.map +1 -0
- package/dist/specs/type/array/mockapi.js +104 -0
- package/dist/specs/type/array/mockapi.js.map +1 -0
- package/dist/specs/type/dictionary/mockapi.d.ts +3 -0
- package/dist/specs/type/dictionary/mockapi.d.ts.map +1 -0
- package/dist/specs/type/dictionary/mockapi.js +103 -0
- package/dist/specs/type/dictionary/mockapi.js.map +1 -0
- package/dist/specs/type/enum/extensible/mockapi.d.ts +3 -0
- package/dist/specs/type/enum/extensible/mockapi.d.ts.map +1 -0
- package/dist/specs/type/enum/extensible/mockapi.js +46 -0
- package/dist/specs/type/enum/extensible/mockapi.js.map +1 -0
- package/dist/specs/type/enum/fixed/mockapi.d.ts +3 -0
- package/dist/specs/type/enum/fixed/mockapi.d.ts.map +1 -0
- package/dist/specs/type/enum/fixed/mockapi.js +53 -0
- package/dist/specs/type/enum/fixed/mockapi.js.map +1 -0
- package/dist/specs/type/model/empty/mockapi.d.ts +3 -0
- package/dist/specs/type/model/empty/mockapi.d.ts.map +1 -0
- package/dist/specs/type/model/empty/mockapi.js +48 -0
- package/dist/specs/type/model/empty/mockapi.js.map +1 -0
- package/dist/specs/type/model/inheritance/enum-discriminator/mockapi.d.ts +3 -0
- package/dist/specs/type/model/inheritance/enum-discriminator/mockapi.d.ts.map +1 -0
- package/dist/specs/type/model/inheritance/enum-discriminator/mockapi.js +79 -0
- package/dist/specs/type/model/inheritance/enum-discriminator/mockapi.js.map +1 -0
- package/dist/specs/type/model/inheritance/nested-discriminator/mockapi.d.ts +3 -0
- package/dist/specs/type/model/inheritance/nested-discriminator/mockapi.d.ts.map +1 -0
- package/dist/specs/type/model/inheritance/nested-discriminator/mockapi.js +147 -0
- package/dist/specs/type/model/inheritance/nested-discriminator/mockapi.js.map +1 -0
- package/dist/specs/type/model/inheritance/not-discriminated/mockapi.d.ts +3 -0
- package/dist/specs/type/model/inheritance/not-discriminated/mockapi.d.ts.map +1 -0
- package/dist/specs/type/model/inheritance/not-discriminated/mockapi.js +47 -0
- package/dist/specs/type/model/inheritance/not-discriminated/mockapi.js.map +1 -0
- package/dist/specs/type/model/inheritance/recursive/mockapi.d.ts +3 -0
- package/dist/specs/type/model/inheritance/recursive/mockapi.d.ts.map +1 -0
- package/dist/specs/type/model/inheritance/recursive/mockapi.js +47 -0
- package/dist/specs/type/model/inheritance/recursive/mockapi.js.map +1 -0
- package/dist/specs/type/model/inheritance/single-discriminator/mockapi.d.ts +3 -0
- package/dist/specs/type/model/inheritance/single-discriminator/mockapi.d.ts.map +1 -0
- package/dist/specs/type/model/inheritance/single-discriminator/mockapi.js +122 -0
- package/dist/specs/type/model/inheritance/single-discriminator/mockapi.js.map +1 -0
- package/dist/specs/type/model/templated/mockapi.d.ts +3 -0
- package/dist/specs/type/model/templated/mockapi.d.ts.map +1 -0
- package/dist/specs/type/model/templated/mockapi.js +99 -0
- package/dist/specs/type/model/templated/mockapi.js.map +1 -0
- package/dist/specs/type/model/usage/mockapi.d.ts +3 -0
- package/dist/specs/type/model/usage/mockapi.d.ts.map +1 -0
- package/dist/specs/type/model/usage/mockapi.js +52 -0
- package/dist/specs/type/model/usage/mockapi.js.map +1 -0
- package/dist/specs/type/model/visibility/mockapi.d.ts +3 -0
- package/dist/specs/type/model/visibility/mockapi.d.ts.map +1 -0
- package/dist/specs/type/model/visibility/mockapi.js +138 -0
- package/dist/specs/type/model/visibility/mockapi.js.map +1 -0
- package/dist/specs/type/property/additional-properties/mockapi.d.ts +3 -0
- package/dist/specs/type/property/additional-properties/mockapi.d.ts.map +1 -0
- package/dist/specs/type/property/additional-properties/mockapi.js +346 -0
- package/dist/specs/type/property/additional-properties/mockapi.js.map +1 -0
- package/dist/specs/type/property/nullable/mockapi.d.ts +3 -0
- package/dist/specs/type/property/nullable/mockapi.d.ts.map +1 -0
- package/dist/specs/type/property/nullable/mockapi.js +147 -0
- package/dist/specs/type/property/nullable/mockapi.js.map +1 -0
- package/dist/specs/type/property/optionality/mockapi.d.ts +3 -0
- package/dist/specs/type/property/optionality/mockapi.d.ts.map +1 -0
- package/dist/specs/type/property/optionality/mockapi.js +197 -0
- package/dist/specs/type/property/optionality/mockapi.js.map +1 -0
- package/dist/specs/type/property/value-types/mockapi.d.ts +3 -0
- package/dist/specs/type/property/value-types/mockapi.d.ts.map +1 -0
- package/dist/specs/type/property/value-types/mockapi.js +213 -0
- package/dist/specs/type/property/value-types/mockapi.js.map +1 -0
- package/dist/specs/type/scalar/mockapi.d.ts +3 -0
- package/dist/specs/type/scalar/mockapi.d.ts.map +1 -0
- package/dist/specs/type/scalar/mockapi.js +274 -0
- package/dist/specs/type/scalar/mockapi.js.map +1 -0
- package/dist/specs/type/union/mockapi.d.ts +3 -0
- package/dist/specs/type/union/mockapi.d.ts.map +1 -0
- package/dist/specs/type/union/mockapi.js +113 -0
- package/dist/specs/type/union/mockapi.js.map +1 -0
- package/dist/specs/versioning/added/mockapi.d.ts +3 -0
- package/dist/specs/versioning/added/mockapi.d.ts.map +1 -0
- package/dist/specs/versioning/added/mockapi.js +76 -0
- package/dist/specs/versioning/added/mockapi.js.map +1 -0
- package/dist/specs/versioning/madeOptional/mockapi.d.ts +3 -0
- package/dist/specs/versioning/madeOptional/mockapi.d.ts.map +1 -0
- package/dist/specs/versioning/madeOptional/mockapi.js +24 -0
- package/dist/specs/versioning/madeOptional/mockapi.js.map +1 -0
- package/dist/specs/versioning/removed/mockapi.d.ts +3 -0
- package/dist/specs/versioning/removed/mockapi.d.ts.map +1 -0
- package/dist/specs/versioning/removed/mockapi.js +26 -0
- package/dist/specs/versioning/removed/mockapi.js.map +1 -0
- package/dist/specs/versioning/renamedFrom/mockapi.d.ts +3 -0
- package/dist/specs/versioning/renamedFrom/mockapi.d.ts.map +1 -0
- package/dist/specs/versioning/renamedFrom/mockapi.js +53 -0
- package/dist/specs/versioning/renamedFrom/mockapi.js.map +1 -0
- package/dist/specs/versioning/returnTypeChangedFrom/mockapi.d.ts +3 -0
- package/dist/specs/versioning/returnTypeChangedFrom/mockapi.d.ts.map +1 -0
- package/dist/specs/versioning/returnTypeChangedFrom/mockapi.js +25 -0
- package/dist/specs/versioning/returnTypeChangedFrom/mockapi.js.map +1 -0
- package/dist/specs/versioning/typeChangedFrom/mockapi.d.ts +3 -0
- package/dist/specs/versioning/typeChangedFrom/mockapi.d.ts.map +1 -0
- package/dist/specs/versioning/typeChangedFrom/mockapi.js +29 -0
- package/dist/specs/versioning/typeChangedFrom/mockapi.js.map +1 -0
- package/package.json +53 -0
- package/specs/README.md +3 -0
- package/specs/authentication/api-key/main.tsp +39 -0
- package/specs/authentication/api-key/mockapi.ts +47 -0
- package/specs/authentication/commonapi.ts +43 -0
- package/specs/authentication/http/custom/main.tsp +39 -0
- package/specs/authentication/http/custom/mockapi.ts +47 -0
- package/specs/authentication/oauth2/main.tsp +44 -0
- package/specs/authentication/oauth2/mockapi.ts +44 -0
- package/specs/authentication/union/main.tsp +29 -0
- package/specs/authentication/union/mockapi.ts +39 -0
- package/specs/encode/bytes/main.tsp +369 -0
- package/specs/encode/bytes/mockapi.ts +309 -0
- package/specs/encode/datetime/main.tsp +344 -0
- package/specs/encode/datetime/mockapi.ts +274 -0
- package/specs/encode/duration/main.tsp +322 -0
- package/specs/encode/duration/mockapi.ts +204 -0
- package/specs/encode/numeric/main.tsp +71 -0
- package/specs/encode/numeric/mockapi.ts +39 -0
- package/specs/helper.ts +8 -0
- package/specs/parameters/basic/main.tsp +61 -0
- package/specs/parameters/basic/mockapi.ts +29 -0
- package/specs/parameters/body-optionality/main.tsp +63 -0
- package/specs/parameters/body-optionality/mockapi.ts +71 -0
- package/specs/parameters/collection-format/main.tsp +95 -0
- package/specs/parameters/collection-format/mockapi.ts +113 -0
- package/specs/parameters/spread/main.tsp +340 -0
- package/specs/parameters/spread/mockapi.ts +216 -0
- package/specs/payload/json-merge-patch/main.tsp +183 -0
- package/specs/payload/json-merge-patch/mockapi.ts +146 -0
- package/specs/payload/media-type/main.tsp +54 -0
- package/specs/payload/media-type/mockapi.ts +88 -0
- package/specs/payload/multipart/main.tsp +499 -0
- package/specs/payload/multipart/mockapi.ts +226 -0
- package/specs/payload/xml/main.tsp +312 -0
- package/specs/payload/xml/mockapi.ts +244 -0
- package/specs/routes/main.tsp +476 -0
- package/specs/routes/mockapi.ts +158 -0
- package/specs/scratch/.gitignore +3 -0
- package/specs/serialization/encoded-name/json/main.tsp +45 -0
- package/specs/serialization/encoded-name/json/mockapi.ts +34 -0
- package/specs/server/endpoint/not-defined/main.tsp +19 -0
- package/specs/server/endpoint/not-defined/mockapi.ts +16 -0
- package/specs/server/path/multiple/main.tsp +46 -0
- package/specs/server/path/multiple/mockapi.ts +29 -0
- package/specs/server/path/single/main.tsp +23 -0
- package/specs/server/path/single/mockapi.ts +16 -0
- package/specs/server/versions/not-versioned/main.tsp +39 -0
- package/specs/server/versions/not-versioned/mockapi.ts +55 -0
- package/specs/server/versions/versioned/main.tsp +65 -0
- package/specs/server/versions/versioned/mockapi.ts +68 -0
- package/specs/special-headers/conditional-request/main.tsp +89 -0
- package/specs/special-headers/conditional-request/mockapi.ts +83 -0
- package/specs/special-headers/repeatability/main.tsp +39 -0
- package/specs/special-headers/repeatability/mockapi.ts +47 -0
- package/specs/special-words/dec.js +52 -0
- package/specs/special-words/main.tsp +238 -0
- package/specs/special-words/mockapi.ts +407 -0
- package/specs/type/array/main.tsp +132 -0
- package/specs/type/array/mockapi.ts +119 -0
- package/specs/type/dictionary/main.tsp +122 -0
- package/specs/type/dictionary/mockapi.ts +115 -0
- package/specs/type/enum/extensible/main.tsp +64 -0
- package/specs/type/enum/extensible/mockapi.ts +55 -0
- package/specs/type/enum/fixed/main.tsp +60 -0
- package/specs/type/enum/fixed/mockapi.ts +55 -0
- package/specs/type/model/empty/main.tsp +39 -0
- package/specs/type/model/empty/mockapi.ts +51 -0
- package/specs/type/model/inheritance/enum-discriminator/main.tsp +169 -0
- package/specs/type/model/inheritance/enum-discriminator/mockapi.ts +99 -0
- package/specs/type/model/inheritance/nested-discriminator/main.tsp +223 -0
- package/specs/type/model/inheritance/nested-discriminator/mockapi.ts +150 -0
- package/specs/type/model/inheritance/not-discriminated/main.tsp +53 -0
- package/specs/type/model/inheritance/not-discriminated/mockapi.ts +49 -0
- package/specs/type/model/inheritance/recursive/main.tsp +70 -0
- package/specs/type/model/inheritance/recursive/mockapi.ts +48 -0
- package/specs/type/model/inheritance/single-discriminator/main.tsp +171 -0
- package/specs/type/model/inheritance/single-discriminator/mockapi.ts +126 -0
- package/specs/type/model/templated/main.tsp +130 -0
- package/specs/type/model/templated/mockapi.ts +102 -0
- package/specs/type/model/usage/main.tsp +48 -0
- package/specs/type/model/usage/mockapi.ts +56 -0
- package/specs/type/model/visibility/main.tsp +152 -0
- package/specs/type/model/visibility/mockapi.ts +139 -0
- package/specs/type/property/additional-properties/main.tsp +591 -0
- package/specs/type/property/additional-properties/mockapi.ts +477 -0
- package/specs/type/property/nullable/client.tsp +21 -0
- package/specs/type/property/nullable/main.tsp +162 -0
- package/specs/type/property/nullable/mockapi.ts +202 -0
- package/specs/type/property/optionality/main.tsp +258 -0
- package/specs/type/property/optionality/mockapi.ts +308 -0
- package/specs/type/property/value-types/main.tsp +285 -0
- package/specs/type/property/value-types/mockapi.ts +297 -0
- package/specs/type/scalar/main.tsp +164 -0
- package/specs/type/scalar/mockapi.ts +280 -0
- package/specs/type/union/main.tsp +262 -0
- package/specs/type/union/mockapi.ts +137 -0
- package/specs/versioning/added/main.tsp +135 -0
- package/specs/versioning/added/mockapi.ts +79 -0
- package/specs/versioning/madeOptional/main.tsp +64 -0
- package/specs/versioning/madeOptional/mockapi.ts +25 -0
- package/specs/versioning/removed/main.tsp +125 -0
- package/specs/versioning/removed/mockapi.ts +27 -0
- package/specs/versioning/renamedFrom/main.tsp +111 -0
- package/specs/versioning/renamedFrom/mockapi.ts +55 -0
- package/specs/versioning/returnTypeChangedFrom/main.tsp +56 -0
- package/specs/versioning/returnTypeChangedFrom/mockapi.ts +26 -0
- package/specs/versioning/typeChangedFrom/main.tsp +70 -0
- package/specs/versioning/typeChangedFrom/mockapi.ts +30 -0
- package/temp/.tsbuildinfo +1 -0
- package/tsconfig.build.json +9 -0
- package/tsconfig.json +11 -0
- package/tspconfig.yaml +2 -0
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
import { json, passOnSuccess } from "@typespec/spec-api";
|
|
2
|
+
export const Scenarios = {};
|
|
3
|
+
const recordFloatBody = {
|
|
4
|
+
id: 43.125,
|
|
5
|
+
prop: 43.125,
|
|
6
|
+
};
|
|
7
|
+
const recordModelBody = {
|
|
8
|
+
knownProp: { state: "ok" },
|
|
9
|
+
prop: { state: "ok" },
|
|
10
|
+
};
|
|
11
|
+
const recordModelArrayBody = {
|
|
12
|
+
knownProp: [{ state: "ok" }, { state: "ok" }],
|
|
13
|
+
prop: [{ state: "ok" }, { state: "ok" }],
|
|
14
|
+
};
|
|
15
|
+
const differentRecordStringBody = {
|
|
16
|
+
id: 43.125,
|
|
17
|
+
prop: "abc",
|
|
18
|
+
};
|
|
19
|
+
const differentRecordFloatBody = {
|
|
20
|
+
name: "abc",
|
|
21
|
+
prop: 43.125,
|
|
22
|
+
};
|
|
23
|
+
const differentRecordModelBody = {
|
|
24
|
+
knownProp: "abc",
|
|
25
|
+
prop: { state: "ok" },
|
|
26
|
+
};
|
|
27
|
+
const differentRecordModelArrayBody = {
|
|
28
|
+
knownProp: "abc",
|
|
29
|
+
prop: [{ state: "ok" }, { state: "ok" }],
|
|
30
|
+
};
|
|
31
|
+
const extendsModelSpreadStringBody = {
|
|
32
|
+
id: 43.125,
|
|
33
|
+
prop: "abc",
|
|
34
|
+
derivedProp: "abc",
|
|
35
|
+
};
|
|
36
|
+
const extendsModelSpreadFloatBody = {
|
|
37
|
+
name: "abc",
|
|
38
|
+
prop: 43.125,
|
|
39
|
+
derivedProp: 43.125,
|
|
40
|
+
};
|
|
41
|
+
const extendsModelSpreadModelBody = {
|
|
42
|
+
knownProp: "abc",
|
|
43
|
+
prop: { state: "ok" },
|
|
44
|
+
derivedProp: { state: "ok" },
|
|
45
|
+
};
|
|
46
|
+
const extendsModelSpreadModelArrayBody = {
|
|
47
|
+
knownProp: "abc",
|
|
48
|
+
prop: [{ state: "ok" }, { state: "ok" }],
|
|
49
|
+
derivedProp: [{ state: "ok" }, { state: "ok" }],
|
|
50
|
+
};
|
|
51
|
+
const multipleSpreadBody = {
|
|
52
|
+
flag: true,
|
|
53
|
+
prop1: "abc",
|
|
54
|
+
prop2: 43.125,
|
|
55
|
+
};
|
|
56
|
+
const recordUnionBody = multipleSpreadBody;
|
|
57
|
+
const recordDiscriminatedUnionBody = {
|
|
58
|
+
name: "abc",
|
|
59
|
+
prop1: {
|
|
60
|
+
kind: "kind0",
|
|
61
|
+
fooProp: "abc",
|
|
62
|
+
},
|
|
63
|
+
prop2: {
|
|
64
|
+
kind: "kind1",
|
|
65
|
+
start: "2021-01-01T00:00:00Z",
|
|
66
|
+
end: "2021-01-02T00:00:00Z",
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
const recordNonDiscriminatedUnion2Body = {
|
|
70
|
+
name: "abc",
|
|
71
|
+
prop1: {
|
|
72
|
+
kind: "kind1",
|
|
73
|
+
start: "2021-01-01T00:00:00Z",
|
|
74
|
+
},
|
|
75
|
+
prop2: {
|
|
76
|
+
kind: "kind1",
|
|
77
|
+
start: "2021-01-01T00:00:00Z",
|
|
78
|
+
end: "2021-01-02T00:00:00Z",
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
const recordNonDiscriminatedUnion3Body = {
|
|
82
|
+
name: "abc",
|
|
83
|
+
prop1: [
|
|
84
|
+
{
|
|
85
|
+
kind: "kind1",
|
|
86
|
+
start: "2021-01-01T00:00:00Z",
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
kind: "kind1",
|
|
90
|
+
start: "2021-01-01T00:00:00Z",
|
|
91
|
+
},
|
|
92
|
+
],
|
|
93
|
+
prop2: {
|
|
94
|
+
kind: "kind1",
|
|
95
|
+
start: "2021-01-01T00:00:00Z",
|
|
96
|
+
end: "2021-01-02T00:00:00Z",
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
function createServerTests(url, value) {
|
|
100
|
+
return {
|
|
101
|
+
get: passOnSuccess({
|
|
102
|
+
uri: url,
|
|
103
|
+
method: `get`,
|
|
104
|
+
request: {},
|
|
105
|
+
response: {
|
|
106
|
+
status: 200,
|
|
107
|
+
body: json(value),
|
|
108
|
+
},
|
|
109
|
+
handler: (req) => {
|
|
110
|
+
return {
|
|
111
|
+
status: 200,
|
|
112
|
+
body: json(value),
|
|
113
|
+
};
|
|
114
|
+
},
|
|
115
|
+
kind: "MockApiDefinition",
|
|
116
|
+
}),
|
|
117
|
+
put: passOnSuccess({
|
|
118
|
+
uri: url,
|
|
119
|
+
method: `put`,
|
|
120
|
+
request: {
|
|
121
|
+
body: value,
|
|
122
|
+
},
|
|
123
|
+
response: {
|
|
124
|
+
status: 204,
|
|
125
|
+
},
|
|
126
|
+
handler: (req) => {
|
|
127
|
+
const expectedBody = JSON.parse(JSON.stringify(value));
|
|
128
|
+
req.expect.coercedBodyEquals(expectedBody);
|
|
129
|
+
return {
|
|
130
|
+
status: 204,
|
|
131
|
+
};
|
|
132
|
+
},
|
|
133
|
+
kind: "MockApiDefinition",
|
|
134
|
+
}),
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
const Type_Property_Additional_Properties_Extends_Record_Unknown = createServerTests(`/type/property/additionalProperties/extendsRecordUnknown`, {
|
|
138
|
+
name: "ExtendsUnknownAdditionalProperties",
|
|
139
|
+
prop1: 32,
|
|
140
|
+
prop2: true,
|
|
141
|
+
prop3: "abc",
|
|
142
|
+
});
|
|
143
|
+
Scenarios.Type_Property_AdditionalProperties_ExtendsUnknown_get =
|
|
144
|
+
Type_Property_Additional_Properties_Extends_Record_Unknown.get;
|
|
145
|
+
Scenarios.Type_Property_AdditionalProperties_ExtendsUnknown_put =
|
|
146
|
+
Type_Property_Additional_Properties_Extends_Record_Unknown.put;
|
|
147
|
+
const Type_Property_Additional_Properties_Extends_Record_Unknown_Derived = createServerTests(`/type/property/additionalProperties/extendsRecordUnknownDerived`, {
|
|
148
|
+
name: "ExtendsUnknownAdditionalProperties",
|
|
149
|
+
index: 314,
|
|
150
|
+
age: 2.71875,
|
|
151
|
+
prop1: 32,
|
|
152
|
+
prop2: true,
|
|
153
|
+
prop3: "abc",
|
|
154
|
+
});
|
|
155
|
+
Scenarios.Type_Property_AdditionalProperties_ExtendsUnknownDerived_get =
|
|
156
|
+
Type_Property_Additional_Properties_Extends_Record_Unknown_Derived.get;
|
|
157
|
+
Scenarios.Type_Property_AdditionalProperties_ExtendsUnknownDerived_put =
|
|
158
|
+
Type_Property_Additional_Properties_Extends_Record_Unknown_Derived.put;
|
|
159
|
+
const Type_Property_Additional_Properties_Extends_Unknown_Discriminated = createServerTests(`/type/property/additionalProperties/extendsUnknownDiscriminated`, {
|
|
160
|
+
kind: "derived",
|
|
161
|
+
name: "Derived",
|
|
162
|
+
index: 314,
|
|
163
|
+
age: 2.71875,
|
|
164
|
+
prop1: 32,
|
|
165
|
+
prop2: true,
|
|
166
|
+
prop3: "abc",
|
|
167
|
+
});
|
|
168
|
+
Scenarios.Type_Property_AdditionalProperties_ExtendsUnknownDiscriminated_get =
|
|
169
|
+
Type_Property_Additional_Properties_Extends_Unknown_Discriminated.get;
|
|
170
|
+
Scenarios.Type_Property_AdditionalProperties_ExtendsUnknownDiscriminated_put =
|
|
171
|
+
Type_Property_Additional_Properties_Extends_Unknown_Discriminated.put;
|
|
172
|
+
const Type_Property_Additional_Properties_Is_Record_Unknown = createServerTests(`/type/property/additionalProperties/isRecordUnknown`, {
|
|
173
|
+
name: "IsUnknownAdditionalProperties",
|
|
174
|
+
prop1: 32,
|
|
175
|
+
prop2: true,
|
|
176
|
+
prop3: "abc",
|
|
177
|
+
});
|
|
178
|
+
Scenarios.Type_Property_AdditionalProperties_IsUnknown_get =
|
|
179
|
+
Type_Property_Additional_Properties_Is_Record_Unknown.get;
|
|
180
|
+
Scenarios.Type_Property_AdditionalProperties_IsUnknown_put =
|
|
181
|
+
Type_Property_Additional_Properties_Is_Record_Unknown.put;
|
|
182
|
+
const Type_Property_Additional_Properties_Is_Record_Unknown_Derived = createServerTests(`/type/property/additionalProperties/isRecordUnknownDerived`, {
|
|
183
|
+
name: "IsUnknownAdditionalProperties",
|
|
184
|
+
index: 314,
|
|
185
|
+
age: 2.71875,
|
|
186
|
+
prop1: 32,
|
|
187
|
+
prop2: true,
|
|
188
|
+
prop3: "abc",
|
|
189
|
+
});
|
|
190
|
+
Scenarios.Type_Property_AdditionalProperties_IsUnknownDerived_get =
|
|
191
|
+
Type_Property_Additional_Properties_Is_Record_Unknown_Derived.get;
|
|
192
|
+
Scenarios.Type_Property_AdditionalProperties_IsUnknownDerived_put =
|
|
193
|
+
Type_Property_Additional_Properties_Is_Record_Unknown_Derived.put;
|
|
194
|
+
const Type_Property_Additional_Properties_Is_Unknown_Discriminated = createServerTests(`/type/property/additionalProperties/isUnknownDiscriminated`, {
|
|
195
|
+
kind: "derived",
|
|
196
|
+
name: "Derived",
|
|
197
|
+
index: 314,
|
|
198
|
+
age: 2.71875,
|
|
199
|
+
prop1: 32,
|
|
200
|
+
prop2: true,
|
|
201
|
+
prop3: "abc",
|
|
202
|
+
});
|
|
203
|
+
Scenarios.Type_Property_AdditionalProperties_IsUnknownDiscriminated_get =
|
|
204
|
+
Type_Property_Additional_Properties_Is_Unknown_Discriminated.get;
|
|
205
|
+
Scenarios.Type_Property_AdditionalProperties_IsUnknownDiscriminated_put =
|
|
206
|
+
Type_Property_Additional_Properties_Is_Unknown_Discriminated.put;
|
|
207
|
+
const Type_Property_Additional_Properties_Extends_Record_String = createServerTests(`/type/property/additionalProperties/extendsRecordString`, {
|
|
208
|
+
name: "ExtendsStringAdditionalProperties",
|
|
209
|
+
prop: "abc",
|
|
210
|
+
});
|
|
211
|
+
Scenarios.Type_Property_AdditionalProperties_ExtendsString_get =
|
|
212
|
+
Type_Property_Additional_Properties_Extends_Record_String.get;
|
|
213
|
+
Scenarios.Type_Property_AdditionalProperties_ExtendsString_put =
|
|
214
|
+
Type_Property_Additional_Properties_Extends_Record_String.put;
|
|
215
|
+
const Type_Property_Additional_Properties_Is_Record_String = createServerTests(`/type/property/additionalProperties/isRecordstring`, {
|
|
216
|
+
name: "IsStringAdditionalProperties",
|
|
217
|
+
prop: "abc",
|
|
218
|
+
});
|
|
219
|
+
Scenarios.Type_Property_AdditionalProperties_IsString_get =
|
|
220
|
+
Type_Property_Additional_Properties_Is_Record_String.get;
|
|
221
|
+
Scenarios.Type_Property_AdditionalProperties_IsString_put =
|
|
222
|
+
Type_Property_Additional_Properties_Is_Record_String.put;
|
|
223
|
+
const Type_Property_Additional_Properties_Extends_Record_Float = createServerTests(`/type/property/additionalProperties/extendsRecordFloat`, recordFloatBody);
|
|
224
|
+
Scenarios.Type_Property_AdditionalProperties_ExtendsFloat_get =
|
|
225
|
+
Type_Property_Additional_Properties_Extends_Record_Float.get;
|
|
226
|
+
Scenarios.Type_Property_AdditionalProperties_ExtendsFloat_put =
|
|
227
|
+
Type_Property_Additional_Properties_Extends_Record_Float.put;
|
|
228
|
+
const Type_Property_Additional_Properties_Is_Record_Float = createServerTests(`/type/property/additionalProperties/isRecordFloat`, recordFloatBody);
|
|
229
|
+
Scenarios.Type_Property_AdditionalProperties_IsFloat_get =
|
|
230
|
+
Type_Property_Additional_Properties_Is_Record_Float.get;
|
|
231
|
+
Scenarios.Type_Property_AdditionalProperties_IsFloat_put =
|
|
232
|
+
Type_Property_Additional_Properties_Is_Record_Float.put;
|
|
233
|
+
const Type_Property_Additional_Properties_Extends_Record_Model = createServerTests(`/type/property/additionalProperties/extendsRecordModel`, recordModelBody);
|
|
234
|
+
Scenarios.Type_Property_AdditionalProperties_ExtendsModel_get =
|
|
235
|
+
Type_Property_Additional_Properties_Extends_Record_Model.get;
|
|
236
|
+
Scenarios.Type_Property_AdditionalProperties_ExtendsModel_put =
|
|
237
|
+
Type_Property_Additional_Properties_Extends_Record_Model.put;
|
|
238
|
+
const Type_Property_Additional_Properties_Is_Record_Model = createServerTests(`/type/property/additionalProperties/isRecordModel`, recordModelBody);
|
|
239
|
+
Scenarios.Type_Property_AdditionalProperties_IsModel_get =
|
|
240
|
+
Type_Property_Additional_Properties_Is_Record_Model.get;
|
|
241
|
+
Scenarios.Type_Property_AdditionalProperties_IsModel_put =
|
|
242
|
+
Type_Property_Additional_Properties_Is_Record_Model.put;
|
|
243
|
+
const Type_Property_Additional_Properties_Extends_Record_Model_Array = createServerTests(`/type/property/additionalProperties/extendsRecordModelArray`, recordModelArrayBody);
|
|
244
|
+
Scenarios.Type_Property_AdditionalProperties_ExtendsModelArray_get =
|
|
245
|
+
Type_Property_Additional_Properties_Extends_Record_Model_Array.get;
|
|
246
|
+
Scenarios.Type_Property_AdditionalProperties_ExtendsModelArray_put =
|
|
247
|
+
Type_Property_Additional_Properties_Extends_Record_Model_Array.put;
|
|
248
|
+
const Type_Property_Additional_Properties_Is_Record_Model_Array = createServerTests(`/type/property/additionalProperties/isRecordModelArray`, recordModelArrayBody);
|
|
249
|
+
Scenarios.Type_Property_AdditionalProperties_IsModelArray_get =
|
|
250
|
+
Type_Property_Additional_Properties_Is_Record_Model_Array.get;
|
|
251
|
+
Scenarios.Type_Property_AdditionalProperties_IsModelArray_put =
|
|
252
|
+
Type_Property_Additional_Properties_Is_Record_Model_Array.put;
|
|
253
|
+
const Type_Property_Additional_Properties_Spread_Record_String = createServerTests(`/type/property/additionalProperties/spreadRecordString`, {
|
|
254
|
+
name: "SpreadSpringRecord",
|
|
255
|
+
prop: "abc",
|
|
256
|
+
});
|
|
257
|
+
Scenarios.Type_Property_AdditionalProperties_SpreadString_get =
|
|
258
|
+
Type_Property_Additional_Properties_Spread_Record_String.get;
|
|
259
|
+
Scenarios.Type_Property_AdditionalProperties_SpreadString_put =
|
|
260
|
+
Type_Property_Additional_Properties_Spread_Record_String.put;
|
|
261
|
+
const Type_Property_Additional_Properties_Spread_Record_Float = createServerTests(`/type/property/additionalProperties/spreadRecordFloat`, recordFloatBody);
|
|
262
|
+
Scenarios.Type_Property_AdditionalProperties_SpreadFloat_get =
|
|
263
|
+
Type_Property_Additional_Properties_Spread_Record_Float.get;
|
|
264
|
+
Scenarios.Type_Property_AdditionalProperties_SpreadFloat_put =
|
|
265
|
+
Type_Property_Additional_Properties_Spread_Record_Float.put;
|
|
266
|
+
const Type_Property_Additional_Properties_Spread_Record_Model = createServerTests(`/type/property/additionalProperties/spreadRecordModel`, recordModelBody);
|
|
267
|
+
Scenarios.Type_Property_AdditionalProperties_SpreadModel_get =
|
|
268
|
+
Type_Property_Additional_Properties_Spread_Record_Model.get;
|
|
269
|
+
Scenarios.Type_Property_AdditionalProperties_SpreadModel_put =
|
|
270
|
+
Type_Property_Additional_Properties_Spread_Record_Model.put;
|
|
271
|
+
const Type_Property_Additional_Properties_Spread_Record_Model_Array = createServerTests(`/type/property/additionalProperties/spreadRecordModelArray`, recordModelArrayBody);
|
|
272
|
+
Scenarios.Type_Property_AdditionalProperties_SpreadModelArray_get =
|
|
273
|
+
Type_Property_Additional_Properties_Spread_Record_Model_Array.get;
|
|
274
|
+
Scenarios.Type_Property_AdditionalProperties_SpreadModelArray_put =
|
|
275
|
+
Type_Property_Additional_Properties_Spread_Record_Model_Array.put;
|
|
276
|
+
const Type_Property_Additional_Properties_Spread_Different_Record_String = createServerTests(`/type/property/additionalProperties/spreadDifferentRecordString`, differentRecordStringBody);
|
|
277
|
+
Scenarios.Type_Property_AdditionalProperties_SpreadDifferentString_get =
|
|
278
|
+
Type_Property_Additional_Properties_Spread_Different_Record_String.get;
|
|
279
|
+
Scenarios.Type_Property_AdditionalProperties_SpreadDifferentString_put =
|
|
280
|
+
Type_Property_Additional_Properties_Spread_Different_Record_String.put;
|
|
281
|
+
const Type_Property_Additional_Properties_Spread_Different_Record_Float = createServerTests(`/type/property/additionalProperties/spreadDifferentRecordFloat`, differentRecordFloatBody);
|
|
282
|
+
Scenarios.Type_Property_AdditionalProperties_SpreadDifferentFloat_get =
|
|
283
|
+
Type_Property_Additional_Properties_Spread_Different_Record_Float.get;
|
|
284
|
+
Scenarios.Type_Property_AdditionalProperties_SpreadDifferentFloat_put =
|
|
285
|
+
Type_Property_Additional_Properties_Spread_Different_Record_Float.put;
|
|
286
|
+
const Type_Property_Additional_Properties_Spread_Different_Record_Model = createServerTests(`/type/property/additionalProperties/spreadDifferentRecordModel`, differentRecordModelBody);
|
|
287
|
+
Scenarios.Type_Property_AdditionalProperties_SpreadDifferentModel_get =
|
|
288
|
+
Type_Property_Additional_Properties_Spread_Different_Record_Model.get;
|
|
289
|
+
Scenarios.Type_Property_AdditionalProperties_SpreadDifferentModel_put =
|
|
290
|
+
Type_Property_Additional_Properties_Spread_Different_Record_Model.put;
|
|
291
|
+
const Type_Property_Additional_Properties_Spread_Different_Record_Model_Array = createServerTests(`/type/property/additionalProperties/spreadDifferentRecordModelArray`, differentRecordModelArrayBody);
|
|
292
|
+
Scenarios.Type_Property_AdditionalProperties_SpreadDifferentModelArray_get =
|
|
293
|
+
Type_Property_Additional_Properties_Spread_Different_Record_Model_Array.get;
|
|
294
|
+
Scenarios.Type_Property_AdditionalProperties_SpreadDifferentModelArray_put =
|
|
295
|
+
Type_Property_Additional_Properties_Spread_Different_Record_Model_Array.put;
|
|
296
|
+
const Type_Property_Additional_Properties_Extends_Different_Spread_String = createServerTests(`/type/property/additionalProperties/extendsDifferentSpreadString`, extendsModelSpreadStringBody);
|
|
297
|
+
Scenarios.Type_Property_AdditionalProperties_ExtendsDifferentSpreadString_get =
|
|
298
|
+
Type_Property_Additional_Properties_Extends_Different_Spread_String.get;
|
|
299
|
+
Scenarios.Type_Property_AdditionalProperties_ExtendsDifferentSpreadString_put =
|
|
300
|
+
Type_Property_Additional_Properties_Extends_Different_Spread_String.put;
|
|
301
|
+
const Type_Property_Additional_Properties_Extends_Different_Spread_Float = createServerTests(`/type/property/additionalProperties/extendsDifferentSpreadFloat`, extendsModelSpreadFloatBody);
|
|
302
|
+
Scenarios.Type_Property_AdditionalProperties_ExtendsDifferentSpreadFloat_get =
|
|
303
|
+
Type_Property_Additional_Properties_Extends_Different_Spread_Float.get;
|
|
304
|
+
Scenarios.Type_Property_AdditionalProperties_ExtendsDifferentSpreadFloat_put =
|
|
305
|
+
Type_Property_Additional_Properties_Extends_Different_Spread_Float.put;
|
|
306
|
+
const Type_Property_Additional_Properties_Extends_Different_Spread_Model = createServerTests(`/type/property/additionalProperties/extendsDifferentSpreadModel`, extendsModelSpreadModelBody);
|
|
307
|
+
Scenarios.Type_Property_AdditionalProperties_ExtendsDifferentSpreadModel_get =
|
|
308
|
+
Type_Property_Additional_Properties_Extends_Different_Spread_Model.get;
|
|
309
|
+
Scenarios.Type_Property_AdditionalProperties_ExtendsDifferentSpreadModel_put =
|
|
310
|
+
Type_Property_Additional_Properties_Extends_Different_Spread_Model.put;
|
|
311
|
+
const Type_Property_Additional_Properties_Extends_Different_Spread_Model_Array = createServerTests(`/type/property/additionalProperties/extendsDifferentSpreadModelArray`, extendsModelSpreadModelArrayBody);
|
|
312
|
+
Scenarios.Type_Property_AdditionalProperties_ExtendsDifferentSpreadModelArray_get =
|
|
313
|
+
Type_Property_Additional_Properties_Extends_Different_Spread_Model_Array.get;
|
|
314
|
+
Scenarios.Type_Property_AdditionalProperties_ExtendsDifferentSpreadModelArray_put =
|
|
315
|
+
Type_Property_Additional_Properties_Extends_Different_Spread_Model_Array.put;
|
|
316
|
+
const Type_Property_Additional_Properties_Multiple_Spread_Record = createServerTests(`/type/property/additionalProperties/multipleSpreadRecord`, multipleSpreadBody);
|
|
317
|
+
Scenarios.Type_Property_AdditionalProperties_MultipleSpread_get =
|
|
318
|
+
Type_Property_Additional_Properties_Multiple_Spread_Record.get;
|
|
319
|
+
Scenarios.Type_Property_AdditionalProperties_MultipleSpread_put =
|
|
320
|
+
Type_Property_Additional_Properties_Multiple_Spread_Record.put;
|
|
321
|
+
const Type_Property_Additional_Properties_Spread_Record_Union = createServerTests(`/type/property/additionalProperties/spreadRecordUnion`, recordUnionBody);
|
|
322
|
+
Scenarios.Type_Property_AdditionalProperties_SpreadRecordUnion_get =
|
|
323
|
+
Type_Property_Additional_Properties_Spread_Record_Union.get;
|
|
324
|
+
Scenarios.Type_Property_AdditionalProperties_SpreadRecordUnion_put =
|
|
325
|
+
Type_Property_Additional_Properties_Spread_Record_Union.put;
|
|
326
|
+
const Type_Property_Additional_Properties_Spread_Record_Discriminated_Union = createServerTests(`/type/property/additionalProperties/spreadRecordDiscriminatedUnion`, recordDiscriminatedUnionBody);
|
|
327
|
+
Scenarios.Type_Property_AdditionalProperties_SpreadRecordDiscriminatedUnion_get =
|
|
328
|
+
Type_Property_Additional_Properties_Spread_Record_Discriminated_Union.get;
|
|
329
|
+
Scenarios.Type_Property_AdditionalProperties_SpreadRecordDiscriminatedUnion_put =
|
|
330
|
+
Type_Property_Additional_Properties_Spread_Record_Discriminated_Union.put;
|
|
331
|
+
const Type_Property_Additional_Properties_Spread_Record_Non_Discriminated_Union = createServerTests(`/type/property/additionalProperties/spreadRecordNonDiscriminatedUnion`, recordDiscriminatedUnionBody);
|
|
332
|
+
Scenarios.Type_Property_AdditionalProperties_SpreadRecordNonDiscriminatedUnion_get =
|
|
333
|
+
Type_Property_Additional_Properties_Spread_Record_Non_Discriminated_Union.get;
|
|
334
|
+
Scenarios.Type_Property_AdditionalProperties_SpreadRecordNonDiscriminatedUnion_put =
|
|
335
|
+
Type_Property_Additional_Properties_Spread_Record_Non_Discriminated_Union.put;
|
|
336
|
+
const Type_Property_Additional_Properties_Spread_Record_Non_Discriminated_Union2 = createServerTests(`/type/property/additionalProperties/spreadRecordNonDiscriminatedUnion2`, recordNonDiscriminatedUnion2Body);
|
|
337
|
+
Scenarios.Type_Property_AdditionalProperties_SpreadRecordNonDiscriminatedUnion2_get =
|
|
338
|
+
Type_Property_Additional_Properties_Spread_Record_Non_Discriminated_Union2.get;
|
|
339
|
+
Scenarios.Type_Property_AdditionalProperties_SpreadRecordNonDiscriminatedUnion2_put =
|
|
340
|
+
Type_Property_Additional_Properties_Spread_Record_Non_Discriminated_Union2.put;
|
|
341
|
+
const Type_Property_Additional_Properties_Spread_Record_Non_Discriminated_Union3 = createServerTests(`/type/property/additionalProperties/spreadRecordNonDiscriminatedUnion3`, recordNonDiscriminatedUnion3Body);
|
|
342
|
+
Scenarios.Type_Property_AdditionalProperties_SpreadRecordNonDiscriminatedUnion3_get =
|
|
343
|
+
Type_Property_Additional_Properties_Spread_Record_Non_Discriminated_Union3.get;
|
|
344
|
+
Scenarios.Type_Property_AdditionalProperties_SpreadRecordNonDiscriminatedUnion3_put =
|
|
345
|
+
Type_Property_Additional_Properties_Spread_Record_Non_Discriminated_Union3.put;
|
|
346
|
+
//# sourceMappingURL=mockapi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mockapi.js","sourceRoot":"","sources":["../../../../../specs/type/property/additional-properties/mockapi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAe,aAAa,EAAmB,MAAM,oBAAoB,CAAC;AAEvF,MAAM,CAAC,MAAM,SAAS,GAAoC,EAAE,CAAC;AAE7D,MAAM,eAAe,GAAG;IACtB,EAAE,EAAE,MAAM;IACV,IAAI,EAAE,MAAM;CACb,CAAC;AACF,MAAM,eAAe,GAAG;IACtB,SAAS,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;IAC1B,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;CACtB,CAAC;AACF,MAAM,oBAAoB,GAAG;IAC3B,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IAC7C,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;CACzC,CAAC;AACF,MAAM,yBAAyB,GAAG;IAChC,EAAE,EAAE,MAAM;IACV,IAAI,EAAE,KAAK;CACZ,CAAC;AACF,MAAM,wBAAwB,GAAG;IAC/B,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,MAAM;CACb,CAAC;AACF,MAAM,wBAAwB,GAAG;IAC/B,SAAS,EAAE,KAAK;IAChB,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;CACtB,CAAC;AACF,MAAM,6BAA6B,GAAG;IACpC,SAAS,EAAE,KAAK;IAChB,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;CACzC,CAAC;AACF,MAAM,4BAA4B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Ae,CAAM,CAAC"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { json, passOnSuccess } from "@typespec/spec-api";
|
|
2
|
+
export const Scenarios = {};
|
|
3
|
+
function createServerTests(url, value, patchNullableProperty) {
|
|
4
|
+
return {
|
|
5
|
+
get: passOnSuccess({
|
|
6
|
+
uri: url,
|
|
7
|
+
method: `get`,
|
|
8
|
+
request: {},
|
|
9
|
+
response: {
|
|
10
|
+
status: 200,
|
|
11
|
+
body: json(value),
|
|
12
|
+
},
|
|
13
|
+
handler: (req) => {
|
|
14
|
+
return {
|
|
15
|
+
status: 200,
|
|
16
|
+
body: json(value),
|
|
17
|
+
};
|
|
18
|
+
},
|
|
19
|
+
kind: "MockApiDefinition",
|
|
20
|
+
}),
|
|
21
|
+
patch: passOnSuccess({
|
|
22
|
+
uri: url,
|
|
23
|
+
method: `patch`,
|
|
24
|
+
request: {
|
|
25
|
+
body: {
|
|
26
|
+
requiredProperty: "foo",
|
|
27
|
+
nullableProperty: patchNullableProperty || null,
|
|
28
|
+
},
|
|
29
|
+
headers: {
|
|
30
|
+
"Content-Type": "application/merge-patch+json",
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
response: {
|
|
34
|
+
status: 204,
|
|
35
|
+
},
|
|
36
|
+
handler: (req) => {
|
|
37
|
+
req.expect.bodyEquals({
|
|
38
|
+
requiredProperty: "foo",
|
|
39
|
+
nullableProperty: patchNullableProperty || null,
|
|
40
|
+
});
|
|
41
|
+
return {
|
|
42
|
+
status: 204,
|
|
43
|
+
};
|
|
44
|
+
},
|
|
45
|
+
kind: "MockApiDefinition",
|
|
46
|
+
}),
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
const Type_Property_Nullable_String_Null = createServerTests(`/type/property/nullable/string/null`, {
|
|
50
|
+
requiredProperty: "foo",
|
|
51
|
+
nullableProperty: null,
|
|
52
|
+
});
|
|
53
|
+
const Type_Property_Nullable_String_Non_Null = createServerTests(`/type/property/nullable/string/non-null`, {
|
|
54
|
+
requiredProperty: "foo",
|
|
55
|
+
nullableProperty: "hello",
|
|
56
|
+
}, "hello");
|
|
57
|
+
Scenarios.Type_Property_Nullable_String_getNonNull = Type_Property_Nullable_String_Non_Null.get;
|
|
58
|
+
Scenarios.Type_Property_Nullable_String_getNull = Type_Property_Nullable_String_Null.get;
|
|
59
|
+
Scenarios.Type_Property_Nullable_String_patchNonNull = Type_Property_Nullable_String_Non_Null.patch;
|
|
60
|
+
Scenarios.Type_Property_Nullable_String_patchNull = Type_Property_Nullable_String_Null.patch;
|
|
61
|
+
const Type_Property_Nullable_Bytes_Null = createServerTests(`/type/property/nullable/bytes/null`, {
|
|
62
|
+
requiredProperty: "foo",
|
|
63
|
+
nullableProperty: null,
|
|
64
|
+
});
|
|
65
|
+
const Type_Property_Nullable_Bytes_Non_Null = createServerTests(`/type/property/nullable/bytes/non-null`, {
|
|
66
|
+
requiredProperty: "foo",
|
|
67
|
+
nullableProperty: "aGVsbG8sIHdvcmxkIQ==",
|
|
68
|
+
}, "aGVsbG8sIHdvcmxkIQ==");
|
|
69
|
+
Scenarios.Type_Property_Nullable_Bytes_getNonNull = Type_Property_Nullable_Bytes_Non_Null.get;
|
|
70
|
+
Scenarios.Type_Property_Nullable_Bytes_getNull = Type_Property_Nullable_Bytes_Null.get;
|
|
71
|
+
Scenarios.Type_Property_Nullable_Bytes_patchNonNull = Type_Property_Nullable_Bytes_Non_Null.patch;
|
|
72
|
+
Scenarios.Type_Property_Nullable_Bytes_patchNull = Type_Property_Nullable_Bytes_Null.patch;
|
|
73
|
+
const Type_Property_Nullable_DateTime_Null = createServerTests(`/type/property/nullable/datetime/null`, {
|
|
74
|
+
requiredProperty: "foo",
|
|
75
|
+
nullableProperty: null,
|
|
76
|
+
});
|
|
77
|
+
const Type_Property_Nullable_DateTime_Non_Null = createServerTests(`/type/property/nullable/datetime/non-null`, {
|
|
78
|
+
requiredProperty: "foo",
|
|
79
|
+
nullableProperty: "2022-08-26T18:38:00Z",
|
|
80
|
+
}, "2022-08-26T18:38:00Z");
|
|
81
|
+
Scenarios.Type_Property_Nullable_Datetime_getNonNull = Type_Property_Nullable_DateTime_Non_Null.get;
|
|
82
|
+
Scenarios.Type_Property_Nullable_Datetime_getNull = Type_Property_Nullable_DateTime_Null.get;
|
|
83
|
+
Scenarios.Type_Property_Nullable_Datetime_patchNonNull =
|
|
84
|
+
Type_Property_Nullable_DateTime_Non_Null.patch;
|
|
85
|
+
Scenarios.Type_Property_Nullable_Datetime_patchNull = Type_Property_Nullable_DateTime_Null.patch;
|
|
86
|
+
const Type_Property_Nullable_Duration_Null = createServerTests(`/type/property/nullable/duration/null`, {
|
|
87
|
+
requiredProperty: "foo",
|
|
88
|
+
nullableProperty: null,
|
|
89
|
+
});
|
|
90
|
+
const Type_Property_Nullable_Duration_Non_Null = createServerTests(`/type/property/nullable/duration/non-null`, {
|
|
91
|
+
requiredProperty: "foo",
|
|
92
|
+
nullableProperty: "P123DT22H14M12.011S",
|
|
93
|
+
}, "P123DT22H14M12.011S");
|
|
94
|
+
Scenarios.Type_Property_Nullable_Duration_getNonNull = Type_Property_Nullable_Duration_Non_Null.get;
|
|
95
|
+
Scenarios.Type_Property_Nullable_Duration_getNull = Type_Property_Nullable_Duration_Null.get;
|
|
96
|
+
Scenarios.Type_Property_Nullable_Duration_patchNonNull =
|
|
97
|
+
Type_Property_Nullable_Duration_Non_Null.patch;
|
|
98
|
+
Scenarios.Type_Property_Nullable_Duration_patchNull = Type_Property_Nullable_Duration_Null.patch;
|
|
99
|
+
const Type_Property_Nullable_Collections_Bytes_Null = createServerTests(`/type/property/nullable/collections/bytes/null`, {
|
|
100
|
+
requiredProperty: "foo",
|
|
101
|
+
nullableProperty: null,
|
|
102
|
+
});
|
|
103
|
+
const Type_Property_Nullable_Collections_Bytes_Non_Null = createServerTests(`/type/property/nullable/collections/bytes/non-null`, {
|
|
104
|
+
requiredProperty: "foo",
|
|
105
|
+
nullableProperty: ["aGVsbG8sIHdvcmxkIQ==", "aGVsbG8sIHdvcmxkIQ=="],
|
|
106
|
+
}, ["aGVsbG8sIHdvcmxkIQ==", "aGVsbG8sIHdvcmxkIQ=="]);
|
|
107
|
+
Scenarios.Type_Property_Nullable_CollectionsByte_getNonNull =
|
|
108
|
+
Type_Property_Nullable_Collections_Bytes_Non_Null.get;
|
|
109
|
+
Scenarios.Type_Property_Nullable_CollectionsByte_getNull =
|
|
110
|
+
Type_Property_Nullable_Collections_Bytes_Null.get;
|
|
111
|
+
Scenarios.Type_Property_Nullable_CollectionsByte_patchNonNull =
|
|
112
|
+
Type_Property_Nullable_Collections_Bytes_Non_Null.patch;
|
|
113
|
+
Scenarios.Type_Property_Nullable_CollectionsByte_patchNull =
|
|
114
|
+
Type_Property_Nullable_Collections_Bytes_Null.patch;
|
|
115
|
+
const Type_Property_Nullable_Collections_Model_Null = createServerTests(`/type/property/nullable/collections/model/null`, {
|
|
116
|
+
requiredProperty: "foo",
|
|
117
|
+
nullableProperty: null,
|
|
118
|
+
});
|
|
119
|
+
const Type_Property_Nullable_Collections_Model_Non_Null = createServerTests(`/type/property/nullable/collections/model/non-null`, {
|
|
120
|
+
requiredProperty: "foo",
|
|
121
|
+
nullableProperty: [{ property: "hello" }, { property: "world" }],
|
|
122
|
+
}, [{ property: "hello" }, { property: "world" }]);
|
|
123
|
+
Scenarios.Type_Property_Nullable_CollectionsModel_getNonNull =
|
|
124
|
+
Type_Property_Nullable_Collections_Model_Non_Null.get;
|
|
125
|
+
Scenarios.Type_Property_Nullable_CollectionsModel_getNull =
|
|
126
|
+
Type_Property_Nullable_Collections_Model_Null.get;
|
|
127
|
+
Scenarios.Type_Property_Nullable_CollectionsModel_patchNonNull =
|
|
128
|
+
Type_Property_Nullable_Collections_Model_Non_Null.patch;
|
|
129
|
+
Scenarios.Type_Property_Nullable_CollectionsModel_patchNull =
|
|
130
|
+
Type_Property_Nullable_Collections_Model_Null.patch;
|
|
131
|
+
const Type_Property_Nullable_Collections_String_Null = createServerTests(`/type/property/nullable/collections/string/null`, {
|
|
132
|
+
requiredProperty: "foo",
|
|
133
|
+
nullableProperty: null,
|
|
134
|
+
});
|
|
135
|
+
const Type_Property_Nullable_Collections_String_Non_Null = createServerTests(`/type/property/nullable/collections/string/non-null`, {
|
|
136
|
+
requiredProperty: "foo",
|
|
137
|
+
nullableProperty: ["hello", "world"],
|
|
138
|
+
}, ["hello", "world"]);
|
|
139
|
+
Scenarios.Type_Property_Nullable_CollectionsString_getNonNull =
|
|
140
|
+
Type_Property_Nullable_Collections_String_Non_Null.get;
|
|
141
|
+
Scenarios.Type_Property_Nullable_CollectionsString_getNull =
|
|
142
|
+
Type_Property_Nullable_Collections_String_Null.get;
|
|
143
|
+
Scenarios.Type_Property_Nullable_CollectionsString_patchNonNull =
|
|
144
|
+
Type_Property_Nullable_Collections_String_Non_Null.patch;
|
|
145
|
+
Scenarios.Type_Property_Nullable_CollectionsString_patchNull =
|
|
146
|
+
Type_Property_Nullable_Collections_String_Null.patch;
|
|
147
|
+
//# sourceMappingURL=mockapi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mockapi.js","sourceRoot":"","sources":["../../../../../specs/type/property/nullable/mockapi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAe,aAAa,EAAmB,MAAM,oBAAoB,CAAC;AAEvF,MAAM,CAAC,MAAM,SAAS,GAAoC,EAAE,CAAC;AAE7D,SAAS,iBAAiB,CAAC,GAAW,EAAE,KAAc,EAAE,qBAA2B;IACjF,OAAO;QACL,GAAG,EAAE,aAAa,CAAC;YACjB,GAAG,EAAE,GAAG;YACR,MAAM,EAAE,KAAK;YACb,OAAO,EAAE,EAAE;YACX,QAAQ,EAAE;gBACR,MAAM,EAAE,GAAG;gBACX,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC;aAClB;YACD,OAAO,EAAE,CAAC,GAAgB,EAAE,EAAE;gBAC5B,OAAO;oBACL,MAAM,EAAE,GAAG;oBACX,IAAI,EAAE,I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