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

Adding APIGroups back to the schema #230

Merged
merged 1 commit into from
Jul 3, 2024

Conversation

MbolotSuse
Copy link
Contributor

Overview

Related to rancher/rancher#45955. Previous changes changed the order that schemas were evaluated in (used to be models, then ServerGroupsAndResources, is now ServerGroupsAndResources, then models). The APIGroups resource, which is not itself a server group/resource, but is a model, was omitted because of this. This re-adds this custom schema first (so that the description later on can fill in more detail), making the endpoint visible again in steve.

Solution Detail

  • Adds a BaseSchema to the apigroup package.
    • This package defines the template (which is applied to customize the schema later) for the apigroup schema.
  • Changes schema generation functionality to add the BaseSchema for apigroup.
    • This is done first so that addDescription will add a description for this schema.

Prior schema calculations started with openapiv2 models which included a
model for APIGroups. However, new schema calculations use
ServerGroupsAndResources first, which omitted these values. This
re-adds this type using a static schema.
@MbolotSuse MbolotSuse requested a review from a team as a code owner July 2, 2024 19:02
Copy link
Contributor

@ericpromislow ericpromislow left a comment

Choose a reason for hiding this comment

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

Looks good, tests pass

@MbolotSuse MbolotSuse merged commit 22a06dd into rancher:master Jul 3, 2024
1 check 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