github fuma-nama/fumadocs fumadocs-openapi@12.5.6

latest release: @fumadocs/story@1.5.3
4 hours ago

Unions of const members render as a labelled select

  • In the playground, a oneOf/anyOf whose members are all const is one select labelled by each member's title, instead of a switch between members.

renderParameterField can render the default input with another schema

renderParameterField gets ctx.renderDefault(schema) as its third argument, which renders the parameter's default input with schema replacing its own. For example, an enum of values loaded at runtime shows the playground's select.

Index card links with contentDir

  • index.url.contentDir of generateFiles() resolves the generated pages from the output directory, card links no longer start with ../.
  • Card links use forward slashes on Windows.

Names for the selects of operation pages

The selects that switch the code language, the example request, the response status, the media type, the security scheme and the variant of a union schema now have an accessible name, so a screen reader announces what they choose and not only their value. The names go through t() like the other labels. ExampleSelect accepts an aria-label.

The proxy keeps fetch() working

  • Without allowedOrigins, the proxy imports undici, which replaced the dispatcher of the built-in fetch(). Afterwards, fetch() rejected requests setting content-length, and ignored configured dispatchers like NODE_USE_ENV_PROXY. The dispatcher is now restored.
  • The proxy no longer forwards content-length, fetch() sets it from the body.

Don't miss a new fumadocs release

NewReleases is sending notifications on new releases.