Skip to content

Commit

Permalink
Add documentation for to_purl and from_purl #241 #445
Browse files Browse the repository at this point in the history
Signed-off-by: Jono Yang <[email protected]>
  • Loading branch information
JonoYang committed Jun 1, 2024
1 parent 802daf5 commit c57783f
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions docs/source/purldb/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1071,3 +1071,32 @@ Return a list of package sets and the package data of packages within
...
]
}
to_purl
-------
Return a ``golang_purl`` PackageURL from ``go_package``, a standard go import
string or a go.mod string.
``GET /api/to_purl/?go_package=github.com/gorilla/mux%20v1.8.1``
.. code-block:: json
{
"golang_purl": "pkg:golang/github.com/gorilla/[email protected]"
}
from_purl
---------
Return a ``git_repo`` from a standard PackageURL ``package_url``.
``GET /api/from_purl/?package_url=pkg:github/ckeditor/ckeditor4-react``
.. code-block:: json
{
"git_repo": "git+https://github.com/ckeditor/ckeditor4-react.git"
}

0 comments on commit c57783f

Please sign in to comment.