Unsupported specification error with Redocusaurus plugin

84 views Asked by At

I am creating .yml files from an ASP Net Core API using docFx version 2.73.2.
When I try to create a Docusaurus site using the Redocusaurus plugin I receive an Unsupported Specification error.

docfx config file

{
  "metadata": [
    {
      "src": [
        {
          "src": "../",
          "files": [
            "src/**.csproj"
          ]
        }
      ],
      "dest": "api",
      "disableGitFeatures": false,
      "disableDefaultFilter": false,
      "filter": "filterConfig.yml"
    }
  ],
  "build": {
    "content": [
      {
        "files": [
          "api/**.{md,yml}",
          "api/index.md"
        ]
      },
      {
        "files": [
        "articles/**.md",
        "articles/**/toc.yml",
        "toc.yml",
        "*.md"
      ]
    }
    ],
    "resource": [
      {
        "files": [
          "images/**"
        ]
      }
    ],
    "overwrite": [
      {
        "files": [
          "apidoc/**.md"
        ],
        "exclude": [
          "obj/**",
          "_site/**"
        ]
      }
    ],
    "dest": "_site",
    "globalMetadataFiles": [],
    "fileMetadataFiles": [],
    "template": [
      "default",
      "docfx-tmpl/src"
    ],
    "postProcessors": [],
    "markdownEngineName": "markdig",
    "noLangKeyword": false,
    "keepFileLink": false,
    "cleanupCacheHistory": false,
    "disableGitFeatures": false
  }
}

docusaurus config preset definition

presets: [
    [
      'classic',
      {
        docs: {
          sidebarPath: './sidebars.ts',
        },
        blog: false,
        theme: {
          customCss: './src/css/custom.css',
        },
      } satisfies Preset.Options,
    ],
    [
      'redocusaurus',
      {
        // Plugin Options for loading OpenAPI files
        specs: [
          {
            spec: 'path/to.yml',
            route: '/api/',
          },
        ],
        // Theme Options for modifying how redoc renders them
        theme: {
          // Change with your site colors
          primaryColor: '#1890ff',
        },
      },
    ],
  ],

I have tried multiple configuration changes on both docFx and Redocusaurus but nothing seems to work

Any helpp is greatly appreciated

0

There are 0 answers