Skip to content

🌱 [release/0.5.z] update client/openapi/trustd.yaml#1142

Merged
carlosthe19916 merged 1 commit into
release/0.5.zfrom
create-pull-request/patch-3427e85
Jul 3, 2026
Merged

🌱 [release/0.5.z] update client/openapi/trustd.yaml#1142
carlosthe19916 merged 1 commit into
release/0.5.zfrom
create-pull-request/patch-3427e85

Conversation

@trustify-ci-bot

@trustify-ci-bot trustify-ci-bot Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

The openapi.yaml of trustify has changed

Summary by Sourcery

Update trustd OpenAPI specification to expose advisory severity summaries for SBOMs and define the corresponding reusable schema.

New Features:

  • Add an optional advisories query parameter to the SBOM listing endpoint to request advisory severity summaries per SBOM.
  • Introduce a reusable RequestedField_HashMap_HashMap schema for mapping advisory severity levels to integer counts and reference it from multiple components.

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@sourcery-ai

sourcery-ai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Extends the trustd OpenAPI spec to support an optional advisories summary per SBOM, wiring a reusable severity-map schema into relevant response objects and query parameters.

Flow diagram for advisories query parameter and response field

flowchart LR
  client[Client]
  request[Endpoint call with advisories query parameter]
  response[Response with optional advisories summary per SBOM]
  map[RequestedField_HashMap_HashMap severity map]

  client --> request
  request --> response
  response --> map
Loading

File-Level Changes

Change Details Files
Add optional advisories query parameter to SBOM listing endpoint to request advisory severity summaries.
  • Introduce boolean query parameter advisories on the affected path to toggle inclusion of advisory severity summaries.
  • Document the new parameter with description and mark it as optional.
client/openapi/trustd.yaml
Wire advisories severity summary into multiple response object schemas using a reusable map type.
  • Add advisories field to several component schemas that previously only exposed described_by, referencing a new RequestedField_HashMap_HashMap schema.
  • Define RequestedField_HashMap_HashMap as a nullable object mapping severity levels to non-negative 64-bit integers, with constrained property names for allowed severities (unknown, none, low, medium, high, critical).
client/openapi/trustd.yaml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • The new RequestedField_HashMap_HashMap schema name is a bit opaque; consider renaming it to something that reflects its semantic purpose (e.g., advisory severity summary map) to improve readability and future maintainability.
  • The advisories query parameter description references a severity summary, but the schema description focuses on severity levels; consider aligning the wording so the OpenAPI clearly explains the shape and meaning of the returned data (e.g., counts per severity).
  • You’ve added advisories as an optional property in several response objects; double-check whether it should be included in the required list (or explicitly documented as optional) to avoid ambiguity for clients about when this field is present.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The new `RequestedField_HashMap_HashMap` schema name is a bit opaque; consider renaming it to something that reflects its semantic purpose (e.g., advisory severity summary map) to improve readability and future maintainability.
- The `advisories` query parameter description references a severity summary, but the schema description focuses on severity levels; consider aligning the wording so the OpenAPI clearly explains the shape and meaning of the returned data (e.g., counts per severity).
- You’ve added `advisories` as an optional property in several response objects; double-check whether it should be included in the `required` list (or explicitly documented as optional) to avoid ambiguity for clients about when this field is present.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.32%. Comparing base (3427e85) to head (4736daa).

Additional details and impacted files
@@              Coverage Diff               @@
##           release/0.5.z    #1142   +/-   ##
==============================================
  Coverage          51.32%   51.32%           
==============================================
  Files                256      256           
  Lines               5518     5518           
  Branches            1668     1668           
==============================================
  Hits                2832     2832           
  Misses              2421     2421           
  Partials             265      265           
Flag Coverage Δ
unit 6.56% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@carlosthe19916 carlosthe19916 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🤖 Auto-approved

Only client/openapi/trustd.yaml changed — no manual review required.

@carlosthe19916 carlosthe19916 merged commit fbdbd2a into release/0.5.z Jul 3, 2026
16 of 17 checks passed
@github-project-automation github-project-automation Bot moved this to Done in Trustify Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant