Switch the API to use the new field types.

Review Request #9683 — Created Feb. 20, 2018 and submitted

Information

Review Board
release-3.0.x
4a9bd2c...

Reviewers

Djblets gained support for a better way of specifying types for fields
and request parameters in the API. This moves us over to these new
types, fixing up the documentation generator in the process to ensure
we're still generating documentation correctly.

In almost all cases, we're using the modern equivalent of the legacy
field types. However, fields for date/time strings have been updated to
use DateTimeField, which will generate nicer documentation by default
(removing the need for us to specify time formats) and will handle
validation for us (removing the need for us to parse the strings).

Unit tests pass.

Built the docs and compared the generated HTML output to the output
using older field types. Except for some slight differences in how we're
representing things now, the output was the same.

Description From Last Updated

E402 module level import not at top of file

reviewbotreviewbot
chipx86
Review request changed
Change Summary:
  • Updated webapi-lint.py to check for modern field types.
  • Updated the WebAPIResource to use a modern field type for ?counts-only=.
Commit:
fe61dafe0bf57271f4dc4549c86b83f6623f4dc9
4a9bd2c6e9b2f78cab6f9fb31b25d3fe1689a53b

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-4.0.x (22278d5)