Skip to content

v0.2.0

Compare
Choose a tag to compare
@bourdakos1 bourdakos1 released this 05 Dec 01:10
· 105 commits to main since this release
1fe5df5

0.2.0 (Dec 4, 2021)

💥 Breaking Changes

The plugin option openapiPath has been renamed to path and no longer needs to be wrapped in require.resolve.

As recomended my the Docusaurus documentation, the plugin docusaurus-plugin-api has been properly split into 3 packages:

  • docusaurus-preset-api
  • docusaurus-plugin-api
  • docusaurus-theme-api

The package docusaurus-plugin-api will no longer work on it's own without docusaurus-theme-api. Instead, the preset docusaurus-preset-api can be used on it's own and act as a drop-in replacement for @docusaurus/preset-classic.

Example usage:

// docusaurus.config.js

const config = {
-  plugins: [
-    [
-      "docusaurus-plugin-openapi",
-      {
-        openapiPath: require.resolve("./examples/openapi.json"),
-      },
-    ],
-  ],

  presets: [
    [
-      "@docusaurus/preset-classic",
+      "docusaurus-preset-openapi",
      {
+        api: {
+          path: "examples/openapi.json",
+        }
        docs: {
          // doc options ...
        },
        blog: {
         // blog options ...
        },
        theme: {
          customCss: require.resolve("./src/css/custom.css"),
        },
      },
    ],
  ],
}

Other enhancements and bug fixes

  • Fix multi plugin bug (#69)
  • Add yaml support (#68)
  • Generate markdown for full page (#65)
  • Refactor plugin into separate packages (#64)
  • Update documentation (#63)