vitepress-openapi 0.1.17 → 0.1.19
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/README.md +19 -0
- package/dist/types/src/client.d.ts +2 -0
- package/dist/types/src/components/Common/OACodeValue.vue.d.ts +9 -9
- package/dist/types/src/components/Parameter/OAParameterExamples.vue.d.ts +13 -3
- package/dist/types/src/components/index.d.ts +6 -1
- package/dist/types/src/components/ui/input/Input.vue.d.ts +1 -0
- package/dist/types/src/composables/usePlayground.d.ts +1 -0
- package/dist/types/src/composables/useTheme.d.ts +4 -0
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/lib/operation/operationData.d.ts +1 -0
- package/dist/types/src/lib/utils/minifyHtml.d.ts +5 -0
- package/dist/{useOpenapi-D3Fw1qI0.js → useOpenapi-B4Uu-BLL.js} +1070 -1057
- package/dist/{useOpenapi-DkEO8B6A.cjs → useOpenapi-CcNxVvye.cjs} +57 -55
- package/dist/vitepress-openapi.client.cjs.js +142 -142
- package/dist/vitepress-openapi.client.es.js +15525 -15434
- package/dist/vitepress-openapi.css +1 -1
- package/dist/vitepress-openapi.node.cjs.js +1 -1
- package/dist/vitepress-openapi.node.es.js +6 -5
- package/package.json +1 -1
- package/src/client.ts +2 -0
- package/src/components/Common/OACodeValue.vue +9 -10
- package/src/components/Parameter/OAParameter.vue +3 -1
- package/src/components/Parameter/OAParameterExamples.vue +30 -10
- package/src/components/Playground/OAPlaygroundParameterInput.vue +1 -0
- package/src/components/Playground/OAPlaygroundParameters.vue +20 -3
- package/src/components/Playground/OAPlaygroundSecurityInput.vue +2 -1
- package/src/components/Security/OASecurityContent.vue +1 -1
- package/src/components/index.ts +10 -0
- package/src/components/ui/input/Input.vue +27 -0
- package/src/components/ui/select-with-custom-option/SelectWithCustomOption.vue +1 -0
- package/src/composables/usePlayground.ts +14 -0
- package/src/composables/useSidebar.ts +5 -2
- package/src/composables/useTheme.ts +12 -0
- package/src/index.ts +1 -0
- package/src/lib/operation/operationData.ts +2 -0
- package/src/lib/sidebar/ensureGroupTextSlashPrefix.ts +1 -1
- package/src/lib/utils/minifyHtml.ts +9 -0
package/README.md
CHANGED
|
@@ -2,10 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
Generate VitePress API Documentation from OpenAPI Specification.
|
|
4
4
|
|
|
5
|
+
## Demo
|
|
6
|
+
|
|
7
|
+
- [DolarApi.com](https://dolarapi.com/)
|
|
8
|
+
- [ArgentinaDatos](https://argentinadatos.com/)
|
|
9
|
+
- [CriptoYa API](https://docs.criptoya.com/)
|
|
10
|
+
|
|
5
11
|
## Documentation
|
|
6
12
|
|
|
7
13
|
To get started, check out the [documentation](https://vitepress-openapi.vercel.app/).
|
|
8
14
|
|
|
15
|
+
|
|
9
16
|
## Contributors
|
|
10
17
|
|
|
11
18
|
<a href="https://github.com/enzonotario/vitepress-openapi/graphs/contributors">
|
|
@@ -14,6 +21,18 @@ To get started, check out the [documentation](https://vitepress-openapi.vercel.a
|
|
|
14
21
|
|
|
15
22
|
Made with [contrib.rocks](https://contrib.rocks).
|
|
16
23
|
|
|
24
|
+
|
|
17
25
|
## License
|
|
18
26
|
|
|
19
27
|
[MIT License](./LICENSE) © 2023-present [Enzo Notario](https://github.com/enzonotario).
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
### ❤️ Sponsors & Backers
|
|
32
|
+
|
|
33
|
+
<a href="https://github.com/sponsors/enzonotario">
|
|
34
|
+
<img src="https://raw.githubusercontent.com/enzonotario/enzonotario/main/sponsors.png" alt="Sponsors & Backers" />
|
|
35
|
+
</a>
|
|
36
|
+
|
|
37
|
+
> [Become a sponsor](https://github.com/sponsors/enzonotario)
|
|
38
|
+
|
|
@@ -12,6 +12,7 @@ interface VPTheme {
|
|
|
12
12
|
extends?: Theme;
|
|
13
13
|
}
|
|
14
14
|
export declare const theme: VPTheme;
|
|
15
|
+
export * from './components';
|
|
15
16
|
export { useOpenapi } from './composables/useOpenapi';
|
|
16
17
|
export { usePlayground } from './composables/usePlayground';
|
|
17
18
|
export { DEFAULT_OPERATION_SLOTS };
|
|
@@ -20,4 +21,5 @@ export { useTheme } from './composables/useTheme';
|
|
|
20
21
|
export { generateCodeSample } from './lib/codeSamples/generateCodeSample';
|
|
21
22
|
export { OARequest } from './lib/codeSamples/request';
|
|
22
23
|
export { createOpenApiSpec } from './lib/spec/createOpenApiSpec';
|
|
24
|
+
export { minifyHtml } from './lib/utils/minifyHtml';
|
|
23
25
|
export { locales } from './locales';
|
|
@@ -5,28 +5,28 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
5
5
|
type: (ObjectConstructor | ArrayConstructor | StringConstructor | NumberConstructor | BooleanConstructor)[];
|
|
6
6
|
required: true;
|
|
7
7
|
};
|
|
8
|
-
parameterName: {
|
|
9
|
-
type: StringConstructor;
|
|
10
|
-
default: string;
|
|
11
|
-
};
|
|
12
8
|
isEnum: {
|
|
13
9
|
type: BooleanConstructor;
|
|
14
10
|
default: boolean;
|
|
15
11
|
};
|
|
12
|
+
onSet: {
|
|
13
|
+
type: FunctionConstructor;
|
|
14
|
+
default: undefined;
|
|
15
|
+
};
|
|
16
16
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
17
|
value: {
|
|
18
18
|
type: (ObjectConstructor | ArrayConstructor | StringConstructor | NumberConstructor | BooleanConstructor)[];
|
|
19
19
|
required: true;
|
|
20
20
|
};
|
|
21
|
-
parameterName: {
|
|
22
|
-
type: StringConstructor;
|
|
23
|
-
default: string;
|
|
24
|
-
};
|
|
25
21
|
isEnum: {
|
|
26
22
|
type: BooleanConstructor;
|
|
27
23
|
default: boolean;
|
|
28
24
|
};
|
|
25
|
+
onSet: {
|
|
26
|
+
type: FunctionConstructor;
|
|
27
|
+
default: undefined;
|
|
28
|
+
};
|
|
29
29
|
}>> & Readonly<{}>, {
|
|
30
|
-
|
|
30
|
+
onSet: Function;
|
|
31
31
|
isEnum: boolean;
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,13 +1,23 @@
|
|
|
1
|
-
declare const _default: typeof __VLS_export;
|
|
2
|
-
export default _default;
|
|
3
1
|
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
2
|
property: {
|
|
5
3
|
type: ObjectConstructor;
|
|
6
4
|
required: true;
|
|
7
5
|
};
|
|
6
|
+
securitySchemeName: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: undefined;
|
|
9
|
+
};
|
|
8
10
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
11
|
property: {
|
|
10
12
|
type: ObjectConstructor;
|
|
11
13
|
required: true;
|
|
12
14
|
};
|
|
13
|
-
|
|
15
|
+
securitySchemeName: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
default: undefined;
|
|
18
|
+
};
|
|
19
|
+
}>> & Readonly<{}>, {
|
|
20
|
+
securitySchemeName: string;
|
|
21
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import OAVueJsonPretty from './Common/Highlight/OAVueJsonPretty.vue';
|
|
2
|
+
import OAFooter from './Common/OAFooter.vue';
|
|
3
|
+
import OAHeaderBadges from './Common/OAHeaderBadges.vue';
|
|
2
4
|
import OAHeading from './Common/OAHeading.vue';
|
|
3
5
|
import OAMarkdown from './Common/OAMarkdown.vue';
|
|
4
6
|
import OAInfo from './Feature/OAInfo.vue';
|
|
@@ -10,10 +12,13 @@ import OAOperationLink from './Feature/OAOperationLink.vue';
|
|
|
10
12
|
import OAServers from './Feature/OAServers.vue';
|
|
11
13
|
import OASpec from './Feature/OASpec.vue';
|
|
12
14
|
import OASpecSkeleton from './Feature/OASpecSkeleton.vue';
|
|
15
|
+
import OAOperationTags from './Operation/OAOperationTags.vue';
|
|
13
16
|
import OAParameter from './Parameter/OAParameter.vue';
|
|
14
17
|
import OAParameters from './Parameter/OAParameters.vue';
|
|
15
18
|
import OAPathEndpoint from './Path/OAPathEndpoint.vue';
|
|
16
19
|
import OAPlayground from './Playground/OAPlayground.vue';
|
|
17
20
|
import OARequestBody from './Request/OARequestBody.vue';
|
|
18
21
|
import OAResponses from './Response/OAResponses.vue';
|
|
19
|
-
|
|
22
|
+
import OACodeSamples from './Sample/OACodeSamples.vue';
|
|
23
|
+
import OASecurity from './Security/OASecurity.vue';
|
|
24
|
+
export { OACodeSamples, OAFooter, OAHeaderBadges, OAHeading, OAInfo, OAIntroduction, OALocaleSelect, OAMarkdown, OAOperation, OAOperationContext, OAOperationLink, OAOperationTags, OAParameter, OAParameters, OAPathEndpoint, OAPlayground, OARequestBody, OAResponses, OASecurity, OAServers, OASpec, OASpecSkeleton, OAVueJsonPretty, };
|
|
@@ -4,6 +4,7 @@ type __VLS_Props = {
|
|
|
4
4
|
modelValue?: string | number;
|
|
5
5
|
class?: HTMLAttributes['class'];
|
|
6
6
|
type?: string;
|
|
7
|
+
clearable?: boolean;
|
|
7
8
|
};
|
|
8
9
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
9
10
|
"update:modelValue": (payload: string | number) => any;
|
|
@@ -41,5 +41,6 @@ export declare function usePlayground(): {
|
|
|
41
41
|
submitRequest: ({ request, method, baseUrl, path, operationId }: SubmitOptions) => Promise<PlaygroundResponse | null>;
|
|
42
42
|
cleanupImageUrls: () => void;
|
|
43
43
|
setParameterValue: (parameterName: string, value: any) => void;
|
|
44
|
+
setSecurityValue: (schemeId: string, value: any) => void;
|
|
44
45
|
hasOperationData: boolean;
|
|
45
46
|
};
|
|
@@ -96,6 +96,7 @@ export interface ServerConfig {
|
|
|
96
96
|
}
|
|
97
97
|
export interface StorageConfig {
|
|
98
98
|
prefix?: string;
|
|
99
|
+
persistAuth?: boolean;
|
|
99
100
|
}
|
|
100
101
|
export interface OperationLinkConfig {
|
|
101
102
|
linkPrefix?: string;
|
|
@@ -159,6 +160,7 @@ type GetServersFunction = ({ method, path, operation }: {
|
|
|
159
160
|
export declare const DEFAULT_OPERATION_SLOTS: OperationSlot[];
|
|
160
161
|
export declare const DEFAULT_BASE_URL = "http://localhost";
|
|
161
162
|
export declare const DEFAULT_STORAGE_PREFIX = "--oa";
|
|
163
|
+
export declare const DEFAULT_STORAGE_PERSIST_AUTH = true;
|
|
162
164
|
export declare const availableLanguages: LanguageConfig[];
|
|
163
165
|
export declare function useTheme(initialConfig?: PartialUseThemeConfig): {
|
|
164
166
|
isDark: import("@vueuse/core").UseDarkReturn;
|
|
@@ -277,6 +279,7 @@ export declare function useTheme(initialConfig?: PartialUseThemeConfig): {
|
|
|
277
279
|
} | undefined;
|
|
278
280
|
storage?: {
|
|
279
281
|
prefix?: string | undefined;
|
|
282
|
+
persistAuth?: boolean | undefined;
|
|
280
283
|
} | undefined;
|
|
281
284
|
markdown?: {
|
|
282
285
|
operationLink?: false | {
|
|
@@ -363,6 +366,7 @@ export declare function useTheme(initialConfig?: PartialUseThemeConfig): {
|
|
|
363
366
|
setMarkdownConfig: (config: Partial<UnwrapNestedRefs<MarkdownConfig>>) => void;
|
|
364
367
|
getOperationLinkConfig: () => OperationLinkConfig | false | undefined;
|
|
365
368
|
getStoragePrefix: () => string;
|
|
369
|
+
getStoragePersistAuth: () => boolean;
|
|
366
370
|
setStorageConfig: (config: Partial<StorageConfig>) => void;
|
|
367
371
|
};
|
|
368
372
|
export {};
|
|
@@ -4,6 +4,7 @@ export { getGlobalOpenapi, injectOpenapi, useOpenapi, } from './composables/useO
|
|
|
4
4
|
export { usePaths } from './composables/usePaths';
|
|
5
5
|
export { useSidebar } from './composables/useSidebar';
|
|
6
6
|
export { createOpenApiSpec, type OpenApiSpecInstance } from './lib/spec/createOpenApiSpec';
|
|
7
|
+
export { minifyHtml } from './lib/utils/minifyHtml';
|
|
7
8
|
export { parseSpec } from './lib/utils/parseSpec';
|
|
8
9
|
export declare const httpVerbs: readonly OpenAPIV3.HttpMethods[];
|
|
9
10
|
export declare const literalTypes: string[];
|