Skip to content

feat(vulnerability): regenerate client from latest openapi spec#507

Merged
charlesmulder merged 1 commit into
RedHatInsights:mainfrom
Siasurai:RHINENG-26655
Jul 22, 2026
Merged

feat(vulnerability): regenerate client from latest openapi spec#507
charlesmulder merged 1 commit into
RedHatInsights:mainfrom
Siasurai:RHINENG-26655

Conversation

@Siasurai

@Siasurai Siasurai commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Description

regenerate API client for vulnerability from latest openapi spec
https://redhat.atlassian.net/browse/RHINENG-26655

@Siasurai
Siasurai requested a review from a team as a code owner July 9, 2026 11:19
@Siasurai Siasurai self-assigned this Jul 9, 2026
karelhala
karelhala previously approved these changes Jul 9, 2026
charlesmulder
charlesmulder previously approved these changes Jul 13, 2026
@charlesmulder
charlesmulder self-requested a review July 13, 2026 10:51
@charlesmulder
charlesmulder dismissed their stale review July 13, 2026 10:52

Need to check if it's a breaking change

@charlesmulder charlesmulder 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.

@Siasurai Looks like the regenerated client includes breaking changes and therefore technically requires a major version bump, which can be achieved by appending an exclamation mark after the conventional commit type eg. feat(vulnerability)!.... More info available here https://www.conventionalcommits.org/en/v1.0.0/

These are some of the breaking changes:

  1. Removed exported interfaces — consumers using these get compile errors:
    - BusinessRiskListOutData, BusinessRiskListOutMeta
    - CveDetailOutData, CveDetailOutDataAttributes
    - StatusListOutData, StatusListOutMeta
    - SystemDetailsOutData, SystemDetailsOutDataTags
    - DashboardCvesBySeverity, DashboardRecentRules
  2. Changed property types in existing interfaces:
    - AffectedSystemsIdsOut.links: LinksInlineResponse2003Links
    - AffectedSystemsIdsOut.meta: MetaAffectedSystemsobject (loses type safety)
  3. Function return type changes:
    - getAffectedSystemsIdsByCve(): Returns InlineResponse2004 instead of AffectedSystemsIdsOut

I wonder if the vulnerability API itself is versioned and if so, does it adhere to semantic versioning?

@Siasurai
Siasurai force-pushed the RHINENG-26655 branch 3 times, most recently from e91e45c to 1cb35da Compare July 14, 2026 14:03
@Siasurai

Copy link
Copy Markdown
Contributor Author

@charlesmulder I updated the commit message to feat(vulnerabilities)!: for the major version bump

I also asked our backend developer about API versioning. He said the service uses semantic versioning, but the API is still v1 and there should not be any breaking changes (not since the last client generation) New changes should only be added endpoints and attributes.

So the breaking changes in this PR are probably from the generator producing different TypeScript structures (maybe a different generator version), not from real breaking API changes

@Siasurai
Siasurai marked this pull request as draft July 15, 2026 12:18
charlesmulder
charlesmulder previously approved these changes Jul 15, 2026
@charlesmulder

charlesmulder commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Thank you for finding out @Siasurai. I have approved the PR. In my opinion, from a javascript-clients point of view, the updated client contains breaking changes, even though the API does not, so using the new API endpoints will require a major version update of the client.

@Siasurai
Siasurai marked this pull request as ready for review July 15, 2026 12:34
@Siasurai
Siasurai marked this pull request as draft July 15, 2026 13:16
@charlesmulder

Copy link
Copy Markdown
Contributor

Hi @Siasurai Please update the commit message scope to include the full package name ie. feat(@redhat-cloud-services/vulnerabilities-client)!: regenerate client from latest openapi spec otherwise semver is capped at patch bump.

@Siasurai

Copy link
Copy Markdown
Contributor Author

@charlesmulder thanks for noticing, I'll ofc update the message

FYI: I’ve also moved this PR to draft so backend can check why the API schemas are sent without $ref

@Siasurai
Siasurai dismissed stale reviews from charlesmulder and karelhala via 797588b July 22, 2026 07:52
@Siasurai
Siasurai marked this pull request as ready for review July 22, 2026 08:04
@Siasurai

Copy link
Copy Markdown
Contributor Author

@charlesmulder Hi
Our backend restored $refs in the OpenAPI spec, so I regenerated the client again. The diff looks much cleaner now, and I don’t think there are any real breaking changes, but I’m not 100% sure

Could you please take another look at the review when you have a moment? Thanks a lot in advance!

@charlesmulder

charlesmulder commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Hi @Siasurai Thank you for spending time on this.

Still a breaking change requiring adding an ! to your commit message.

  1. CvesWithoutErrataOut interface restructured (BREAKING)

Before:

interface CvesWithoutErrataOut {
  updated: CvesWithoutErrataOutUpdated;
  meta: MetaPermissions;
}

After:

interface CvesWithoutErrataOut {
  cves_without_errata: CvesWithoutErrataOutCvesWithoutErrata;
}
  • Removed updated property (replaced with cves_without_errata)
  • Removed meta property
  • Changed structure completely
  1. New interface CvesWithoutErrataOutCvesWithoutErrata

Replaced old nested structure with:

interface CvesWithoutErrataOutCvesWithoutErrata {
  enabled?: boolean;
}
  1. Renamed interface (BREAKING)
  • CvesWithoutErrataOutUpdatedCvesWithoutErrataPatchOut
  • Structure changes in nested types
  1. New GET endpoint added (non-breaking addition)
getCvesWithoutErrata()  // New method

@Siasurai

Copy link
Copy Markdown
Contributor Author

@charlesmulder thank you for review! And done 😊

@charlesmulder
charlesmulder merged commit d6ac780 into RedHatInsights:main Jul 22, 2026
10 checks passed
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