@scalar/api-reference 1.31.17 → 1.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +62 -0
- package/dist/blocks/helpers/getPointer.d.ts +1 -1
- package/dist/blocks/helpers/getPointer.d.ts.map +1 -1
- package/dist/blocks/hooks/useBlockProps.js +10 -10
- package/dist/browser/standalone.js +15959 -15866
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +1 -1
- package/dist/components/ApiReferenceLayout.vue2.js +124 -126
- package/dist/components/ClassicHeader.vue.d.ts.map +1 -1
- package/dist/components/ClassicHeader.vue.js +11 -9
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +2 -2
- package/dist/components/Content/Content.vue2.js +93 -92
- package/dist/components/Content/Introduction/Introduction.vue.js +1 -1
- package/dist/components/Content/Introduction/Introduction.vue2.js +3 -3
- package/dist/components/Content/Lazy/Loading.vue.d.ts +3 -0
- package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
- package/dist/components/Content/Lazy/Loading.vue.js +93 -93
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +1 -1
- package/dist/components/Content/Tag/Tag.vue.js +1 -1
- package/dist/components/Content/Tag/TagList.vue.d.ts +7 -1
- package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagList.vue.js +41 -38
- package/dist/features/Operation/Operation.vue.d.ts +8 -3
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +67 -51
- package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.js +2 -2
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +9 -2
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +92 -84
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +10 -3
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +132 -117
- package/dist/features/Search/SearchButton.vue.d.ts +1 -3
- package/dist/features/Search/SearchButton.vue.d.ts.map +1 -1
- package/dist/features/Search/SearchButton.vue.js +17 -16
- package/dist/features/Search/SearchModal.vue.js +2 -2
- package/dist/features/Search/SearchModal.vue2.js +4 -4
- package/dist/features/Search/useSearchIndex.d.ts.map +1 -1
- package/dist/features/Search/useSearchIndex.js +15 -15
- package/dist/features/api-client-modal/ApiClientModal.vue.d.ts.map +1 -0
- package/dist/features/api-client-modal/index.d.ts.map +1 -0
- package/dist/features/{ApiClientModal → api-client-modal}/useApiClient.d.ts +118 -118
- package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -0
- package/dist/features/base-url/BaseUrl.vue.d.ts.map +1 -0
- package/dist/features/base-url/index.d.ts.map +1 -0
- package/dist/features/document-source/hooks/useDocumentFetcher.d.ts.map +1 -0
- package/dist/features/document-source/hooks/useDocumentSource.d.ts.map +1 -0
- package/dist/features/document-source/hooks/useDocumentSource.js +71 -0
- package/dist/features/document-source/index.d.ts.map +1 -0
- package/dist/features/download-link/DownloadLink.vue.d.ts.map +1 -0
- package/dist/features/{DownloadLink → download-link}/DownloadLink.vue.js +2 -2
- package/dist/features/download-link/DownloadLink.vue2.js +59 -0
- package/dist/features/download-link/index.d.ts.map +1 -0
- package/dist/features/download-link/openapi-version-symbol.d.ts.map +1 -0
- package/dist/features/example-request/ExamplePicker.vue.d.ts +13 -0
- package/dist/features/example-request/ExamplePicker.vue.d.ts.map +1 -0
- package/dist/features/example-request/ExamplePicker.vue.js +7 -0
- package/dist/features/example-request/ExamplePicker.vue2.js +56 -0
- package/dist/features/example-request/ExampleRequest.vue.d.ts.map +1 -0
- package/dist/features/{ExampleRequest → example-request}/ExampleRequest.vue.js +2 -2
- package/dist/features/{ExampleRequest → example-request}/ExampleRequest.vue2.js +93 -93
- package/dist/features/example-request/TextSelect.vue.d.ts.map +1 -0
- package/dist/features/example-request/index.d.ts.map +1 -0
- package/dist/features/example-responses/ExampleResponse.vue.d.ts.map +1 -0
- package/dist/features/example-responses/ExampleResponse.vue.js +7 -0
- package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -0
- package/dist/features/example-responses/ExampleResponses.vue.js +7 -0
- package/dist/features/{ExampleResponses → example-responses}/ExampleResponses.vue2.js +1 -1
- package/dist/features/example-responses/index.d.ts.map +1 -0
- package/dist/{components/DocumentSelector → features/multiple-documents}/DocumentSelector.vue.d.ts.map +1 -1
- package/dist/{components/DocumentSelector → features/multiple-documents}/DocumentSelector.vue.js +15 -15
- package/dist/features/multiple-documents/index.d.ts +3 -0
- package/dist/features/multiple-documents/index.d.ts.map +1 -0
- package/dist/{hooks → features/multiple-documents}/useMultipleDocuments.d.ts +1 -1
- package/dist/features/multiple-documents/useMultipleDocuments.d.ts.map +1 -0
- package/dist/features/sidebar/components/Sidebar.vue.d.ts.map +1 -0
- package/dist/features/sidebar/components/Sidebar.vue.js +7 -0
- package/dist/{components/Sidebar → features/sidebar/components}/Sidebar.vue2.js +2 -2
- package/dist/{components/Sidebar → features/sidebar/components}/SidebarElement.vue.d.ts +1 -1
- package/dist/features/sidebar/components/SidebarElement.vue.d.ts.map +1 -0
- package/dist/features/sidebar/components/SidebarElement.vue.js +7 -0
- package/dist/{components/Sidebar → features/sidebar/components}/SidebarElement.vue2.js +2 -2
- package/dist/features/sidebar/components/SidebarGroup.vue.d.ts.map +1 -0
- package/dist/features/sidebar/components/SidebarGroup.vue.js +7 -0
- package/dist/features/sidebar/components/SidebarHttpBadge.vue.d.ts.map +1 -0
- package/dist/features/sidebar/components/SidebarHttpBadge.vue.js +7 -0
- package/dist/{components/Sidebar → features/sidebar/components}/SidebarHttpBadge.vue2.js +1 -1
- package/dist/features/sidebar/helpers/create-sidebar.d.ts.map +1 -1
- package/dist/features/sidebar/helpers/create-sidebar.js +8 -8
- package/dist/features/sidebar/index.d.ts +1 -0
- package/dist/features/sidebar/index.d.ts.map +1 -1
- package/dist/features/specification-extension/SpecificationExtension.vue.d.ts.map +1 -0
- package/dist/features/specification-extension/index.d.ts.map +1 -0
- package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -0
- package/dist/features/{TestRequestButton → test-request-button}/TestRequestButton.vue.js +2 -2
- package/dist/features/{TestRequestButton → test-request-button}/TestRequestButton.vue2.js +1 -1
- package/dist/features/test-request-button/index.d.ts.map +1 -0
- package/dist/features/traverse-schema/helpers/traverse-paths.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-paths.js +21 -20
- package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-schemas.js +14 -14
- package/dist/helpers/parse.js +7 -7
- package/dist/hooks/useOperationDiscriminator.d.ts +2 -2
- package/dist/hooks/useOperationDiscriminator.d.ts.map +1 -1
- package/dist/hooks/useOperationDiscriminator.js +28 -28
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/libs/openapi.d.ts +5 -6
- package/dist/libs/openapi.d.ts.map +1 -1
- package/dist/libs/openapi.js +44 -46
- package/dist/style.css +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.js +110 -65
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts +141 -0
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts +38 -0
- package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.d.ts +21 -0
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.d.ts +20 -0
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts +4 -0
- package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-request-example-block/index.d.ts +2 -0
- package/dist/v2/blocks/scalar-request-example-block/index.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-request-example-block/types.d.ts +21 -0
- package/dist/v2/blocks/scalar-request-example-block/types.d.ts.map +1 -0
- package/package.json +14 -14
- package/dist/components/DocumentSelector/index.d.ts +0 -2
- package/dist/components/DocumentSelector/index.d.ts.map +0 -1
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +0 -1
- package/dist/components/Sidebar/Sidebar.vue.js +0 -7
- package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +0 -1
- package/dist/components/Sidebar/SidebarElement.vue.js +0 -7
- package/dist/components/Sidebar/SidebarGroup.vue.d.ts.map +0 -1
- package/dist/components/Sidebar/SidebarGroup.vue.js +0 -7
- package/dist/components/Sidebar/SidebarHttpBadge.vue.d.ts.map +0 -1
- package/dist/components/Sidebar/SidebarHttpBadge.vue.js +0 -7
- package/dist/components/Sidebar/index.d.ts +0 -2
- package/dist/components/Sidebar/index.d.ts.map +0 -1
- package/dist/components/SpecificationExtension/SpecificationExtension.vue.d.ts.map +0 -1
- package/dist/components/SpecificationExtension/index.d.ts.map +0 -1
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +0 -1
- package/dist/features/ApiClientModal/index.d.ts.map +0 -1
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +0 -1
- package/dist/features/BaseUrl/BaseUrl.vue.d.ts.map +0 -1
- package/dist/features/BaseUrl/index.d.ts.map +0 -1
- package/dist/features/DocumentSource/hooks/useDocumentFetcher.d.ts.map +0 -1
- package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts.map +0 -1
- package/dist/features/DocumentSource/hooks/useDocumentSource.js +0 -67
- package/dist/features/DocumentSource/index.d.ts.map +0 -1
- package/dist/features/DownloadLink/DownloadLink.vue.d.ts.map +0 -1
- package/dist/features/DownloadLink/DownloadLink.vue2.js +0 -55
- package/dist/features/DownloadLink/index.d.ts.map +0 -1
- package/dist/features/DownloadLink/openapi-version-symbol.d.ts.map +0 -1
- package/dist/features/ExampleRequest/ExamplePicker.vue.d.ts +0 -10
- package/dist/features/ExampleRequest/ExamplePicker.vue.d.ts.map +0 -1
- package/dist/features/ExampleRequest/ExamplePicker.vue.js +0 -7
- package/dist/features/ExampleRequest/ExamplePicker.vue2.js +0 -59
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +0 -1
- package/dist/features/ExampleRequest/TextSelect.vue.d.ts.map +0 -1
- package/dist/features/ExampleRequest/index.d.ts.map +0 -1
- package/dist/features/ExampleResponses/ExampleResponse.vue.d.ts.map +0 -1
- package/dist/features/ExampleResponses/ExampleResponse.vue.js +0 -7
- package/dist/features/ExampleResponses/ExampleResponses.vue.d.ts.map +0 -1
- package/dist/features/ExampleResponses/ExampleResponses.vue.js +0 -7
- package/dist/features/ExampleResponses/index.d.ts.map +0 -1
- package/dist/features/TestRequestButton/TestRequestButton.vue.d.ts.map +0 -1
- package/dist/features/TestRequestButton/index.d.ts.map +0 -1
- package/dist/hooks/useMultipleDocuments.d.ts.map +0 -1
- package/dist/legacy/fixtures/httpRequestMethods.d.ts +0 -10
- package/dist/legacy/fixtures/httpRequestMethods.d.ts.map +0 -1
- package/dist/legacy/fixtures/index.d.ts +0 -2
- package/dist/legacy/fixtures/index.d.ts.map +0 -1
- /package/dist/features/{ApiClientModal → api-client-modal}/ApiClientModal.vue.d.ts +0 -0
- /package/dist/features/{ApiClientModal → api-client-modal}/ApiClientModal.vue.js +0 -0
- /package/dist/features/{ApiClientModal → api-client-modal}/ApiClientModal.vue2.js +0 -0
- /package/dist/features/{ApiClientModal → api-client-modal}/index.d.ts +0 -0
- /package/dist/features/{ApiClientModal → api-client-modal}/useApiClient.js +0 -0
- /package/dist/features/{BaseUrl → base-url}/BaseUrl.vue.d.ts +0 -0
- /package/dist/features/{BaseUrl → base-url}/BaseUrl.vue.js +0 -0
- /package/dist/features/{BaseUrl → base-url}/BaseUrl.vue2.js +0 -0
- /package/dist/features/{BaseUrl → base-url}/index.d.ts +0 -0
- /package/dist/features/{DocumentSource → document-source}/hooks/useDocumentFetcher.d.ts +0 -0
- /package/dist/features/{DocumentSource → document-source}/hooks/useDocumentFetcher.js +0 -0
- /package/dist/features/{DocumentSource → document-source}/hooks/useDocumentSource.d.ts +0 -0
- /package/dist/features/{DocumentSource → document-source}/index.d.ts +0 -0
- /package/dist/features/{DownloadLink → download-link}/DownloadLink.vue.d.ts +0 -0
- /package/dist/features/{DownloadLink → download-link}/index.d.ts +0 -0
- /package/dist/features/{DownloadLink → download-link}/openapi-version-symbol.d.ts +0 -0
- /package/dist/features/{DownloadLink → download-link}/openapi-version-symbol.js +0 -0
- /package/dist/features/{ExampleRequest → example-request}/ExampleRequest.vue.d.ts +0 -0
- /package/dist/features/{ExampleRequest → example-request}/TextSelect.vue.d.ts +0 -0
- /package/dist/features/{ExampleRequest → example-request}/TextSelect.vue.js +0 -0
- /package/dist/features/{ExampleRequest → example-request}/TextSelect.vue3.js +0 -0
- /package/dist/features/{ExampleRequest → example-request}/index.d.ts +0 -0
- /package/dist/features/{ExampleResponses → example-responses}/ExampleResponse.vue.d.ts +0 -0
- /package/dist/features/{ExampleResponses → example-responses}/ExampleResponse.vue2.js +0 -0
- /package/dist/features/{ExampleResponses → example-responses}/ExampleResponses.vue.d.ts +0 -0
- /package/dist/features/{ExampleResponses → example-responses}/index.d.ts +0 -0
- /package/dist/{components/DocumentSelector → features/multiple-documents}/DocumentSelector.vue.d.ts +0 -0
- /package/dist/{components/DocumentSelector → features/multiple-documents}/DocumentSelector.vue2.js +0 -0
- /package/dist/{hooks → features/multiple-documents}/useMultipleDocuments.js +0 -0
- /package/dist/{components/Sidebar → features/sidebar/components}/Sidebar.vue.d.ts +0 -0
- /package/dist/{components/Sidebar → features/sidebar/components}/SidebarGroup.vue.d.ts +0 -0
- /package/dist/{components/Sidebar → features/sidebar/components}/SidebarGroup.vue2.js +0 -0
- /package/dist/{components/Sidebar → features/sidebar/components}/SidebarHttpBadge.vue.d.ts +0 -0
- /package/dist/{components/SpecificationExtension → features/specification-extension}/SpecificationExtension.vue.d.ts +0 -0
- /package/dist/{components/SpecificationExtension → features/specification-extension}/SpecificationExtension.vue.js +0 -0
- /package/dist/{components/SpecificationExtension → features/specification-extension}/SpecificationExtension.vue2.js +0 -0
- /package/dist/{components/SpecificationExtension → features/specification-extension}/index.d.ts +0 -0
- /package/dist/features/{TestRequestButton → test-request-button}/TestRequestButton.vue.d.ts +0 -0
- /package/dist/features/{TestRequestButton → test-request-button}/index.d.ts +0 -0
package/dist/libs/openapi.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { OpenAPI, OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
2
|
-
import type { Spec, TransformedOperation } from '@scalar/types/legacy';
|
|
3
2
|
import { XScalarStability } from '@scalar/types/legacy';
|
|
4
3
|
type PropertyObject = {
|
|
5
4
|
required?: string[];
|
|
@@ -17,19 +16,19 @@ export declare function formatProperty(key: string, obj: PropertyObject): string
|
|
|
17
16
|
/**
|
|
18
17
|
* Extracts the request body from an operation.
|
|
19
18
|
*/
|
|
20
|
-
export declare function extractRequestBody(operation:
|
|
19
|
+
export declare function extractRequestBody(operation: OpenAPIV3_1.OperationObject): string[] | boolean;
|
|
21
20
|
/**
|
|
22
21
|
* Returns all models from the specification, no matter if it’s OpenAPI 3.x.
|
|
23
22
|
*/
|
|
24
|
-
export declare function getModels(
|
|
23
|
+
export declare function getModels(document?: OpenAPIV3_1.Document): Record<string, OpenAPIV3_1.SchemaObject>;
|
|
25
24
|
/**
|
|
26
25
|
* Checks if the OpenAPI document has schemas.
|
|
27
26
|
*/
|
|
28
|
-
export declare const hasModels: (content?:
|
|
27
|
+
export declare const hasModels: (content?: OpenAPIV3_1.Document) => boolean;
|
|
29
28
|
/**
|
|
30
29
|
* Checks if the OpenAPI document has webhooks.
|
|
31
30
|
*/
|
|
32
|
-
export declare const hasWebhooks: (
|
|
31
|
+
export declare const hasWebhooks: (document?: OpenAPIV3_1.Document) => boolean;
|
|
33
32
|
/**
|
|
34
33
|
* Deep merge for objects
|
|
35
34
|
*/
|
|
@@ -38,7 +37,7 @@ export declare function deepMerge(source: Record<any, any>, target: Record<any,
|
|
|
38
37
|
* Creates an empty specification object.
|
|
39
38
|
* The returning object has the same structure as a valid OpenAPI specification, but everything is empty.
|
|
40
39
|
*/
|
|
41
|
-
export declare function createEmptySpecification(partialSpecification?: Partial<OpenAPI.Document>):
|
|
40
|
+
export declare function createEmptySpecification(partialSpecification?: Partial<OpenAPI.Document>): OpenAPI.Document;
|
|
42
41
|
/**
|
|
43
42
|
* Returns if an operation is considered deprecated.
|
|
44
43
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openapi.d.ts","sourceRoot":"","sources":["../../src/libs/openapi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,
|
|
1
|
+
{"version":3,"file":"openapi.d.ts","sourceRoot":"","sources":["../../src/libs/openapi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAIvD,KAAK,cAAc,GAAG;IACpB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,UAAU,EAAE;QACV,CAAC,GAAG,EAAE,MAAM,GAAG;YACb,IAAI,EAAE,MAAM,CAAA;YACZ,WAAW,CAAC,EAAE,MAAM,CAAA;SACrB,CAAA;KACF,CAAA;CACF,CAAA;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,cAAc,GAAG,MAAM,CAcvE;AA8BD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,WAAW,CAAC,eAAe,GAAG,MAAM,EAAE,GAAG,OAAO,CAY7F;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,QAAQ,CAAC,EAAE,WAAW,CAAC,QAAQ,4CAsBxD;AAED;;GAEG;AACH,eAAO,MAAM,SAAS,aAAc,WAAW,CAAC,QAAQ,YAUvD,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,WAAW,cAAe,WAAW,CAAC,QAAQ,YAU1D,CAAA;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,oBAW3E;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,GAiBjF,OAAO,CAAC,QAAQ,CACvB;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,WAAW,CAAC,eAAe,GAAG,OAAO,CAQrF;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,WAAW,CAAC,eAAe,GAAG,gBAAgB,GAAG,SAAS,CAK1G;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,WAAW,CAAC,eAAe,GAAG,MAAM,CAYzF"}
|
package/dist/libs/openapi.js
CHANGED
|
@@ -1,58 +1,57 @@
|
|
|
1
|
-
import { XScalarStability as
|
|
2
|
-
function
|
|
3
|
-
var
|
|
4
|
-
let
|
|
5
|
-
const i = (
|
|
6
|
-
return
|
|
1
|
+
import { XScalarStability as c } from "@scalar/types/legacy";
|
|
2
|
+
function u(e, r) {
|
|
3
|
+
var s;
|
|
4
|
+
let t = e;
|
|
5
|
+
const i = (s = r.required) == null ? void 0 : s.includes(e);
|
|
6
|
+
return t += i ? " REQUIRED " : " optional ", r.properties[e] && (t += r.properties[e].type, r.properties[e].description && (t += " " + r.properties[e].description)), t;
|
|
7
7
|
}
|
|
8
8
|
function d(e) {
|
|
9
9
|
var i;
|
|
10
|
-
const
|
|
11
|
-
return
|
|
10
|
+
const r = ["Body"], t = (i = e == null ? void 0 : e.schema) == null ? void 0 : i.properties;
|
|
11
|
+
return t && Object.keys(t).forEach((s) => {
|
|
12
12
|
if (!e.schema)
|
|
13
13
|
return;
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
var
|
|
18
|
-
|
|
14
|
+
r.push(u(s, e.schema));
|
|
15
|
+
const n = t[s];
|
|
16
|
+
n.type === "object" && !!n.properties && n.properties && Object.keys(n.properties).forEach((p) => {
|
|
17
|
+
var f, a;
|
|
18
|
+
r.push(`${p} ${(a = (f = n.properties) == null ? void 0 : f[p]) == null ? void 0 : a.type}`);
|
|
19
19
|
});
|
|
20
|
-
}),
|
|
20
|
+
}), r;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
var
|
|
22
|
+
function x(e) {
|
|
23
|
+
var r, t;
|
|
24
24
|
try {
|
|
25
|
-
const
|
|
26
|
-
if (!
|
|
25
|
+
const i = (t = (r = e == null ? void 0 : e.requestBody) == null ? void 0 : r.content) == null ? void 0 : t["application/json"];
|
|
26
|
+
if (!i)
|
|
27
27
|
throw new Error("Body not found");
|
|
28
|
-
return d(
|
|
28
|
+
return d(i);
|
|
29
29
|
} catch {
|
|
30
30
|
return !1;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
var
|
|
33
|
+
function O(e) {
|
|
34
|
+
var t, i;
|
|
35
35
|
if (!e)
|
|
36
36
|
return {};
|
|
37
|
-
const
|
|
37
|
+
const r = (
|
|
38
38
|
// OpenAPI 3.x
|
|
39
|
-
Object.keys(((
|
|
39
|
+
Object.keys(((t = e == null ? void 0 : e.components) == null ? void 0 : t.schemas) ?? {}).length ? (i = e == null ? void 0 : e.components) == null ? void 0 : i.schemas : (
|
|
40
40
|
// Fallback
|
|
41
41
|
{}
|
|
42
42
|
)
|
|
43
43
|
);
|
|
44
|
-
return Object.keys(
|
|
45
|
-
var
|
|
46
|
-
(((
|
|
47
|
-
}),
|
|
44
|
+
return Object.keys(r ?? {}).forEach((s) => {
|
|
45
|
+
var n, o;
|
|
46
|
+
(((n = r[s]) == null ? void 0 : n["x-internal"]) === !0 || ((o = r[s]) == null ? void 0 : o["x-scalar-ignore"]) === !0) && delete r[s];
|
|
47
|
+
}), r;
|
|
48
48
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
return t;
|
|
49
|
+
function l(e, r) {
|
|
50
|
+
for (const [t, i] of Object.entries(e))
|
|
51
|
+
i !== null && typeof i == "object" ? (r[t] ?? (r[t] = new i.__proto__.constructor()), l(i, r[t])) : typeof i < "u" && (r[t] = i);
|
|
52
|
+
return r;
|
|
54
53
|
}
|
|
55
|
-
function
|
|
54
|
+
function E(e) {
|
|
56
55
|
return l(e ?? {}, {
|
|
57
56
|
info: {
|
|
58
57
|
title: "",
|
|
@@ -72,23 +71,22 @@ function g(e) {
|
|
|
72
71
|
});
|
|
73
72
|
}
|
|
74
73
|
function b(e) {
|
|
75
|
-
return e.deprecated !== void 0 ? e.deprecated : !!(e["x-scalar-stability"] && e["x-scalar-stability"] ===
|
|
74
|
+
return e.deprecated !== void 0 ? e.deprecated : !!(e["x-scalar-stability"] && e["x-scalar-stability"] === c.Deprecated);
|
|
76
75
|
}
|
|
77
|
-
function
|
|
78
|
-
return e.deprecated ?
|
|
76
|
+
function y(e) {
|
|
77
|
+
return e.deprecated ? c.Deprecated : e["x-scalar-stability"];
|
|
79
78
|
}
|
|
80
|
-
function
|
|
81
|
-
const
|
|
82
|
-
return
|
|
79
|
+
function S(e) {
|
|
80
|
+
const r = y(e);
|
|
81
|
+
return r === c.Deprecated ? "text-red" : r === c.Experimental ? "text-orange" : r === c.Stable ? "text-green" : "";
|
|
83
82
|
}
|
|
84
83
|
export {
|
|
85
|
-
|
|
84
|
+
E as createEmptySpecification,
|
|
86
85
|
l as deepMerge,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
x as hasModels,
|
|
86
|
+
x as extractRequestBody,
|
|
87
|
+
u as formatProperty,
|
|
88
|
+
O as getModels,
|
|
89
|
+
y as getOperationStability,
|
|
90
|
+
S as getOperationStabilityColor,
|
|
93
91
|
b as isOperationDeprecated
|
|
94
92
|
};
|