@mintlify/validation 0.1.46 → 0.1.47
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 -7
- 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 -275
- package/dist/mint-config/schemas/anchorColors.d.ts +28 -28
- package/dist/mint-config/schemas/anchors.d.ts +108 -108
- package/dist/mint-config/schemas/apiReference.d.ts +77 -77
- package/dist/mint-config/schemas/basics.d.ts +80 -80
- package/dist/mint-config/schemas/colors.d.ts +62 -62
- package/dist/mint-config/schemas/config.d.ts +815 -815
- package/dist/mint-config/schemas/favicon.d.ts +2 -2
- package/dist/mint-config/schemas/integrations.d.ts +38 -38
- package/dist/mint-config/schemas/navigation.d.ts +3 -3
- package/dist/mint-config/schemas/tabs.d.ts +31 -31
- package/dist/mint-config/schemas/versions.d.ts +24 -24
- package/dist/mint-config/types/enums.d.ts +4 -4
- package/dist/mint-config/types/index.d.ts +12 -12
- package/dist/mint-config/types/navigation.d.ts +13 -13
- 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 +76 -75
- package/dist/mint-config/schemas/name.d.ts +0 -2
- package/dist/mint-config/types/analytics.d.ts +0 -3
- package/dist/mint-config/types/anchors.d.ts +0 -3
- package/dist/mint-config/types/colors.d.ts +0 -3
- package/dist/mint-config/types/config.d.ts +0 -3
- package/dist/mint-config/types/versions.d.ts +0 -3
- 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
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2022 Mintlify, Inc.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 Mintlify, Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
# @mintlify/validation
|
|
2
|
-
|
|
3
|
-
`@mintlify/validation` is a small package to validate `mint.json` files.
|
|
4
|
-
|
|
5
|
-
# Installation
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
npm install @mintlify/validation
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
# Usage
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
import mintValidation from "@mintlify/validation"
|
|
15
|
-
|
|
16
|
-
const configObject = { name: "Site Name", navigation: [] }
|
|
17
|
-
|
|
18
|
-
mintValidation.validateMintConfig(configObject)
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
This package assumes you have already loaded a config object into a JavaScript object.
|
|
22
|
-
|
|
23
|
-
## Return Values
|
|
24
|
-
|
|
25
|
-
The package returns an object with the properties `status`, `warnings`, and `errors`.
|
|
26
|
-
|
|
27
|
-
`status` can be one of: `"success"`, `"error"`.
|
|
28
|
-
|
|
29
|
-
`warnings` is a string array with warnings the user should know but are not expected to break the site.
|
|
30
|
-
|
|
31
|
-
`errors` is a string array of errors that will likely break the site.
|
|
32
|
-
|
|
33
|
-
When `status === "error"` you should stop trying to build `mint`, your `mint.json` file is invalid and the site will crash when building.
|
|
34
|
-
|
|
35
|
-
## Return Value Example
|
|
36
|
-
|
|
37
|
-
```
|
|
38
|
-
{
|
|
39
|
-
"status": "error",
|
|
40
|
-
"warnings": ["Navigation is an empty array, no pages will be shown"],
|
|
41
|
-
"errors": ["Mintlify does not support .ico favicons, use .svg or .png instead."]
|
|
42
|
-
}
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
## Documentation
|
|
46
|
-
|
|
47
|
-
Additional documentation on `mint.json` is available on [Mintlify's website](https://mintlify.com/docs/settings/global).
|
|
48
|
-
|
|
49
|
-
# Community
|
|
50
|
-
|
|
51
|
-
Join our Discord community if you have questions or just want to chat:
|
|
52
|
-
|
|
53
|
-
[](https://discord.gg/ACREKdwjG5)
|
|
54
|
-
|
|
55
|
-
_Built with 💚 by the Mintlify community._
|
|
1
|
+
# @mintlify/validation
|
|
2
|
+
|
|
3
|
+
`@mintlify/validation` is a small package to validate `mint.json` files.
|
|
4
|
+
|
|
5
|
+
# Installation
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
npm install @mintlify/validation
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
# Usage
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
import mintValidation from "@mintlify/validation"
|
|
15
|
+
|
|
16
|
+
const configObject = { name: "Site Name", navigation: [] }
|
|
17
|
+
|
|
18
|
+
mintValidation.validateMintConfig(configObject)
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
This package assumes you have already loaded a config object into a JavaScript object.
|
|
22
|
+
|
|
23
|
+
## Return Values
|
|
24
|
+
|
|
25
|
+
The package returns an object with the properties `status`, `warnings`, and `errors`.
|
|
26
|
+
|
|
27
|
+
`status` can be one of: `"success"`, `"error"`.
|
|
28
|
+
|
|
29
|
+
`warnings` is a string array with warnings the user should know but are not expected to break the site.
|
|
30
|
+
|
|
31
|
+
`errors` is a string array of errors that will likely break the site.
|
|
32
|
+
|
|
33
|
+
When `status === "error"` you should stop trying to build `mint`, your `mint.json` file is invalid and the site will crash when building.
|
|
34
|
+
|
|
35
|
+
## Return Value Example
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
{
|
|
39
|
+
"status": "error",
|
|
40
|
+
"warnings": ["Navigation is an empty array, no pages will be shown"],
|
|
41
|
+
"errors": ["Mintlify does not support .ico favicons, use .svg or .png instead."]
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Documentation
|
|
46
|
+
|
|
47
|
+
Additional documentation on `mint.json` is available on [Mintlify's website](https://mintlify.com/docs/settings/global).
|
|
48
|
+
|
|
49
|
+
# Community
|
|
50
|
+
|
|
51
|
+
Join our Discord community if you have questions or just want to chat:
|
|
52
|
+
|
|
53
|
+
[](https://discord.gg/ACREKdwjG5)
|
|
54
|
+
|
|
55
|
+
_Built with 💚 by the Mintlify community._
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MintValidationResults } from './mint-config/common';
|
|
2
|
-
import type { ConfigType } from './mint-config/types';
|
|
3
|
-
export declare function validateMintConfig(config: ConfigType): MintValidationResults;
|
|
4
|
-
export * from './openapi/types/endpoint';
|
|
5
|
-
export * from './mint-config/types';
|
|
6
|
-
export { convertOpenAPIV3_1ToEndpoint } from './openapi/convertOpenApi';
|
|
7
|
-
export declare const mintConfigSchema: any;
|
|
1
|
+
import { MintValidationResults } from './mint-config/common';
|
|
2
|
+
import type { ConfigType } from './mint-config/types';
|
|
3
|
+
export declare function validateMintConfig(config: ConfigType): MintValidationResults;
|
|
4
|
+
export * from './openapi/types/endpoint';
|
|
5
|
+
export * from './mint-config/types';
|
|
6
|
+
export { convertOpenAPIV3_1ToEndpoint } from './openapi/convertOpenApi';
|
|
7
|
+
export declare const mintConfigSchema: any;
|