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

Jackson views/ignored properties: fix view names, in-line custom schemas #2063

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

MikeEdgar
Copy link
Member

This change addresses the issues raised in #2062

  1. Do not register view-specific schemas for JDK types. These types are not introspected and do not change based on the view in effect.
  2. Limit the names of view-specific schemas to include only the views directly effective. The views inherited by the active views will no longer display.
  3. In-line the schema of a type reference that includes @JsonIgnoreProperties. In these cases the schema is specific to the point of reference and will not be considered reusable.
  4. Unrelated: reduce misleading logging in a few IO classes. This reduces logging that indicates processing of annotations that aren't actually present in the classes being scanned.

For number 2 above, given the views:

class Views {
    class Max extends Full {
    }

    class Full extends Ingest {
    }

    class Ingest extends Abridged {
    }

    class Abridged {
    }
}

the old process would append _Max_Full_Ingest_Abridged to schema names when the Max view is in effect. With this change we will now simply append _Max.

@MikeEdgar MikeEdgar added this to the 4.0.3 milestone Nov 10, 2024
@MikeEdgar MikeEdgar linked an issue Nov 10, 2024 that may be closed by this pull request
Copy link

@MikeEdgar MikeEdgar merged commit 458fb2f into smallrye:main Nov 11, 2024
6 checks passed
@MikeEdgar MikeEdgar deleted the issue-2062 branch November 11, 2024 09:55
@MikeEdgar MikeEdgar added the backport/3.x Issue pending backport to the 3.x series label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/3.x Issue pending backport to the 3.x series
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Found several bugs in the OpenAPI generation results
2 participants