As far as I can tell, the “internal” flag isn’t shown anywhere on the API Sandbox, which means that people who explore the API through the sandbox instead of via action=help don’t see the warning that a module is internal or unstable.
Description
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Highlight internal modules in API help and sandbox | mediawiki/core | master | +120 -44 |
Related Objects
- Mentioned In
- T235034: Add wbdatabridgeconfig API to repo
Event Timeline
Unless someone has a better suggestion, I’d display internal modules similar to deprecated ones: ordered at the end of the module list, strikethrough on the label, and with a bold red notice before the summary message. (If we’re feeling adventurous, make the notice yellow instead of red?)
The API sandbox doesn’t currently display anything special on the page for the module itself, as far as I can tell; informing developers that this is a deprecated module is left to the module itself, via the apihelp-NAME-extended-description message. We can keep it this way for internal modules, too.
The 'internal' flag isn't available when building the list. You'd have to adjust the output from action=paraminfo for submodule-type parameters to somehow include it.
I'm not sure that the strikethrough used for deprecated submodules would be appropriate for internal submodules too. Reordering and a red notice saying "Internal" would be fine though.
The API sandbox doesn’t currently display anything special on the page for the module itself, as far as I can tell
I wouldn't oppose adding something there if you want.
The 'internal' flag isn't available when building the list. You'd have to adjust the output from action=paraminfo for submodule-type parameters to somehow include it.
Oh, I didn’t know paraminfo doesn’t include that information. Thanks.
Hm, this is a bit tricky because there’s some correspondence between “this module is deprecated” (make isDeprecated() return true) and “the parameter value specifying this module is deprecated” (ApiBase::PARAM_DEPRECATED), whereas there’s no such thing as internal parameter values. I’m not yet sure if that’s a big problem.
If you want to do anything in JS for it, you'd probably need to add another output array paralleling "deprecatedvalues".
On the other hand, for deprecated submodules the reordering is done in ApiParamInfo and the red "Deprecated" is done in ApiBase::getFinalParamDescription() and ApiHelpParamValueMessage, with no involvement from JS in either one.
Change 542158 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/core@master] Highlight internal modules in API help and sandbox
Yeah, I noticed while working on the above patch how little this actually has to do with the API sandbox itself :)
Change 542158 merged by jenkins-bot:
[mediawiki/core@master] Highlight internal modules in API help and sandbox