Skip to content

Conversation

@timtebeek
Copy link
Member

@timtebeek timtebeek commented Jan 12, 2026

@github-project-automation github-project-automation bot moved this to In Progress in OpenRewrite Jan 12, 2026
@timtebeek timtebeek changed the title Convert @ApiModel(reference) to @Schema(ref) or @Schema(implementation) Convert @ApiModel(reference) to @Schema(ref) or @Schema(implementation) Jan 12, 2026
@timtebeek timtebeek added the enhancement New feature or request label Jan 12, 2026
@timtebeek
Copy link
Member Author

@simoneromani-90 hope you agree with the changes here! Thanks again for calling these out.

@timtebeek timtebeek requested a review from Laurens-W January 12, 2026 13:46
@timtebeek timtebeek moved this from In Progress to Ready to Review in OpenRewrite Jan 12, 2026
Copy link
Contributor

@Laurens-W Laurens-W left a comment

Choose a reason for hiding this comment

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

LGTM

return;
}
String referenceValue = literal.getValue().toString();
if (referenceValue.contains("://")) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder, could this be a local file reference? In that case this doesn't work

Copy link
Contributor

Choose a reason for hiding this comment

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

It actually can, so we should expand this to also check for #
These are examples of local references (within and outside of the current spec)
"common-models.json#/definitions/Address"
"#/definitions/MyModel"

@timtebeek timtebeek merged commit 20770ba into main Jan 12, 2026
2 checks passed
@timtebeek timtebeek deleted the aipmodel-reference-as-url-or-type branch January 12, 2026 17:24
@github-project-automation github-project-automation bot moved this from Ready to Review to Done in OpenRewrite Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Swagger @ApiModel(reference) migration should support both @Schema(ref) and @Schema(implementation) based on value being an URL or class name

3 participants