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

Initial v2 Types for Objects and API responses #34

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

puerco
Copy link
Member

@puerco puerco commented Oct 10, 2024

This PR adds two packages with the initial data structures to capture the following v2/apis:

  • v2/alternative
  • v2/license
  • v2/pkg
  • v2/similar

The response types build on the types defined on the objects package.

Note that this initial push of data types is subject to change along with the v2 API design, the main goal is to start structuring the packages and their files to quickly follow the API improvements.

Copy link

stacklok-cloud-staging bot commented Oct 10, 2024

Minder Vulnerability Report ✅

Minder analyzed this PR and found it does not add any new vulnerable dependencies.

Vulnerability scan of bcc68f0b:

  • 🐞 vulnerable packages: 0
  • 🛠 fixes available for: 0

Copy link

@stacklok-cloud-staging stacklok-cloud-staging bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dependency Information

Minder analyzed the dependencies introduced in this pull request and detected that some dependencies do not meet your security profile.

📦 Dependency: github.com/google/uuid

Trusty Score: 0

Scoring details
Component Score
Package activity 0
Provenance 0
Malicious false

Signed-off-by: Adolfo García Veytia (puerco) <[email protected]>
This commit adds the first batch of objects to start parsing the v2 trusty APIs.

Signed-off-by: Adolfo García Veytia (puerco) <[email protected]>
This commit adds the initial data structures to capture the following v2/apis:

- v2/alternative
- v2/license
- v2/pkg
- v2/similar

These rely on the objects defined in the previous commits.

Signed-off-by: Adolfo García Veytia (puerco) <[email protected]>
Copy link

@stacklok-cloud-staging stacklok-cloud-staging bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dependency Information

Minder analyzed the dependencies introduced in this pull request and detected that some dependencies do not meet your security profile.

📦 Dependency: github.com/google/uuid

Trusty Score: 0

Scoring details
Component Score
Malicious false
Package activity 0
Provenance 0

Company *string
Blog *string
Location *string
// Email *string // email
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like this needs a TODO, so it can be figured out which is the field to use.

Licenses []*LicenseIdentifier `json:"licenses"`
Claim *LicenseClaim
Content *string // ?
URL *string // ?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the ? is confusing. What's the question? If there is uncertainty it's fine to document, but let's actually portray the question. Alternatively, you can post it as a GH comment in this PR.

PublicRepos *int
PublicGists *int
Followers *int
Following *int
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Let's be consistent with struct tags and add them everywhere.

Contributors []*Contributor
LastUpdate *time.Time `json:"last_update"`
// Scores
// "scores": {},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there no OpenAPI schema for scores?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants