vitepress-openapi 0.2.11 → 0.2.12
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/dist/types/src/components/Feature/OAOperation.vue.d.ts +3 -1
- package/dist/types/src/components/Feature/OAOperationContent.vue.d.ts +2 -2
- package/dist/types/src/components/Feature/OASpec.vue.d.ts +3 -1
- package/dist/types/src/components/Feature/OASpecContent.vue.d.ts +2 -2
- package/dist/types/src/components/Path/OAPaths.vue.d.ts +2 -2
- package/dist/types/src/components/Path/OAPathsGroup.vue.d.ts +2 -2
- package/dist/types/src/components/Path/OAPathsGroups.vue.d.ts +2 -2
- package/dist/types/src/components/Response/OAResponse.vue.d.ts +13 -3
- package/dist/types/src/components/Response/OAResponses.vue.d.ts +13 -3
- package/dist/types/src/types.d.ts +11 -0
- package/dist/vitepress-openapi.client.cjs.js +2 -2
- package/dist/vitepress-openapi.client.es.js +45 -31
- package/package.json +1 -1
- package/src/components/Feature/OAOperation.vue +4 -2
- package/src/components/Feature/OAOperationContent.vue +13 -3
- package/src/components/Feature/OASpec.vue +4 -2
- package/src/components/Feature/OASpecContent.vue +2 -2
- package/src/components/Path/OAPaths.vue +2 -2
- package/src/components/Path/OAPathsGroup.vue +2 -2
- package/src/components/Path/OAPathsGroups.vue +2 -2
- package/src/components/Response/OAResponse.vue +21 -7
- package/src/components/Response/OAResponses.vue +20 -5
- package/src/types.ts +13 -0
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import type { OperationSlot } from '../../types';
|
|
1
|
+
import type { OperationSlot, ResponseDescriptionSlotProps } from '../../types';
|
|
2
2
|
type __VLS_Slots = {
|
|
3
3
|
[K in OperationSlot]?: (props: any) => any;
|
|
4
|
+
} & {
|
|
5
|
+
'response-description'?: (props: ResponseDescriptionSlotProps) => any;
|
|
4
6
|
};
|
|
5
7
|
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
8
|
operationId: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { OperationSlot } from '../../types';
|
|
1
|
+
import type { OperationNestedSlot, OperationSlot } from '../../types';
|
|
2
2
|
type __VLS_Slots = {
|
|
3
|
-
[K in OperationSlot]?: (props: any) => any;
|
|
3
|
+
[K in OperationSlot | OperationNestedSlot]?: (props: any) => any;
|
|
4
4
|
};
|
|
5
5
|
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
6
|
operationId: {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import type { OperationSlot } from '../../types';
|
|
1
|
+
import type { OperationSlot, ResponseDescriptionSlotProps } from '../../types';
|
|
2
2
|
type __VLS_Slots = {
|
|
3
3
|
[K in OperationSlot]?: (props: any) => any;
|
|
4
|
+
} & {
|
|
5
|
+
'response-description'?: (props: ResponseDescriptionSlotProps) => any;
|
|
4
6
|
};
|
|
5
7
|
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
8
|
spec: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { OperationSlot } from '../../types';
|
|
1
|
+
import type { OperationNestedSlot, OperationSlot } from '../../types';
|
|
2
2
|
type __VLS_Slots = {
|
|
3
|
-
[K in OperationSlot]?: (props: any) => any;
|
|
3
|
+
[K in OperationSlot | OperationNestedSlot]?: (props: any) => any;
|
|
4
4
|
};
|
|
5
5
|
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
6
|
hideInfo: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { OperationSlot } from '../../types';
|
|
1
|
+
import type { OperationNestedSlot, OperationSlot } from '../../types';
|
|
2
2
|
type __VLS_Slots = {
|
|
3
|
-
[K in OperationSlot]?: (props: any) => any;
|
|
3
|
+
[K in OperationSlot | OperationNestedSlot]?: (props: any) => any;
|
|
4
4
|
};
|
|
5
5
|
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
6
|
paths: {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { OperationSlot, PathsGroupView } from '../../types';
|
|
1
|
+
import type { OperationNestedSlot, OperationSlot, PathsGroupView } from '../../types';
|
|
2
2
|
interface Props {
|
|
3
3
|
group: PathsGroupView;
|
|
4
4
|
hidePathsSummary?: boolean;
|
|
5
5
|
isLazy?: boolean;
|
|
6
6
|
}
|
|
7
7
|
type __VLS_Slots = {
|
|
8
|
-
[K in OperationSlot]?: (props: any) => any;
|
|
8
|
+
[K in OperationSlot | OperationNestedSlot]?: (props: any) => any;
|
|
9
9
|
};
|
|
10
10
|
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
11
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { OperationSlot, PathsGroupView } from '../../types';
|
|
1
|
+
import type { OperationNestedSlot, OperationSlot, PathsGroupView } from '../../types';
|
|
2
2
|
type __VLS_Slots = {
|
|
3
|
-
[K in OperationSlot]?: (props: any) => any;
|
|
3
|
+
[K in OperationSlot | OperationNestedSlot]?: (props: any) => any;
|
|
4
4
|
};
|
|
5
5
|
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
6
|
groups: {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { ResponseDescriptionSlotProps } from '../../types';
|
|
2
|
+
type __VLS_Slots = {
|
|
3
|
+
'response-description'?: (props: ResponseDescriptionSlotProps) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
6
|
operationId: {
|
|
5
7
|
type: StringConstructor;
|
|
6
8
|
required: true;
|
|
@@ -27,3 +29,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
27
29
|
required: true;
|
|
28
30
|
};
|
|
29
31
|
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
32
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
33
|
+
declare const _default: typeof __VLS_export;
|
|
34
|
+
export default _default;
|
|
35
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
36
|
+
new (): {
|
|
37
|
+
$slots: S;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { ResponseDescriptionSlotProps } from '../../types';
|
|
2
|
+
type __VLS_Slots = {
|
|
3
|
+
'response-description'?: (props: ResponseDescriptionSlotProps) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
6
|
operationId: {
|
|
5
7
|
type: StringConstructor;
|
|
6
8
|
required: true;
|
|
@@ -29,3 +31,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
29
31
|
}>> & Readonly<{}>, {
|
|
30
32
|
headingPrefix: string;
|
|
31
33
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
34
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
35
|
+
declare const _default: typeof __VLS_export;
|
|
36
|
+
export default _default;
|
|
37
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
38
|
+
new (): {
|
|
39
|
+
$slots: S;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -4,6 +4,17 @@ import type { RemovableRef } from '@vueuse/core';
|
|
|
4
4
|
* Slots required for OAOperation component.
|
|
5
5
|
*/
|
|
6
6
|
export type OperationSlot = 'header' | 'tags' | 'path' | 'description' | 'security' | 'parameters' | 'request-body' | 'responses' | 'playground' | 'try-it' | 'code-samples' | 'branding' | 'footer';
|
|
7
|
+
/**
|
|
8
|
+
* Slots for parts inside an operation section, forwarded like `OperationSlot`.
|
|
9
|
+
* They are not sections, so `operation.slots` and `operation.hiddenSlots` do not apply to them.
|
|
10
|
+
*/
|
|
11
|
+
export type OperationNestedSlot = 'response-description';
|
|
12
|
+
export interface ResponseDescriptionSlotProps {
|
|
13
|
+
operationId: string;
|
|
14
|
+
responseCode: string;
|
|
15
|
+
response: Record<string, any>;
|
|
16
|
+
description?: string;
|
|
17
|
+
}
|
|
7
18
|
export type OpenAPIDocument = OpenAPIV3.Document & OpenAPIV3_1.Document;
|
|
8
19
|
export type ParsedPaths = OpenAPIV3.PathsObject & OpenAPIV3_1.PathsObject & {
|
|
9
20
|
[key: string]: OpenAPIV3.PathItemObject & OpenAPIV3_1.PathItemObject & {
|