Deprecated.
The author/
directory contains the logic for generating the v3.pm module.
DATA FILES
The author/config.yml
drives the order and configuration of individual sections.
The YAML files in the author/sections/
directory have lines like this:
- SUB: HTTP_METHOD PATH
- SUB: RETURN = HTTP_METHOD PATH?
SUB
The name if the subroutine that will be created in v3.pm.
RETURN
The name of the return variable if any. This is used as part of generating the documentation. If no return variable is declared then the subroutine will return an empty list no matter what the API response returns.
HTTP_METHOD
One of GET, POST, PUT, or DELETE.
PATH
The path to the API endpoint (after the /api/v3 bit). The path is a list of static and dynamic strings separate by forward slashes. So, if you have:
/foo/:bar/baz
Then the API subroutine would require one argument which would be injected in place of :bar
.
?
If the PATH ends with a ?
then this signifies that the API endpoint accepts query parameters.
GENERATING
To generate lib/GitLab/API/v3.pm
do this:
cd author
perl generate.pl > ../lib/GitLab/API/v3.pm