-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: more options for UI middleware
- refactored UI middleware * factorized chore middleware to remove duplicated code * factorized UI middleware options: to avoid breaking changes in the options types, there is a decode/encode to a common structure * added more options: * allows to fully customize the UI template * added more unit tests - Spec middleware: added support for optional SpecOption argument * allows to serve the spec from a custom path / document name - serving with or without trailing "/" (cf. issue #238) * replaced path.Join() by path.Clean(), which is the intended behavior (i.e. serve the path, irrespective of the presence of a trailing slash) * generalized this behavior to all UI and Spec middleware, not just swaggerUI - API Context: * exposed middleware to serve RapiDoc UI * allowed new UIOption (...UIOption) to the APIHandler, etc middleware * coordinated UI / Spec middleware to be consistent when non-default path/document URL is served * fixes #192 * fixes #226 Signed-off-by: Frederic BIDON <[email protected]>
- Loading branch information
Showing
15 changed files
with
1,009 additions
and
269 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.