radiant-docs-validator 0.1.6 → 0.1.7

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 (2) hide show
  1. package/dist/index.js +10 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2490,7 +2490,7 @@ async function validateNavigation(navigation) {
2490
2490
  const navValue = navigation[navKey];
2491
2491
  if (navKey === "menu") {
2492
2492
  await validateNavMenu(navValue, ["navigation", "menu"]);
2493
- } else {
2493
+ } else if (navKey === "pages") {
2494
2494
  checkType(
2495
2495
  navValue,
2496
2496
  "array",
@@ -2507,6 +2507,15 @@ async function validateNavigation(navigation) {
2507
2507
  await validateNavigationNode(item, itemPath);
2508
2508
  }
2509
2509
  }
2510
+ } else if (typeof navValue === "string") {
2511
+ await validateOpenApiFile(navValue, ["navigation", "openapi"]);
2512
+ } else if (navValue && typeof navValue === "object" && !Array.isArray(navValue)) {
2513
+ await validateNavOpenApi(navValue, ["navigation", "openapi"]);
2514
+ } else {
2515
+ throwConfigError(
2516
+ "OpenAPI must be either a string (file path or hosted file) or an object.",
2517
+ ["navigation", "openapi"]
2518
+ );
2510
2519
  }
2511
2520
  }
2512
2521
  async function validateConfig(config) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "radiant-docs-validator",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Shared validation for Radiant documentation repositories",
5
5
  "type": "module",
6
6
  "scripts": {