Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add API examples #2517

Merged
merged 5 commits into from
Feb 2, 2024
Merged

Add API examples #2517

merged 5 commits into from
Feb 2, 2024

Conversation

wagoodman
Copy link
Contributor

@wagoodman wagoodman commented Jan 19, 2024

This is a starting point to showing how to use the Syft API to do common tasks such as:

  • create an SBOM
  • create a custom cataloger
  • decode/encode an SBOM object from/to a particular format (e.g. SPDX, CycloneDX, Syft-JSON, etc)
  • obtain a source object to catalog

This is partially completed at this point, I'm looking for feedback at this stage regarding two topics:

  • what high-level examples do you wish were here but aren't?
  • what sharp-edges in the API exist that might need refactoring?

Closes #558

@wagoodman wagoodman added documentation Improvements or additions to documentation WIP work in progress / do not merge labels Jan 19, 2024
@wagoodman wagoodman requested a review from a team January 19, 2024 19:09
@wagoodman wagoodman self-assigned this Jan 19, 2024
@wagoodman wagoodman force-pushed the add-api-examples branch 3 times, most recently from e27e208 to 911d4dd Compare February 1, 2024 19:18
@wagoodman wagoodman removed the WIP work in progress / do not merge label Feb 1, 2024
@wagoodman wagoodman marked this pull request as ready for review February 1, 2024 19:22
@wagoodman wagoodman enabled auto-merge (squash) February 2, 2024 16:20
@wagoodman wagoodman merged commit 3da6790 into main Feb 2, 2024
11 checks passed
@wagoodman wagoodman deleted the add-api-examples branch February 2, 2024 16:26
GijsCalis pushed a commit to GijsCalis/syft that referenced this pull request Feb 19, 2024
* [wip] initial syft api examples

Signed-off-by: Alex Goodman <[email protected]>

* smooth over some rough edges in the API

Signed-off-by: Alex Goodman <[email protected]>

* embed example file

Signed-off-by: Alex Goodman <[email protected]>

* address review comments

Signed-off-by: Alex Goodman <[email protected]>

* change name of builder function

Signed-off-by: Alex Goodman <[email protected]>

---------

Signed-off-by: Alex Goodman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Top-level API should be more composable
3 participants