Description
SwaggerUI used to make WordPress REST API endpoint have a interactive UI, so we can check our API endpoint directly from the website it self
Feature:
- Support for GET, POST, PUT, PATCH and DELETE request method
- Support for Auth Basic authorization method
- Support for Bearer token (Authorization header) authorization method
- Choose which authorization methods (Basic / Bearer) appear in the Swagger UI Authorize dialog
- Output as Swagger 2.0 (default) or OpenAPI 3.0.3
- Option to include or omit the site admin contact email in the generated schema
- Choose which namespace API that will be used on the SwaggerUI
Installation
This plugin can be installed directly from your site.
- Log in and navigate to Plugins > Add New.
- Type “WP API SwaggerUI” into the Search and hit Enter.
- Locate the WP API SwaggerUI plugin in the list of search results and click Install Now.
- Once installed, click the Activate link.
Reviews
January 3, 2023
Not working with wp 6.
July 3, 2022
Hi.
Any updates?
It’s not working fully with wp6 and messes if I add js widgets like an ADA accessability widegt.
April 30, 2021
Great Job, thank you for collaboration!
September 30, 2020
All work on 5.5.1
September 24, 2020
Awesome plugin and very good execution. When you’ve multiple active plugins that you need to manage and publish documentation about the API, that’s a perfect way to automate the boring task.
Kudos.
June 1, 2020
I was looking for a tool to automatically create documentation from the REST API definition. It’s exactly this!
Contributors & Developers
“WP API SwaggerUI” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “WP API SwaggerUI” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
2.4.0
- Serve the docs and schema on all permalink types via
?swagger_api=docs/?swagger_api=schema, not only pretty permalinks - Make the interactive Try-it-out work under Plain permalinks by rewriting REST requests to the
?rest_route=form; the OpenAPI 3.0.3 server URL now advertises that same form so it matches the request that is sent
2.3.0
- Fix nested object and array item properties not showing in Swagger UI (recursive schema normalization)
- Combine registered JSON arguments into a single request body for POST/PUT/PATCH routes
- Preserve enum, required, format and default across nested schemas; keep file uploads on multipart/form-data
- Improve OpenAPI 3.0.3 output: move definitions to components.schemas and rewrite $ref targets
2.2.0
- Add OpenAPI 3.0.3 output, selectable in Settings Swagger (default stays Swagger 2.0, so existing installs are unchanged)
- Add a setting to include or omit the site contact email in the generated schema
2.1.1
- Fix per-route
tagsoverride being ignored in the generated Swagger docs
2.1.0
- Add Bearer token (Authorization header) support in the Swagger UI Authorize dialog
- Add a setting to choose which auth methods (Basic / Bearer) appear in Swagger UI
- Fix a Bearer Authorization header being misparsed as Basic on the REDIRECT_HTTP_AUTHORIZATION path
2.0.3
- Fix Query Monitor and other admin bar tools being broken on the API docs page by the asset cleanup
2.0.2
- Fix REST API being blocked on WordPress 5.6+ when the site is behind server Basic Auth (broke Elementor editing and Application Passwords)
- Keep WooCommerce consumer-key authentication working alongside native Application Passwords
2.0.1
- Fix REST routes with multiple or nested named parameters in the generated docs
- Fix default tag for routes that start with a named parameter
2.0.0
- Compatibility with WordPress 7.0 and PHP 8
- Modernize test suite for PHPUnit 9
- Fix deprecation notice leaking into /schema on root-path installs
- Raise minimum PHP to 7.4
1.2.0
- Update doc
- Force object type to string
- Node modules update
1.1.2
- Update regex for parameter detection
1.1.1
- Put back missing header element
1.1.0
- Use swagger-ui npm version
- Auto tags on endpoint
1.0.9
- Fix readme typo
1.0.8
- Restore custom port support
1.0.7
- Support
producesandconsumesdirectly via register_rest_route 3rd parameter
1.0.6
- Change site_url to home_url
1.0.5
- Support summary and desription on each endpoint api
1.0.4
- make WooCommerce REST API Key works on Swagger Docs Auth
1.0.3
- change template_include priority
- change dtermine_current_user priority
1.0.2
- Ensure REDIRECT_HTTP_AUTHORIZATION is not empty
1.0.1
- Auto add params from path
1.0
- Initial release

