@scalar/api-reference 0.8.10 → 1.0.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.
Files changed (32) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +8 -0
  3. package/dist/browser/standalone.js +88840 -88787
  4. package/dist/components/ApiClientModal.vue.d.ts +2 -2
  5. package/dist/components/ApiClientModal.vue.d.ts.map +1 -1
  6. package/dist/components/ApiReference.vue.d.ts +7 -7
  7. package/dist/components/ApiReference.vue.d.ts.map +1 -1
  8. package/dist/components/Content/Authentication/Authentication.vue.d.ts +2 -2
  9. package/dist/components/Content/Authentication/Authentication.vue.d.ts.map +1 -1
  10. package/dist/components/Content/Authentication/SecuritySchemeSelector.vue.d.ts.map +1 -1
  11. package/dist/components/Content/Content.vue.d.ts +9 -2
  12. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  13. package/dist/components/Content/Introduction/ServerList.vue.d.ts.map +1 -1
  14. package/dist/components/Content/ReferenceEndpoint/ReferenceEndpoint.vue.d.ts +1 -17
  15. package/dist/components/Content/ReferenceEndpoint/ReferenceEndpoint.vue.d.ts.map +1 -1
  16. package/dist/components/FindAnythingButton.vue.d.ts +13 -1
  17. package/dist/components/FindAnythingButton.vue.d.ts.map +1 -1
  18. package/dist/components/SearchModal.vue.d.ts +2 -2
  19. package/dist/components/Sidebar.vue.d.ts +13 -3
  20. package/dist/components/Sidebar.vue.d.ts.map +1 -1
  21. package/dist/helpers/getUrlFromServerState.d.ts +1 -1
  22. package/dist/helpers/getUrlFromServerState.d.ts.map +1 -1
  23. package/dist/hooks/index.d.ts +2 -0
  24. package/dist/hooks/index.d.ts.map +1 -1
  25. package/dist/hooks/useParser.d.ts +161 -0
  26. package/dist/hooks/useParser.d.ts.map +1 -0
  27. package/dist/hooks/useSpec.d.ts +13 -0
  28. package/dist/hooks/useSpec.d.ts.map +1 -0
  29. package/dist/index.js +36534 -19134
  30. package/dist/types.d.ts +11 -8
  31. package/dist/types.d.ts.map +1 -1
  32. package/package.json +23 -8
@@ -1,7 +1,7 @@
1
1
  import { type Spec } from '../types';
2
2
  export { useApiClientStore } from '@scalar/api-client';
3
3
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
4
- spec: {
4
+ parsedSpec: {
5
5
  type: import("vue").PropType<Spec>;
6
6
  required: true;
7
7
  };
@@ -18,7 +18,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
18
18
  type: import("vue").PropType<string>;
19
19
  };
20
20
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
21
- spec: {
21
+ parsedSpec: {
22
22
  type: import("vue").PropType<Spec>;
23
23
  required: true;
24
24
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiClientModal.vue.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,UAAU,CAAA;AAKpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBA2NzB,GAAG;0BACG,GAAG;;AA3NtC,wBA0O0G;AAG1G,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
1
+ {"version":3,"file":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiClientModal.vue.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,UAAU,CAAA;AAKpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAkOzB,GAAG;0BACG,GAAG;;AAlOtC,wBAiP0G;AAG1G,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
@@ -1,9 +1,6 @@
1
1
  import { type ThemeId } from '@scalar/themes';
2
2
  import type { ReferenceConfiguration } from '../types';
3
3
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
4
- spec: {
5
- type: import("vue").PropType<string>;
6
- };
7
4
  proxyUrl: {
8
5
  type: import("vue").PropType<string>;
9
6
  };
@@ -16,6 +13,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
16
13
  aiWriterMarkdown: {
17
14
  type: import("vue").PropType<string>;
18
15
  };
16
+ spec: {
17
+ type: import("vue").PropType<string>;
18
+ };
19
19
  specUrl: {
20
20
  type: import("vue").PropType<string>;
21
21
  };
@@ -44,9 +44,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
44
44
  changeTheme: (value: ThemeId) => void;
45
45
  startAIWriter: (value: string[], swaggerData: string, swaggerType: "json" | "yaml") => void;
46
46
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
47
- spec: {
48
- type: import("vue").PropType<string>;
49
- };
50
47
  proxyUrl: {
51
48
  type: import("vue").PropType<string>;
52
49
  };
@@ -59,6 +56,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
59
56
  aiWriterMarkdown: {
60
57
  type: import("vue").PropType<string>;
61
58
  };
59
+ spec: {
60
+ type: import("vue").PropType<string>;
61
+ };
62
62
  specUrl: {
63
63
  type: import("vue").PropType<string>;
64
64
  };
@@ -84,8 +84,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
84
84
  type: import("vue").PropType<import("@scalar/swagger-editor").HocuspocusConfigurationProp>;
85
85
  };
86
86
  }>> & {
87
- onChangeTheme?: ((value: ThemeId) => any) | undefined;
88
87
  onStartAIWriter?: ((value: string[], swaggerData: string, swaggerType: "json" | "yaml") => any) | undefined;
88
+ onChangeTheme?: ((value: ThemeId) => any) | undefined;
89
89
  }, {
90
90
  showSidebar: boolean;
91
91
  footerBelowSidebar: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"ApiReference.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReference.vue.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,OAAO,EAAe,MAAM,gBAAgB,CAAA;AAc1D,OAAO,KAAK,EAAE,sBAAsB,EAAwB,MAAM,UAAU,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgmB5E,wBAA8G;AAyB9G,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
1
+ {"version":3,"file":"ApiReference.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReference.vue.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,OAAO,EAAe,MAAM,gBAAgB,CAAA;AAQ1D,OAAO,KAAK,EAAE,sBAAsB,EAAwB,MAAM,UAAU,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+jB5E,wBAA8G;AAyB9G,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
@@ -1,10 +1,10 @@
1
1
  import { type Spec } from '../../../types';
2
2
  declare const _default: import("vue").DefineComponent<{
3
- spec: {
3
+ parsedSpec: {
4
4
  type: import("vue").PropType<Spec>;
5
5
  };
6
6
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
7
- spec: {
7
+ parsedSpec: {
8
8
  type: import("vue").PropType<Spec>;
9
9
  };
10
10
  }>>, {}, {}>;
@@ -1 +1 @@
1
- {"version":3,"file":"Authentication.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Authentication/Authentication.vue.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,gBAAgB,CAAA;;;;;;;;;;AA2L1C,wBAAkD"}
1
+ {"version":3,"file":"Authentication.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Authentication/Authentication.vue.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,gBAAgB,CAAA;;;;;;;;;;AAyM1C,wBAAkD"}
@@ -1 +1 @@
1
- {"version":3,"file":"SecuritySchemeSelector.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Authentication/SecuritySchemeSelector.vue.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAyMA,wBAAkD"}
1
+ {"version":3,"file":"SecuritySchemeSelector.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Authentication/SecuritySchemeSelector.vue.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAoNA,wBAAkD"}
@@ -1,5 +1,5 @@
1
1
  import type { Spec } from '../../types';
2
- declare const _default: import("vue").DefineComponent<{
2
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
3
3
  ready: {
4
4
  type: import("vue").PropType<boolean>;
5
5
  required: true;
@@ -25,6 +25,13 @@ declare const _default: import("vue").DefineComponent<{
25
25
  type: import("vue").PropType<string>;
26
26
  required: true;
27
27
  };
28
- }>>, {}, {}>;
28
+ }>>, {}, {}>, {
29
+ "empty-state"?(_: {}): any;
30
+ }>;
29
31
  export default _default;
32
+ type __VLS_WithTemplateSlots<T, S> = T & {
33
+ new (): {
34
+ $slots: S;
35
+ };
36
+ };
30
37
  //# sourceMappingURL=Content.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Content.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Content/Content.vue.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,IAAI,EAAO,MAAM,aAAa,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyS5C,wBAAkD"}
1
+ {"version":3,"file":"Content.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Content/Content.vue.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,IAAI,EAAO,MAAM,aAAa,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwT5C,wBAA8G;AAI9G,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ServerList.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Introduction/ServerList.vue.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAA;;;;;;;;;;;;AAqc5C,wBAAkD"}
1
+ {"version":3,"file":"ServerList.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Introduction/ServerList.vue.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAA;;;;;;;;;;;;AA8b5C,wBAAkD"}
@@ -1,17 +1,9 @@
1
- import type { Server, Spec, Tag, TransformedOperation } from '../../../types';
1
+ import type { Tag, TransformedOperation } from '../../../types';
2
2
  declare const _default: import("vue").DefineComponent<{
3
3
  operation: {
4
4
  type: import("vue").PropType<TransformedOperation>;
5
5
  required: true;
6
6
  };
7
- server: {
8
- type: import("vue").PropType<Server>;
9
- required: true;
10
- };
11
- spec: {
12
- type: import("vue").PropType<Spec>;
13
- required: true;
14
- };
15
7
  tag: {
16
8
  type: import("vue").PropType<Tag>;
17
9
  required: true;
@@ -21,14 +13,6 @@ declare const _default: import("vue").DefineComponent<{
21
13
  type: import("vue").PropType<TransformedOperation>;
22
14
  required: true;
23
15
  };
24
- server: {
25
- type: import("vue").PropType<Server>;
26
- required: true;
27
- };
28
- spec: {
29
- type: import("vue").PropType<Spec>;
30
- required: true;
31
- };
32
16
  tag: {
33
17
  type: import("vue").PropType<Tag>;
34
18
  required: true;
@@ -1 +1 @@
1
- {"version":3,"file":"ReferenceEndpoint.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/ReferenceEndpoint/ReferenceEndpoint.vue.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8M7E,wBAAkD"}
1
+ {"version":3,"file":"ReferenceEndpoint.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/ReferenceEndpoint/ReferenceEndpoint.vue.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;;;;;;;;;;;;;;;;;;;;AA0M/D,wBAAkD"}
@@ -1,3 +1,15 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
1
+ declare const _default: import("vue").DefineComponent<{
2
+ searchHotKey: {
3
+ type: import("vue").PropType<string>;
4
+ default: string;
5
+ };
6
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
7
+ searchHotKey: {
8
+ type: import("vue").PropType<string>;
9
+ default: string;
10
+ };
11
+ }>>, {
12
+ searchHotKey: string;
13
+ }, {}>;
2
14
  export default _default;
3
15
  //# sourceMappingURL=FindAnythingButton.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FindAnythingButton.vue.d.ts","sourceRoot":"","sources":["../../src/components/FindAnythingButton.vue.ts"],"names":[],"mappings":";AA6HA,wBAAkD"}
1
+ {"version":3,"file":"FindAnythingButton.vue.d.ts","sourceRoot":"","sources":["../../src/components/FindAnythingButton.vue.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAwIA,wBAAkD"}
@@ -1,11 +1,11 @@
1
1
  import type { Spec } from '../types';
2
2
  declare const _default: import("vue").DefineComponent<{
3
- spec: {
3
+ parsedSpec: {
4
4
  type: import("vue").PropType<Spec>;
5
5
  required: true;
6
6
  };
7
7
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
8
- spec: {
8
+ parsedSpec: {
9
9
  type: import("vue").PropType<Spec>;
10
10
  required: true;
11
11
  };
@@ -1,14 +1,24 @@
1
1
  import type { Spec } from '../types';
2
2
  declare const _default: import("vue").DefineComponent<{
3
- spec: {
3
+ searchHotKey: {
4
+ type: import("vue").PropType<string>;
5
+ default: string;
6
+ };
7
+ parsedSpec: {
4
8
  type: import("vue").PropType<Spec>;
5
9
  required: true;
6
10
  };
7
11
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
8
- spec: {
12
+ searchHotKey: {
13
+ type: import("vue").PropType<string>;
14
+ default: string;
15
+ };
16
+ parsedSpec: {
9
17
  type: import("vue").PropType<Spec>;
10
18
  required: true;
11
19
  };
12
- }>>, {}, {}>;
20
+ }>>, {
21
+ searchHotKey: string;
22
+ }, {}>;
13
23
  export default _default;
14
24
  //# sourceMappingURL=Sidebar.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../src/components/Sidebar.vue.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,IAAI,EAA6B,MAAM,UAAU,CAAA;;;;;;;;;;;;AA0a/D,wBAAkD"}
1
+ {"version":3,"file":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../src/components/Sidebar.vue.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,IAAI,EAA6B,MAAM,UAAU,CAAA;;;;;;;;;;;;;;;;;;;;;;AAsc/D,wBAAkD"}
@@ -1,3 +1,3 @@
1
1
  import type { ServerState } from '../types';
2
- export declare function getUrlFromServerState(state: ServerState): string;
2
+ export declare function getUrlFromServerState(state: ServerState): string | undefined;
3
3
  //# sourceMappingURL=getUrlFromServerState.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getUrlFromServerState.d.ts","sourceRoot":"","sources":["../../src/helpers/getUrlFromServerState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAG3C,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,WAAW,UAOvD"}
1
+ {"version":3,"file":"getUrlFromServerState.d.ts","sourceRoot":"","sources":["../../src/helpers/getUrlFromServerState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAG3C,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,WAAW,sBAOvD"}
@@ -1,4 +1,6 @@
1
1
  export * from './useDarkModeState';
2
2
  export * from './useOperation';
3
+ export * from './useParser';
3
4
  export * from './useRefOnMount';
5
+ export * from './useSpec';
4
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA"}
@@ -0,0 +1,161 @@
1
+ import { type ComputedRef, type Ref } from 'vue';
2
+ import type { Spec } from '../types';
3
+ /**
4
+ * Dereference OpenAPI/Swagger specs
5
+ */
6
+ export declare function useParser({ input, }: {
7
+ input?: string | Ref<string> | ComputedRef<string>;
8
+ }): {
9
+ parsedSpecRef: {
10
+ tags: {
11
+ name: string;
12
+ description: string;
13
+ operations: {
14
+ httpVerb: string;
15
+ path: string;
16
+ operationId: string;
17
+ name: string;
18
+ description: string;
19
+ information: {
20
+ description: string;
21
+ operationId: string;
22
+ parameters: {
23
+ description?: string | undefined;
24
+ in?: string | undefined;
25
+ name: string;
26
+ required?: boolean | undefined;
27
+ schema?: {
28
+ format: string;
29
+ type: string;
30
+ } | undefined;
31
+ }[];
32
+ responses: Record<string, import("../types").Response>;
33
+ security: import("openapi-types").OpenAPIV3.SecurityRequirementObject[];
34
+ requestBody: {
35
+ description: string;
36
+ content: {
37
+ "application/json": {
38
+ schema: {
39
+ type: string;
40
+ required: string[];
41
+ properties: import("../types").ContentProperties;
42
+ };
43
+ };
44
+ "application/xml": {
45
+ schema: {
46
+ type: string;
47
+ required: string[];
48
+ properties: import("../types").ContentProperties;
49
+ };
50
+ };
51
+ "text/plain": {
52
+ schema: {
53
+ type: string;
54
+ required: string[];
55
+ properties: import("../types").ContentProperties;
56
+ };
57
+ };
58
+ "text/html": {
59
+ schema: {
60
+ type: string;
61
+ required: string[];
62
+ properties: import("../types").ContentProperties;
63
+ };
64
+ };
65
+ "application/x-www-form-urlencoded": {
66
+ schema: {
67
+ type: string;
68
+ required: string[];
69
+ properties: import("../types").ContentProperties;
70
+ };
71
+ };
72
+ "multipart/form-data": {
73
+ schema: {
74
+ type: string;
75
+ required: string[];
76
+ properties: import("../types").ContentProperties;
77
+ };
78
+ };
79
+ };
80
+ required: boolean;
81
+ };
82
+ summary: string;
83
+ tags: string[];
84
+ };
85
+ responses: Record<string, import("../types").Response & {
86
+ headers: import("../types").ExampleResponseHeaders;
87
+ }>;
88
+ }[];
89
+ }[];
90
+ info: {
91
+ title: string;
92
+ description: string;
93
+ termsOfService: string;
94
+ contact: {
95
+ email: string;
96
+ };
97
+ license: {
98
+ name: string;
99
+ url: string;
100
+ };
101
+ version: string;
102
+ };
103
+ externalDocs: {
104
+ description: string;
105
+ url: string;
106
+ };
107
+ servers: {
108
+ url: string;
109
+ description?: string | undefined;
110
+ variables?: Record<string, {
111
+ default?: string | number | undefined;
112
+ description?: string | undefined;
113
+ enum?: (string | number)[] | undefined;
114
+ }> | undefined;
115
+ }[];
116
+ components?: {
117
+ schemas?: {
118
+ [key: string]: import("openapi-types").OpenAPIV3.ReferenceObject | import("openapi-types").OpenAPIV3.SchemaObject;
119
+ } | undefined;
120
+ responses?: {
121
+ [key: string]: import("openapi-types").OpenAPIV3.ReferenceObject | import("openapi-types").OpenAPIV3.ResponseObject;
122
+ } | undefined;
123
+ parameters?: {
124
+ [key: string]: import("openapi-types").OpenAPIV3.ReferenceObject | import("openapi-types").OpenAPIV3.ParameterObject;
125
+ } | undefined;
126
+ examples?: {
127
+ [key: string]: import("openapi-types").OpenAPIV3.ReferenceObject | import("openapi-types").OpenAPIV3.ExampleObject;
128
+ } | undefined;
129
+ requestBodies?: {
130
+ [key: string]: import("openapi-types").OpenAPIV3.ReferenceObject | import("openapi-types").OpenAPIV3.RequestBodyObject;
131
+ } | undefined;
132
+ headers?: {
133
+ [key: string]: import("openapi-types").OpenAPIV3.ReferenceObject | import("openapi-types").OpenAPIV3.HeaderObject;
134
+ } | undefined;
135
+ securitySchemes?: {
136
+ [key: string]: import("openapi-types").OpenAPIV3.SecuritySchemeObject | import("openapi-types").OpenAPIV3.ReferenceObject;
137
+ } | undefined;
138
+ links?: {
139
+ [key: string]: import("openapi-types").OpenAPIV3.ReferenceObject | import("openapi-types").OpenAPIV3.LinkObject;
140
+ } | undefined;
141
+ callbacks?: {
142
+ [key: string]: import("openapi-types").OpenAPIV3.ReferenceObject | import("openapi-types").OpenAPIV3.CallbackObject;
143
+ } | undefined;
144
+ } | {
145
+ schemas?: Record<string, import("openapi-types").OpenAPIV3_1.SchemaObject> | undefined;
146
+ responses?: Record<string, import("openapi-types").OpenAPIV3_1.ReferenceObject | import("openapi-types").OpenAPIV3_1.ResponseObject> | undefined;
147
+ parameters?: Record<string, import("openapi-types").OpenAPIV3_1.ReferenceObject | import("openapi-types").OpenAPIV3.ParameterObject> | undefined;
148
+ examples?: Record<string, import("openapi-types").OpenAPIV3_1.ReferenceObject | import("openapi-types").OpenAPIV3.ExampleObject> | undefined;
149
+ requestBodies?: Record<string, import("openapi-types").OpenAPIV3_1.ReferenceObject | import("openapi-types").OpenAPIV3_1.RequestBodyObject> | undefined;
150
+ headers?: Record<string, import("openapi-types").OpenAPIV3_1.ReferenceObject | import("openapi-types").OpenAPIV3.HeaderObject> | undefined;
151
+ securitySchemes?: Record<string, import("openapi-types").OpenAPIV3.SecuritySchemeObject | import("openapi-types").OpenAPIV3_1.ReferenceObject> | undefined;
152
+ links?: Record<string, import("openapi-types").OpenAPIV3_1.ReferenceObject | import("openapi-types").OpenAPIV3_1.LinkObject> | undefined;
153
+ callbacks?: Record<string, import("openapi-types").OpenAPIV3_1.ReferenceObject | import("openapi-types").OpenAPIV3_1.CallbackObject> | undefined;
154
+ pathItems?: Record<string, import("openapi-types").OpenAPIV3_1.ReferenceObject | import("openapi-types").OpenAPIV3_1.PathItemObject<{}>> | undefined;
155
+ } | undefined;
156
+ definitions?: import("openapi-types").OpenAPIV2.DefinitionsObject | undefined;
157
+ };
158
+ overwriteParsedSpecRef: (value: Spec) => void;
159
+ errorRef: Ref<string | null>;
160
+ };
161
+ //# sourceMappingURL=useParser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useParser.d.ts","sourceRoot":"","sources":["../../src/hooks/useParser.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,GAAG,EAA+B,MAAM,KAAK,CAAA;AAE7E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AA4BpC;;GAEG;AACH,wBAAgB,SAAS,CAAC,EACxB,KAAK,GACN,EAAE;IACD,KAAK,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC,MAAM,CAAC,CAAA;CACnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCA2CwC,IAAI;;EAS5C"}
@@ -0,0 +1,13 @@
1
+ import { type ComputedRef, type Ref } from 'vue';
2
+ import type { SpecConfiguration } from '../types';
3
+ /**
4
+ * Keep the raw spec content in a ref and update it when the configuration changes.
5
+ */
6
+ export declare function useSpec({ configuration, proxy, }: {
7
+ configuration?: SpecConfiguration | Ref<SpecConfiguration | undefined> | ComputedRef<SpecConfiguration | undefined>;
8
+ proxy?: string;
9
+ }): {
10
+ rawSpecRef: Ref<string>;
11
+ setRawSpecRef: (value: string) => void;
12
+ };
13
+ //# sourceMappingURL=useSpec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSpec.d.ts","sourceRoot":"","sources":["../../src/hooks/useSpec.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,GAAG,EAAqB,MAAM,KAAK,CAAA;AAEnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AA4CjD;;GAEG;AACH,wBAAgB,OAAO,CAAC,EACtB,aAAa,EACb,KAAK,GACN,EAAE;IACD,aAAa,CAAC,EACV,iBAAiB,GACjB,GAAG,CAAC,iBAAiB,GAAG,SAAS,CAAC,GAClC,WAAW,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAAA;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;;2BA4B+B,MAAM;EAYrC"}