Page MenuHomePhabricator

Documentation handling improvements
Closed, ResolvedPublic

Description

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.

Event Timeline

Pchelolo claimed this task.
Pchelolo raised the priority of this task from to Needs Triage.
Pchelolo updated the task description. (Show Details)
Pchelolo added a project: RESTBase.
Pchelolo renamed this task from RESTBase refactoring required for Hyperswitch to Documentation handling improvements.Feb 1 2016, 6:38 PM
Pchelolo updated the task description. (Show Details)
Pchelolo edited projects, added HyperSwitch; removed RESTBase.
Pchelolo set Security to None.
Pchelolo added a project: Services.
  • 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.

Addressed in PR #61.

PR 61 is merged, and the point that /sys is too magic isn't really valid/needed, so I'm resolving this one.