Page MenuHomeSoftware Heritage

apidoc: Add support for request data documentation
ClosedPublic

Authored by anlambert on Wed, Feb 12, 5:59 PM.

Details

Summary

Some new api endpoints require to send JSON data in HTTP requests but it was currently
not handled by the apidoc module.

So handle corresponding httpdomain directives in our custom rst nodes visitor.

Also add support for documenting JSON array of non object type as httpdomain does
not offer any directive for that type.

And yes I know the code in that module is awful but until we start implementing API v2,
we are stucked with it to display the HTML documentation.

Depends on D2665

Diff Detail

Repository
rDWAPPS Web applications
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

anlambert created this revision.Wed, Feb 12, 5:59 PM
vlorentz accepted this revision.Fri, Feb 14, 10:20 AM
This revision is now accepted and ready to land.Fri, Feb 14, 10:20 AM
anlambert updated this revision to Diff 9532.Fri, Feb 14, 2:09 PM

Rebase on the correct branch

anlambert updated this revision to Diff 9533.Fri, Feb 14, 2:21 PM

Fix tests

This revision was automatically updated to reflect the committed changes.