github fuma-nama/fumadocs fumadocs-openapi@11.0.0

latest releases: @fumadocs/language@0.1.0, fumadocs-mdx@15.0.12, fumadocs-ui@16.10.0...
6 hours ago

Major Changes

  • f027706: Unify RSC & client APIs

    • createAPIPage() & createClientAPIPage() unify into createOpenAPIPage():
      • no longer accepts an OpenAPIServer & client option.
      • requires api-page.tsx to be a client component.
      • server should pass page props using page.data.getOpenAPIPageProps() (virtual files) or openapi.preloadOpenAPIPage() (pre-generated files).
    • Remove subpath exports: ui/client.

    Server & loader

    • getSchema() no longer includes the dereferenced document.
    • input: drop the whole-map factory () => SchemaMap. Use a record instead: [k: string]: string | Document | (() => Awaitable<string | Document>).

    Customization callbacks

    More context will be available to callbacks:

    • generateCodeSamples: (method: MethodInformation)({ operation, method, pathItem }).
    • renderOperationLayout: (slots, ctx, method)(slots, { operation, method, pathItem, ctx }).
    • playground.render: method: MethodInformation({ operation, method, pathItem }).

    Drop deprecated APIs

    • transformerOpenAPI(): use openapiPlugin() instead.
    • createCodeSample(): use CodeUsageGenerator API instead.
    • generateTypeScriptSchema(): use generateTypeScriptDefinitions() instead.
    • playground.requestTimeout option: use fetchOptions.requestTimeout instead.
    • allowedUrls option: use allowedOrigins or filterRequest instead.
    • groupStyle option: use folderStyle instead.

    Other

    • generateFiles & beforeWrite context: remove documents field, access from the OpenAPI server instead.

Minor Changes

  • 779efff: Introduce new translations API

    It is now powered by fuma-translate. Be careful: while the API surface is same, some translation keys are changed, unused labels will be ignored.

Patch Changes

  • Updated dependencies [9b9545f]
  • Updated dependencies [0cc1fac]
  • Updated dependencies [779efff]
    • fumadocs-core@16.10.0
    • fumadocs-ui@16.10.0

Don't miss a new fumadocs release

NewReleases is sending notifications on new releases.