Major Changes
-
f027706: Unify RSC & client APIs
createAPIPage()&createClientAPIPage()unify intocreateOpenAPIPage():- no longer accepts an
OpenAPIServer&clientoption. - requires
api-page.tsxto be a client component. - server should pass page props using
page.data.getOpenAPIPageProps()(virtual files) oropenapi.preloadOpenAPIPage()(pre-generated files).
- no longer accepts an
- 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(): useopenapiPlugin()instead.createCodeSample(): useCodeUsageGeneratorAPI instead.generateTypeScriptSchema(): usegenerateTypeScriptDefinitions()instead.playground.requestTimeoutoption: usefetchOptions.requestTimeoutinstead.allowedUrlsoption: useallowedOriginsorfilterRequestinstead.groupStyleoption: usefolderStyleinstead.
Other
generateFiles&beforeWritecontext: removedocumentsfield, 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.