feat: add AdvisoryInfo schema to RemediationInfo#115
Merged
Conversation
Add AdvisoryInfo schema with id (required), title, and url fields to carry source advisory attribution for each remediation. Ref: TC-5018 Assisted-by: Claude Code
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds an AdvisoryInfo schema to the OpenAPI v5 spec and wires it into RemediationInfo so generated clients can surface advisory attribution per remediation. Entity relationship diagram for RemediationInfo and AdvisoryInfoerDiagram
RemediationInfo {
string url
AdvisoryInfo advisory
}
AdvisoryInfo {
string id
string title
string url
}
RemediationInfo ||--o| AdvisoryInfo : advisory
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Consider adding
format: urito theurlproperties in bothRemediationInfoandAdvisoryInfoto enable stronger validation and better tooling support. - If advisory identifiers follow a well-defined pattern (e.g., RHSA-YYYY:NNNN, GHSA-xxxx-xxxx-xxxx), you might want to add a
patternto theidfield to capture that structure explicitly. - Double-check whether an advisory-like schema already exists elsewhere in the spec and, if so, consider reusing or aligning this
AdvisoryInfoschema to avoid duplication and keep the API model consistent.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider adding `format: uri` to the `url` properties in both `RemediationInfo` and `AdvisoryInfo` to enable stronger validation and better tooling support.
- If advisory identifiers follow a well-defined pattern (e.g., RHSA-YYYY:NNNN, GHSA-xxxx-xxxx-xxxx), you might want to add a `pattern` to the `id` field to capture that structure explicitly.
- Double-check whether an advisory-like schema already exists elsewhere in the spec and, if so, consider reusing or aligning this `AdvisoryInfo` schema to avoid duplication and keep the API model consistent.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #115 +/- ##
=========================================
Coverage 95.00% 95.00%
Complexity 35 35
=========================================
Files 4 4
Lines 100 100
Branches 9 9
=========================================
Hits 95 95
Misses 4 4
Partials 1 1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
…Info Ref: TC-5018
Collaborator
Author
Verification Report — TC-5018Task: DA API Spec: Add advisory attribution to RemediationInfo and release 2.0.10
Review Comments (3 suggestions from sourcery-ai)
Correctness Details
Post-merge remaining: Acceptance criterion 5 (release 2.0.10) is a post-merge activity. This comment was AI-generated by sdlc-workflow/verify-pr v0.11.0. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AdvisoryInfoschema (idrequired,titleoptional,urloptional) to the OpenAPI v5 specadvisoryproperty toRemediationInforeferencingAdvisoryInfoRef: TC-5018
Test plan
mvn validatepassesmvn generate-sourcesproducesAdvisoryInfoin both Java and TypeScript targetsRemediationInfoincludesadvisoryfield in both languagesSummary by Sourcery
Add advisory metadata support to remediation information in the OpenAPI v5 specification.
New Features: