docusaurus-plugin-openapi-docs 1.3.1 → 1.3.2

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/lib/index.js CHANGED
@@ -26,7 +26,8 @@ exports.isURL = isURL;
26
26
  function getDocsPluginConfig(presetsPlugins, pluginId) {
27
27
  // eslint-disable-next-line array-callback-return
28
28
  const filteredConfig = presetsPlugins.filter((data) => {
29
- if (data[0] === pluginId) {
29
+ // Search presets
30
+ if (data[0].endsWith(pluginId)) {
30
31
  return data[1];
31
32
  }
32
33
  // Search plugin-content-docs instances
@@ -39,7 +40,7 @@ function getDocsPluginConfig(presetsPlugins, pluginId) {
39
40
  })[0];
40
41
  if (filteredConfig) {
41
42
  // Search presets, e.g. "classic"
42
- if (filteredConfig[0] === pluginId) {
43
+ if (filteredConfig[0].endsWith(pluginId)) {
43
44
  return filteredConfig[1].docs;
44
45
  }
45
46
  // Search plugin-content-docs instances
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "docusaurus-plugin-openapi-docs",
3
3
  "description": "OpenAPI plugin for Docusaurus.",
4
- "version": "1.3.1",
4
+ "version": "1.3.2",
5
5
  "license": "MIT",
6
6
  "keywords": [
7
7
  "openapi",
@@ -68,5 +68,5 @@
68
68
  "engines": {
69
69
  "node": ">=14"
70
70
  },
71
- "gitHead": "5f41e8dc4981409902ae96a7d127a2ae7eb9a47d"
71
+ "gitHead": "761a89172da04573369441cf7342f6c643bc3ecd"
72
72
  }
package/src/index.ts CHANGED
@@ -29,7 +29,8 @@ export function getDocsPluginConfig(
29
29
  ): Object | undefined {
30
30
  // eslint-disable-next-line array-callback-return
31
31
  const filteredConfig = presetsPlugins.filter((data) => {
32
- if (data[0] === pluginId) {
32
+ // Search presets
33
+ if (data[0].endsWith(pluginId)) {
33
34
  return data[1];
34
35
  }
35
36
 
@@ -43,7 +44,7 @@ export function getDocsPluginConfig(
43
44
  })[0];
44
45
  if (filteredConfig) {
45
46
  // Search presets, e.g. "classic"
46
- if (filteredConfig[0] === pluginId) {
47
+ if (filteredConfig[0].endsWith(pluginId)) {
47
48
  return filteredConfig[1].docs;
48
49
  }
49
50