Unions of const members render as a labelled select
- In the playground, a
oneOf/anyOfwhose members are allconstis one select labelled by each member'stitle, 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.contentDirofgenerateFiles()resolves the generated pages from theoutputdirectory, 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-infetch(). Afterwards,fetch()rejected requests settingcontent-length, and ignored configured dispatchers likeNODE_USE_ENV_PROXY. The dispatcher is now restored. - The proxy no longer forwards
content-length,fetch()sets it from the body.