High level enhancements
- All theme components are now TypeScript 🎉
Other enhancements and bug fixes
- Fix small theme regression (#151)
- Clear request body when empty (#147)
- Fix code editor background color bug (#146)
- Update theme components to TypeScript (#130)
Enhancements and bug fixes
Enhancements and bug fixes
High level enhancements
-
Docusaurus beta.14 support
// Be sure to update @docusaurus/core: "dependencies": { "@docusaurus/core": "2.0.0-beta.14", // ... }
-
With the release of Docusaurus beta.14 (Thanks @slorber!), we can now support configuration of
webpack-dev-server
's proxy via ourdocusaurus-plugin-proxy
plugin.This can be useful when you have a separate API backend development server and you want to send API requests on the same domain.
With the following, a request to
/api/users
will now proxy the request tohttp://localhost:3001/api/users
:// docusaurus.config.js const config = { plugins: [["docusaurus-plugin-proxy", { "/api": "http://localhost:3001" }]], // ... };
To proxy
/api/users
tohttp://localhost:3001/users
, the path can be rewritten:// docusaurus.config.js const config = { plugins: [ [ "docusaurus-plugin-proxy", { "/api": { target: "http://localhost:3001", pathRewrite: { "^/api": "" }, }, }, ], ], // ... };
For more config options, see devServer.proxy.
-
Better yarn 3 support
Other enhancements and bug fixes
High level enhancements
-
Added support for more schema qualifiers:
- maxLength - minLength - maximum - minumum - exclusiveMaximum - exclusiveMinimum - pattern
Example:
slug: type: string description: The human-readable, unique identifier, used to identify the document. minLength: 1 maxLength: 40 pattern: "^[a-zA-Z0-9_-]*$"
Displays:
slug
stringPossible values: 1 ≤ length ≤ 40, Value must match regular expression
^[a-zA-Z0-9_-]*$
The human-readable, unique identifier, used to identify the document.
Other enhancements and bug fixes
- Add additional schema qualifiers (#112)
- Sidebar generation refactor (#111)
- Add recursive folder structure reading & labeling support (#107)
- Add experimental support for loading a multiple OpenAPI definitions (#103)
- Add sidebar item classname for method (#104)
- Fix schema name bug with allOf (#102)
High level enhancements
-
Docusaurus beta.13 support (Thanks @Josh-Cena!)
// Be sure to update @docusaurus/core: "dependencies": { "@docusaurus/core": "2.0.0-beta.13", // ... }
-
The OpenAPI
info
stanza will now generate an "Introduction" pageopenapi: 3.0.3 info: title: Swagger Petstore version: 1.0.0 description: | This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
-
Request bodies will now render JSON Schema with the use of
allOf
keywordsrequestBody: content: description: Example request application/json: schema: allOf: - $ref: "#/components/schema/Example1" - $ref: "#/components/schema/Example2"
-
Enum options will now be displayed in schema tables
status
stringEnum:
"available"
,"pending"
,"sold"
Pet status in the store
Other enhancements and bug fixes
- Initial proxy code (#97)
- Add support for an introduction page (#94)
- Add
allOf
JSON schema support (#96) - Display enum values in tables (#93)
- Initial plugin refactor (#86)
- Upgrade to Docusaurus beta.13 (#88)
Enhancements and bug fixes
Fix broken package
High level enhancements
- The demo panel now allows you to choose the security scheme from a dropdown that is populated by the OpenAPI definition (only showing the dropdown if more than one is listed)
- Adds support for using multiple auth modes simultaneously (Eg:
(BearerAuth) OR (ApiKeyAuth AND BasicAuth)
) - Adds an
authPersistence
option tothemeConfig.api
. Defaults to"localStorage"
, can be set tofalse
to disable orsessionStorage
to only persist while the window is open.
Other enhancements and bug fixes
- Add better auth support (#74)
The plugin option openapiPath
has been renamed to path
and no longer needs to be wrapped in require.resolve
.
As recomended my the Docusaurus documentation, the plugin docusaurus-plugin-api
has been properly split into 3 packages:
docusaurus-preset-api
docusaurus-plugin-api
docusaurus-theme-api
The package docusaurus-plugin-api
will no longer work on it's own without docusaurus-theme-api
. Instead, the preset docusaurus-preset-api
can be used on it's own and act as a drop-in replacement for @docusaurus/preset-classic
.
Example usage:
// docusaurus.config.js
const config = {
- plugins: [
- [
- "docusaurus-plugin-openapi",
- {
- openapiPath: require.resolve("./examples/openapi.json"),
- },
- ],
- ],
presets: [
[
- "@docusaurus/preset-classic",
+ "docusaurus-preset-openapi",
{
+ api: {
+ path: "examples/openapi.json",
+ }
docs: {
// doc options ...
},
blog: {
// blog options ...
},
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
},
],
],
}
Other enhancements and bug fixes
- Fix multi plugin bug (#69)
- Add yaml support (#68)
- Generate markdown for full page (#65)
- Refactor plugin into separate packages (#64)
- Update documentation (#63)
Enhancements and bug fixes
Enhancements and bug fixes