In order to make lib code from RESTBase useful as a framework, we need to do several refactorings to make it more configurable. This task is about improving swagger documentation handling and rendering.
- Refactor doc listings Currently, RESTBase renders a domain list on / like this: https://rest.wikimedia.org the links get you to the {host}/{domain}/v1?doc=, which is specific to RESTBase. What if the framework user doesn't want to follow v1 naming convention, or has multiple API versions. Instead, the domain listing links should go to another listing, which would list non-private endpoints available with this prefix. For RESTBase it would be just v1, for other use cases it could be v1, v2, v3 etc. Done with PR#14
- Make doc page properties configurable Currently doc page has a RESTBase title and logo, we need to make it pick up it from the spec of config, so that framework users could replace that.
- /sys is too magical We have a private sub-api mounted at /sys. Instead we need to create a custom stanza, like x-private-api and tread private/public APIs not by naming, but by the property of this stanza
The list is not complete and will be expanded as I identify more issues and subtasks. However, none of these problems are blocking us from actually moving out the framework functionality to the hyperswitch package.