@scalar/workspace-store 0.40.2 → 0.40.4
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 +13 -0
- package/dist/client.d.ts +7 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +820 -681
- package/dist/entities/auth/index.js +96 -101
- package/dist/entities/auth/schema.d.ts +10 -0
- package/dist/entities/auth/schema.d.ts.map +1 -1
- package/dist/entities/auth/schema.js +42 -116
- package/dist/entities/history/index.js +80 -60
- package/dist/entities/history/schema.js +94 -88
- package/dist/events/bus.js +146 -93
- package/dist/events/definitions/analytics.js +1 -1
- package/dist/events/definitions/auth.js +1 -1
- package/dist/events/definitions/common.js +1 -1
- package/dist/events/definitions/cookie.js +1 -1
- package/dist/events/definitions/document.js +1 -1
- package/dist/events/definitions/environment.js +1 -1
- package/dist/events/definitions/hooks.js +1 -1
- package/dist/events/definitions/index.js +1 -1
- package/dist/events/definitions/meta.js +1 -1
- package/dist/events/definitions/operation.js +1 -1
- package/dist/events/definitions/server.js +1 -1
- package/dist/events/definitions/tabs.js +1 -1
- package/dist/events/definitions/tag.js +1 -1
- package/dist/events/definitions/ui.js +1 -1
- package/dist/events/definitions/workspace.js +1 -1
- package/dist/events/index.js +3 -9
- package/dist/events/listeners.js +20 -22
- package/dist/events/old-definitions.js +15 -12
- package/dist/helpers/deep-clone.js +33 -17
- package/dist/helpers/detect-changes-proxy.js +95 -57
- package/dist/helpers/general.js +78 -23
- package/dist/helpers/generate-unique-value.js +77 -45
- package/dist/helpers/get-fetch.js +12 -10
- package/dist/helpers/get-resolved-ref.js +11 -10
- package/dist/helpers/is-non-optional-security-requirement.js +3 -6
- package/dist/helpers/merge-object.js +71 -30
- package/dist/helpers/overrides-proxy.js +98 -58
- package/dist/helpers/unpack-proxy.js +60 -58
- package/dist/mutators/auth.js +358 -230
- package/dist/mutators/cookie.js +59 -42
- package/dist/mutators/document.js +104 -66
- package/dist/mutators/environment.js +97 -72
- package/dist/mutators/helpers.js +9 -13
- package/dist/mutators/index.js +62 -49
- package/dist/mutators/operation/body.js +88 -57
- package/dist/mutators/operation/extensions.js +20 -12
- package/dist/mutators/operation/helpers/fetch-request-to-har.js +144 -107
- package/dist/mutators/operation/helpers/fetch-response-to-har.js +143 -95
- package/dist/mutators/operation/helpers/get-parameter-position.js +12 -12
- package/dist/mutators/operation/helpers/har-to-operation.js +169 -132
- package/dist/mutators/operation/helpers/sync-path-parameters.js +109 -60
- package/dist/mutators/operation/history.js +60 -64
- package/dist/mutators/operation/index.js +25 -49
- package/dist/mutators/operation/operation.js +349 -240
- package/dist/mutators/operation/parameters.js +157 -93
- package/dist/mutators/server.js +213 -152
- package/dist/mutators/tabs.js +173 -130
- package/dist/mutators/tag.js +131 -97
- package/dist/mutators/workspace.js +72 -42
- package/dist/navigation/get-navigation-options.js +97 -84
- package/dist/navigation/helpers/get-openapi-object.js +46 -29
- package/dist/navigation/helpers/get-operation-entries.js +72 -32
- package/dist/navigation/helpers/get-parent-entry.js +16 -12
- package/dist/navigation/helpers/get-tag-entries.js +56 -29
- package/dist/navigation/helpers/get-tag.js +22 -23
- package/dist/navigation/helpers/get-x-keys.js +13 -9
- package/dist/navigation/helpers/traverse-description.js +90 -72
- package/dist/navigation/helpers/traverse-document.js +111 -98
- package/dist/navigation/helpers/traverse-examples.js +35 -31
- package/dist/navigation/helpers/traverse-paths.js +118 -106
- package/dist/navigation/helpers/traverse-schemas.js +65 -64
- package/dist/navigation/helpers/traverse-tags.js +158 -129
- package/dist/navigation/helpers/traverse-webhooks.js +96 -90
- package/dist/navigation/helpers/update-order-ids.js +59 -51
- package/dist/navigation/helpers/utils.js +71 -21
- package/dist/navigation/index.js +5 -13
- package/dist/navigation/types.js +1 -1
- package/dist/persistence/index.js +283 -285
- package/dist/persistence/indexdb.js +263 -126
- package/dist/plugins/bundler/helpers.js +21 -12
- package/dist/plugins/bundler/index.d.ts +7 -0
- package/dist/plugins/bundler/index.d.ts.map +1 -1
- package/dist/plugins/bundler/index.js +305 -171
- package/dist/plugins/client/index.js +1 -5
- package/dist/plugins/client/persistence.js +95 -90
- package/dist/resolve.js +18 -25
- package/dist/schemas/compose.js +6 -7
- package/dist/schemas/extensions/document/x-internal.js +3 -7
- package/dist/schemas/extensions/document/x-scalar-environments.js +16 -22
- package/dist/schemas/extensions/document/x-scalar-icon.js +3 -7
- package/dist/schemas/extensions/document/x-scalar-ignore.js +3 -7
- package/dist/schemas/extensions/document/x-scalar-is-dirty.js +21 -8
- package/dist/schemas/extensions/document/x-scalar-original-document-hash.js +17 -8
- package/dist/schemas/extensions/document/x-scalar-registry-meta.js +15 -21
- package/dist/schemas/extensions/document/x-scalar-sdk-installation.js +5 -13
- package/dist/schemas/extensions/document/x-scalar-watch-mode.js +4 -8
- package/dist/schemas/extensions/document/x-tags.js +3 -7
- package/dist/schemas/extensions/example/x-disabled.js +17 -7
- package/dist/schemas/extensions/general/x-scalar-active-environment.js +4 -7
- package/dist/schemas/extensions/general/x-scalar-cookies.js +9 -14
- package/dist/schemas/extensions/general/x-scalar-order.js +8 -7
- package/dist/schemas/extensions/operation/index.js +4 -23
- package/dist/schemas/extensions/operation/x-badge.js +42 -50
- package/dist/schemas/extensions/operation/x-code-samples.js +8 -12
- package/dist/schemas/extensions/operation/x-draft-examples.js +3 -7
- package/dist/schemas/extensions/operation/x-post-response.js +18 -7
- package/dist/schemas/extensions/operation/x-scalar-disable-parameters.js +57 -13
- package/dist/schemas/extensions/operation/x-scalar-selected-content-type.js +9 -7
- package/dist/schemas/extensions/operation/x-scalar-stability.js +15 -14
- package/dist/schemas/extensions/parameter/x-global.js +12 -7
- package/dist/schemas/extensions/schema/x-additional-properties-name.js +10 -7
- package/dist/schemas/extensions/schema/x-enum-descriptions.js +17 -12
- package/dist/schemas/extensions/schema/x-enum-varnames.js +21 -8
- package/dist/schemas/extensions/schema/x-examples.js +3 -7
- package/dist/schemas/extensions/schema/x-variable.js +3 -7
- package/dist/schemas/extensions/security/index.js +1 -1
- package/dist/schemas/extensions/security/x-default-scopes.js +16 -7
- package/dist/schemas/extensions/security/x-scalar-credentials-location.js +16 -7
- package/dist/schemas/extensions/security/x-scalar-security-body.js +14 -7
- package/dist/schemas/extensions/security/x-scalar-security-query.js +14 -7
- package/dist/schemas/extensions/security/x-scalar-security-secrets.js +66 -37
- package/dist/schemas/extensions/security/x-tokenName.js +11 -7
- package/dist/schemas/extensions/security/x-use-pkce.js +6 -10
- package/dist/schemas/extensions/server/x-scalar-selected-server.js +3 -7
- package/dist/schemas/extensions/tag/index.js +1 -1
- package/dist/schemas/extensions/tag/x-display-name.js +11 -7
- package/dist/schemas/extensions/tag/x-tag-groups.js +13 -15
- package/dist/schemas/extensions/workspace/index.js +2 -11
- package/dist/schemas/extensions/workspace/x-scalar-active-proxy.js +13 -7
- package/dist/schemas/extensions/workspace/x-scalar-tabs.js +15 -13
- package/dist/schemas/extensions.js +11 -15
- package/dist/schemas/inmemory-workspace.d.ts +6 -0
- package/dist/schemas/inmemory-workspace.d.ts.map +1 -1
- package/dist/schemas/inmemory-workspace.js +13 -21
- package/dist/schemas/navigation.js +48 -85
- package/dist/schemas/reference-config/appearance.js +15 -22
- package/dist/schemas/reference-config/features.js +14 -21
- package/dist/schemas/reference-config/index.d.ts +2 -0
- package/dist/schemas/reference-config/index.d.ts.map +1 -1
- package/dist/schemas/reference-config/index.js +42 -44
- package/dist/schemas/reference-config/meta.js +11 -18
- package/dist/schemas/reference-config/routing.js +7 -14
- package/dist/schemas/reference-config/settings.d.ts +2 -0
- package/dist/schemas/reference-config/settings.d.ts.map +1 -1
- package/dist/schemas/reference-config/settings.js +10 -17
- package/dist/schemas/typebox-coerce.js +23 -6
- package/dist/schemas/v3.1/strict/callback.js +6 -12
- package/dist/schemas/v3.1/strict/components.js +26 -48
- package/dist/schemas/v3.1/strict/contact.js +9 -12
- package/dist/schemas/v3.1/strict/discriminator.js +11 -10
- package/dist/schemas/v3.1/strict/encoding.js +15 -12
- package/dist/schemas/v3.1/strict/example.js +11 -13
- package/dist/schemas/v3.1/strict/external-documentation.js +7 -10
- package/dist/schemas/v3.1/strict/header.js +27 -28
- package/dist/schemas/v3.1/strict/info.js +10 -16
- package/dist/schemas/v3.1/strict/license.js +9 -12
- package/dist/schemas/v3.1/strict/link.js +22 -19
- package/dist/schemas/v3.1/strict/media-type.js +17 -16
- package/dist/schemas/v3.1/strict/oauth-flow.js +28 -62
- package/dist/schemas/v3.1/strict/oauthflows.js +14 -20
- package/dist/schemas/v3.1/strict/openapi-document.d.ts +70 -0
- package/dist/schemas/v3.1/strict/openapi-document.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/openapi-document.js +126 -210
- package/dist/schemas/v3.1/strict/operation.js +16 -43
- package/dist/schemas/v3.1/strict/parameter.d.ts +6 -0
- package/dist/schemas/v3.1/strict/parameter.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/parameter.js +29 -35
- package/dist/schemas/v3.1/strict/path-item.js +36 -40
- package/dist/schemas/v3.1/strict/paths.js +8 -11
- package/dist/schemas/v3.1/strict/ref-definitions.js +76 -100
- package/dist/schemas/v3.1/strict/reference.js +18 -21
- package/dist/schemas/v3.1/strict/request-body.js +8 -16
- package/dist/schemas/v3.1/strict/response.js +12 -16
- package/dist/schemas/v3.1/strict/responses.js +13 -11
- package/dist/schemas/v3.1/strict/schema.js +149 -157
- package/dist/schemas/v3.1/strict/security-requirement.js +13 -12
- package/dist/schemas/v3.1/strict/security-scheme.js +29 -41
- package/dist/schemas/v3.1/strict/server-variable.js +9 -12
- package/dist/schemas/v3.1/strict/server.js +10 -13
- package/dist/schemas/v3.1/strict/tag.js +11 -20
- package/dist/schemas/v3.1/strict/type-guards.js +20 -20
- package/dist/schemas/v3.1/strict/xml.js +17 -16
- package/dist/schemas/workspace-specification/index.js +11 -23
- package/dist/schemas/workspace-specification/info.js +4 -8
- package/dist/schemas/workspace.d.ts +6 -0
- package/dist/schemas/workspace.d.ts.map +1 -1
- package/dist/schemas/workspace.js +25 -51
- package/dist/schemas.js +2 -6
- package/dist/server.js +286 -176
- package/dist/workspace-plugin.js +1 -1
- package/package.json +13 -19
- package/dist/client.js.map +0 -7
- package/dist/entities/auth/index.js.map +0 -7
- package/dist/entities/auth/schema.js.map +0 -7
- package/dist/entities/history/index.js.map +0 -7
- package/dist/entities/history/schema.js.map +0 -7
- package/dist/events/bus.js.map +0 -7
- package/dist/events/definitions/analytics.js.map +0 -7
- package/dist/events/definitions/auth.js.map +0 -7
- package/dist/events/definitions/common.js.map +0 -7
- package/dist/events/definitions/cookie.js.map +0 -7
- package/dist/events/definitions/document.js.map +0 -7
- package/dist/events/definitions/environment.js.map +0 -7
- package/dist/events/definitions/hooks.js.map +0 -7
- package/dist/events/definitions/index.js.map +0 -7
- package/dist/events/definitions/meta.js.map +0 -7
- package/dist/events/definitions/operation.js.map +0 -7
- package/dist/events/definitions/server.js.map +0 -7
- package/dist/events/definitions/tabs.js.map +0 -7
- package/dist/events/definitions/tag.js.map +0 -7
- package/dist/events/definitions/ui.js.map +0 -7
- package/dist/events/definitions/workspace.js.map +0 -7
- package/dist/events/index.js.map +0 -7
- package/dist/events/listeners.js.map +0 -7
- package/dist/events/old-definitions.js.map +0 -7
- package/dist/helpers/apply-selective-updates.d.ts +0 -19
- package/dist/helpers/apply-selective-updates.d.ts.map +0 -1
- package/dist/helpers/apply-selective-updates.js +0 -37
- package/dist/helpers/apply-selective-updates.js.map +0 -7
- package/dist/helpers/deep-clone.js.map +0 -7
- package/dist/helpers/detect-changes-proxy.js.map +0 -7
- package/dist/helpers/general.js.map +0 -7
- package/dist/helpers/generate-unique-value.js.map +0 -7
- package/dist/helpers/get-fetch.js.map +0 -7
- package/dist/helpers/get-resolved-ref.js.map +0 -7
- package/dist/helpers/is-non-optional-security-requirement.js.map +0 -7
- package/dist/helpers/merge-object.js.map +0 -7
- package/dist/helpers/overrides-proxy.js.map +0 -7
- package/dist/helpers/unpack-proxy.js.map +0 -7
- package/dist/mutators/auth.js.map +0 -7
- package/dist/mutators/cookie.js.map +0 -7
- package/dist/mutators/document.js.map +0 -7
- package/dist/mutators/environment.js.map +0 -7
- package/dist/mutators/helpers.js.map +0 -7
- package/dist/mutators/index.js.map +0 -7
- package/dist/mutators/operation/body.js.map +0 -7
- package/dist/mutators/operation/extensions.js.map +0 -7
- package/dist/mutators/operation/helpers/fetch-request-to-har.js.map +0 -7
- package/dist/mutators/operation/helpers/fetch-response-to-har.js.map +0 -7
- package/dist/mutators/operation/helpers/get-parameter-position.js.map +0 -7
- package/dist/mutators/operation/helpers/har-to-operation.js.map +0 -7
- package/dist/mutators/operation/helpers/sync-path-parameters.js.map +0 -7
- package/dist/mutators/operation/history.js.map +0 -7
- package/dist/mutators/operation/index.js.map +0 -7
- package/dist/mutators/operation/operation.js.map +0 -7
- package/dist/mutators/operation/parameters.js.map +0 -7
- package/dist/mutators/server.js.map +0 -7
- package/dist/mutators/tabs.js.map +0 -7
- package/dist/mutators/tag.js.map +0 -7
- package/dist/mutators/workspace.js.map +0 -7
- package/dist/navigation/get-navigation-options.js.map +0 -7
- package/dist/navigation/helpers/get-openapi-object.js.map +0 -7
- package/dist/navigation/helpers/get-operation-entries.js.map +0 -7
- package/dist/navigation/helpers/get-parent-entry.js.map +0 -7
- package/dist/navigation/helpers/get-tag-entries.js.map +0 -7
- package/dist/navigation/helpers/get-tag.js.map +0 -7
- package/dist/navigation/helpers/get-x-keys.js.map +0 -7
- package/dist/navigation/helpers/traverse-description.js.map +0 -7
- package/dist/navigation/helpers/traverse-document.js.map +0 -7
- package/dist/navigation/helpers/traverse-examples.js.map +0 -7
- package/dist/navigation/helpers/traverse-paths.js.map +0 -7
- package/dist/navigation/helpers/traverse-schemas.js.map +0 -7
- package/dist/navigation/helpers/traverse-tags.js.map +0 -7
- package/dist/navigation/helpers/traverse-webhooks.js.map +0 -7
- package/dist/navigation/helpers/update-order-ids.js.map +0 -7
- package/dist/navigation/helpers/utils.js.map +0 -7
- package/dist/navigation/index.js.map +0 -7
- package/dist/navigation/types.js.map +0 -7
- package/dist/persistence/index.js.map +0 -7
- package/dist/persistence/indexdb.js.map +0 -7
- package/dist/plugins/bundler/helpers.js.map +0 -7
- package/dist/plugins/bundler/index.js.map +0 -7
- package/dist/plugins/client/index.js.map +0 -7
- package/dist/plugins/client/persistence.js.map +0 -7
- package/dist/resolve.js.map +0 -7
- package/dist/schemas/compose.js.map +0 -7
- package/dist/schemas/extensions/document/x-internal.js.map +0 -7
- package/dist/schemas/extensions/document/x-scalar-environments.js.map +0 -7
- package/dist/schemas/extensions/document/x-scalar-icon.js.map +0 -7
- package/dist/schemas/extensions/document/x-scalar-ignore.js.map +0 -7
- package/dist/schemas/extensions/document/x-scalar-is-dirty.js.map +0 -7
- package/dist/schemas/extensions/document/x-scalar-original-document-hash.js.map +0 -7
- package/dist/schemas/extensions/document/x-scalar-registry-meta.js.map +0 -7
- package/dist/schemas/extensions/document/x-scalar-sdk-installation.js.map +0 -7
- package/dist/schemas/extensions/document/x-scalar-watch-mode.js.map +0 -7
- package/dist/schemas/extensions/document/x-tags.js.map +0 -7
- package/dist/schemas/extensions/example/x-disabled.js.map +0 -7
- package/dist/schemas/extensions/general/x-scalar-active-environment.js.map +0 -7
- package/dist/schemas/extensions/general/x-scalar-cookies.js.map +0 -7
- package/dist/schemas/extensions/general/x-scalar-order.js.map +0 -7
- package/dist/schemas/extensions/operation/index.js.map +0 -7
- package/dist/schemas/extensions/operation/x-badge.js.map +0 -7
- package/dist/schemas/extensions/operation/x-code-samples.js.map +0 -7
- package/dist/schemas/extensions/operation/x-draft-examples.js.map +0 -7
- package/dist/schemas/extensions/operation/x-post-response.js.map +0 -7
- package/dist/schemas/extensions/operation/x-scalar-disable-parameters.js.map +0 -7
- package/dist/schemas/extensions/operation/x-scalar-selected-content-type.js.map +0 -7
- package/dist/schemas/extensions/operation/x-scalar-stability.js.map +0 -7
- package/dist/schemas/extensions/parameter/x-global.js.map +0 -7
- package/dist/schemas/extensions/schema/x-additional-properties-name.js.map +0 -7
- package/dist/schemas/extensions/schema/x-enum-descriptions.js.map +0 -7
- package/dist/schemas/extensions/schema/x-enum-varnames.js.map +0 -7
- package/dist/schemas/extensions/schema/x-examples.js.map +0 -7
- package/dist/schemas/extensions/schema/x-variable.js.map +0 -7
- package/dist/schemas/extensions/security/index.js.map +0 -7
- package/dist/schemas/extensions/security/x-default-scopes.js.map +0 -7
- package/dist/schemas/extensions/security/x-scalar-credentials-location.js.map +0 -7
- package/dist/schemas/extensions/security/x-scalar-security-body.js.map +0 -7
- package/dist/schemas/extensions/security/x-scalar-security-query.js.map +0 -7
- package/dist/schemas/extensions/security/x-scalar-security-secrets.js.map +0 -7
- package/dist/schemas/extensions/security/x-tokenName.js.map +0 -7
- package/dist/schemas/extensions/security/x-use-pkce.js.map +0 -7
- package/dist/schemas/extensions/server/x-scalar-selected-server.js.map +0 -7
- package/dist/schemas/extensions/tag/index.js.map +0 -7
- package/dist/schemas/extensions/tag/x-display-name.js.map +0 -7
- package/dist/schemas/extensions/tag/x-tag-groups.js.map +0 -7
- package/dist/schemas/extensions/workspace/index.js.map +0 -7
- package/dist/schemas/extensions/workspace/x-scalar-active-proxy.js.map +0 -7
- package/dist/schemas/extensions/workspace/x-scalar-tabs.js.map +0 -7
- package/dist/schemas/extensions.js.map +0 -7
- package/dist/schemas/inmemory-workspace.js.map +0 -7
- package/dist/schemas/navigation.js.map +0 -7
- package/dist/schemas/reference-config/appearance.js.map +0 -7
- package/dist/schemas/reference-config/features.js.map +0 -7
- package/dist/schemas/reference-config/index.js.map +0 -7
- package/dist/schemas/reference-config/meta.js.map +0 -7
- package/dist/schemas/reference-config/routing.js.map +0 -7
- package/dist/schemas/reference-config/settings.js.map +0 -7
- package/dist/schemas/typebox-coerce.js.map +0 -7
- package/dist/schemas/v3.1/strict/callback.js.map +0 -7
- package/dist/schemas/v3.1/strict/components.js.map +0 -7
- package/dist/schemas/v3.1/strict/contact.js.map +0 -7
- package/dist/schemas/v3.1/strict/discriminator.js.map +0 -7
- package/dist/schemas/v3.1/strict/encoding.js.map +0 -7
- package/dist/schemas/v3.1/strict/example.js.map +0 -7
- package/dist/schemas/v3.1/strict/external-documentation.js.map +0 -7
- package/dist/schemas/v3.1/strict/header.js.map +0 -7
- package/dist/schemas/v3.1/strict/info.js.map +0 -7
- package/dist/schemas/v3.1/strict/license.js.map +0 -7
- package/dist/schemas/v3.1/strict/link.js.map +0 -7
- package/dist/schemas/v3.1/strict/media-type.js.map +0 -7
- package/dist/schemas/v3.1/strict/oauth-flow.js.map +0 -7
- package/dist/schemas/v3.1/strict/oauthflows.js.map +0 -7
- package/dist/schemas/v3.1/strict/openapi-document.js.map +0 -7
- package/dist/schemas/v3.1/strict/operation.js.map +0 -7
- package/dist/schemas/v3.1/strict/parameter.js.map +0 -7
- package/dist/schemas/v3.1/strict/path-item.js.map +0 -7
- package/dist/schemas/v3.1/strict/paths.js.map +0 -7
- package/dist/schemas/v3.1/strict/ref-definitions.js.map +0 -7
- package/dist/schemas/v3.1/strict/reference.js.map +0 -7
- package/dist/schemas/v3.1/strict/request-body.js.map +0 -7
- package/dist/schemas/v3.1/strict/response.js.map +0 -7
- package/dist/schemas/v3.1/strict/responses.js.map +0 -7
- package/dist/schemas/v3.1/strict/schema.js.map +0 -7
- package/dist/schemas/v3.1/strict/security-requirement.js.map +0 -7
- package/dist/schemas/v3.1/strict/security-scheme.js.map +0 -7
- package/dist/schemas/v3.1/strict/server-variable.js.map +0 -7
- package/dist/schemas/v3.1/strict/server.js.map +0 -7
- package/dist/schemas/v3.1/strict/tag.js.map +0 -7
- package/dist/schemas/v3.1/strict/type-guards.js.map +0 -7
- package/dist/schemas/v3.1/strict/xml.js.map +0 -7
- package/dist/schemas/workspace-specification/index.js.map +0 -7
- package/dist/schemas/workspace-specification/info.js.map +0 -7
- package/dist/schemas/workspace.js.map +0 -7
- package/dist/schemas.js.map +0 -7
- package/dist/server.js.map +0 -7
- package/dist/workspace-plugin.js.map +0 -7
|
@@ -1,30 +1,17 @@
|
|
|
1
|
-
import { Type } from
|
|
2
|
-
import { compose } from
|
|
3
|
-
import { XInternalSchema } from
|
|
4
|
-
import { XScalarIgnoreSchema } from
|
|
5
|
-
import { XBadgesSchema } from
|
|
6
|
-
import { XCodeSamplesSchema } from
|
|
7
|
-
import { XDraftExamplesSchema } from
|
|
8
|
-
import { XPostResponseSchema } from
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
} from
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
} from "../../../schemas/extensions/server/x-scalar-selected-server.js";
|
|
16
|
-
import {
|
|
17
|
-
CallbackObjectRef,
|
|
18
|
-
ExternalDocumentationObjectRef,
|
|
19
|
-
ParameterObjectRef,
|
|
20
|
-
RequestBodyObjectRef,
|
|
21
|
-
ResponsesObjectRef,
|
|
22
|
-
SecurityRequirementObjectRef,
|
|
23
|
-
ServerObjectRef
|
|
24
|
-
} from "./ref-definitions.js";
|
|
25
|
-
import { reference } from "./reference.js";
|
|
26
|
-
const OperationObjectSchemaDefinition = compose(
|
|
27
|
-
Type.Object({
|
|
1
|
+
import { Type } from '@scalar/typebox';
|
|
2
|
+
import { compose } from '../../../schemas/compose.js';
|
|
3
|
+
import { XInternalSchema } from '../../../schemas/extensions/document/x-internal.js';
|
|
4
|
+
import { XScalarIgnoreSchema } from '../../../schemas/extensions/document/x-scalar-ignore.js';
|
|
5
|
+
import { XBadgesSchema } from '../../../schemas/extensions/operation/x-badge.js';
|
|
6
|
+
import { XCodeSamplesSchema } from '../../../schemas/extensions/operation/x-code-samples.js';
|
|
7
|
+
import { XDraftExamplesSchema } from '../../../schemas/extensions/operation/x-draft-examples.js';
|
|
8
|
+
import { XPostResponseSchema } from '../../../schemas/extensions/operation/x-post-response.js';
|
|
9
|
+
import { XScalarDisableParametersSchema, } from '../../../schemas/extensions/operation/x-scalar-disable-parameters.js';
|
|
10
|
+
import { XScalarStabilitySchema } from '../../../schemas/extensions/operation/x-scalar-stability.js';
|
|
11
|
+
import { XScalarSelectedServerSchema, } from '../../../schemas/extensions/server/x-scalar-selected-server.js';
|
|
12
|
+
import { CallbackObjectRef, ExternalDocumentationObjectRef, ParameterObjectRef, RequestBodyObjectRef, ResponsesObjectRef, SecurityRequirementObjectRef, ServerObjectRef, } from './ref-definitions.js';
|
|
13
|
+
import { reference } from './reference.js';
|
|
14
|
+
export const OperationObjectSchemaDefinition = compose(Type.Object({
|
|
28
15
|
/** A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier. */
|
|
29
16
|
tags: Type.Optional(Type.Array(Type.String())),
|
|
30
17
|
/** A short summary of what the operation does. */
|
|
@@ -48,19 +35,5 @@ const OperationObjectSchemaDefinition = compose(
|
|
|
48
35
|
/** An alternative servers array to service this operation. If a servers array is specified at the Path Item Object or OpenAPI Object level, it will be overridden by this value. */
|
|
49
36
|
servers: Type.Optional(Type.Array(ServerObjectRef)),
|
|
50
37
|
/** A map of possible out-of band callbacks related to the parent operation. The key is a unique identifier for the Callback Object. Each value in the map is a Callback Object that describes a request that may be initiated by the API provider and the expected responses. */
|
|
51
|
-
callbacks: Type.Optional(Type.Record(Type.String(), Type.Union([CallbackObjectRef, reference(CallbackObjectRef)])))
|
|
52
|
-
|
|
53
|
-
XBadgesSchema,
|
|
54
|
-
XInternalSchema,
|
|
55
|
-
XScalarIgnoreSchema,
|
|
56
|
-
XCodeSamplesSchema,
|
|
57
|
-
XScalarStabilitySchema,
|
|
58
|
-
XScalarDisableParametersSchema,
|
|
59
|
-
XPostResponseSchema,
|
|
60
|
-
XDraftExamplesSchema,
|
|
61
|
-
XScalarSelectedServerSchema
|
|
62
|
-
);
|
|
63
|
-
export {
|
|
64
|
-
OperationObjectSchemaDefinition
|
|
65
|
-
};
|
|
66
|
-
//# sourceMappingURL=operation.js.map
|
|
38
|
+
callbacks: Type.Optional(Type.Record(Type.String(), Type.Union([CallbackObjectRef, reference(CallbackObjectRef)]))),
|
|
39
|
+
}), XBadgesSchema, XInternalSchema, XScalarIgnoreSchema, XCodeSamplesSchema, XScalarStabilitySchema, XScalarDisableParametersSchema, XPostResponseSchema, XDraftExamplesSchema, XScalarSelectedServerSchema);
|
|
@@ -20,6 +20,8 @@ type ParameterObjectBase = {
|
|
|
20
20
|
deprecated?: boolean;
|
|
21
21
|
/** If true, clients MAY pass a zero-length string value in place of parameters that would otherwise be omitted entirely, which the server SHOULD interpret as the parameter being unused. Default value is false. If style is used, and if behavior is n/a (cannot be serialized), the value of allowEmptyValue SHALL be ignored. Interactions between this field and the parameter's Schema Object are implementation-defined. This field is valid only for query parameters. Use of this field is NOT RECOMMENDED, and it is likely to be removed in a later revision. */
|
|
22
22
|
allowEmptyValue?: boolean;
|
|
23
|
+
/** Determines whether the parameter value SHOULD allow reserved characters without percent-encoding. This field is valid only for query parameters. Default value is false. */
|
|
24
|
+
allowReserved?: boolean;
|
|
23
25
|
/**
|
|
24
26
|
* OpenAPI extension used by the api-client application to determine if a parameter is considered global in scope
|
|
25
27
|
* for the entire workspace. When set, this parameter will be injected into every request automatically.
|
|
@@ -64,6 +66,8 @@ export declare const ParameterObjectSchemaDefinition: import("@scalar/typebox").
|
|
|
64
66
|
deprecated: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
65
67
|
/** If true, clients MAY pass a zero-length string value in place of parameters that would otherwise be omitted entirely, which the server SHOULD interpret as the parameter being unused. Default value is false. If style is used, and if behavior is n/a (cannot be serialized), the value of allowEmptyValue SHALL be ignored. Interactions between this field and the parameter's Schema Object are implementation-defined. This field is valid only for query parameters. Use of this field is NOT RECOMMENDED, and it is likely to be removed in a later revision. */
|
|
66
68
|
allowEmptyValue: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
69
|
+
/** When this is true, parameter values are serialized using reserved expansion, as defined by RFC6570, which allows RFC3986's reserved character set, as well as percent-encoded triples, to pass through unchanged, while still percent-encoding all other disallowed characters (including % outside of percent-encoded triples). Applications are still responsible for percent-encoding reserved characters that are not allowed in the query string ([, ], #), or have a special meaning in application/x-www-form-urlencoded (-, &, +); see Appendices C and E for details. This field only applies to parameters with an in value of query. The default value is false. */
|
|
70
|
+
allowReserved: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
67
71
|
}>, import("@scalar/typebox").TObject<{
|
|
68
72
|
'x-global': import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
69
73
|
}>, import("@scalar/typebox").TObject<{
|
|
@@ -115,6 +119,8 @@ export declare const ParameterObjectSchemaDefinition: import("@scalar/typebox").
|
|
|
115
119
|
deprecated: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
116
120
|
/** If true, clients MAY pass a zero-length string value in place of parameters that would otherwise be omitted entirely, which the server SHOULD interpret as the parameter being unused. Default value is false. If style is used, and if behavior is n/a (cannot be serialized), the value of allowEmptyValue SHALL be ignored. Interactions between this field and the parameter's Schema Object are implementation-defined. This field is valid only for query parameters. Use of this field is NOT RECOMMENDED, and it is likely to be removed in a later revision. */
|
|
117
121
|
allowEmptyValue: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
122
|
+
/** When this is true, parameter values are serialized using reserved expansion, as defined by RFC6570, which allows RFC3986's reserved character set, as well as percent-encoded triples, to pass through unchanged, while still percent-encoding all other disallowed characters (including % outside of percent-encoded triples). Applications are still responsible for percent-encoding reserved characters that are not allowed in the query string ([, ], #), or have a special meaning in application/x-www-form-urlencoded (-, &, +); see Appendices C and E for details. This field only applies to parameters with an in value of query. The default value is false. */
|
|
123
|
+
allowReserved: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
118
124
|
}>, import("@scalar/typebox").TObject<{
|
|
119
125
|
'x-global': import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
120
126
|
}>, import("@scalar/typebox").TObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parameter.d.ts","sourceRoot":"","sources":["../../../../src/schemas/v3.1/strict/parameter.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,SAAS,EAAmB,MAAM,0CAA0C,CAAA;AAC1F,OAAO,EAAE,KAAK,aAAa,EAAuB,MAAM,+CAA+C,CAAA;AAEvG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAEvE,OAAO,EAAE,KAAK,aAAa,EAAa,MAAM,iCAAiC,CAAA;AAC/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;
|
|
1
|
+
{"version":3,"file":"parameter.d.ts","sourceRoot":"","sources":["../../../../src/schemas/v3.1/strict/parameter.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,SAAS,EAAmB,MAAM,0CAA0C,CAAA;AAC1F,OAAO,EAAE,KAAK,aAAa,EAAuB,MAAM,+CAA+C,CAAA;AAEvG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAEvE,OAAO,EAAE,KAAK,aAAa,EAAa,MAAM,iCAAiC,CAAA;AAC/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AA2BhE,KAAK,mBAAmB,GAAG;IACzB;;;oGAGgG;IAChG,IAAI,EAAE,MAAM,CAAA;IACZ,0GAA0G;IAC1G,EAAE,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAA;IAC1C,4IAA4I;IAC5I,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,mNAAmN;IACnN,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,gHAAgH;IAChH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,4iBAA4iB;IAC5iB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,+KAA+K;IAC/K,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,GAAG,SAAS,GACX,aAAa,CAAA;AAkBf,MAAM,MAAM,yBAAyB,GAAG,mBAAmB,GAAG;IAC5D,qHAAqH;IACrH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,+QAA+Q;IAC/Q,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,wDAAwD;IACxD,MAAM,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,CAAA;IACpC,kIAAkI;IAClI,OAAO,CAAC,EAAE,GAAG,CAAA;IACb,mIAAmI;IACnI,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC,CAAA;CACxD,CAAA;AASD,MAAM,MAAM,0BAA0B,GAAG,mBAAmB,GAAG;IAC7D,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;CAC1C,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B;IAhGxC;;;oGAGgG;;IAEhG,0GAA0G;;IAE1G,4IAA4I;;IAE5I,mNAAmN;;IAEnN,gHAAgH;;IAEhH,4iBAA4iB;;IAE5iB,kpBAAkpB;;;;;;;;;IAqClpB,qHAAqH;;IAErH,+QAA+Q;;IAE/Q,wDAAwD;;;;;;;;;;;IAExD,kIAAkI;;IAElI,mIAAmI;;;;;;;;;;;;IA5DnI;;;oGAGgG;;IAEhG,0GAA0G;;IAE1G,4IAA4I;;IAE5I,mNAAmN;;IAEnN,gHAAgH;;IAEhH,4iBAA4iB;;IAE5iB,kpBAAkpB;;;;;;;;;;MAoFppB,CAAA;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,yBAAyB,GAAG,0BAA0B,CAAA"}
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import { Type } from
|
|
2
|
-
import { compose } from
|
|
3
|
-
import { XInternalSchema } from
|
|
4
|
-
import { XScalarIgnoreSchema } from
|
|
5
|
-
import { XGlobal } from
|
|
6
|
-
import { ExampleObjectRef, MediaTypeObjectRef, SchemaObjectRef } from
|
|
7
|
-
import { reference } from
|
|
8
|
-
const ParameterObjectBaseSchema = compose(
|
|
9
|
-
Type.Object({
|
|
1
|
+
import { Type } from '@scalar/typebox';
|
|
2
|
+
import { compose } from '../../../schemas/compose.js';
|
|
3
|
+
import { XInternalSchema } from '../../../schemas/extensions/document/x-internal.js';
|
|
4
|
+
import { XScalarIgnoreSchema } from '../../../schemas/extensions/document/x-scalar-ignore.js';
|
|
5
|
+
import { XGlobal } from '../../../schemas/extensions/parameter/x-global.js';
|
|
6
|
+
import { ExampleObjectRef, MediaTypeObjectRef, SchemaObjectRef } from '../../../schemas/v3.1/strict/ref-definitions.js';
|
|
7
|
+
import { reference } from '../../../schemas/v3.1/strict/reference.js';
|
|
8
|
+
const ParameterObjectBaseSchema = compose(Type.Object({
|
|
10
9
|
/** REQUIRED. The name of the parameter. Parameter names are case sensitive.
|
|
11
10
|
* - If in is "path", the name field MUST correspond to a template expression occurring within the path field in the Paths Object. See Path Templating for further information.
|
|
12
11
|
* - If in is "header" and the name field is "Accept", "Content-Type" or "Authorization", the parameter definition SHALL be ignored.
|
|
13
12
|
* - For all other cases, the name corresponds to the parameter name used by the in field. */
|
|
14
13
|
name: Type.String(),
|
|
15
14
|
/** REQUIRED. The location of the parameter. Possible values are "query", "header", "path" or "cookie". */
|
|
16
|
-
in: Type.Union([Type.Literal(
|
|
15
|
+
in: Type.Union([Type.Literal('query'), Type.Literal('header'), Type.Literal('path'), Type.Literal('cookie')]),
|
|
17
16
|
/** A brief description of the parameter. This could contain examples of use. CommonMark syntax MAY be used for rich text representation. */
|
|
18
17
|
description: Type.Optional(Type.String()),
|
|
19
18
|
/** Determines whether this parameter is mandatory. If the parameter location is "path", this field is REQUIRED and its value MUST be true. Otherwise, the field MAY be included and its default value is false. */
|
|
@@ -21,15 +20,11 @@ const ParameterObjectBaseSchema = compose(
|
|
|
21
20
|
/** Specifies that a parameter is deprecated and SHOULD be transitioned out of usage. Default value is false. */
|
|
22
21
|
deprecated: Type.Optional(Type.Boolean()),
|
|
23
22
|
/** If true, clients MAY pass a zero-length string value in place of parameters that would otherwise be omitted entirely, which the server SHOULD interpret as the parameter being unused. Default value is false. If style is used, and if behavior is n/a (cannot be serialized), the value of allowEmptyValue SHALL be ignored. Interactions between this field and the parameter's Schema Object are implementation-defined. This field is valid only for query parameters. Use of this field is NOT RECOMMENDED, and it is likely to be removed in a later revision. */
|
|
24
|
-
allowEmptyValue: Type.Optional(Type.Boolean())
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
);
|
|
30
|
-
const ParameterObjectWithSchemaSchema = compose(
|
|
31
|
-
ParameterObjectBaseSchema,
|
|
32
|
-
Type.Object({
|
|
23
|
+
allowEmptyValue: Type.Optional(Type.Boolean()),
|
|
24
|
+
/** When this is true, parameter values are serialized using reserved expansion, as defined by RFC6570, which allows RFC3986's reserved character set, as well as percent-encoded triples, to pass through unchanged, while still percent-encoding all other disallowed characters (including % outside of percent-encoded triples). Applications are still responsible for percent-encoding reserved characters that are not allowed in the query string ([, ], #), or have a special meaning in application/x-www-form-urlencoded (-, &, +); see Appendices C and E for details. This field only applies to parameters with an in value of query. The default value is false. */
|
|
25
|
+
allowReserved: Type.Optional(Type.Boolean()),
|
|
26
|
+
}), XGlobal, XInternalSchema, XScalarIgnoreSchema);
|
|
27
|
+
const ParameterObjectWithSchemaSchema = compose(ParameterObjectBaseSchema, Type.Object({
|
|
33
28
|
/** Describes how the header value will be serialized. The default (and only legal value for headers) is "simple". */
|
|
34
29
|
style: Type.Optional(Type.String()),
|
|
35
30
|
/** When this is true, header values of type array or object generate a single header whose value is a comma-separated list of the array items or key-value pairs of the map, see Style Examples. For other data types this field has no effect. The default value is false. */
|
|
@@ -39,20 +34,19 @@ const ParameterObjectWithSchemaSchema = compose(
|
|
|
39
34
|
/** Example of the header's potential value; see Working With Examples. https://swagger.io/specification/#working-with-examples */
|
|
40
35
|
example: Type.Optional(Type.Any()),
|
|
41
36
|
/** Examples of the header's potential value; see Working With Examples. https://swagger.io/specification/#working-with-examples */
|
|
42
|
-
examples: Type.Optional(Type.Record(Type.String(), Type.Union([ExampleObjectRef, reference(ExampleObjectRef)])))
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
37
|
+
examples: Type.Optional(Type.Record(Type.String(), Type.Union([ExampleObjectRef, reference(ExampleObjectRef)]))),
|
|
38
|
+
}));
|
|
39
|
+
const ParameterObjectWithContentSchema = compose(ParameterObjectBaseSchema, Type.Object({
|
|
40
|
+
content: Type.Optional(Type.Record(Type.String(), MediaTypeObjectRef)),
|
|
41
|
+
}));
|
|
42
|
+
/**
|
|
43
|
+
* Describes a single operation parameter.
|
|
44
|
+
*
|
|
45
|
+
* A unique parameter is defined by a combination of a name and location.
|
|
46
|
+
*
|
|
47
|
+
* See Appendix E for a detailed examination of percent-encoding concerns, including interactions with the application/x-www-form-urlencoded query string format.
|
|
48
|
+
*/
|
|
49
|
+
export const ParameterObjectSchemaDefinition = Type.Union([
|
|
50
|
+
ParameterObjectWithSchemaSchema,
|
|
51
|
+
ParameterObjectWithContentSchema,
|
|
54
52
|
]);
|
|
55
|
-
export {
|
|
56
|
-
ParameterObjectSchemaDefinition
|
|
57
|
-
};
|
|
58
|
-
//# sourceMappingURL=parameter.js.map
|
|
@@ -1,41 +1,37 @@
|
|
|
1
|
-
import { Type } from
|
|
2
|
-
import { OperationObjectRef, ParameterObjectRef, ServerObjectRef } from
|
|
3
|
-
import { reference } from
|
|
4
|
-
const PathItemObjectSchemaDefinition = Type.Object({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
1
|
+
import { Type } from '@scalar/typebox';
|
|
2
|
+
import { OperationObjectRef, ParameterObjectRef, ServerObjectRef } from './ref-definitions.js';
|
|
3
|
+
import { reference } from './reference.js';
|
|
4
|
+
export const PathItemObjectSchemaDefinition = Type.Object({
|
|
5
|
+
/**
|
|
6
|
+
* Allows for a referenced definition of this path item. The value MUST be in the form of a URI, and the referenced structure MUST be in the form of a Path Item Object. In case a Path Item Object field appears both in the defined object and the referenced object, the behavior is undefined. See the rules for resolving Relative References.
|
|
7
|
+
*
|
|
8
|
+
* Note: The behavior of $ref with adjacent properties is likely to change in future versions of this specification to bring it into closer alignment with the behavior of the Reference Object.
|
|
9
|
+
*/
|
|
10
|
+
'$ref': Type.Optional(Type.String()),
|
|
11
|
+
/** An optional string summary, intended to apply to all operations in this path. */
|
|
12
|
+
summary: Type.Optional(Type.String()),
|
|
13
|
+
/** An optional string description, intended to apply to all operations in this path. CommonMark syntax MAY be used for rich text representation. */
|
|
14
|
+
description: Type.Optional(Type.String()),
|
|
15
|
+
/** A definition of a GET operation on this path. */
|
|
16
|
+
get: Type.Optional(Type.Union([OperationObjectRef, reference(OperationObjectRef)])),
|
|
17
|
+
/** A definition of a PUT operation on this path. */
|
|
18
|
+
put: Type.Optional(Type.Union([OperationObjectRef, reference(OperationObjectRef)])),
|
|
19
|
+
/** A definition of a POST operation on this path. */
|
|
20
|
+
post: Type.Optional(Type.Union([OperationObjectRef, reference(OperationObjectRef)])),
|
|
21
|
+
/** A definition of a DELETE operation on this path. */
|
|
22
|
+
delete: Type.Optional(Type.Union([OperationObjectRef, reference(OperationObjectRef)])),
|
|
23
|
+
/** A definition of a PATCH operation on this path. */
|
|
24
|
+
patch: Type.Optional(Type.Union([OperationObjectRef, reference(OperationObjectRef)])),
|
|
25
|
+
/** A definition of a CONNECT operation on this path. */
|
|
26
|
+
connect: Type.Optional(Type.Union([OperationObjectRef, reference(OperationObjectRef)])),
|
|
27
|
+
/** A definition of a OPTIONS operation on this path. */
|
|
28
|
+
options: Type.Optional(Type.Union([OperationObjectRef, reference(OperationObjectRef)])),
|
|
29
|
+
/** A definition of a HEAD operation on this path. */
|
|
30
|
+
head: Type.Optional(Type.Union([OperationObjectRef, reference(OperationObjectRef)])),
|
|
31
|
+
/** A definition of a TRACE operation on this path. */
|
|
32
|
+
trace: Type.Optional(Type.Union([OperationObjectRef, reference(OperationObjectRef)])),
|
|
33
|
+
/** An alternative servers array to service all operations in this path. If a servers array is specified at the OpenAPI Object level, it will be overridden by this value. */
|
|
34
|
+
servers: Type.Optional(Type.Array(ServerObjectRef)),
|
|
35
|
+
/** A list of parameters that are applicable for all the operations described under this path. These parameters can be overridden at the operation level, but cannot be removed there. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined in the OpenAPI Object's components.parameters. */
|
|
36
|
+
parameters: Type.Optional(Type.Array(Type.Union([ParameterObjectRef, reference(ParameterObjectRef)]))),
|
|
37
37
|
});
|
|
38
|
-
export {
|
|
39
|
-
PathItemObjectSchemaDefinition
|
|
40
|
-
};
|
|
41
|
-
//# sourceMappingURL=path-item.js.map
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import { Type } from
|
|
2
|
-
import { PathItemObjectRef } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
)
|
|
8
|
-
|
|
9
|
-
PathsObjectSchemaDefinition
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=paths.js.map
|
|
1
|
+
import { Type } from '@scalar/typebox';
|
|
2
|
+
import { PathItemObjectRef } from './ref-definitions.js';
|
|
3
|
+
/**
|
|
4
|
+
* Holds the relative paths to the individual endpoints and their operations. The path is appended to the URL from the Server Object in order to construct the full URL. The Paths Object MAY be empty, due to Access Control List (ACL) constraints.
|
|
5
|
+
*/
|
|
6
|
+
export const PathsObjectSchemaDefinition = Type.Record(Type.String(),
|
|
7
|
+
/** A relative path to an individual endpoint. The field name MUST begin with a forward slash (/). The path is appended (no relative URL resolution) to the expanded URL from the Server Object's url field in order to construct the full URL. Path templating is allowed. When matching URLs, concrete (non-templated) paths would be matched before their templated counterparts. Templated paths with the same hierarchy but different templated names MUST NOT exist as they are identical. In case of ambiguous matching, it's up to the tooling to decide which one to use. */
|
|
8
|
+
PathItemObjectRef);
|
|
@@ -1,101 +1,77 @@
|
|
|
1
|
-
import { Type } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
1
|
+
import { Type } from '@scalar/typebox';
|
|
2
|
+
/**
|
|
3
|
+
* Reference definitions for OpenAPI 3.1 objects.
|
|
4
|
+
* These can be used with Type.Ref to create references to these objects in other schemas.
|
|
5
|
+
*
|
|
6
|
+
* Referencing them this way helps avoid circular dependencies in TypeBox schemas while keeping the overhead performance lower.
|
|
7
|
+
*/
|
|
8
|
+
export const REF_DEFINITIONS = {
|
|
9
|
+
ComponentsObject: 'ComponentsObject',
|
|
10
|
+
SecurityRequirementObject: 'SecurityRequirementObject',
|
|
11
|
+
TagObject: 'TagObject',
|
|
12
|
+
CallbackObject: 'CallbackObject',
|
|
13
|
+
PathsObject: 'PathsObject',
|
|
14
|
+
PathItemObject: 'PathItemObject',
|
|
15
|
+
OperationObject: 'OperationObject',
|
|
16
|
+
SchemaObject: 'SchemaObject',
|
|
17
|
+
EncodingObject: 'EncodingObject',
|
|
18
|
+
HeaderObject: 'HeaderObject',
|
|
19
|
+
MediaTypeObject: 'MediaTypeObject',
|
|
20
|
+
ServerObject: 'ServerObject',
|
|
21
|
+
ExternalDocumentationObject: 'ExternalDocumentationObject',
|
|
22
|
+
InfoObject: 'InfoObject',
|
|
23
|
+
ContactObject: 'ContactObject',
|
|
24
|
+
LicenseObject: 'LicenseObject',
|
|
25
|
+
ResponseObject: 'ResponseObject',
|
|
26
|
+
ResponsesObject: 'ResponsesObject',
|
|
27
|
+
ParameterObject: 'ParameterObject',
|
|
28
|
+
ExampleObject: 'ExampleObject',
|
|
29
|
+
RequestBodyObject: 'RequestBodyObject',
|
|
30
|
+
SecuritySchemeObject: 'SecuritySchemeObject',
|
|
31
|
+
SecuritySchemes: 'SecuritySchemes',
|
|
32
|
+
LinkObject: 'LinkObject',
|
|
33
|
+
XMLObject: 'XMLObject',
|
|
34
|
+
DiscriminatorObject: 'DiscriminatorObject',
|
|
35
|
+
OAuthFlowsObject: 'OAuthFlowsObject',
|
|
36
|
+
ServerVariableObject: 'ServerVariableObject',
|
|
37
|
+
// Navigation schemas
|
|
38
|
+
TraversedDescriptionObject: 'TraversedDescriptionObject',
|
|
39
|
+
TraversedOperationObject: 'TraversedOperationObject',
|
|
40
|
+
TraversedSchemaObject: 'TraversedSchemaObject',
|
|
41
|
+
TraversedWebhookObject: 'TraversedWebhookObject',
|
|
42
|
+
TraversedTagObject: 'TraversedTagObject',
|
|
43
|
+
TraversedEntryObject: 'TraversedEntryObject',
|
|
44
|
+
TraversedDocumentObject: 'TraversedDocumentObject',
|
|
39
45
|
};
|
|
40
|
-
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
const
|
|
48
|
-
const
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
-
const
|
|
52
|
-
const
|
|
53
|
-
const
|
|
54
|
-
const
|
|
55
|
-
const
|
|
56
|
-
const
|
|
57
|
-
const
|
|
58
|
-
const
|
|
59
|
-
const
|
|
60
|
-
const
|
|
61
|
-
const
|
|
62
|
-
const
|
|
63
|
-
const
|
|
64
|
-
const
|
|
65
|
-
const
|
|
66
|
-
const
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
export
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
ContactObjectRef,
|
|
73
|
-
DiscriminatorObjectRef,
|
|
74
|
-
EncodingObjectRef,
|
|
75
|
-
ExampleObjectRef,
|
|
76
|
-
ExternalDocumentationObjectRef,
|
|
77
|
-
HeaderObjectRef,
|
|
78
|
-
InfoObjectRef,
|
|
79
|
-
LicenseObjectRef,
|
|
80
|
-
LinkObjectRef,
|
|
81
|
-
MediaTypeObjectRef,
|
|
82
|
-
OAuthFlowsObjectRef,
|
|
83
|
-
OperationObjectRef,
|
|
84
|
-
ParameterObjectRef,
|
|
85
|
-
PathItemObjectRef,
|
|
86
|
-
PathsObjectRef,
|
|
87
|
-
REF_DEFINITIONS,
|
|
88
|
-
RequestBodyObjectRef,
|
|
89
|
-
ResponseObjectRef,
|
|
90
|
-
ResponsesObjectRef,
|
|
91
|
-
SchemaObjectRef,
|
|
92
|
-
SecurityRequirementObjectRef,
|
|
93
|
-
SecuritySchemeObjectRef,
|
|
94
|
-
ServerObjectRef,
|
|
95
|
-
ServerVariableObjectRef,
|
|
96
|
-
TagObjectRef,
|
|
97
|
-
TraversedDocumentObjectRef,
|
|
98
|
-
TraversedEntryObjectRef,
|
|
99
|
-
XMLObjectRef
|
|
100
|
-
};
|
|
101
|
-
//# sourceMappingURL=ref-definitions.js.map
|
|
46
|
+
// Type alias for schema definitions
|
|
47
|
+
export const ComponentsObjectRef = Type.Ref(REF_DEFINITIONS.ComponentsObject);
|
|
48
|
+
export const SecurityRequirementObjectRef = Type.Ref(REF_DEFINITIONS.SecurityRequirementObject);
|
|
49
|
+
export const TagObjectRef = Type.Ref(REF_DEFINITIONS.TagObject);
|
|
50
|
+
export const CallbackObjectRef = Type.Ref(REF_DEFINITIONS.CallbackObject);
|
|
51
|
+
export const PathItemObjectRef = Type.Ref(REF_DEFINITIONS.PathItemObject);
|
|
52
|
+
export const PathsObjectRef = Type.Ref(REF_DEFINITIONS.PathsObject);
|
|
53
|
+
export const OperationObjectRef = Type.Ref(REF_DEFINITIONS.OperationObject);
|
|
54
|
+
export const SchemaObjectRef = Type.Ref(REF_DEFINITIONS.SchemaObject);
|
|
55
|
+
export const EncodingObjectRef = Type.Ref(REF_DEFINITIONS.EncodingObject);
|
|
56
|
+
export const HeaderObjectRef = Type.Ref(REF_DEFINITIONS.HeaderObject);
|
|
57
|
+
export const MediaTypeObjectRef = Type.Ref(REF_DEFINITIONS.MediaTypeObject);
|
|
58
|
+
export const ServerObjectRef = Type.Ref(REF_DEFINITIONS.ServerObject);
|
|
59
|
+
export const ExternalDocumentationObjectRef = Type.Ref(REF_DEFINITIONS.ExternalDocumentationObject);
|
|
60
|
+
export const InfoObjectRef = Type.Ref(REF_DEFINITIONS.InfoObject);
|
|
61
|
+
export const ContactObjectRef = Type.Ref(REF_DEFINITIONS.ContactObject);
|
|
62
|
+
export const LicenseObjectRef = Type.Ref(REF_DEFINITIONS.LicenseObject);
|
|
63
|
+
export const ResponseObjectRef = Type.Ref(REF_DEFINITIONS.ResponseObject);
|
|
64
|
+
export const ResponsesObjectRef = Type.Ref(REF_DEFINITIONS.ResponsesObject);
|
|
65
|
+
export const ParameterObjectRef = Type.Ref(REF_DEFINITIONS.ParameterObject);
|
|
66
|
+
export const ExampleObjectRef = Type.Ref(REF_DEFINITIONS.ExampleObject);
|
|
67
|
+
export const RequestBodyObjectRef = Type.Ref(REF_DEFINITIONS.RequestBodyObject);
|
|
68
|
+
export const SecuritySchemeObjectRef = Type.Ref(REF_DEFINITIONS.SecuritySchemeObject);
|
|
69
|
+
export const LinkObjectRef = Type.Ref(REF_DEFINITIONS.LinkObject);
|
|
70
|
+
export const XMLObjectRef = Type.Ref(REF_DEFINITIONS.XMLObject);
|
|
71
|
+
export const DiscriminatorObjectRef = Type.Ref(REF_DEFINITIONS.DiscriminatorObject);
|
|
72
|
+
export const OAuthFlowsObjectRef = Type.Ref(REF_DEFINITIONS.OAuthFlowsObject);
|
|
73
|
+
export const ServerVariableObjectRef = Type.Ref(REF_DEFINITIONS.ServerVariableObject);
|
|
74
|
+
// Navigation schema references
|
|
75
|
+
export const TraversedEntryObjectRef = Type.Ref(REF_DEFINITIONS.TraversedEntryObject);
|
|
76
|
+
// export const TraversedTagObjectRef = Type.Ref(REF_DEFINITIONS.TraversedTagObject)
|
|
77
|
+
export const TraversedDocumentObjectRef = Type.Ref(REF_DEFINITIONS.TraversedDocumentObject);
|
|
@@ -1,26 +1,23 @@
|
|
|
1
|
-
import { Type } from
|
|
2
|
-
import { compose } from
|
|
3
|
-
const ReferenceObjectExtensionsSchema = Type.Object({
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { Type } from '@scalar/typebox';
|
|
2
|
+
import { compose } from '../../../schemas/compose.js';
|
|
3
|
+
export const ReferenceObjectExtensionsSchema = Type.Object({
|
|
4
|
+
/** Indicates the current status of the reference resolution. Can be either 'loading' while fetching the reference or 'error' if the resolution failed. */
|
|
5
|
+
'$status': Type.Optional(Type.Union([Type.Literal('loading'), Type.Literal('error')])),
|
|
6
|
+
/** Indicates whether this reference should be resolved globally across all documents, rather than just within the current document context. */
|
|
7
|
+
'$global': Type.Optional(Type.Boolean()),
|
|
8
8
|
});
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
/**
|
|
10
|
+
* A simple object to allow referencing other components in the OpenAPI Description, internally and externally.
|
|
11
|
+
*
|
|
12
|
+
* The $ref string value contains a URI RFC3986, which identifies the value being referenced.
|
|
13
|
+
*
|
|
14
|
+
* See the rules for resolving Relative References. */
|
|
15
|
+
export const ReferenceObjectSchema = compose(Type.Object({
|
|
11
16
|
/** REQUIRED. The reference identifier. This MUST be in the form of a URI. */
|
|
12
|
-
|
|
17
|
+
'$ref': Type.String(),
|
|
13
18
|
/** A short summary which by default SHOULD override that of the referenced component. If the referenced object-type does not allow a summary field, then this field has no effect. */
|
|
14
19
|
summary: Type.Optional(Type.String()),
|
|
15
20
|
/** A description which by default SHOULD override that of the referenced component. CommonMark syntax MAY be used for rich text representation. If the referenced object-type does not allow a description field, then this field has no effect. */
|
|
16
|
-
description: Type.Optional(Type.String())
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
);
|
|
20
|
-
const reference = (schema) => compose(ReferenceObjectSchema, Type.Object({ "$ref-value": schema }));
|
|
21
|
-
export {
|
|
22
|
-
ReferenceObjectExtensionsSchema,
|
|
23
|
-
ReferenceObjectSchema,
|
|
24
|
-
reference
|
|
25
|
-
};
|
|
26
|
-
//# sourceMappingURL=reference.js.map
|
|
21
|
+
description: Type.Optional(Type.String()),
|
|
22
|
+
}), ReferenceObjectExtensionsSchema);
|
|
23
|
+
export const reference = (schema) => compose(ReferenceObjectSchema, Type.Object({ '$ref-value': schema }));
|
|
@@ -1,21 +1,13 @@
|
|
|
1
|
-
import { Type } from
|
|
2
|
-
import { compose } from
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const RequestBodyObjectSchemaDefinition = compose(
|
|
8
|
-
Type.Object({
|
|
1
|
+
import { Type } from '@scalar/typebox';
|
|
2
|
+
import { compose } from '../../../schemas/compose.js';
|
|
3
|
+
import { XScalarSelectedContentTypeSchema, } from '../../../schemas/extensions/operation/x-scalar-selected-content-type.js';
|
|
4
|
+
import { MediaTypeObjectRef } from './ref-definitions.js';
|
|
5
|
+
/** Describes a single request body. */
|
|
6
|
+
export const RequestBodyObjectSchemaDefinition = compose(Type.Object({
|
|
9
7
|
/** A brief description of the request body. This could contain examples of use. CommonMark syntax MAY be used for rich text representation. */
|
|
10
8
|
description: Type.Optional(Type.String()),
|
|
11
9
|
/** REQUIRED. The content of the request body. The key is a media type or media type range and the value describes it. For requests that match multiple keys, only the most specific key is applicable. e.g. "text/plain" overrides "text/* */
|
|
12
10
|
content: Type.Record(Type.String(), MediaTypeObjectRef),
|
|
13
11
|
/** Determines if the request body is required in the request. Defaults to false. */
|
|
14
|
-
required: Type.Optional(Type.Boolean())
|
|
15
|
-
|
|
16
|
-
XScalarSelectedContentTypeSchema
|
|
17
|
-
);
|
|
18
|
-
export {
|
|
19
|
-
RequestBodyObjectSchemaDefinition
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=request-body.js.map
|
|
12
|
+
required: Type.Optional(Type.Boolean()),
|
|
13
|
+
}), XScalarSelectedContentTypeSchema);
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
import { Type } from
|
|
2
|
-
import { HeaderObjectRef, LinkObjectRef, MediaTypeObjectRef } from
|
|
3
|
-
import { reference } from
|
|
4
|
-
const ResponseObjectSchemaDefinition = Type.Object({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { Type } from '@scalar/typebox';
|
|
2
|
+
import { HeaderObjectRef, LinkObjectRef, MediaTypeObjectRef } from './ref-definitions.js';
|
|
3
|
+
import { reference } from './reference.js';
|
|
4
|
+
export const ResponseObjectSchemaDefinition = Type.Object({
|
|
5
|
+
/** REQUIRED. A description of the response. CommonMark syntax MAY be used for rich text representation. */
|
|
6
|
+
description: Type.String(),
|
|
7
|
+
/** Maps a header name to its definition. RFC7230 states header names are case insensitive. If a response header is defined with the name "Content-Type", it SHALL be ignored. */
|
|
8
|
+
headers: Type.Optional(Type.Record(Type.String(), Type.Union([HeaderObjectRef, reference(HeaderObjectRef)]))),
|
|
9
|
+
/** A map containing descriptions of potential response payloads. The key is a media type or media type range and the value describes it. For responses that match multiple keys, only the most specific key is applicable. e.g. "text/plain" overrides "text/*" */
|
|
10
|
+
content: Type.Optional(Type.Record(Type.String(), MediaTypeObjectRef)),
|
|
11
|
+
/** A map of operations links that can be followed from the response. The key of the map is a short name for the link, following the naming constraints of the names for Component Objects. */
|
|
12
|
+
links: Type.Optional(Type.Record(Type.String(), Type.Union([LinkObjectRef, reference(LinkObjectRef)]))),
|
|
13
13
|
});
|
|
14
|
-
export {
|
|
15
|
-
ResponseObjectSchemaDefinition
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=response.js.map
|