@mintlify/validation 0.1.44 → 0.1.45
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/LICENSE +21 -21
- package/README.md +55 -55
- package/dist/index.d.ts +7 -11
- package/dist/index.js +1 -1
- package/dist/mint-config/common.d.ts +6 -6
- package/dist/mint-config/flattenUnionErrorMessages.d.ts +7 -7
- package/dist/mint-config/hexadecimalPattern.d.ts +1 -1
- package/dist/mint-config/schemas/analytics.d.ts +275 -171
- package/dist/mint-config/schemas/anchorColors.d.ts +28 -14
- package/dist/mint-config/schemas/anchors.d.ts +108 -46
- package/dist/mint-config/schemas/apiReference.d.ts +77 -0
- package/dist/mint-config/schemas/basics.d.ts +80 -0
- package/dist/mint-config/schemas/colors.d.ts +62 -61
- package/dist/mint-config/schemas/config.d.ts +814 -895
- package/dist/mint-config/schemas/favicon.d.ts +2 -2
- package/dist/mint-config/schemas/integrations.d.ts +38 -0
- package/dist/mint-config/schemas/name.d.ts +2 -2
- package/dist/mint-config/schemas/navigation.d.ts +3 -3
- package/dist/mint-config/schemas/tabs.d.ts +31 -11
- package/dist/mint-config/schemas/versions.d.ts +24 -11
- package/dist/mint-config/types/analytics.d.ts +3 -3
- package/dist/mint-config/types/anchors.d.ts +4 -4
- package/dist/mint-config/types/colors.d.ts +3 -3
- package/dist/mint-config/types/config.d.ts +55 -4
- package/dist/mint-config/types/enums.d.ts +4 -0
- package/dist/mint-config/types/index.d.ts +12 -0
- package/dist/mint-config/types/navigation.d.ts +13 -6
- package/dist/mint-config/types/versions.d.ts +3 -3
- package/dist/mint-config/validateAnchorsWarnings.d.ts +4 -4
- package/dist/mint-config/validateVersionsInNavigation.d.ts +5 -5
- package/dist/openapi/convertOpenApi.d.ts +18 -18
- package/dist/openapi/convertParameters.d.ts +9 -9
- package/dist/openapi/convertSchema.d.ts +11 -11
- package/dist/openapi/convertSecurity.d.ts +14 -14
- package/dist/openapi/convertServers.d.ts +8 -8
- package/dist/openapi/types/endpoint.d.ts +128 -128
- package/package.json +75 -75
- package/dist/schemas/analytics.d.ts +0 -171
- package/dist/schemas/anchorColors.d.ts +0 -14
- package/dist/schemas/anchors.d.ts +0 -46
- package/dist/schemas/colors.d.ts +0 -61
- package/dist/schemas/config.d.ts +0 -799
- package/dist/schemas/favicon.d.ts +0 -2
- package/dist/schemas/name.d.ts +0 -2
- package/dist/schemas/navigation.d.ts +0 -3
- package/dist/schemas/tabs.d.ts +0 -11
- package/dist/schemas/versions.d.ts +0 -11
- package/dist/types/analytics.d.ts +0 -3
- package/dist/types/anchors.d.ts +0 -3
- package/dist/types/colors.d.ts +0 -3
- package/dist/types/config.d.ts +0 -3
- package/dist/types/endpoint.d.ts +0 -125
- package/dist/types/navigation.d.ts +0 -6
- package/dist/types/versions.d.ts +0 -3
- package/dist/utils/common.d.ts +0 -6
- package/dist/utils/convertOpenApi.d.ts +0 -43
- package/dist/utils/flattenUnionErrorMessages.d.ts +0 -7
- package/dist/utils/hexadecimalPattern.d.ts +0 -1
- package/dist/utils/validateAnchorsWarnings.d.ts +0 -4
- package/dist/utils/validateVersionsInNavigation.d.ts +0 -5
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const faviconSchema: z.ZodEffects<z.ZodString, string, string>;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const faviconSchema: z.ZodEffects<z.ZodString, string, string>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const intercomSchema: z.ZodString;
|
|
3
|
+
declare const frontchatSchema: z.ZodString;
|
|
4
|
+
declare const inkeepSchema: z.ZodObject<{
|
|
5
|
+
integrationApiKey: z.ZodString;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
integrationApiKey: string;
|
|
8
|
+
}, {
|
|
9
|
+
integrationApiKey: string;
|
|
10
|
+
}>;
|
|
11
|
+
export declare const integrationsSchema: z.ZodObject<{
|
|
12
|
+
intercom: z.ZodOptional<z.ZodString>;
|
|
13
|
+
frontchat: z.ZodOptional<z.ZodString>;
|
|
14
|
+
inkeepSchema: z.ZodOptional<z.ZodObject<{
|
|
15
|
+
integrationApiKey: z.ZodString;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
integrationApiKey: string;
|
|
18
|
+
}, {
|
|
19
|
+
integrationApiKey: string;
|
|
20
|
+
}>>;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
intercom?: string | undefined;
|
|
23
|
+
frontchat?: string | undefined;
|
|
24
|
+
inkeepSchema?: {
|
|
25
|
+
integrationApiKey: string;
|
|
26
|
+
} | undefined;
|
|
27
|
+
}, {
|
|
28
|
+
intercom?: string | undefined;
|
|
29
|
+
frontchat?: string | undefined;
|
|
30
|
+
inkeepSchema?: {
|
|
31
|
+
integrationApiKey: string;
|
|
32
|
+
} | undefined;
|
|
33
|
+
}>;
|
|
34
|
+
export type IntercomType = z.infer<typeof intercomSchema>;
|
|
35
|
+
export type FrontchatType = z.infer<typeof frontchatSchema>;
|
|
36
|
+
export type InkeepType = z.infer<typeof inkeepSchema>;
|
|
37
|
+
export type IntegrationsType = z.infer<typeof integrationsSchema>;
|
|
38
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const nameSchema: z.ZodString;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const nameSchema: z.ZodString;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
export declare const navigationConfigSchema: z.ZodArray<z.ZodType<
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { MintNavigationGroup } from '../types/navigation';
|
|
3
|
+
export declare const navigationConfigSchema: z.ZodArray<z.ZodType<MintNavigationGroup, z.ZodTypeDef, MintNavigationGroup>, "many">;
|
|
@@ -1,11 +1,31 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
name: z.ZodString;
|
|
4
|
-
url: z.ZodString;
|
|
5
|
-
}, "strip", z.ZodTypeAny, {
|
|
6
|
-
name: string;
|
|
7
|
-
url: string;
|
|
8
|
-
}, {
|
|
9
|
-
name: string;
|
|
10
|
-
url: string;
|
|
11
|
-
}
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const tabSchema: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
url: z.ZodString;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
name: string;
|
|
7
|
+
url: string;
|
|
8
|
+
}, {
|
|
9
|
+
name: string;
|
|
10
|
+
url: string;
|
|
11
|
+
}>;
|
|
12
|
+
export type TabType = z.infer<typeof tabSchema>;
|
|
13
|
+
export declare const tabsSchema: z.ZodArray<z.ZodObject<{
|
|
14
|
+
name: z.ZodString;
|
|
15
|
+
url: z.ZodString;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
name: string;
|
|
18
|
+
url: string;
|
|
19
|
+
}, {
|
|
20
|
+
name: string;
|
|
21
|
+
url: string;
|
|
22
|
+
}>, "many">;
|
|
23
|
+
export declare const primaryTabSchema: z.ZodObject<{
|
|
24
|
+
name: z.ZodString;
|
|
25
|
+
}, "strict", z.ZodTypeAny, {
|
|
26
|
+
name: string;
|
|
27
|
+
}, {
|
|
28
|
+
name: string;
|
|
29
|
+
}>;
|
|
30
|
+
export type PrimaryTabType = z.infer<typeof primaryTabSchema>;
|
|
31
|
+
export {};
|
|
@@ -1,11 +1,24 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
name: z.ZodString;
|
|
4
|
-
url: z.ZodString;
|
|
5
|
-
}, "strict", z.ZodTypeAny, {
|
|
6
|
-
name: string;
|
|
7
|
-
url: string;
|
|
8
|
-
}, {
|
|
9
|
-
name: string;
|
|
10
|
-
url: string;
|
|
11
|
-
}>]
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const versionSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
url: z.ZodString;
|
|
5
|
+
}, "strict", z.ZodTypeAny, {
|
|
6
|
+
name: string;
|
|
7
|
+
url: string;
|
|
8
|
+
}, {
|
|
9
|
+
name: string;
|
|
10
|
+
url: string;
|
|
11
|
+
}>]>;
|
|
12
|
+
export declare const versionsSchema: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
13
|
+
name: z.ZodString;
|
|
14
|
+
url: z.ZodString;
|
|
15
|
+
}, "strict", z.ZodTypeAny, {
|
|
16
|
+
name: string;
|
|
17
|
+
url: string;
|
|
18
|
+
}, {
|
|
19
|
+
name: string;
|
|
20
|
+
url: string;
|
|
21
|
+
}>]>, "many">;
|
|
22
|
+
export type VersionType = z.infer<typeof versionSchema>;
|
|
23
|
+
export type VersionsType = z.infer<typeof versionsSchema>;
|
|
24
|
+
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { analyticsSchema } from '../schemas/analytics';
|
|
3
|
-
export type AnalyticsType = z.infer<typeof analyticsSchema>;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { analyticsSchema } from '../schemas/analytics';
|
|
3
|
+
export type AnalyticsType = z.infer<typeof analyticsSchema>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { anchorsSchema } from '../schemas/anchors';
|
|
3
|
-
export type AnchorsType = z.infer<typeof anchorsSchema>;
|
|
4
|
-
export type AnchorType = AnchorsType[0];
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { anchorsSchema } from '../schemas/anchors';
|
|
3
|
+
export type AnchorsType = z.infer<typeof anchorsSchema>;
|
|
4
|
+
export type AnchorType = AnchorsType[0];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { colorsSchema } from '../schemas/colors';
|
|
3
|
-
export type ColorsType = z.infer<typeof colorsSchema>;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { colorsSchema } from '../schemas/colors';
|
|
3
|
+
export type ColorsType = z.infer<typeof colorsSchema>;
|
|
@@ -1,4 +1,55 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AnalyticsType } from '../schemas/analytics';
|
|
3
|
+
import { AnchorsType } from '../schemas/anchors';
|
|
4
|
+
import { ApiConfigType } from '../schemas/apiReference';
|
|
5
|
+
import { FeedbackType, LogoType, FooterSocialsType, NavbarLink, IconType } from '../schemas/basics';
|
|
6
|
+
import { ColorsType } from '../schemas/colors';
|
|
7
|
+
import { configSchema } from '../schemas/config';
|
|
8
|
+
import { IntegrationsType } from '../schemas/integrations';
|
|
9
|
+
import { TabType } from '../schemas/tabs';
|
|
10
|
+
import { VersionsType } from '../schemas/versions';
|
|
11
|
+
import { ModeToggleType } from './enums';
|
|
12
|
+
import { MintNavigation } from './navigation';
|
|
13
|
+
export type ConfigType = z.infer<typeof configSchema>;
|
|
14
|
+
export type MintConfig = {
|
|
15
|
+
name: string;
|
|
16
|
+
backgroundImage?: string;
|
|
17
|
+
colors?: ColorsType;
|
|
18
|
+
favicon?: string;
|
|
19
|
+
feedback?: FeedbackType;
|
|
20
|
+
footerSocials?: FooterSocialsType;
|
|
21
|
+
logo?: LogoType;
|
|
22
|
+
metadata?: Record<string, string>;
|
|
23
|
+
modeToggle?: {
|
|
24
|
+
default?: ModeToggleType;
|
|
25
|
+
isHidden?: boolean;
|
|
26
|
+
};
|
|
27
|
+
openapi?: string | string[];
|
|
28
|
+
api?: ApiConfigType;
|
|
29
|
+
navigation?: MintNavigation;
|
|
30
|
+
anchors?: AnchorsType;
|
|
31
|
+
versions?: VersionsType;
|
|
32
|
+
topbarCtaButton?: NavbarLink;
|
|
33
|
+
topAnchor?: {
|
|
34
|
+
name: string;
|
|
35
|
+
icon?: string;
|
|
36
|
+
iconType?: IconType;
|
|
37
|
+
};
|
|
38
|
+
topbarLinks?: NavbarLink[];
|
|
39
|
+
primaryTab?: {
|
|
40
|
+
name: string;
|
|
41
|
+
};
|
|
42
|
+
tabs?: TabType[];
|
|
43
|
+
repo?: {
|
|
44
|
+
github?: {
|
|
45
|
+
owner: string;
|
|
46
|
+
repo: string;
|
|
47
|
+
deployBranch: string;
|
|
48
|
+
contentDirectory: string;
|
|
49
|
+
isPrivate?: boolean;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
analytics?: AnalyticsType;
|
|
53
|
+
integrations?: IntegrationsType;
|
|
54
|
+
isWhiteLabeled?: boolean;
|
|
55
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type ModeToggleType = 'dark' | 'light' | (string & {});
|
|
2
|
+
export type NavbarLinkType = 'github' | 'link' | (string & {});
|
|
3
|
+
export type ApiAuthMethodType = 'key' | 'bearer' | 'basic' | (string & {});
|
|
4
|
+
export type ApiPlaygroundModeType = 'show' | 'simple' | 'hide' | (string & {});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type { ConfigType, MintConfig } from './config';
|
|
2
|
+
export type { AnalyticsType, AmplitudeConfigInterface, ClearbitConfigInterface, FathomConfigInterface, GoogleAnalyticsConfigInterface, GoogleTagManagerConfigInterface, HotjarConfigInterface, KoalaConfigInterface, LogrocketConfigInterface, MixpanelConfigInterface, PirschConfigInterface, PostHogConfigInterface, PlausibleConfigInterface, } from '../schemas/analytics';
|
|
3
|
+
export type { AnchorsType, AnchorType, TopAnchorType } from '../schemas/anchors';
|
|
4
|
+
export type { ApiConfigType } from '../schemas/apiReference';
|
|
5
|
+
export type { FeedbackType, FooterSocialsType, IconType, LogoType, NavbarLink, } from '../schemas/basics';
|
|
6
|
+
export type { ColorsType } from '../schemas/colors';
|
|
7
|
+
export type { GradientType } from '../schemas/anchorColors';
|
|
8
|
+
export type { IntegrationsType, IntercomType, FrontchatType, InkeepType, } from '../schemas/integrations';
|
|
9
|
+
export type { TabType, PrimaryTabType } from '../schemas/tabs';
|
|
10
|
+
export type { VersionsType, VersionType } from '../schemas/versions';
|
|
11
|
+
export type { ModeToggleType, NavbarLinkType, ApiAuthMethodType, ApiPlaygroundModeType, } from './enums';
|
|
12
|
+
export type { MintNavigation, MintNavigationGroup, MintNavigationGroupChild, NavigationEntry, NavigationType, } from './navigation';
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
export type NavigationEntry = string | NavigationType;
|
|
2
|
-
export type NavigationType = {
|
|
3
|
-
group: string;
|
|
4
|
-
pages: NavigationEntry[];
|
|
5
|
-
version?: string;
|
|
6
|
-
};
|
|
1
|
+
export type NavigationEntry = string | NavigationType;
|
|
2
|
+
export type NavigationType = {
|
|
3
|
+
group: string;
|
|
4
|
+
pages: NavigationEntry[];
|
|
5
|
+
version?: string;
|
|
6
|
+
};
|
|
7
|
+
export type MintNavigation = MintNavigationGroup[];
|
|
8
|
+
export type MintNavigationGroup = {
|
|
9
|
+
group: string;
|
|
10
|
+
version?: string;
|
|
11
|
+
pages: MintNavigationGroupChild[];
|
|
12
|
+
};
|
|
13
|
+
export type MintNavigationGroupChild = string | MintNavigationGroup;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { versionsSchema } from '../schemas/versions';
|
|
3
|
-
export type VersionsType = z.infer<typeof versionsSchema>;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { versionsSchema } from '../schemas/versions';
|
|
3
|
+
export type VersionsType = z.infer<typeof versionsSchema>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MintValidationResults } from './common';
|
|
2
|
-
import { AnchorsType } from './
|
|
3
|
-
import {
|
|
4
|
-
export declare function validateAnchorsWarnings(anchors: AnchorsType | undefined, navigation:
|
|
1
|
+
import { MintValidationResults } from './common';
|
|
2
|
+
import { AnchorsType } from './schemas/anchors';
|
|
3
|
+
import { MintNavigation } from './types/navigation';
|
|
4
|
+
export declare function validateAnchorsWarnings(anchors: AnchorsType | undefined, navigation: MintNavigation | undefined): MintValidationResults;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MintValidationResults } from './common';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
export declare function flattenNavigationVersions(nav:
|
|
5
|
-
export declare function validateVersionsInNavigation(navigation:
|
|
1
|
+
import { MintValidationResults } from './common';
|
|
2
|
+
import { VersionsType } from './schemas/versions';
|
|
3
|
+
import { MintNavigationGroupChild, MintNavigationGroup } from './types/navigation';
|
|
4
|
+
export declare function flattenNavigationVersions(nav: MintNavigationGroupChild[], versions?: string[]): string[];
|
|
5
|
+
export declare function validateVersionsInNavigation(navigation: MintNavigationGroup[] | undefined, versions?: VersionsType | undefined): MintValidationResults;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { OpenAPIV3_1 } from 'openapi-types';
|
|
2
|
-
import type { BodySchema, DataSchemaArray, Endpoint, HttpMethod, ResponseSchema } from './types/endpoint';
|
|
3
|
-
export declare const generateMessage: (path: string[], messages?: string[]) => string;
|
|
4
|
-
export declare class InvalidSchemaError extends Error {
|
|
5
|
-
constructor(path: string[], ...messages: string[]);
|
|
6
|
-
}
|
|
7
|
-
export declare class ImpossibleSchemaError extends Error {
|
|
8
|
-
constructor(path: string[], ...messages: string[]);
|
|
9
|
-
}
|
|
10
|
-
export declare class ConversionError extends Error {
|
|
11
|
-
constructor(path: string[], ...messages: string[]);
|
|
12
|
-
}
|
|
13
|
-
export declare const convertBody: (path: string[], body: OpenAPIV3_1.RequestBodyObject | undefined) => BodySchema;
|
|
14
|
-
export declare const convertResponses: (path: string[], responses: OpenAPIV3_1.ResponsesObject) => ResponseSchema;
|
|
15
|
-
export declare const convertResponse: (path: string[], response: OpenAPIV3_1.ResponseObject) => {
|
|
16
|
-
[contentType: string]: DataSchemaArray;
|
|
17
|
-
};
|
|
18
|
-
export declare const convertOpenAPIV3_1ToEndpoint: (spec: OpenAPIV3_1.Document, path: string, method: HttpMethod) => Endpoint | undefined;
|
|
1
|
+
import { OpenAPIV3_1 } from 'openapi-types';
|
|
2
|
+
import type { BodySchema, DataSchemaArray, Endpoint, HttpMethod, ResponseSchema } from './types/endpoint';
|
|
3
|
+
export declare const generateMessage: (path: string[], messages?: string[]) => string;
|
|
4
|
+
export declare class InvalidSchemaError extends Error {
|
|
5
|
+
constructor(path: string[], ...messages: string[]);
|
|
6
|
+
}
|
|
7
|
+
export declare class ImpossibleSchemaError extends Error {
|
|
8
|
+
constructor(path: string[], ...messages: string[]);
|
|
9
|
+
}
|
|
10
|
+
export declare class ConversionError extends Error {
|
|
11
|
+
constructor(path: string[], ...messages: string[]);
|
|
12
|
+
}
|
|
13
|
+
export declare const convertBody: (path: string[], body: OpenAPIV3_1.RequestBodyObject | undefined) => BodySchema;
|
|
14
|
+
export declare const convertResponses: (path: string[], responses: OpenAPIV3_1.ResponsesObject) => ResponseSchema;
|
|
15
|
+
export declare const convertResponse: (path: string[], response: OpenAPIV3_1.ResponseObject) => {
|
|
16
|
+
[contentType: string]: DataSchemaArray;
|
|
17
|
+
};
|
|
18
|
+
export declare const convertOpenAPIV3_1ToEndpoint: (spec: OpenAPIV3_1.Document, path: string, method: HttpMethod) => Endpoint | undefined;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { OpenAPIV3_1 } from 'openapi-types';
|
|
2
|
-
import { ParameterSections } from './types/endpoint';
|
|
3
|
-
export type ConvertParametersParams = {
|
|
4
|
-
path: string[];
|
|
5
|
-
method: string;
|
|
6
|
-
pathParameters: OpenAPIV3_1.ParameterObject[] | undefined;
|
|
7
|
-
operationParameters: OpenAPIV3_1.ParameterObject[] | undefined;
|
|
8
|
-
};
|
|
9
|
-
export declare const convertParameters: ({ path, method, pathParameters, operationParameters, }: ConvertParametersParams) => ParameterSections;
|
|
1
|
+
import { OpenAPIV3_1 } from 'openapi-types';
|
|
2
|
+
import { ParameterSections } from './types/endpoint';
|
|
3
|
+
export type ConvertParametersParams = {
|
|
4
|
+
path: string[];
|
|
5
|
+
method: string;
|
|
6
|
+
pathParameters: OpenAPIV3_1.ParameterObject[] | undefined;
|
|
7
|
+
operationParameters: OpenAPIV3_1.ParameterObject[] | undefined;
|
|
8
|
+
};
|
|
9
|
+
export declare const convertParameters: ({ path, method, pathParameters, operationParameters, }: ConvertParametersParams) => ParameterSections;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { OpenAPIV3_1 } from 'openapi-types';
|
|
2
|
-
import { DataSchemaArray } from './types/endpoint';
|
|
3
|
-
export declare const convertSchema: (path: string[], schema: OpenAPIV3_1.SchemaObject | undefined, required?: boolean) => DataSchemaArray;
|
|
4
|
-
export declare const combineTopLevelSchemas: (path: string[], schema1: OpenAPIV3_1.SchemaObject, schema2: OpenAPIV3_1.SchemaObject) => OpenAPIV3_1.SchemaObject;
|
|
5
|
-
export declare const addKeyIfDefined: <D, K extends keyof D>(key: K, value: D[K], destination: D) => void;
|
|
6
|
-
export declare const copyKeyIfDefined: <D, K extends keyof D>(key: K, source: Pick<D, K>, destination: D) => void;
|
|
7
|
-
export declare const convertProperties: (path: string[], properties: {
|
|
8
|
-
[key: string]: OpenAPIV3_1.SchemaObject;
|
|
9
|
-
} | undefined, required?: string[]) => {
|
|
10
|
-
[key: string]: DataSchemaArray;
|
|
11
|
-
};
|
|
1
|
+
import { OpenAPIV3_1 } from 'openapi-types';
|
|
2
|
+
import { DataSchemaArray } from './types/endpoint';
|
|
3
|
+
export declare const convertSchema: (path: string[], schema: OpenAPIV3_1.SchemaObject | undefined, required?: boolean) => DataSchemaArray;
|
|
4
|
+
export declare const combineTopLevelSchemas: (path: string[], schema1: OpenAPIV3_1.SchemaObject, schema2: OpenAPIV3_1.SchemaObject) => OpenAPIV3_1.SchemaObject;
|
|
5
|
+
export declare const addKeyIfDefined: <D, K extends keyof D>(key: K, value: D[K], destination: D) => void;
|
|
6
|
+
export declare const copyKeyIfDefined: <D, K extends keyof D>(key: K, source: Pick<D, K>, destination: D) => void;
|
|
7
|
+
export declare const convertProperties: (path: string[], properties: {
|
|
8
|
+
[key: string]: OpenAPIV3_1.SchemaObject;
|
|
9
|
+
} | undefined, required?: string[]) => {
|
|
10
|
+
[key: string]: DataSchemaArray;
|
|
11
|
+
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { OpenAPIV3_1 } from 'openapi-types';
|
|
2
|
-
import { SecurityOption } from './types/endpoint';
|
|
3
|
-
type ConvertSecurityParams = {
|
|
4
|
-
securityRequirements?: OpenAPIV3_1.SecurityRequirementObject[];
|
|
5
|
-
securitySchemes: OpenAPIV3_1.ComponentsObject['securitySchemes'];
|
|
6
|
-
};
|
|
7
|
-
export declare const convertSecurity: ({ securityRequirements, securitySchemes, }: ConvertSecurityParams) => SecurityOption[];
|
|
8
|
-
type AddSecurityParametersParams = {
|
|
9
|
-
securityName: string;
|
|
10
|
-
securityScheme: OpenAPIV3_1.SecuritySchemeObject;
|
|
11
|
-
parameterSections: SecurityOption;
|
|
12
|
-
};
|
|
13
|
-
export declare const addSecurityParameters: ({ securityName, securityScheme, parameterSections, }: AddSecurityParametersParams) => void;
|
|
14
|
-
export {};
|
|
1
|
+
import { OpenAPIV3_1 } from 'openapi-types';
|
|
2
|
+
import { SecurityOption } from './types/endpoint';
|
|
3
|
+
type ConvertSecurityParams = {
|
|
4
|
+
securityRequirements?: OpenAPIV3_1.SecurityRequirementObject[];
|
|
5
|
+
securitySchemes: OpenAPIV3_1.ComponentsObject['securitySchemes'];
|
|
6
|
+
};
|
|
7
|
+
export declare const convertSecurity: ({ securityRequirements, securitySchemes, }: ConvertSecurityParams) => SecurityOption[];
|
|
8
|
+
type AddSecurityParametersParams = {
|
|
9
|
+
securityName: string;
|
|
10
|
+
securityScheme: OpenAPIV3_1.SecuritySchemeObject;
|
|
11
|
+
parameterSections: SecurityOption;
|
|
12
|
+
};
|
|
13
|
+
export declare const addSecurityParameters: ({ securityName, securityScheme, parameterSections, }: AddSecurityParametersParams) => void;
|
|
14
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { OpenAPIV3_1 } from 'openapi-types';
|
|
2
|
-
import { Server } from './types/endpoint';
|
|
3
|
-
type ConvertServersParams = {
|
|
4
|
-
servers?: OpenAPIV3_1.ServerObject[];
|
|
5
|
-
};
|
|
6
|
-
type ConvertServersType = Server[] | undefined;
|
|
7
|
-
export declare const convertServers: ({ servers }: ConvertServersParams) => ConvertServersType;
|
|
8
|
-
export {};
|
|
1
|
+
import { OpenAPIV3_1 } from 'openapi-types';
|
|
2
|
+
import { Server } from './types/endpoint';
|
|
3
|
+
type ConvertServersParams = {
|
|
4
|
+
servers?: OpenAPIV3_1.ServerObject[];
|
|
5
|
+
};
|
|
6
|
+
type ConvertServersType = Server[] | undefined;
|
|
7
|
+
export declare const convertServers: ({ servers }: ConvertServersParams) => ConvertServersType;
|
|
8
|
+
export {};
|