fumadocs-openapi 5.5.9 → 5.5.11

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.
@@ -322,7 +322,7 @@ function getAuthorizationField(method, ctx) {
322
322
  const scheme = getSecurities(singular, ctx.document)[0];
323
323
  return {
324
324
  type: 'string',
325
- name: 'Authorization',
325
+ name: scheme.type === 'apiKey' ? scheme.name : 'Authorization',
326
326
  authType: scheme.type,
327
327
  defaultValue: scheme.type === 'oauth2' || scheme.type === 'http' && scheme.scheme === 'bearer' ? 'Bearer' : 'Basic',
328
328
  isRequired: security.every((requirements)=>Object.keys(requirements).length > 0),
@@ -6,7 +6,7 @@ import dynamic from 'next/dynamic';
6
6
  import { useOnChange } from 'fumadocs-core/utils/use-on-change';
7
7
 
8
8
  /**
9
- * @license lucide-react v0.455.0 - ISC
9
+ * @license lucide-react v0.456.0 - ISC
10
10
  *
11
11
  * This source code is licensed under the ISC license.
12
12
  * See the LICENSE file in the root directory of this source tree.
@@ -16,7 +16,7 @@ const mergeClasses = (...classes)=>classes.filter((className, index, array)=>{
16
16
  }).join(" ").trim();
17
17
 
18
18
  /**
19
- * @license lucide-react v0.455.0 - ISC
19
+ * @license lucide-react v0.456.0 - ISC
20
20
  *
21
21
  * This source code is licensed under the ISC license.
22
22
  * See the LICENSE file in the root directory of this source tree.
@@ -253,7 +253,7 @@ function useSchemaContext() {
253
253
  return ctx;
254
254
  }
255
255
 
256
- const APIPlayground = dynamic(()=>import('./playground-client-CD8aXhkm.js').then((mod)=>mod.APIPlayground));
256
+ const APIPlayground = dynamic(()=>import('./playground-client-BEoalWj1.js').then((mod)=>mod.APIPlayground));
257
257
  function Root({ children, baseUrl, className, shikiOptions, ...props }) {
258
258
  return /*#__PURE__*/ jsx("div", {
259
259
  className: cn('flex flex-col gap-24 text-sm text-fd-muted-foreground', className),
package/dist/ui/index.js CHANGED
@@ -3,8 +3,8 @@ import { cn } from 'fumadocs-ui/components/api';
3
3
  import { Fragment } from 'react';
4
4
  import { Accordions, Accordion } from 'fumadocs-ui/components/accordion';
5
5
  import { cva } from 'class-variance-authority';
6
- import { f as CopyRouteButton } from './client-client-YY5m8QKX.js';
7
- export { A as APIPlayground, R as Root, u as useSchemaContext } from './client-client-YY5m8QKX.js';
6
+ import { f as CopyRouteButton } from './client-client-ByqJh-mB.js';
7
+ export { A as APIPlayground, R as Root, u as useSchemaContext } from './client-client-ByqJh-mB.js';
8
8
 
9
9
  const badgeVariants = cva('rounded-xl border px-1.5 py-1 text-xs font-medium leading-[12px]', {
10
10
  variants: {
@@ -5,7 +5,7 @@ import { forwardRef, useId, createContext, useContext, useState, useCallback, us
5
5
  import { FormProvider, Controller, useFormContext, useFieldArray, useForm, useWatch } from 'react-hook-form';
6
6
  import { Accordions, Accordion } from 'fumadocs-ui/components/accordion';
7
7
  import { cn, buttonVariants } from 'fumadocs-ui/components/api';
8
- import { C as CircleCheck, a as CircleX, b as ChevronDown, c as ChevronUp, d as Check, u as useSchemaContext, T as Trash2, P as Plus, e as useApiContext, S as SchemaContext } from './client-client-YY5m8QKX.js';
8
+ import { C as CircleCheck, a as CircleX, b as ChevronDown, c as ChevronUp, d as Check, u as useSchemaContext, T as Trash2, P as Plus, e as useApiContext, S as SchemaContext } from './client-client-ByqJh-mB.js';
9
9
  import { Slot } from '@radix-ui/react-slot';
10
10
  import { cva } from 'class-variance-authority';
11
11
  import { useOnChange } from 'fumadocs-core/utils/use-on-change';
@@ -845,8 +845,8 @@ function APIPlayground({ route, method = 'GET', bodyType, authorization, path =
845
845
  const url = new URL(`${baseUrl ?? window.location.origin}${createUrlFromInput(route, input.path, input.query)}`);
846
846
  const headers = new Headers();
847
847
  if (bodyType !== 'form-data') headers.append('Content-Type', 'application/json');
848
- if (input.authorization) {
849
- headers.append('Authorization', input.authorization);
848
+ if (input.authorization && authorization) {
849
+ headers.append(authorization.name, input.authorization);
850
850
  }
851
851
  Object.keys(input.header).forEach((key)=>{
852
852
  const paramValue = input.header[key];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-openapi",
3
- "version": "5.5.9",
3
+ "version": "5.5.11",
4
4
  "description": "Generate MDX docs for your OpenAPI spec",
5
5
  "keywords": [
6
6
  "NextJs",
@@ -41,12 +41,12 @@
41
41
  "hast-util-to-jsx-runtime": "^2.3.2",
42
42
  "js-yaml": "^4.1.0",
43
43
  "openapi-sampler": "^1.5.1",
44
- "react-hook-form": "^7.53.1",
44
+ "react-hook-form": "^7.53.2",
45
45
  "remark": "^15.0.1",
46
46
  "remark-rehype": "^11.1.1",
47
47
  "shiki": "^1.22.2",
48
- "fumadocs-core": "14.3.1",
49
- "fumadocs-ui": "14.3.1"
48
+ "fumadocs-ui": "14.4.0",
49
+ "fumadocs-core": "14.4.0"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@types/js-yaml": "^4.0.9",
@@ -54,7 +54,7 @@
54
54
  "@types/openapi-sampler": "^1.0.3",
55
55
  "@types/react": "^18.3.12",
56
56
  "bunchee": "^5.6.1",
57
- "lucide-react": "^0.455.0",
57
+ "lucide-react": "^0.456.0",
58
58
  "next": "15.0.3",
59
59
  "openapi-types": "^12.1.3",
60
60
  "eslint-config-custom": "0.0.0",