Repository navigation
Fix jackson version doc - #5353
Closed
daniel-kmiecik wants to merge 27 commits into
Closed
daniel-kmiecik wants to merge 27 commits into
daniel-kmiecik wants to merge 27 commits into
Conversation
--------- Signed-off-by: Vasily Pelikh <2010720+vpelikh@users.noreply.github.com> Co-authored-by: Vasily Pelikh <2010720+vpelikh@users.noreply.github.com>
* chore: remove unused modules after migration to Jakarta * chore: remove references to `javax` namespace and update examples/documentation for Jakarta transition
Signed-off-by: Vasily Pelikh <vasily.pelikh@gmail.com>
Signed-off-by: Vasily Pelikh <vasily.pelikh@gmail.com>
…ame resolution (#5321) Signed-off-by: Vasily Pelikh <vasily.pelikh@gmail.com> Co-authored-by: Daniel Kmiecik <daniel.kmiecik@smartbear.com>
…ers (#5324) Co-authored-by: Daniel Kmiecik <daniel.kmiecik@smartbear.com>
Signed-off-by: Vasily Pelikh <vasily.pelikh@gmail.com>
Co-authored-by: Daniel Kmiecik <daniel.kmiecik@smartbear.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011jHegT9Maya3AJq7GyQaTp
* chore(ci): add dependabot entries for 3.0.0 and align CodeQL checkout action * chore(deps): bump minor/patch dependency versions for 3.0.0 * chore(build): clean up build configuration and update build plugins * test(deps): move to rest-assured 6 and stop leaking javassist from swagger-rest * test(deps): bump Guava to 33.7.2-jre and joda-convert to 3.0.1 * refactor(maven-plugin): drop runtime plexus-utils dependency * Remove unused org.joda.joda-convert dependency * Fix mvn site and Gradle plugin deprecations
* fix: deduplicate subtypes before composing oneOf Identical @JsonSubTypes entries (and Jackson's AnnotationIntrospectorPair) can report the same subtype more than once. Once a polymorphic parent is composed into a oneOf (see #5320), each duplicate entry becomes a repeated $ref in the composed schema, e.g. two $refs to the same subtype. resolveSubtypes() now drops duplicate subtypes via a new removeDuplicateSubTypes() helper, preserving declaration order. * Dedupe by class, not by NamedType --------- Co-authored-by: Ewa Ostrowska <ewa.ostrowska@smartbear.com>
* feat: optionally compose @JsonSubTypes parents into oneOf Adds an opt-in (json-subtypes-oneof system property / ModelResolver.jsonSubTypesOneOf) that composes a @JsonSubTypes or @Schema(subTypes) parent into a self-referencing oneOf: the parent gets a oneOf to its subtypes while the subtypes keep allOf to the parent. The cyclic allOf <-> oneOf shape is off by default because swagger-ui, openapi-generator and others dislike it, so the default output is unchanged from 3.0.0. When enabled, resolveSubtypes() replaces the parent model with a ComposedSchema whose oneOf references the resolved subtypes (using the resolved @JsonView-aware names) and re-reads the parent from the context; an explicit @Schema(oneOf) wins over the automatic composition to avoid a recursive allOf <-> oneOf. resolveSubtypes() is now protected instead of private, providing an extension point for downstream ModelResolver subclasses that need to customize or disable subtype resolution (see #5030). * make oneOf use only resolved subtypes, clean up and additional tests * change back resolveSubtypes to private, skip `composeParentAsOneOf` when `@Schema(oneOf)` is present instead of returning early --------- Co-authored-by: Ewa Ostrowska <ewa.ostrowska@smartbear.com>
* fix: keep oneOf when WRAPPER_OBJECT wrapping is applied ModelResolver.resolveWrapping() nested the whole model inside a new wrapper schema that only copied the name and properties, so a model carrying a oneOf (from @Schema(oneOf) or @JsonSubTypes) lost its composition and became a plain object schema with a single property. When the model already has a non-empty oneOf, add the wrapper property directly to the model and return it, preserving the composition. Behavior is unchanged for models without oneOf. Adds WrapperObjectOneOfTest, which fails before the fix (ObjectSchema with no oneOf) and passes after it. * remove empty object placeholder, add tests --------- Co-authored-by: Ewa Ostrowska <ewa.ostrowska@smartbear.com>
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.
Pull Request
Thank you for contributing to swagger-core!
Please fill out the following information to help us review your PR efficiently.
Description
Type of Change
Checklist
Screenshots / Additional Context