Toolhub/Progress reports/2021-01-29
Report on activities in the Toolhub project for the week ending 2021-01-29.
Direct tool registration
[edit]Allowing folks to create their toolinfo.json style tool descriptions directly in Toolhub rather than requiring an externally hosted json file for the crawler to harvest is a named goal for the January-March quarter.
Bryan has built out the initial API to allow this in gerrit:657932. These new API endpoints are included:
- POST /api/tools - Create a new toolinfo record
- PUT /api/tools/{name}/ - Update info for a specific tool
- DELETE /api/tools/{name}/ - Delete a tool
Improved API description
[edit]While working towards the tool write API, Bryan took some time to find a way to better document some data fields in the OpenAPI spec.
- gerrit:658458 Add JSONSchemaField for JSON data with a schema
- gerrit:658487 JSONSchemaField: Add a proper validator
- phab:T272190 Replace ForWikiSerializer with ForWikiField
- gerrit:657931 jsonschema: Rename $schema and $language fields
- gerrit:658459 toolinfo: normalize url_multilingual_or_array fields
Prior to the introduction of JSONSchemaField, values stored in the database as JSON blobs had an OpenAPI description without any details:
url_alternates : { <any-key>: {missing-type-info} }
These fields now have descriptions taken directly from the toolinfo schema:
url_alternates : [{ language: string url: uri }]
Initial RTL review complete
[edit]Eran completed an initial review of RTL support using the https://toolhub-demo.wmcloud.org demo server. He has also graciously supplied a gerrit patch to improve one aspect of the display by explicitly setting dir=auto
for content from toolinfo files which may be written in an LTR language even when viewed with an RTL locale selected.
Miscellaneous fixes
[edit]- gerrit:657716 Updated a lot of npm dependencies
- gerrit:658467 Fix regression caused by jsonschema-tools upgrade
- gerrit:658464 api-docs: Use column layout
- gerrit:658488 auditlog: Handle deleted targets
Wrap up
[edit]Having the core toolinfo write API merged unblocks a large amount of UI work to add screens for creating and editing tools. While that work starts we will be making additional enhancements to the backend storage and API to track version history for tools and allow wiki-like views of past revisions and diffs between revisions. We expect the work needed to implement these features to be greatly accelerated by copying implementation details from the Striker project which has this functionality for it's toolinfo.json objects.