@mintlify/validation 0.1.37 → 0.1.39
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.
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { OpenAPIV3_1 } from 'openapi-types';
|
|
2
2
|
import type { BodySchema, DataSchemaArray, Endpoint, HttpMethod, ResponseSchema } from './types/endpoint';
|
|
3
|
+
export declare const generateMessage: (path: string[], messages?: string[]) => string;
|
|
3
4
|
export declare class InvalidSchemaError extends Error {
|
|
4
|
-
constructor(
|
|
5
|
+
constructor(path: string[], ...messages: string[]);
|
|
5
6
|
}
|
|
6
7
|
export declare class ImpossibleSchemaError extends Error {
|
|
7
|
-
constructor(
|
|
8
|
+
constructor(path: string[], ...messages: string[]);
|
|
8
9
|
}
|
|
9
10
|
export declare class ConversionError extends Error {
|
|
10
|
-
constructor(
|
|
11
|
+
constructor(path: string[], ...messages: string[]);
|
|
11
12
|
}
|
|
12
|
-
export declare const convertBody: (body
|
|
13
|
-
export declare const convertResponses: (responses: OpenAPIV3_1.ResponsesObject) => ResponseSchema;
|
|
14
|
-
export declare const convertResponse: (response: OpenAPIV3_1.ResponseObject) => {
|
|
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) => {
|
|
15
16
|
[contentType: string]: DataSchemaArray;
|
|
16
17
|
};
|
|
17
18
|
export declare const convertOpenAPIV3_1ToEndpoint: (spec: OpenAPIV3_1.Document, path: string, method: HttpMethod) => Endpoint | undefined;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { OpenAPIV3_1 } from 'openapi-types';
|
|
2
2
|
import { ParameterSections } from './types/endpoint';
|
|
3
|
-
type ConvertParametersParams = {
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
export type ConvertParametersParams = {
|
|
4
|
+
path: string[];
|
|
5
|
+
method: string;
|
|
6
|
+
pathParameters: OpenAPIV3_1.ParameterObject[] | undefined;
|
|
7
|
+
operationParameters: OpenAPIV3_1.ParameterObject[] | undefined;
|
|
6
8
|
};
|
|
7
|
-
export declare const convertParameters: ({ pathParameters, operationParameters, }: ConvertParametersParams) => ParameterSections;
|
|
8
|
-
export {};
|
|
9
|
+
export declare const convertParameters: ({ path, method, pathParameters, operationParameters, }: ConvertParametersParams) => ParameterSections;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { OpenAPIV3_1 } from 'openapi-types';
|
|
2
2
|
import { DataSchemaArray } from './types/endpoint';
|
|
3
|
-
export declare const convertSchema: (schema
|
|
4
|
-
export declare const combineTopLevelSchemas: (schema1: OpenAPIV3_1.SchemaObject, schema2: OpenAPIV3_1.SchemaObject) => OpenAPIV3_1.SchemaObject;
|
|
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
5
|
export declare const addKeyIfDefined: <D, K extends keyof D>(key: K, value: D[K], destination: D) => void;
|
|
6
6
|
export declare const copyKeyIfDefined: <D, K extends keyof D>(key: K, source: Pick<D, K>, destination: D) => void;
|
|
7
|
-
export declare const convertProperties: (properties
|
|
7
|
+
export declare const convertProperties: (path: string[], properties: {
|
|
8
8
|
[key: string]: OpenAPIV3_1.SchemaObject;
|
|
9
9
|
} | undefined, required?: string[]) => {
|
|
10
10
|
[key: string]: DataSchemaArray;
|
|
@@ -6,8 +6,9 @@ type ConvertSecurityParams = {
|
|
|
6
6
|
};
|
|
7
7
|
export declare const convertSecurity: ({ securityRequirements, securitySchemes, }: ConvertSecurityParams) => SecurityOption[];
|
|
8
8
|
type AddSecurityParametersParams = {
|
|
9
|
+
securityName: string;
|
|
9
10
|
securityScheme: OpenAPIV3_1.SecuritySchemeObject;
|
|
10
11
|
parameterSections: SecurityOption;
|
|
11
12
|
};
|
|
12
|
-
export declare const addSecurityParameters: ({ securityScheme, parameterSections, }: AddSecurityParametersParams) => void;
|
|
13
|
+
export declare const addSecurityParameters: ({ securityName, securityScheme, parameterSections, }: AddSecurityParametersParams) => void;
|
|
13
14
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintlify/validation",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.39",
|
|
4
4
|
"description": "Validates mint.json files",
|
|
5
5
|
"author": "Mintlify, Inc.",
|
|
6
6
|
"repository": {
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"webpack": "^5.75.0",
|
|
69
69
|
"webpack-cli": "^5.0.1"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "eca5f7098e1bc0728e7c011454e4071b3ea28de4"
|
|
72
72
|
}
|