@bfra.me/api-core 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +11 -0
- package/LICENSE +18 -0
- package/README.md +18 -0
- package/dist/chunk-7NM3WYHE.js +32 -0
- package/dist/chunk-7NM3WYHE.js.map +1 -0
- package/dist/chunk-7QVYU63E.js +7 -0
- package/dist/chunk-7QVYU63E.js.map +1 -0
- package/dist/chunk-HKKQOEV3.js +786 -0
- package/dist/chunk-HKKQOEV3.js.map +1 -0
- package/dist/errors/fetchError.d.ts +13 -0
- package/dist/errors/fetchError.js +8 -0
- package/dist/errors/fetchError.js.map +1 -0
- package/dist/index.d.ts +47 -0
- package/dist/index.js +105 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/index.d.ts +59 -0
- package/dist/lib/index.js +16 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/types.d.ts +22 -0
- package/dist/types.js +1 -0
- package/dist/types.js.map +1 -0
- package/eslint.config.ts +25 -0
- package/package.json +67 -0
- package/src/errors/fetchError.ts +29 -0
- package/src/index.ts +134 -0
- package/src/lib/getJSONSchemaDefaults.ts +77 -0
- package/src/lib/index.ts +7 -0
- package/src/lib/parseResponse.ts +28 -0
- package/src/lib/prepareAuth.ts +107 -0
- package/src/lib/prepareParams.ts +439 -0
- package/src/lib/prepareServer.ts +52 -0
- package/src/types.ts +28 -0
- package/test-utils/CHANGELOG.md +11 -0
- package/test-utils/datasets/real-world-apis.json +8507 -0
- package/test-utils/datasets/refresh-dataset +336 -0
- package/test-utils/definitions/alby.json +5391 -0
- package/test-utils/definitions/auth-quirks.json +62 -0
- package/test-utils/definitions/basiq.json +104 -0
- package/test-utils/definitions/metrotransit.json +318 -0
- package/test-utils/definitions/nested-defaults.json +107 -0
- package/test-utils/definitions/operationid-quirks.json +36 -0
- package/test-utils/definitions/optional-payload.json +57 -0
- package/test-utils/definitions/payloads.json +58 -0
- package/test-utils/definitions/response-title-quirks.json +77 -0
- package/test-utils/definitions/simple.json +291 -0
- package/test-utils/fetch-mock.ts +81 -0
- package/test-utils/fixtures/hello.jp.txt +1 -0
- package/test-utils/fixtures/hello.txt +1 -0
- package/test-utils/fixtures/owlbert-shrub.png +0 -0
- package/test-utils/fixtures/owlbert.png +0 -0
- package/test-utils/index.ts +2 -0
- package/test-utils/load-spec.ts +8 -0
- package/test-utils/node_modules/.bin/tsc +17 -0
- package/test-utils/node_modules/.bin/tsserver +17 -0
- package/test-utils/package.json +20 -0
- package/test-utils/sdks/README.md +3 -0
- package/test-utils/sdks/alby/README.md +23 -0
- package/test-utils/sdks/alby/package.json +55 -0
- package/test-utils/sdks/alby/src/index.ts +18 -0
- package/test-utils/sdks/alby/src/schemas/AmqpExternalRulePatch.ts +92 -0
- package/test-utils/sdks/alby/src/schemas/AmqpExternalRulePost.ts +93 -0
- package/test-utils/sdks/alby/src/schemas/AmqpExternalRuleResponse.ts +143 -0
- package/test-utils/sdks/alby/src/schemas/AmqpRulePatch.ts +76 -0
- package/test-utils/sdks/alby/src/schemas/AmqpRulePost.ts +85 -0
- package/test-utils/sdks/alby/src/schemas/AmqpRuleResponse.ts +124 -0
- package/test-utils/sdks/alby/src/schemas/AppPatch.ts +68 -0
- package/test-utils/sdks/alby/src/schemas/AppPkcs12.ts +22 -0
- package/test-utils/sdks/alby/src/schemas/AppPost.ts +71 -0
- package/test-utils/sdks/alby/src/schemas/AppResponse.ts +69 -0
- package/test-utils/sdks/alby/src/schemas/AwsAccessKeys.ts +28 -0
- package/test-utils/sdks/alby/src/schemas/AwsAccessKeysResponse.ts +20 -0
- package/test-utils/sdks/alby/src/schemas/AwsAssumeRole.ts +23 -0
- package/test-utils/sdks/alby/src/schemas/AwsKinesisRulePatch.ts +90 -0
- package/test-utils/sdks/alby/src/schemas/AwsKinesisRulePost.ts +103 -0
- package/test-utils/sdks/alby/src/schemas/AwsKinesisRuleResponse.ts +142 -0
- package/test-utils/sdks/alby/src/schemas/AwsLambdaRulePatch.ts +90 -0
- package/test-utils/sdks/alby/src/schemas/AwsLambdaRulePost.ts +90 -0
- package/test-utils/sdks/alby/src/schemas/AwsLambdaRuleResponse.ts +132 -0
- package/test-utils/sdks/alby/src/schemas/AwsSqsRulePatch.ts +86 -0
- package/test-utils/sdks/alby/src/schemas/AwsSqsRulePost.ts +98 -0
- package/test-utils/sdks/alby/src/schemas/AwsSqsRuleResponse.ts +137 -0
- package/test-utils/sdks/alby/src/schemas/AzureFunctionRulePatch.ts +96 -0
- package/test-utils/sdks/alby/src/schemas/AzureFunctionRulePost.ts +106 -0
- package/test-utils/sdks/alby/src/schemas/AzureFunctionRuleResponse.ts +145 -0
- package/test-utils/sdks/alby/src/schemas/CloudflareWorkerRulePatch.ts +74 -0
- package/test-utils/sdks/alby/src/schemas/CloudflareWorkerRulePost.ts +83 -0
- package/test-utils/sdks/alby/src/schemas/CloudflareWorkerRuleResponse.ts +125 -0
- package/test-utils/sdks/alby/src/schemas/DeleteAppsAppIdNamespacesNamespaceId.ts +26 -0
- package/test-utils/sdks/alby/src/schemas/DeleteAppsAppIdQueuesQueueId.ts +26 -0
- package/test-utils/sdks/alby/src/schemas/DeleteAppsAppIdRulesRuleId.ts +26 -0
- package/test-utils/sdks/alby/src/schemas/DeleteAppsId.ts +20 -0
- package/test-utils/sdks/alby/src/schemas/Error.ts +39 -0
- package/test-utils/sdks/alby/src/schemas/GetAccountsAccountIdApps.ts +29 -0
- package/test-utils/sdks/alby/src/schemas/GetAppsAppIdKeys.ts +29 -0
- package/test-utils/sdks/alby/src/schemas/GetAppsAppIdNamespaces.ts +29 -0
- package/test-utils/sdks/alby/src/schemas/GetAppsAppIdQueues.ts +29 -0
- package/test-utils/sdks/alby/src/schemas/GetAppsAppIdRules.ts +29 -0
- package/test-utils/sdks/alby/src/schemas/GetAppsAppIdRulesRuleId.ts +26 -0
- package/test-utils/sdks/alby/src/schemas/GoogleCloudFunctionRulePatch.ts +100 -0
- package/test-utils/sdks/alby/src/schemas/GoogleCloudFunctionRulePost.ts +100 -0
- package/test-utils/sdks/alby/src/schemas/GoogleCloudFunctionRuleResponse.ts +150 -0
- package/test-utils/sdks/alby/src/schemas/HttpRulePatch.ts +89 -0
- package/test-utils/sdks/alby/src/schemas/HttpRulePost.ts +100 -0
- package/test-utils/sdks/alby/src/schemas/HttpRuleResponse.ts +138 -0
- package/test-utils/sdks/alby/src/schemas/IftttRulePatch.ts +59 -0
- package/test-utils/sdks/alby/src/schemas/IftttRulePost.ts +62 -0
- package/test-utils/sdks/alby/src/schemas/IftttRuleResponse.ts +101 -0
- package/test-utils/sdks/alby/src/schemas/KeyPatch.ts +34 -0
- package/test-utils/sdks/alby/src/schemas/KeyPost.ts +39 -0
- package/test-utils/sdks/alby/src/schemas/KeyResponse.ts +63 -0
- package/test-utils/sdks/alby/src/schemas/Me.ts +98 -0
- package/test-utils/sdks/alby/src/schemas/NamespacePatch.ts +49 -0
- package/test-utils/sdks/alby/src/schemas/NamespacePost.ts +59 -0
- package/test-utils/sdks/alby/src/schemas/NamespaceResponse.ts +70 -0
- package/test-utils/sdks/alby/src/schemas/PatchAppsAppIdKeysKeyId.ts +26 -0
- package/test-utils/sdks/alby/src/schemas/PatchAppsAppIdNamespacesNamespaceId.ts +26 -0
- package/test-utils/sdks/alby/src/schemas/PatchAppsAppIdRulesRuleId.ts +26 -0
- package/test-utils/sdks/alby/src/schemas/PatchAppsId.ts +20 -0
- package/test-utils/sdks/alby/src/schemas/PostAccountsAccountIdApps.ts +20 -0
- package/test-utils/sdks/alby/src/schemas/PostAppsAppIdKeys.ts +20 -0
- package/test-utils/sdks/alby/src/schemas/PostAppsAppIdKeysKeyIdRevoke.ts +26 -0
- package/test-utils/sdks/alby/src/schemas/PostAppsAppIdNamespaces.ts +20 -0
- package/test-utils/sdks/alby/src/schemas/PostAppsAppIdQueues.ts +20 -0
- package/test-utils/sdks/alby/src/schemas/PostAppsAppIdRules.ts +20 -0
- package/test-utils/sdks/alby/src/schemas/PostAppsIdPkcs12.ts +20 -0
- package/test-utils/sdks/alby/src/schemas/Queue.ts +43 -0
- package/test-utils/sdks/alby/src/schemas/QueueResponse.ts +185 -0
- package/test-utils/sdks/alby/src/schemas/RulePatch.ts +46 -0
- package/test-utils/sdks/alby/src/schemas/RulePost.ts +49 -0
- package/test-utils/sdks/alby/src/schemas/RuleResponse.ts +46 -0
- package/test-utils/sdks/alby/src/schemas/RuleSource.ts +30 -0
- package/test-utils/sdks/alby/src/schemas/UnsupportedRuleResponse.ts +98 -0
- package/test-utils/sdks/alby/src/schemas/ZapierRulePatch.ts +74 -0
- package/test-utils/sdks/alby/src/schemas/ZapierRulePost.ts +83 -0
- package/test-utils/sdks/alby/src/schemas/ZapierRuleResponse.ts +122 -0
- package/test-utils/sdks/alby/src/schemas.ts +77 -0
- package/test-utils/sdks/alby/src/sdk.ts +381 -0
- package/test-utils/sdks/alby/src/types.ts +84 -0
- package/test-utils/sdks/alby/tsconfig.json +12 -0
- package/test-utils/sdks/metrotransit/README.md +22 -0
- package/test-utils/sdks/metrotransit/package.json +55 -0
- package/test-utils/sdks/metrotransit/src/index.ts +12 -0
- package/test-utils/sdks/metrotransit/src/schemas/Agency.ts +19 -0
- package/test-utils/sdks/metrotransit/src/schemas/AlertMessage.ts +18 -0
- package/test-utils/sdks/metrotransit/src/schemas/Departure.ts +78 -0
- package/test-utils/sdks/metrotransit/src/schemas/Direction.ts +19 -0
- package/test-utils/sdks/metrotransit/src/schemas/GetNextripAgencies.ts +12 -0
- package/test-utils/sdks/metrotransit/src/schemas/GetNextripDirectionsRouteId.ts +28 -0
- package/test-utils/sdks/metrotransit/src/schemas/GetNextripRouteIdDirectionIdPlaceCode.ts +30 -0
- package/test-utils/sdks/metrotransit/src/schemas/GetNextripRoutes.ts +12 -0
- package/test-utils/sdks/metrotransit/src/schemas/GetNextripStopId.ts +20 -0
- package/test-utils/sdks/metrotransit/src/schemas/GetNextripStopsRouteIdDirectionId.ts +34 -0
- package/test-utils/sdks/metrotransit/src/schemas/GetNextripVehiclesRouteId.ts +28 -0
- package/test-utils/sdks/metrotransit/src/schemas/NexTripResult.ts +34 -0
- package/test-utils/sdks/metrotransit/src/schemas/Place.ts +21 -0
- package/test-utils/sdks/metrotransit/src/schemas/ProblemDetails.ts +40 -0
- package/test-utils/sdks/metrotransit/src/schemas/Route.ts +25 -0
- package/test-utils/sdks/metrotransit/src/schemas/Stop.ts +27 -0
- package/test-utils/sdks/metrotransit/src/schemas/Vehicle.ts +61 -0
- package/test-utils/sdks/metrotransit/src/schemas.ts +18 -0
- package/test-utils/sdks/metrotransit/src/sdk.ts +107 -0
- package/test-utils/sdks/metrotransit/src/types.ts +23 -0
- package/test-utils/sdks/metrotransit/tsconfig.json +12 -0
- package/test-utils/sdks/operationid-quirks/README.md +22 -0
- package/test-utils/sdks/operationid-quirks/package.json +50 -0
- package/test-utils/sdks/operationid-quirks/src/index.ts +9 -0
- package/test-utils/sdks/operationid-quirks/src/sdk.ts +107 -0
- package/test-utils/sdks/operationid-quirks/tsconfig.json +12 -0
- package/test-utils/sdks/optional-payload/README.md +14 -0
- package/test-utils/sdks/optional-payload/package.json +55 -0
- package/test-utils/sdks/optional-payload/src/index.ts +9 -0
- package/test-utils/sdks/optional-payload/src/schemas/UpdatePetWithForm.ts +35 -0
- package/test-utils/sdks/optional-payload/src/schemas.ts +2 -0
- package/test-utils/sdks/optional-payload/src/sdk.ts +82 -0
- package/test-utils/sdks/optional-payload/src/types.ts +5 -0
- package/test-utils/sdks/optional-payload/tsconfig.json +12 -0
- package/test-utils/sdks/petstore/LICENSE +97 -0
- package/test-utils/sdks/petstore/README.md +23 -0
- package/test-utils/sdks/petstore/package.json +56 -0
- package/test-utils/sdks/petstore/src/index.ts +17 -0
- package/test-utils/sdks/petstore/src/schemas/ApiResponse.ts +18 -0
- package/test-utils/sdks/petstore/src/schemas/Category.ts +15 -0
- package/test-utils/sdks/petstore/src/schemas/CreateUsersWithArrayInput.ts +10 -0
- package/test-utils/sdks/petstore/src/schemas/CreateUsersWithListInput.ts +10 -0
- package/test-utils/sdks/petstore/src/schemas/DeleteOrder.ts +22 -0
- package/test-utils/sdks/petstore/src/schemas/DeletePet.ts +31 -0
- package/test-utils/sdks/petstore/src/schemas/DeleteUser.ts +20 -0
- package/test-utils/sdks/petstore/src/schemas/FindPetsByStatus.ts +38 -0
- package/test-utils/sdks/petstore/src/schemas/FindPetsByTags.ts +32 -0
- package/test-utils/sdks/petstore/src/schemas/GetInventory.ts +13 -0
- package/test-utils/sdks/petstore/src/schemas/GetOrderById.ts +23 -0
- package/test-utils/sdks/petstore/src/schemas/GetPetById.ts +21 -0
- package/test-utils/sdks/petstore/src/schemas/GetUserByName.ts +20 -0
- package/test-utils/sdks/petstore/src/schemas/LoginUser.ts +32 -0
- package/test-utils/sdks/petstore/src/schemas/Order.ts +37 -0
- package/test-utils/sdks/petstore/src/schemas/Pet.ts +53 -0
- package/test-utils/sdks/petstore/src/schemas/Tag.ts +15 -0
- package/test-utils/sdks/petstore/src/schemas/UpdatePetWithForm.ts +35 -0
- package/test-utils/sdks/petstore/src/schemas/UpdateUser.ts +20 -0
- package/test-utils/sdks/petstore/src/schemas/UploadFile.ts +36 -0
- package/test-utils/sdks/petstore/src/schemas/User.ts +35 -0
- package/test-utils/sdks/petstore/src/schemas.ts +22 -0
- package/test-utils/sdks/petstore/src/sdk.ts +248 -0
- package/test-utils/sdks/petstore/src/types.ts +29 -0
- package/test-utils/sdks/petstore/tsconfig.json +12 -0
- package/test-utils/sdks/readme/README.md +23 -0
- package/test-utils/sdks/readme/package.json +55 -0
- package/test-utils/sdks/readme/src/index.ts +13 -0
- package/test-utils/sdks/readme/src/schemas/Apply.ts +61 -0
- package/test-utils/sdks/readme/src/schemas/Category.ts +24 -0
- package/test-utils/sdks/readme/src/schemas/Changelog.ts +36 -0
- package/test-utils/sdks/readme/src/schemas/CondensedProjectData.ts +25 -0
- package/test-utils/sdks/readme/src/schemas/CreateCategory.ts +21 -0
- package/test-utils/sdks/readme/src/schemas/CreateCustomPage.ts +22 -0
- package/test-utils/sdks/readme/src/schemas/CreateDoc.ts +40 -0
- package/test-utils/sdks/readme/src/schemas/CreateVersion.ts +33 -0
- package/test-utils/sdks/readme/src/schemas/CustomPage.ts +33 -0
- package/test-utils/sdks/readme/src/schemas/DeleteApiSpecification.ts +39 -0
- package/test-utils/sdks/readme/src/schemas/DeleteCategory.ts +37 -0
- package/test-utils/sdks/readme/src/schemas/DeleteChangelog.ts +20 -0
- package/test-utils/sdks/readme/src/schemas/DeleteCustomPage.ts +39 -0
- package/test-utils/sdks/readme/src/schemas/DeleteDoc.ts +53 -0
- package/test-utils/sdks/readme/src/schemas/DeleteVersion.ts +42 -0
- package/test-utils/sdks/readme/src/schemas/DocSchemaPost.ts +135 -0
- package/test-utils/sdks/readme/src/schemas/DocSchemaPut.ts +62 -0
- package/test-utils/sdks/readme/src/schemas/DocSchemaResponse.ts +54 -0
- package/test-utils/sdks/readme/src/schemas/ErrorApikeyEmpty.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorApikeyMismatch.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorApikeyNotfound.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorCategoryInvalid.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorCategoryNotfound.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorCustompageInvalid.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorCustompageNotfound.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorDocInvalid.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorDocNotfound.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorRegistryNotfound.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorSpecFileEmpty.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorSpecIdDuplicate.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorSpecIdInvalid.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorSpecInvalid.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorSpecInvalidSchema.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorSpecNotfound.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorSpecTimeout.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorSpecVersionNotfound.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorVersionCantDemoteStable.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorVersionCantRemoveStable.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorVersionDuplicate.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorVersionEmpty.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorVersionForkEmpty.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorVersionForkNotfound.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorVersionNotfound.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/GetApiRegistry.ts +27 -0
- package/test-utils/sdks/readme/src/schemas/GetApiSchema.ts +10 -0
- package/test-utils/sdks/readme/src/schemas/GetApiSpecification.ts +74 -0
- package/test-utils/sdks/readme/src/schemas/GetCategories.ts +57 -0
- package/test-utils/sdks/readme/src/schemas/GetCategory.ts +37 -0
- package/test-utils/sdks/readme/src/schemas/GetCategoryDocs.ts +37 -0
- package/test-utils/sdks/readme/src/schemas/GetChangelog.ts +20 -0
- package/test-utils/sdks/readme/src/schemas/GetChangelogs.ts +43 -0
- package/test-utils/sdks/readme/src/schemas/GetCustomPage.ts +39 -0
- package/test-utils/sdks/readme/src/schemas/GetCustomPages.ts +60 -0
- package/test-utils/sdks/readme/src/schemas/GetDoc.ts +53 -0
- package/test-utils/sdks/readme/src/schemas/GetOpenRoles.ts +12 -0
- package/test-utils/sdks/readme/src/schemas/GetProductionDoc.ts +53 -0
- package/test-utils/sdks/readme/src/schemas/GetProject.ts +22 -0
- package/test-utils/sdks/readme/src/schemas/GetVersion.ts +42 -0
- package/test-utils/sdks/readme/src/schemas/GetVersions.ts +22 -0
- package/test-utils/sdks/readme/src/schemas/JobOpening.ts +52 -0
- package/test-utils/sdks/readme/src/schemas/SearchDocs.ts +53 -0
- package/test-utils/sdks/readme/src/schemas/UpdateApiSpecification.ts +67 -0
- package/test-utils/sdks/readme/src/schemas/UpdateCategory.ts +37 -0
- package/test-utils/sdks/readme/src/schemas/UpdateChangelog.ts +20 -0
- package/test-utils/sdks/readme/src/schemas/UpdateCustomPage.ts +39 -0
- package/test-utils/sdks/readme/src/schemas/UpdateDoc.ts +53 -0
- package/test-utils/sdks/readme/src/schemas/UpdateVersion.ts +42 -0
- package/test-utils/sdks/readme/src/schemas/UploadApiSpecification.ts +64 -0
- package/test-utils/sdks/readme/src/schemas/Version.ts +40 -0
- package/test-utils/sdks/readme/src/schemas.ts +70 -0
- package/test-utils/sdks/readme/src/sdk.ts +477 -0
- package/test-utils/sdks/readme/src/types.ts +120 -0
- package/test-utils/sdks/readme/tsconfig.json +12 -0
- package/test-utils/sdks/response-title-quirks/README.md +14 -0
- package/test-utils/sdks/response-title-quirks/package.json +55 -0
- package/test-utils/sdks/response-title-quirks/src/index.ts +9 -0
- package/test-utils/sdks/response-title-quirks/src/schemas/GetAnything.ts +60 -0
- package/test-utils/sdks/response-title-quirks/src/schemas.ts +2 -0
- package/test-utils/sdks/response-title-quirks/src/sdk.ts +76 -0
- package/test-utils/sdks/response-title-quirks/src/types.ts +5 -0
- package/test-utils/sdks/response-title-quirks/tsconfig.json +12 -0
- package/test-utils/sdks/simple/README.md +14 -0
- package/test-utils/sdks/simple/package.json +55 -0
- package/test-utils/sdks/simple/src/index.ts +10 -0
- package/test-utils/sdks/simple/src/schemas/Category.ts +15 -0
- package/test-utils/sdks/simple/src/schemas/FindPetsByStatus.ts +38 -0
- package/test-utils/sdks/simple/src/schemas/Pet.ts +53 -0
- package/test-utils/sdks/simple/src/schemas/Tag.ts +15 -0
- package/test-utils/sdks/simple/src/schemas.ts +5 -0
- package/test-utils/sdks/simple/src/sdk.ts +81 -0
- package/test-utils/sdks/simple/src/types.ts +8 -0
- package/test-utils/sdks/simple/tsconfig.json +12 -0
- package/test-utils/sdks/star-trek/README.md +22 -0
- package/test-utils/sdks/star-trek/package.json +55 -0
- package/test-utils/sdks/star-trek/src/index.ts +9 -0
- package/test-utils/sdks/star-trek/src/schemas/AnimalBase.ts +41 -0
- package/test-utils/sdks/star-trek/src/schemas/AnimalBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/AnimalFull.ts +41 -0
- package/test-utils/sdks/star-trek/src/schemas/AnimalFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/AstronomicalObjectBase.ts +27 -0
- package/test-utils/sdks/star-trek/src/schemas/AstronomicalObjectBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/AstronomicalObjectFull.ts +32 -0
- package/test-utils/sdks/star-trek/src/schemas/AstronomicalObjectFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/AstronomicalObjectHeader.ts +21 -0
- package/test-utils/sdks/star-trek/src/schemas/AstronomicalObjectType.ts +36 -0
- package/test-utils/sdks/star-trek/src/schemas/BloodType.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/BookBase.ts +120 -0
- package/test-utils/sdks/star-trek/src/schemas/BookBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/BookCollectionBase.ts +51 -0
- package/test-utils/sdks/star-trek/src/schemas/BookCollectionBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/BookCollectionFull.ts +98 -0
- package/test-utils/sdks/star-trek/src/schemas/BookCollectionFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/BookFull.ts +182 -0
- package/test-utils/sdks/star-trek/src/schemas/BookFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/BookSeriesBase.ts +57 -0
- package/test-utils/sdks/star-trek/src/schemas/BookSeriesBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/BookSeriesFull.ts +81 -0
- package/test-utils/sdks/star-trek/src/schemas/BookSeriesFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/CharacterBase.ts +104 -0
- package/test-utils/sdks/star-trek/src/schemas/CharacterBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/CharacterFull.ts +152 -0
- package/test-utils/sdks/star-trek/src/schemas/CharacterFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/CharacterHeader.ts +21 -0
- package/test-utils/sdks/star-trek/src/schemas/CharacterRelation.ts +17 -0
- package/test-utils/sdks/star-trek/src/schemas/CharacterSpecies.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/ComicCollectionBase.ts +71 -0
- package/test-utils/sdks/star-trek/src/schemas/ComicCollectionBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/ComicCollectionFull.ts +123 -0
- package/test-utils/sdks/star-trek/src/schemas/ComicCollectionFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/ComicSeriesBase.ts +75 -0
- package/test-utils/sdks/star-trek/src/schemas/ComicSeriesBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/ComicSeriesFull.ts +99 -0
- package/test-utils/sdks/star-trek/src/schemas/ComicSeriesFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/ComicStripBase.ts +61 -0
- package/test-utils/sdks/star-trek/src/schemas/ComicStripBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/ComicStripFull.ts +85 -0
- package/test-utils/sdks/star-trek/src/schemas/ComicStripFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/ComicsBase.ts +75 -0
- package/test-utils/sdks/star-trek/src/schemas/ComicsBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/ComicsFull.ts +127 -0
- package/test-utils/sdks/star-trek/src/schemas/ComicsFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/CompanyBase.ts +89 -0
- package/test-utils/sdks/star-trek/src/schemas/CompanyBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/CompanyFull.ts +89 -0
- package/test-utils/sdks/star-trek/src/schemas/CompanyFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/CompanyHeader.ts +21 -0
- package/test-utils/sdks/star-trek/src/schemas/ConflictBase.ts +49 -0
- package/test-utils/sdks/star-trek/src/schemas/ConflictBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/ConflictFull.ts +78 -0
- package/test-utils/sdks/star-trek/src/schemas/ConflictFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/ContentLanguage.ts +21 -0
- package/test-utils/sdks/star-trek/src/schemas/ContentRating.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/ContentRatingSystem.ts +35 -0
- package/test-utils/sdks/star-trek/src/schemas/Country.ts +21 -0
- package/test-utils/sdks/star-trek/src/schemas/ElementBase.ts +61 -0
- package/test-utils/sdks/star-trek/src/schemas/ElementBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/ElementFull.ts +61 -0
- package/test-utils/sdks/star-trek/src/schemas/ElementFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/EpisodeBase.ts +82 -0
- package/test-utils/sdks/star-trek/src/schemas/EpisodeBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/EpisodeFull.ts +125 -0
- package/test-utils/sdks/star-trek/src/schemas/EpisodeFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/Error.ts +17 -0
- package/test-utils/sdks/star-trek/src/schemas/FoodBase.ts +61 -0
- package/test-utils/sdks/star-trek/src/schemas/FoodBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/FoodFull.ts +61 -0
- package/test-utils/sdks/star-trek/src/schemas/FoodFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/Gender.ts +11 -0
- package/test-utils/sdks/star-trek/src/schemas/Genre.ts +17 -0
- package/test-utils/sdks/star-trek/src/schemas/GetAnimal.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetAnimalSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetAstronomicalobject.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetAstronomicalobjectSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetBook.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetBookSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetBookcollection.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetBookcollectionSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetBookseries.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetBookseriesSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetCharacter.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetCharacterSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetComiccollection.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetComiccollectionSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetComics.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetComicsSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetComicseries.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetComicseriesSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetComicstrip.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetComicstripSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetCompany.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetCompanySearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetConflict.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetConflictSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetElement.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetElementSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetEpisode.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetEpisodeSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetFood.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetFoodSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetLiterature.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetLiteratureSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetLocation.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetLocationSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetMagazine.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetMagazineSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetMagazineseries.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetMagazineseriesSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetMaterial.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetMaterialSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetMedicalcondition.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetMedicalconditionSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetMovie.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetMovieSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetOccupation.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetOccupationSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetOrganization.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetOrganizationSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetPerformer.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetPerformerSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetSeason.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetSeasonSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetSeries.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetSeriesSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetSoundtrack.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetSoundtrackSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetSpacecraft.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetSpacecraftSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetSpacecraftclass.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetSpacecraftclassSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetSpecies.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetSpeciesSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetStaff.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetStaffSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetTechnology.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetTechnologySearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetTitle.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetTitleSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetTradingcard.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetTradingcardSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetTradingcarddeck.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetTradingcarddeckSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetTradingcardset.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetTradingcardsetSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetVideogame.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetVideogameSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetVideorelease.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetVideoreleaseSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetWeapon.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetWeaponSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/LiteratureBase.ts +45 -0
- package/test-utils/sdks/star-trek/src/schemas/LiteratureBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/LiteratureFull.ts +45 -0
- package/test-utils/sdks/star-trek/src/schemas/LiteratureFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/LocationBase.ts +113 -0
- package/test-utils/sdks/star-trek/src/schemas/LocationBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/LocationFull.ts +113 -0
- package/test-utils/sdks/star-trek/src/schemas/LocationFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/MagazineBase.ts +53 -0
- package/test-utils/sdks/star-trek/src/schemas/MagazineBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/MagazineFull.ts +72 -0
- package/test-utils/sdks/star-trek/src/schemas/MagazineFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/MagazineSeriesBase.ts +41 -0
- package/test-utils/sdks/star-trek/src/schemas/MagazineSeriesBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/MagazineSeriesFull.ts +60 -0
- package/test-utils/sdks/star-trek/src/schemas/MagazineSeriesFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/MaritalStatus.ts +17 -0
- package/test-utils/sdks/star-trek/src/schemas/MaterialBase.ts +61 -0
- package/test-utils/sdks/star-trek/src/schemas/MaterialBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/MaterialFull.ts +61 -0
- package/test-utils/sdks/star-trek/src/schemas/MaterialFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/MedicalConditionBase.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/MedicalConditionBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/MedicalConditionFull.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/MedicalConditionFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/MovieBase.ts +87 -0
- package/test-utils/sdks/star-trek/src/schemas/MovieBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/MovieFull.ts +139 -0
- package/test-utils/sdks/star-trek/src/schemas/MovieFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/OccupationBase.ts +33 -0
- package/test-utils/sdks/star-trek/src/schemas/OccupationBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/OccupationFull.ts +40 -0
- package/test-utils/sdks/star-trek/src/schemas/OccupationFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/OrganizationBase.ts +69 -0
- package/test-utils/sdks/star-trek/src/schemas/OrganizationBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/OrganizationFull.ts +76 -0
- package/test-utils/sdks/star-trek/src/schemas/OrganizationFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/OrganizationHeader.ts +21 -0
- package/test-utils/sdks/star-trek/src/schemas/PerformerBase.ts +98 -0
- package/test-utils/sdks/star-trek/src/schemas/PerformerBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/PerformerFull.ts +136 -0
- package/test-utils/sdks/star-trek/src/schemas/PerformerFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/Platform.ts +17 -0
- package/test-utils/sdks/star-trek/src/schemas/PostAnimalSearch.ts +65 -0
- package/test-utils/sdks/star-trek/src/schemas/PostAstronomicalobjectSearch.ts +53 -0
- package/test-utils/sdks/star-trek/src/schemas/PostBookSearch.ts +141 -0
- package/test-utils/sdks/star-trek/src/schemas/PostBookcollectionSearch.ts +85 -0
- package/test-utils/sdks/star-trek/src/schemas/PostBookseriesSearch.ts +83 -0
- package/test-utils/sdks/star-trek/src/schemas/PostCharacterSearch.ts +69 -0
- package/test-utils/sdks/star-trek/src/schemas/PostComiccollectionSearch.ts +89 -0
- package/test-utils/sdks/star-trek/src/schemas/PostComicsSearch.ts +93 -0
- package/test-utils/sdks/star-trek/src/schemas/PostComicseriesSearch.ts +93 -0
- package/test-utils/sdks/star-trek/src/schemas/PostComicstripSearch.ts +75 -0
- package/test-utils/sdks/star-trek/src/schemas/PostCompanySearch.ts +113 -0
- package/test-utils/sdks/star-trek/src/schemas/PostConflictSearch.ts +75 -0
- package/test-utils/sdks/star-trek/src/schemas/PostElementSearch.ts +77 -0
- package/test-utils/sdks/star-trek/src/schemas/PostEpisodeSearch.ts +113 -0
- package/test-utils/sdks/star-trek/src/schemas/PostFoodSearch.ts +85 -0
- package/test-utils/sdks/star-trek/src/schemas/PostLiteratureSearch.ts +69 -0
- package/test-utils/sdks/star-trek/src/schemas/PostLocationSearch.ts +137 -0
- package/test-utils/sdks/star-trek/src/schemas/PostMagazineSearch.ts +65 -0
- package/test-utils/sdks/star-trek/src/schemas/PostMagazineseriesSearch.ts +65 -0
- package/test-utils/sdks/star-trek/src/schemas/PostMaterialSearch.ts +85 -0
- package/test-utils/sdks/star-trek/src/schemas/PostMedicalconditionSearch.ts +49 -0
- package/test-utils/sdks/star-trek/src/schemas/PostMovieSearch.ts +75 -0
- package/test-utils/sdks/star-trek/src/schemas/PostOccupationSearch.ts +57 -0
- package/test-utils/sdks/star-trek/src/schemas/PostOrganizationSearch.ts +93 -0
- package/test-utils/sdks/star-trek/src/schemas/PostPerformerSearch.ts +133 -0
- package/test-utils/sdks/star-trek/src/schemas/PostSeasonSearch.ts +65 -0
- package/test-utils/sdks/star-trek/src/schemas/PostSeriesSearch.ts +89 -0
- package/test-utils/sdks/star-trek/src/schemas/PostSoundtrackSearch.ts +65 -0
- package/test-utils/sdks/star-trek/src/schemas/PostSpacecraftSearch.ts +45 -0
- package/test-utils/sdks/star-trek/src/schemas/PostSpacecraftclassSearch.ts +53 -0
- package/test-utils/sdks/star-trek/src/schemas/PostSpeciesSearch.ts +93 -0
- package/test-utils/sdks/star-trek/src/schemas/PostStaffSearch.ts +301 -0
- package/test-utils/sdks/star-trek/src/schemas/PostTechnologySearch.ts +125 -0
- package/test-utils/sdks/star-trek/src/schemas/PostTitleSearch.ts +65 -0
- package/test-utils/sdks/star-trek/src/schemas/PostTradingcardSearch.ts +53 -0
- package/test-utils/sdks/star-trek/src/schemas/PostTradingcarddeckSearch.ts +49 -0
- package/test-utils/sdks/star-trek/src/schemas/PostTradingcardsetSearch.ts +119 -0
- package/test-utils/sdks/star-trek/src/schemas/PostVideogameSearch.ts +55 -0
- package/test-utils/sdks/star-trek/src/schemas/PostVideoreleaseSearch.ts +65 -0
- package/test-utils/sdks/star-trek/src/schemas/PostWeaponSearch.ts +73 -0
- package/test-utils/sdks/star-trek/src/schemas/ProductionRunUnit.ts +11 -0
- package/test-utils/sdks/star-trek/src/schemas/Reference.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/ReferenceType.ts +11 -0
- package/test-utils/sdks/star-trek/src/schemas/ResponsePage.ts +42 -0
- package/test-utils/sdks/star-trek/src/schemas/ResponseSort.ts +16 -0
- package/test-utils/sdks/star-trek/src/schemas/ResponseSortClause.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/ResponseSortDirection.ts +11 -0
- package/test-utils/sdks/star-trek/src/schemas/SeasonBase.ts +32 -0
- package/test-utils/sdks/star-trek/src/schemas/SeasonBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/SeasonFull.ts +38 -0
- package/test-utils/sdks/star-trek/src/schemas/SeasonFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/SeasonHeader.ts +21 -0
- package/test-utils/sdks/star-trek/src/schemas/SeriesBase.ts +60 -0
- package/test-utils/sdks/star-trek/src/schemas/SeriesBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/SeriesFull.ts +72 -0
- package/test-utils/sdks/star-trek/src/schemas/SeriesFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/SeriesHeader.ts +21 -0
- package/test-utils/sdks/star-trek/src/schemas/SoundtrackBase.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/SoundtrackBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/SoundtrackFull.ts +59 -0
- package/test-utils/sdks/star-trek/src/schemas/SoundtrackFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/SpacecraftBase.ts +39 -0
- package/test-utils/sdks/star-trek/src/schemas/SpacecraftBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/SpacecraftClassBase.ts +48 -0
- package/test-utils/sdks/star-trek/src/schemas/SpacecraftClassBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/SpacecraftClassFull.ts +60 -0
- package/test-utils/sdks/star-trek/src/schemas/SpacecraftClassFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/SpacecraftClassHeader.ts +21 -0
- package/test-utils/sdks/star-trek/src/schemas/SpacecraftFull.ts +45 -0
- package/test-utils/sdks/star-trek/src/schemas/SpacecraftFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/SpacecraftType.ts +17 -0
- package/test-utils/sdks/star-trek/src/schemas/SpeciesBase.ts +73 -0
- package/test-utils/sdks/star-trek/src/schemas/SpeciesBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/SpeciesFull.ts +79 -0
- package/test-utils/sdks/star-trek/src/schemas/SpeciesFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/SpeciesHeader.ts +21 -0
- package/test-utils/sdks/star-trek/src/schemas/StaffBase.ts +266 -0
- package/test-utils/sdks/star-trek/src/schemas/StaffBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/StaffFull.ts +323 -0
- package/test-utils/sdks/star-trek/src/schemas/StaffFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/StaffHeader.ts +21 -0
- package/test-utils/sdks/star-trek/src/schemas/TechnologyBase.ts +101 -0
- package/test-utils/sdks/star-trek/src/schemas/TechnologyBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/TechnologyFull.ts +101 -0
- package/test-utils/sdks/star-trek/src/schemas/TechnologyFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/TitleBase.ts +41 -0
- package/test-utils/sdks/star-trek/src/schemas/TitleBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/TitleFull.ts +48 -0
- package/test-utils/sdks/star-trek/src/schemas/TitleFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/TradingCardBase.ts +38 -0
- package/test-utils/sdks/star-trek/src/schemas/TradingCardBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/TradingCardDeckBase.ts +28 -0
- package/test-utils/sdks/star-trek/src/schemas/TradingCardDeckBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/TradingCardDeckFull.ts +34 -0
- package/test-utils/sdks/star-trek/src/schemas/TradingCardDeckFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/TradingCardDeckHeader.ts +21 -0
- package/test-utils/sdks/star-trek/src/schemas/TradingCardFull.ts +38 -0
- package/test-utils/sdks/star-trek/src/schemas/TradingCardFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/TradingCardSetBase.ts +62 -0
- package/test-utils/sdks/star-trek/src/schemas/TradingCardSetBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/TradingCardSetFull.ts +86 -0
- package/test-utils/sdks/star-trek/src/schemas/TradingCardSetFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/TradingCardSetHeader.ts +21 -0
- package/test-utils/sdks/star-trek/src/schemas/VideoGameBase.ts +48 -0
- package/test-utils/sdks/star-trek/src/schemas/VideoGameBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/VideoGameFull.ts +84 -0
- package/test-utils/sdks/star-trek/src/schemas/VideoGameFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/VideoReleaseBase.ts +127 -0
- package/test-utils/sdks/star-trek/src/schemas/VideoReleaseBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/VideoReleaseFormat.ts +23 -0
- package/test-utils/sdks/star-trek/src/schemas/VideoReleaseFull.ts +155 -0
- package/test-utils/sdks/star-trek/src/schemas/VideoReleaseFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/WeaponBase.ts +49 -0
- package/test-utils/sdks/star-trek/src/schemas/WeaponBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/WeaponFull.ts +49 -0
- package/test-utils/sdks/star-trek/src/schemas/WeaponFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas.ts +314 -0
- package/test-utils/sdks/star-trek/src/sdk.ts +1032 -0
- package/test-utils/sdks/star-trek/src/types.ts +490 -0
- package/test-utils/sdks/star-trek/tsconfig.json +12 -0
- package/test-utils/tsconfig.json +9 -0
- package/tsconfig.eslint.json +8 -0
- package/tsconfig.json +9 -0
- package/tsup.config.ts +31 -0
@@ -0,0 +1,58 @@
|
|
1
|
+
{
|
2
|
+
"openapi": "3.0.0",
|
3
|
+
"info": {
|
4
|
+
"title": "OAS test cases",
|
5
|
+
"version": "1.0.0"
|
6
|
+
},
|
7
|
+
"servers": [
|
8
|
+
{
|
9
|
+
"url": "https://api.example.com"
|
10
|
+
}
|
11
|
+
],
|
12
|
+
"paths": {
|
13
|
+
"/arraySchema": {
|
14
|
+
"put": {
|
15
|
+
"requestBody": {
|
16
|
+
"content": {
|
17
|
+
"application/json": {
|
18
|
+
"schema": {
|
19
|
+
"type": "array",
|
20
|
+
"items": {
|
21
|
+
"type": "object",
|
22
|
+
"properties": {
|
23
|
+
"name": {
|
24
|
+
"type": "string"
|
25
|
+
}
|
26
|
+
}
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
30
|
+
}
|
31
|
+
},
|
32
|
+
"responses": {
|
33
|
+
"200": {
|
34
|
+
"description": "OK"
|
35
|
+
}
|
36
|
+
}
|
37
|
+
}
|
38
|
+
},
|
39
|
+
"/primitiveBody": {
|
40
|
+
"put": {
|
41
|
+
"requestBody": {
|
42
|
+
"content": {
|
43
|
+
"text/plain": {
|
44
|
+
"schema": {
|
45
|
+
"type": "string"
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
49
|
+
},
|
50
|
+
"responses": {
|
51
|
+
"200": {
|
52
|
+
"description": "OK"
|
53
|
+
}
|
54
|
+
}
|
55
|
+
}
|
56
|
+
}
|
57
|
+
}
|
58
|
+
}
|
@@ -0,0 +1,77 @@
|
|
1
|
+
{
|
2
|
+
"openapi": "3.1.0",
|
3
|
+
"info": {
|
4
|
+
"title": "Testing an OAS that has response `title` props that start with a number",
|
5
|
+
"version": "1.0.0"
|
6
|
+
},
|
7
|
+
"servers": [
|
8
|
+
{
|
9
|
+
"url": "https://httpbin.org"
|
10
|
+
}
|
11
|
+
],
|
12
|
+
"paths": {
|
13
|
+
"/anything": {
|
14
|
+
"get": {
|
15
|
+
"operationId": "getAnything",
|
16
|
+
"parameters": [
|
17
|
+
{
|
18
|
+
"name": "status",
|
19
|
+
"in": "query",
|
20
|
+
"description": "Status values that need to be considered for filter",
|
21
|
+
"required": true,
|
22
|
+
"explode": true,
|
23
|
+
"schema": {
|
24
|
+
"type": "array",
|
25
|
+
"items": {
|
26
|
+
"type": "string",
|
27
|
+
"enum": ["available", "pending", "sold"],
|
28
|
+
"default": "available"
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}
|
32
|
+
],
|
33
|
+
"responses": {
|
34
|
+
"2XX": {
|
35
|
+
"description": "2XX",
|
36
|
+
"content": {
|
37
|
+
"application/json": {
|
38
|
+
"examples": {
|
39
|
+
"260 Created (token)": {
|
40
|
+
"value": "{\n\t\"id\": \"e450ec69-dac2-4858-b4c9-6d3af44bb5f8\",\n\t\"user\": {\n\t\t\"id\": \"dd57ae92-bd88-4663-bb9f-5bfd6d75ff85\",\n\t\t\"type\": \"customer\",\n\t\t\"uniqueId\": \"john-smith\"\n\t},\n\t\"session\": {\n\t\t\"id\": \"1063547f-30a1-44c4-ae6f-1dfad5b64403\",\n\t\t\"externalRef\": \"external-session-ref\",\n\t\t\"isAuthenticated\": false\n\t},\n\t\"token\": \"eyJh...\"\n}"
|
41
|
+
},
|
42
|
+
"260 Created": {
|
43
|
+
"value": "{\n\t\"id\": \"e450ec69-dac2-4858-b4c9-6d3af44bb5f8\",\n\t\"user\": {\n\t\t\"id\": \"dd57ae92-bd88-4663-bb9f-5bfd6d75ff85\",\n\t\t\"type\": \"customer\",\n\t\t\"uniqueId\": \"john-smith\"\n\t},\n\t\"session\": {\n\t\t\"id\": \"1063547f-30a1-44c4-ae6f-1dfad5b64403\",\n\t\t\"externalRef\": \"external-session-ref\",\n\t\t\"isAuthenticated\": false\n\t}\n}"
|
44
|
+
}
|
45
|
+
},
|
46
|
+
"schema": {
|
47
|
+
"oneOf": [
|
48
|
+
{
|
49
|
+
"title": "260 Created (token)",
|
50
|
+
"type": "object",
|
51
|
+
"properties": {
|
52
|
+
"id": {
|
53
|
+
"type": "string",
|
54
|
+
"example": "e450ec69-dac2-4858-b4c9-6d3af44bb5f8"
|
55
|
+
}
|
56
|
+
}
|
57
|
+
},
|
58
|
+
{
|
59
|
+
"title": "260 Created",
|
60
|
+
"type": "object",
|
61
|
+
"properties": {
|
62
|
+
"id": {
|
63
|
+
"type": "string",
|
64
|
+
"example": "e450ec69-dac2-4858-b4c9-6d3af44bb5f8"
|
65
|
+
}
|
66
|
+
}
|
67
|
+
}
|
68
|
+
]
|
69
|
+
}
|
70
|
+
}
|
71
|
+
}
|
72
|
+
}
|
73
|
+
}
|
74
|
+
}
|
75
|
+
}
|
76
|
+
}
|
77
|
+
}
|
@@ -0,0 +1,291 @@
|
|
1
|
+
{
|
2
|
+
"openapi": "3.0.0",
|
3
|
+
"info": {
|
4
|
+
"version": "1.0.0",
|
5
|
+
"title": "Swagger Petstore",
|
6
|
+
"contact": {
|
7
|
+
"name": "API Support",
|
8
|
+
"email": "support@example.com"
|
9
|
+
}
|
10
|
+
},
|
11
|
+
"servers": [
|
12
|
+
{
|
13
|
+
"url": "http://petstore.swagger.io/v2"
|
14
|
+
}
|
15
|
+
],
|
16
|
+
"paths": {
|
17
|
+
"/pet/findByStatus": {
|
18
|
+
"get": {
|
19
|
+
"tags": ["pet"],
|
20
|
+
"summary": "Finds Pets by status",
|
21
|
+
"description": "Multiple status values can be provided with comma separated strings",
|
22
|
+
"operationId": "findPetsByStatus",
|
23
|
+
"parameters": [
|
24
|
+
{
|
25
|
+
"name": "status",
|
26
|
+
"in": "query",
|
27
|
+
"description": "Status values that need to be considered for filter",
|
28
|
+
"required": true,
|
29
|
+
"explode": true,
|
30
|
+
"schema": {
|
31
|
+
"type": "array",
|
32
|
+
"items": {
|
33
|
+
"type": "string",
|
34
|
+
"enum": ["available", "pending", "sold"],
|
35
|
+
"default": "available"
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|
39
|
+
],
|
40
|
+
"responses": {
|
41
|
+
"200": {
|
42
|
+
"description": "successful operation",
|
43
|
+
"content": {
|
44
|
+
"application/xml": {
|
45
|
+
"schema": {
|
46
|
+
"type": "array",
|
47
|
+
"items": {
|
48
|
+
"$ref": "#/components/schemas/Pet"
|
49
|
+
}
|
50
|
+
}
|
51
|
+
},
|
52
|
+
"application/json": {
|
53
|
+
"schema": {
|
54
|
+
"type": "array",
|
55
|
+
"items": {
|
56
|
+
"$ref": "#/components/schemas/Pet"
|
57
|
+
}
|
58
|
+
}
|
59
|
+
}
|
60
|
+
}
|
61
|
+
},
|
62
|
+
"400": {
|
63
|
+
"description": "Invalid status value"
|
64
|
+
}
|
65
|
+
},
|
66
|
+
"security": [
|
67
|
+
{
|
68
|
+
"petstore_auth": ["write:pets", "read:pets"]
|
69
|
+
}
|
70
|
+
]
|
71
|
+
}
|
72
|
+
}
|
73
|
+
},
|
74
|
+
"components": {
|
75
|
+
"requestBodies": {
|
76
|
+
"Pet": {
|
77
|
+
"content": {
|
78
|
+
"application/json": {
|
79
|
+
"schema": {
|
80
|
+
"$ref": "#/components/schemas/Pet"
|
81
|
+
}
|
82
|
+
},
|
83
|
+
"application/xml": {
|
84
|
+
"schema": {
|
85
|
+
"$ref": "#/components/schemas/Pet"
|
86
|
+
}
|
87
|
+
}
|
88
|
+
},
|
89
|
+
"description": "Pet object that needs to be added to the store",
|
90
|
+
"required": true
|
91
|
+
},
|
92
|
+
"UserArray": {
|
93
|
+
"content": {
|
94
|
+
"application/json": {
|
95
|
+
"schema": {
|
96
|
+
"type": "array",
|
97
|
+
"items": {
|
98
|
+
"$ref": "#/components/schemas/User"
|
99
|
+
}
|
100
|
+
}
|
101
|
+
}
|
102
|
+
},
|
103
|
+
"description": "List of user object",
|
104
|
+
"required": true
|
105
|
+
}
|
106
|
+
},
|
107
|
+
"securitySchemes": {
|
108
|
+
"petstore_auth": {
|
109
|
+
"type": "oauth2",
|
110
|
+
"flows": {
|
111
|
+
"implicit": {
|
112
|
+
"authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
|
113
|
+
"scopes": {
|
114
|
+
"write:pets": "modify pets in your account",
|
115
|
+
"read:pets": "read your pets"
|
116
|
+
}
|
117
|
+
}
|
118
|
+
}
|
119
|
+
},
|
120
|
+
"api_key": {
|
121
|
+
"type": "apiKey",
|
122
|
+
"name": "api_key",
|
123
|
+
"in": "header"
|
124
|
+
}
|
125
|
+
},
|
126
|
+
"schemas": {
|
127
|
+
"Order": {
|
128
|
+
"type": "object",
|
129
|
+
"properties": {
|
130
|
+
"id": {
|
131
|
+
"type": "integer",
|
132
|
+
"format": "int64"
|
133
|
+
},
|
134
|
+
"petId": {
|
135
|
+
"type": "integer",
|
136
|
+
"format": "int64"
|
137
|
+
},
|
138
|
+
"quantity": {
|
139
|
+
"type": "integer",
|
140
|
+
"format": "int32"
|
141
|
+
},
|
142
|
+
"shipDate": {
|
143
|
+
"type": "string",
|
144
|
+
"format": "date-time"
|
145
|
+
},
|
146
|
+
"status": {
|
147
|
+
"type": "string",
|
148
|
+
"description": "Order Status",
|
149
|
+
"enum": ["placed", "approved", "delivered"]
|
150
|
+
},
|
151
|
+
"complete": {
|
152
|
+
"type": "boolean",
|
153
|
+
"default": false
|
154
|
+
}
|
155
|
+
},
|
156
|
+
"xml": {
|
157
|
+
"name": "Order"
|
158
|
+
}
|
159
|
+
},
|
160
|
+
"Category": {
|
161
|
+
"type": "object",
|
162
|
+
"properties": {
|
163
|
+
"id": {
|
164
|
+
"type": "integer",
|
165
|
+
"format": "int64"
|
166
|
+
},
|
167
|
+
"name": {
|
168
|
+
"type": "string"
|
169
|
+
}
|
170
|
+
},
|
171
|
+
"xml": {
|
172
|
+
"name": "Category"
|
173
|
+
}
|
174
|
+
},
|
175
|
+
"User": {
|
176
|
+
"type": "object",
|
177
|
+
"properties": {
|
178
|
+
"id": {
|
179
|
+
"type": "integer",
|
180
|
+
"format": "int64"
|
181
|
+
},
|
182
|
+
"username": {
|
183
|
+
"type": "string"
|
184
|
+
},
|
185
|
+
"firstName": {
|
186
|
+
"type": "string"
|
187
|
+
},
|
188
|
+
"lastName": {
|
189
|
+
"type": "string"
|
190
|
+
},
|
191
|
+
"email": {
|
192
|
+
"type": "string"
|
193
|
+
},
|
194
|
+
"password": {
|
195
|
+
"type": "string"
|
196
|
+
},
|
197
|
+
"phone": {
|
198
|
+
"type": "string"
|
199
|
+
},
|
200
|
+
"userStatus": {
|
201
|
+
"type": "integer",
|
202
|
+
"format": "int32",
|
203
|
+
"description": "User Status"
|
204
|
+
}
|
205
|
+
},
|
206
|
+
"xml": {
|
207
|
+
"name": "User"
|
208
|
+
}
|
209
|
+
},
|
210
|
+
"Tag": {
|
211
|
+
"type": "object",
|
212
|
+
"properties": {
|
213
|
+
"id": {
|
214
|
+
"type": "integer",
|
215
|
+
"format": "int64"
|
216
|
+
},
|
217
|
+
"name": {
|
218
|
+
"type": "string"
|
219
|
+
}
|
220
|
+
},
|
221
|
+
"xml": {
|
222
|
+
"name": "Tag"
|
223
|
+
}
|
224
|
+
},
|
225
|
+
"Pet": {
|
226
|
+
"type": "object",
|
227
|
+
"required": ["name", "photoUrls"],
|
228
|
+
"properties": {
|
229
|
+
"id": {
|
230
|
+
"type": "integer",
|
231
|
+
"format": "int64",
|
232
|
+
"readOnly": true,
|
233
|
+
"default": 40,
|
234
|
+
"example": 25
|
235
|
+
},
|
236
|
+
"category": {
|
237
|
+
"$ref": "#/components/schemas/Category"
|
238
|
+
},
|
239
|
+
"name": {
|
240
|
+
"type": "string",
|
241
|
+
"example": "doggie"
|
242
|
+
},
|
243
|
+
"photoUrls": {
|
244
|
+
"type": "array",
|
245
|
+
"xml": {
|
246
|
+
"name": "photoUrl",
|
247
|
+
"wrapped": true
|
248
|
+
},
|
249
|
+
"items": {
|
250
|
+
"type": "string",
|
251
|
+
"example": "https://example.com/photo.png"
|
252
|
+
}
|
253
|
+
},
|
254
|
+
"tags": {
|
255
|
+
"type": "array",
|
256
|
+
"xml": {
|
257
|
+
"name": "tag",
|
258
|
+
"wrapped": true
|
259
|
+
},
|
260
|
+
"items": {
|
261
|
+
"$ref": "#/components/schemas/Tag"
|
262
|
+
}
|
263
|
+
},
|
264
|
+
"status": {
|
265
|
+
"type": "string",
|
266
|
+
"description": "pet status in the store",
|
267
|
+
"enum": ["available", "pending", "sold"]
|
268
|
+
}
|
269
|
+
},
|
270
|
+
"xml": {
|
271
|
+
"name": "Pet"
|
272
|
+
}
|
273
|
+
},
|
274
|
+
"ApiResponse": {
|
275
|
+
"type": "object",
|
276
|
+
"properties": {
|
277
|
+
"code": {
|
278
|
+
"type": "integer",
|
279
|
+
"format": "int32"
|
280
|
+
},
|
281
|
+
"type": {
|
282
|
+
"type": "string"
|
283
|
+
},
|
284
|
+
"message": {
|
285
|
+
"type": "string"
|
286
|
+
}
|
287
|
+
}
|
288
|
+
}
|
289
|
+
}
|
290
|
+
}
|
291
|
+
}
|
@@ -0,0 +1,81 @@
|
|
1
|
+
import DatauriParser from 'datauri/parser'
|
2
|
+
import formDataToString from 'formdata-to-string'
|
3
|
+
|
4
|
+
function objectifyHeaders(headers: []) {
|
5
|
+
return Object.fromEntries(headers)
|
6
|
+
}
|
7
|
+
|
8
|
+
export const response = {
|
9
|
+
id: 123,
|
10
|
+
name: 'Buster',
|
11
|
+
}
|
12
|
+
|
13
|
+
export const responses = {
|
14
|
+
all: (url: string, opts: RequestInit) => {
|
15
|
+
return {
|
16
|
+
uri: new URL(url).pathname,
|
17
|
+
headers: Object.fromEntries(opts.headers as unknown as []),
|
18
|
+
requestBody: opts.body,
|
19
|
+
}
|
20
|
+
},
|
21
|
+
|
22
|
+
datauri: (url: string, opts: RequestInit) => {
|
23
|
+
const buffer = Buffer.from(opts.body as string, 'hex')
|
24
|
+
const parser = new DatauriParser()
|
25
|
+
|
26
|
+
return {
|
27
|
+
uri: new URL(url).pathname,
|
28
|
+
requestBody: parser.format('.png', buffer).content,
|
29
|
+
headers: Object.fromEntries(opts.headers as unknown as []),
|
30
|
+
}
|
31
|
+
},
|
32
|
+
|
33
|
+
delay: (res: Record<string, unknown> | string, delay: number) => {
|
34
|
+
return new Promise(resolve => {
|
35
|
+
setTimeout(() => resolve(res), delay)
|
36
|
+
})
|
37
|
+
},
|
38
|
+
|
39
|
+
headers: (url: string, opts: RequestInit) => {
|
40
|
+
// `opts.headers` returns a `HeadersList` object instead of `Headers` as the typing suggests so
|
41
|
+
// we need to convert it to an array before converting it to an object.
|
42
|
+
return Object.fromEntries(opts.headers as unknown as [])
|
43
|
+
},
|
44
|
+
|
45
|
+
multipart: async (url: string, opts: RequestInit) => {
|
46
|
+
const headers = objectifyHeaders(opts.headers as unknown as [])
|
47
|
+
const payload = await formDataToString(opts.body as FormData)
|
48
|
+
|
49
|
+
return {
|
50
|
+
uri: new URL(url).pathname,
|
51
|
+
requestBody: payload,
|
52
|
+
headers,
|
53
|
+
boundary: payload.split('\r\n')[0],
|
54
|
+
}
|
55
|
+
},
|
56
|
+
|
57
|
+
real: (res: Record<string, unknown> | string) => {
|
58
|
+
return () => res
|
59
|
+
},
|
60
|
+
|
61
|
+
requestBody: () => {
|
62
|
+
return (url: string, opts: RequestInit) => {
|
63
|
+
return {
|
64
|
+
uri: new URL(url).pathname,
|
65
|
+
// eslint-disable-next-line try-catch-failsafe/json-parse
|
66
|
+
requestBody: JSON.parse(opts.body as string),
|
67
|
+
}
|
68
|
+
}
|
69
|
+
},
|
70
|
+
|
71
|
+
searchParams: (url: string) => {
|
72
|
+
const res = new URL(url)
|
73
|
+
return `${res.pathname}${res.search}`
|
74
|
+
},
|
75
|
+
|
76
|
+
url: (prop: keyof URL) => {
|
77
|
+
return (url: string) => {
|
78
|
+
return new URL(url)[prop]
|
79
|
+
}
|
80
|
+
},
|
81
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
速い茶色のキツネは怠惰な犬を飛び越えます
|
@@ -0,0 +1 @@
|
|
1
|
+
Hello world!
|
Binary file
|
Binary file
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/**
|
2
|
+
* Because parts of our OpenAPI dereferencer in `oas` can update variable references passed to it
|
3
|
+
* we may need to sometimes fully clone a spec to test something. This is just a small DIY wrapper
|
4
|
+
* for doing so.
|
5
|
+
*/
|
6
|
+
export function loadSpec(spec: string) {
|
7
|
+
return import(spec).then(({default: data}) => JSON.stringify(data)).then(JSON.parse)
|
8
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
3
|
+
|
4
|
+
case `uname` in
|
5
|
+
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
6
|
+
esac
|
7
|
+
|
8
|
+
if [ -z "$NODE_PATH" ]; then
|
9
|
+
export NODE_PATH="/home/runner/work/works/works/node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/bin/node_modules:/home/runner/work/works/works/node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/node_modules:/home/runner/work/works/works/node_modules/.pnpm/typescript@5.6.2/node_modules:/home/runner/work/works/works/node_modules/.pnpm/node_modules"
|
10
|
+
else
|
11
|
+
export NODE_PATH="/home/runner/work/works/works/node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/bin/node_modules:/home/runner/work/works/works/node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/node_modules:/home/runner/work/works/works/node_modules/.pnpm/typescript@5.6.2/node_modules:/home/runner/work/works/works/node_modules/.pnpm/node_modules:$NODE_PATH"
|
12
|
+
fi
|
13
|
+
if [ -x "$basedir/node" ]; then
|
14
|
+
exec "$basedir/node" "$basedir/../typescript/bin/tsc" "$@"
|
15
|
+
else
|
16
|
+
exec node "$basedir/../typescript/bin/tsc" "$@"
|
17
|
+
fi
|
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
3
|
+
|
4
|
+
case `uname` in
|
5
|
+
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
6
|
+
esac
|
7
|
+
|
8
|
+
if [ -z "$NODE_PATH" ]; then
|
9
|
+
export NODE_PATH="/home/runner/work/works/works/node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/bin/node_modules:/home/runner/work/works/works/node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/node_modules:/home/runner/work/works/works/node_modules/.pnpm/typescript@5.6.2/node_modules:/home/runner/work/works/works/node_modules/.pnpm/node_modules"
|
10
|
+
else
|
11
|
+
export NODE_PATH="/home/runner/work/works/works/node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/bin/node_modules:/home/runner/work/works/works/node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/node_modules:/home/runner/work/works/works/node_modules/.pnpm/typescript@5.6.2/node_modules:/home/runner/work/works/works/node_modules/.pnpm/node_modules:$NODE_PATH"
|
12
|
+
fi
|
13
|
+
if [ -x "$basedir/node" ]; then
|
14
|
+
exec "$basedir/node" "$basedir/../typescript/bin/tsserver" "$@"
|
15
|
+
else
|
16
|
+
exec node "$basedir/../typescript/bin/tsserver" "$@"
|
17
|
+
fi
|
@@ -0,0 +1,20 @@
|
|
1
|
+
{
|
2
|
+
"name": "@api/test-utils",
|
3
|
+
"version": "0.1.0",
|
4
|
+
"private": true,
|
5
|
+
"type": "module",
|
6
|
+
"scripts": {
|
7
|
+
"lint:types": "tsc --noEmit"
|
8
|
+
},
|
9
|
+
"dependencies": {
|
10
|
+
"caseless": "^0.12.0",
|
11
|
+
"datauri": "^4.1.0",
|
12
|
+
"formdata-to-string": "^2.0.1"
|
13
|
+
},
|
14
|
+
"devDependencies": {
|
15
|
+
"@types/caseless": "0.12.5",
|
16
|
+
"oas": "^24.0.0",
|
17
|
+
"typescript": "5.6.2",
|
18
|
+
"vitest": "2.1.3"
|
19
|
+
}
|
20
|
+
}
|
@@ -0,0 +1,3 @@
|
|
1
|
+
Contained within this directory are real-world generated API SDKs that we use for running unit tests against.
|
2
|
+
|
3
|
+
There will be TypeScript (and ESLint) errors in some of these files because modules they load aren't present within this test repository, and OpenAPI definition paths don't line up with where the fixture was, but that's okay!
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# `@api/alby`
|
2
|
+
|
3
|
+
This SDK was autogenerated by the [`api` SDK generator](https://api.readme.dev), powered by [ReadMe](https://readme.com) 🦉
|
4
|
+
|
5
|
+
## Example Usage 🚀
|
6
|
+
|
7
|
+
```js
|
8
|
+
import alby from '@api/alby';
|
9
|
+
|
10
|
+
alby.auth('token');
|
11
|
+
alby.getMe()
|
12
|
+
.then(({ data }) => console.log(data))
|
13
|
+
.catch(err => console.error(err));
|
14
|
+
```
|
15
|
+
|
16
|
+
<!---
|
17
|
+
|
18
|
+
Here's some additional info about the generated SDK:
|
19
|
+
|
20
|
+
`api` version: 7.0.0-mock
|
21
|
+
Generated at 2023-10-25T00:00:00.000Z
|
22
|
+
|
23
|
+
--->
|
@@ -0,0 +1,55 @@
|
|
1
|
+
{
|
2
|
+
"name": "@api/alby",
|
3
|
+
"version": "1.0.14",
|
4
|
+
"type": "module",
|
5
|
+
"main": "dist/index.cjs",
|
6
|
+
"types": "dist/index.d.cts",
|
7
|
+
"module": "dist/index.ts",
|
8
|
+
"exports": {
|
9
|
+
".": {
|
10
|
+
"import": "./dist/index.js",
|
11
|
+
"require": "./dist/index.cjs"
|
12
|
+
},
|
13
|
+
"./sdk": {
|
14
|
+
"import": "./dist/sdk.js",
|
15
|
+
"require": "./dist/sdk.cjs"
|
16
|
+
},
|
17
|
+
"./types": {
|
18
|
+
"import": "./dist/types.js",
|
19
|
+
"require": "./dist/types.cjs"
|
20
|
+
},
|
21
|
+
"./package.json": "./package.json"
|
22
|
+
},
|
23
|
+
"files": [
|
24
|
+
"dist",
|
25
|
+
"openapi.json"
|
26
|
+
],
|
27
|
+
"scripts": {
|
28
|
+
"lint": "tsc --noEmit"
|
29
|
+
},
|
30
|
+
"dependencies": {
|
31
|
+
"@readme/api-core": "file:../../../../../core"
|
32
|
+
},
|
33
|
+
"devDependencies": {
|
34
|
+
"tsup": "^7.2.0",
|
35
|
+
"typescript": "^5.2.2"
|
36
|
+
},
|
37
|
+
"tsup": {
|
38
|
+
"cjsInterop": true,
|
39
|
+
"clean": true,
|
40
|
+
"dts": true,
|
41
|
+
"entry": [
|
42
|
+
"./src/index.ts",
|
43
|
+
"./src/sdk.ts",
|
44
|
+
"./src/types.ts"
|
45
|
+
],
|
46
|
+
"format": [
|
47
|
+
"esm",
|
48
|
+
"cjs"
|
49
|
+
],
|
50
|
+
"minify": false,
|
51
|
+
"shims": true,
|
52
|
+
"sourcemap": true,
|
53
|
+
"splitting": true
|
54
|
+
}
|
55
|
+
}
|