diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e19a1821..45b466e12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,26 @@ +## 4.4.0 (May 2, 2025) + +High level enhancements + +- Extend template support to info, tag and schema docs +- Add support for Server-Sent Events (SSE) to API Explorer +- Various bug fixes + +Other enhancements and bug fixes + +- conditionally apply info template ([#1137](https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/pull/1137)) +- Fixes for enums with no type and anyof/oneof schemas ([#1136](https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/pull/1136)) +- fix: add discriminator empty subschema and safeguard check in DiscriminatorNode ([#1133](https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/pull/1133)) +- feat: add support to info, and tag, and schema custom tamplates ([#1122](https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/pull/1122)) +- Pin GitHub Actions ([#1131](https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/pull/1131)) +- fix linter errors +- Pin github actions ([#1124](https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/pull/1124)) +- Update deploy-preview.yml +- Update deploy-live.yml +- Pin github actions ([#1118](https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/pull/1118)) +- add httpbin.org spec to examples ([#1117](https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/pull/1117)) +- Add support for Server-Sent Events (SSE) in API Explorer and configuration ([#1041](https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/pull/1041)) + ## 4.3.7 (Mar 12, 2025) Bug fixes diff --git a/README.md b/README.md index 2f4c4ec30..bbfc72ede 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@
-OpenAPI plugin for generating API reference docs in Docusaurus v3 (compatible with [Docusaurus Faster](https://github.com/facebook/docusaurus/issues/10556). +OpenAPI plugin for generating API reference docs in Docusaurus v3 (compatible with [Docusaurus Faster](https://github.com/facebook/docusaurus/issues/10556)).

@@ -155,22 +155,25 @@ The `docusaurus-plugin-openapi-docs` plugin can be configured with the following `config` can be configured with the following options: -| Name | Type | Default | Description | -| -------------------- | --------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | -| `specPath` | `string` | `null` | Designated URL or path to the source of an OpenAPI specification file or directory of multiple OpenAPI specification files. | -| `ouputDir` | `string` | `null` | Desired output path for generated MDX and sidebar files. | -| `proxy` | `string` | `null` | _Optional:_ Proxy URL to prepend to base URL when performing API requests from browser. | -| `template` | `string` | `null` | _Optional:_ Customize MDX content with a desired template. | -| `downloadUrl` | `string` | `null` | _Optional:_ Designated URL for downloading OpenAPI specification. (requires `info` section/doc) | -| `hideSendButton` | `boolean` | `null` | _Optional:_ If set to `true`, hides the "Send API Request" button in API demo panel | -| `showExtensions` | `boolean` | `null` | _Optional:_ If set to `true`, renders operation-level vendor-extensions in description. | -| `sidebarOptions` | `object` | `null` | _Optional:_ Set of options for sidebar configuration. See below for a list of supported options. | -| `version` | `string` | `null` | _Optional:_ Version assigned to single or micro-spec API specified in `specPath`. | -| `label` | `string` | `null` | _Optional:_ Version label used when generating version selector dropdown menu. | -| `baseUrl` | `string` | `null` | _Optional:_ Version base URL used when generating version selector dropdown menu. | -| `versions` | `object` | `null` | _Optional:_ Set of options for versioning configuration. See below for a list of supported options. | -| `markdownGenerators` | `object` | `null` | _Optional:_ Customize MDX content with a set of options for specifying markdown generator functions. See below for a list of supported options. | -| `showSchemas` | `boolean` | `null` | _Optional:_ If set to `true`, generates schema pages and adds them to the sidebar. | +| Name | Type | Default | Description | +| -------------------- | --------- | ------- | --------------------------------------------------------------------------------------------------------------------------- | +| `specPath` | `string` | `null` | Designated URL or path to the source of an OpenAPI specification file or directory of multiple OpenAPI specification files. | +| `outputDir` | `string` | `null` | Desired output path for generated MDX and sidebar files. | +| `proxy` | `string` | `null` | _Optional:_ Proxy URL to prepend to base URL when performing API requests from browser. | +| `template` | `string` | `null` | _Optional:_ Customize MDX content with a desired template. | +| `infoTemplate` | `string` | `null` | _Optional:_ Customize MDX content for **info** pages only. | +| `tagTemplate` | `string` | `null` | _Optional:_ Customize MDX content for **tag** pages only. | +| `schemaTemplate` | `string` | `null` | _Optional:_ Customize MDX content for **schema** pages only. | +| `downloadUrl` | `string` | `null` | _Optional:_ Designated URL for downloading OpenAPI specification. (requires `info` section/doc) | +| `hideSendButton` | `boolean` | `null` | _Optional:_ If set to `true`, hides the “Send API Request” button in the API demo panel. | +| `showExtensions` | `boolean` | `null` | _Optional:_ If set to `true`, renders operation‑level vendor‑extensions in descriptions. | +| `sidebarOptions` | `object` | `null` | _Optional:_ Set of options for sidebar configuration. See below for a list of supported options. | +| `version` | `string` | `null` | _Optional:_ Version assigned to a single or micro‑spec API specified in `specPath`. | +| `label` | `string` | `null` | _Optional:_ Version label used when generating the version‑selector dropdown menu. | +| `baseUrl` | `string` | `null` | _Optional:_ Base URL for versioned docs in the version‑selector dropdown. | +| `versions` | `object` | `null` | _Optional:_ Options for versioning configuration. See below for a list of supported options. | +| `markdownGenerators` | `object` | `null` | _Optional:_ Customize MDX content via generator functions. See below for a list of supported options. | +| `showSchemas` | `boolean` | `null` | _Optional:_ If set to `true`, generates standalone schema pages and adds them to the sidebar. | ### sidebarOptions diff --git a/demo/docs/intro.mdx b/demo/docs/intro.mdx index 9ac078098..418ed39f7 100644 --- a/demo/docs/intro.mdx +++ b/demo/docs/intro.mdx @@ -186,19 +186,22 @@ The `docusaurus-plugin-openapi-docs` plugin can be configured with the following | Name | Type | Default | Description | | -------------------- | --------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | | `specPath` | `string` | `null` | Designated URL or path to the source of an OpenAPI specification file or directory of multiple OpenAPI specification files. | -| `ouputDir` | `string` | `null` | Desired output path for generated MDX and sidebar files. | +| `outputDir` | `string` | `null` | Desired output path for generated MDX and sidebar files. | | `proxy` | `string` | `null` | _Optional:_ Proxy URL to prepend to base URL when performing API requests from browser. | | `template` | `string` | `null` | _Optional:_ Customize MDX content with a desired template. | +| `infoTemplate` | `string` | `null` | _Optional:_ Customize MDX content for **info** pages only. | +| `tagTemplate` | `string` | `null` | _Optional:_ Customize MDX content for **tag** pages only. | +| `schemaTemplate` | `string` | `null` | _Optional:_ Customize MDX content for **schema** pages only. | | `downloadUrl` | `string` | `null` | _Optional:_ Designated URL for downloading OpenAPI specification. (requires `info` section/doc) | -| `hideSendButton` | `boolean` | `null` | _Optional:_ If set to `true`, hides the "Send API Request" button in API demo panel | -| `showExtensions` | `boolean` | `null` | _Optional:_ If set to `true`, renders operation-level vendor-extensions in description. | +| `hideSendButton` | `boolean` | `null` | _Optional:_ If set to `true`, hides the “Send API Request” button in the API demo panel. | +| `showExtensions` | `boolean` | `null` | _Optional:_ If set to `true`, renders operation‑level vendor‑extensions in descriptions. | | `sidebarOptions` | `object` | `null` | _Optional:_ Set of options for sidebar configuration. See below for a list of supported options. | -| `version` | `string` | `null` | _Optional:_ Version assigned to single or micro-spec API specified in `specPath`. | -| `label` | `string` | `null` | _Optional:_ Version label used when generating version selector dropdown menu. | -| `baseUrl` | `string` | `null` | _Optional:_ Version base URL used when generating version selector dropdown menu. | -| `versions` | `object` | `null` | _Optional:_ Set of options for versioning configuration. See below for a list of supported options. | -| `markdownGenerators` | `object` | `null` | _Optional:_ Customize MDX content with a set of options for specifying markdown generator functions. See [markdownGenerators](#markdowngenerators) for a list of supported options. | -| `showSchemas` | `boolean` | `null` | _Optional:_ If set to `true`, generates schema pages and adds them to the sidebar. | +| `version` | `string` | `null` | _Optional:_ Version assigned to a single or micro‑spec API specified in `specPath`. | +| `label` | `string` | `null` | _Optional:_ Version label used when generating the version‑selector dropdown menu. | +| `baseUrl` | `string` | `null` | _Optional:_ Base URL for versioned docs in the version‑selector dropdown. | +| `versions` | `object` | `null` | _Optional:_ Options for versioning configuration. See below for a list of supported options. | +| `markdownGenerators` | `object` | `null` | _Optional:_ Customize MDX content via generator functions. See below for a list of supported options. | +| `showSchemas` | `boolean` | `null` | _Optional:_ If set to `true`, generates standalone schema pages and adds them to the sidebar. | ### sidebarOptions diff --git a/demo/package.json b/demo/package.json index 6c89f4d6f..5a861bcdc 100644 --- a/demo/package.json +++ b/demo/package.json @@ -1,6 +1,6 @@ { "name": "demo", - "version": "4.3.7", + "version": "4.4.0", "private": true, "scripts": { "docusaurus": "docusaurus", @@ -26,8 +26,8 @@ "@docusaurus/plugin-google-gtag": "3.7.0", "@docusaurus/preset-classic": "3.7.0", "clsx": "^1.1.1", - "docusaurus-plugin-openapi-docs": "^4.3.7", - "docusaurus-theme-openapi-docs": "^4.3.7", + "docusaurus-plugin-openapi-docs": "^4.4.0", + "docusaurus-theme-openapi-docs": "^4.4.0", "prism-react-renderer": "^2.3.0", "react": "^19.0.0", "react-dom": "^19.0.0" diff --git a/lerna.json b/lerna.json index e1cc6426d..f409fb9c2 100644 --- a/lerna.json +++ b/lerna.json @@ -1,4 +1,4 @@ { - "version": "4.3.7", + "version": "4.4.0", "npmClient": "yarn" } diff --git a/packages/docusaurus-plugin-openapi-docs/README.md b/packages/docusaurus-plugin-openapi-docs/README.md index 24d0fb6e3..4fdc077f4 100644 --- a/packages/docusaurus-plugin-openapi-docs/README.md +++ b/packages/docusaurus-plugin-openapi-docs/README.md @@ -155,22 +155,25 @@ The `docusaurus-plugin-openapi-docs` plugin can be configured with the following `config` can be configured with the following options: -| Name | Type | Default | Description | -| -------------------- | --------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | -| `specPath` | `string` | `null` | Designated URL or path to the source of an OpenAPI specification file or directory of multiple OpenAPI specification files. | -| `ouputDir` | `string` | `null` | Desired output path for generated MDX and sidebar files. | -| `proxy` | `string` | `null` | _Optional:_ Proxy URL to prepend to base URL when performing API requests from browser. | -| `template` | `string` | `null` | _Optional:_ Customize MDX content with a desired template. | -| `downloadUrl` | `string` | `null` | _Optional:_ Designated URL for downloading OpenAPI specification. (requires `info` section/doc) | -| `hideSendButton` | `boolean` | `null` | _Optional:_ If set to `true`, hides the "Send API Request" button in API demo panel | -| `showExtensions` | `boolean` | `null` | _Optional:_ If set to `true`, renders operation-level vendor-extensions in description. | -| `sidebarOptions` | `object` | `null` | _Optional:_ Set of options for sidebar configuration. See below for a list of supported options. | -| `version` | `string` | `null` | _Optional:_ Version assigned to single or micro-spec API specified in `specPath`. | -| `label` | `string` | `null` | _Optional:_ Version label used when generating version selector dropdown menu. | -| `baseUrl` | `string` | `null` | _Optional:_ Version base URL used when generating version selector dropdown menu. | -| `versions` | `object` | `null` | _Optional:_ Set of options for versioning configuration. See below for a list of supported options. | -| `markdownGenerators` | `object` | `null` | _Optional:_ Customize MDX content with a set of options for specifying markdown generator functions. See below for a list of supported options. | -| `showSchemas` | `boolean` | `null` | _Optional:_ If set to `true`, generates schema pages and adds them to the sidebar. | +| Name | Type | Default | Description | +| -------------------- | --------- | ------- | --------------------------------------------------------------------------------------------------------------------------- | +| `specPath` | `string` | `null` | Designated URL or path to the source of an OpenAPI specification file or directory of multiple OpenAPI specification files. | +| `outputDir` | `string` | `null` | Desired output path for generated MDX and sidebar files. | +| `proxy` | `string` | `null` | _Optional:_ Proxy URL to prepend to base URL when performing API requests from browser. | +| `template` | `string` | `null` | _Optional:_ Customize MDX content with a desired template. | +| `infoTemplate` | `string` | `null` | _Optional:_ Customize MDX content for **info** pages only. | +| `tagTemplate` | `string` | `null` | _Optional:_ Customize MDX content for **tag** pages only. | +| `schemaTemplate` | `string` | `null` | _Optional:_ Customize MDX content for **schema** pages only. | +| `downloadUrl` | `string` | `null` | _Optional:_ Designated URL for downloading OpenAPI specification. (requires `info` section/doc) | +| `hideSendButton` | `boolean` | `null` | _Optional:_ If set to `true`, hides the “Send API Request” button in the API demo panel. | +| `showExtensions` | `boolean` | `null` | _Optional:_ If set to `true`, renders operation‑level vendor‑extensions in descriptions. | +| `sidebarOptions` | `object` | `null` | _Optional:_ Set of options for sidebar configuration. See below for a list of supported options. | +| `version` | `string` | `null` | _Optional:_ Version assigned to a single or micro‑spec API specified in `specPath`. | +| `label` | `string` | `null` | _Optional:_ Version label used when generating the version‑selector dropdown menu. | +| `baseUrl` | `string` | `null` | _Optional:_ Base URL for versioned docs in the version‑selector dropdown. | +| `versions` | `object` | `null` | _Optional:_ Options for versioning configuration. See below for a list of supported options. | +| `markdownGenerators` | `object` | `null` | _Optional:_ Customize MDX content via generator functions. See below for a list of supported options. | +| `showSchemas` | `boolean` | `null` | _Optional:_ If set to `true`, generates standalone schema pages and adds them to the sidebar. | ### sidebarOptions diff --git a/packages/docusaurus-plugin-openapi-docs/package.json b/packages/docusaurus-plugin-openapi-docs/package.json index 07e0785ad..a8802e940 100644 --- a/packages/docusaurus-plugin-openapi-docs/package.json +++ b/packages/docusaurus-plugin-openapi-docs/package.json @@ -1,7 +1,7 @@ { "name": "docusaurus-plugin-openapi-docs", "description": "OpenAPI plugin for Docusaurus.", - "version": "4.3.7", + "version": "4.4.0", "license": "MIT", "keywords": [ "openapi", diff --git a/packages/docusaurus-theme-openapi-docs/package.json b/packages/docusaurus-theme-openapi-docs/package.json index 58e61faf3..68172e1fb 100644 --- a/packages/docusaurus-theme-openapi-docs/package.json +++ b/packages/docusaurus-theme-openapi-docs/package.json @@ -1,7 +1,7 @@ { "name": "docusaurus-theme-openapi-docs", "description": "OpenAPI theme for Docusaurus.", - "version": "4.3.7", + "version": "4.4.0", "license": "MIT", "keywords": [ "openapi", @@ -36,7 +36,7 @@ "@types/lodash": "^4.14.176", "@types/pako": "^2.0.3", "concurrently": "^5.2.0", - "docusaurus-plugin-openapi-docs": "^4.3.7", + "docusaurus-plugin-openapi-docs": "^4.4.0", "docusaurus-plugin-sass": "^0.2.3", "eslint-plugin-prettier": "^5.0.1" },