Customizing swagger-ui: Logout Action
With OpenAPI you can define so called security schemas. This section is used to define your authentication and authorization flows.
Maybe you have already noticed the Logout button within the authorize modal. If not you can find it at PetStore when clicking on the Authorize button and setting a value the logout button appears:

This button is used to clear authentication values provided by the user. We can use this to hook into and run custom logic.
For example we could use this to call a logout endpoint.
To archive this the plugin system of swagger-ui can be used to wrap the logout redux action.
The action is called with the keys of the security schemas to log out of.
Happy Coding!