Skip to content

Upgrade swagger-core from version 2.2.43 to 2.2.45#3245

Draft
Mattias-Sehlstedt wants to merge 1 commit intospringdoc:mainfrom
Mattias-Sehlstedt:update-swagger-core
Draft

Upgrade swagger-core from version 2.2.43 to 2.2.45#3245
Mattias-Sehlstedt wants to merge 1 commit intospringdoc:mainfrom
Mattias-Sehlstedt:update-swagger-core

Conversation

@Mattias-Sehlstedt
Copy link
Contributor

@Mattias-Sehlstedt Mattias-Sehlstedt commented Mar 13, 2026

Known caveats

  1. Change 5001: Add support for @Nullable annotations in OpenAPI 3.1 schemas swagger-api/swagger-core#5018 that introduced support for @Nullable leaks the nullable to array items. Reported in [Bug]: Issues using @Nullable annotations in OpenAPI 3.1 schemata swagger-api/swagger-core#5077. The annotation also incorrectly leaks to objects, so that they will be marked nullable: true or type: null. I know the cause and the fix but I am waiting for the first ticket to be resolved before I implement that fix.
  2. Change fix: add empty default value (#4838) swagger-api/swagger-core#5063 made it so that the swagger-core ObjectMapper is need to properly retain the null default/example when cloning via json. This means that custom injected extensions that do not abide to having a prefix "x-" gets dropped.
  3. I suspect change fix: OAS 3.1 schema generation for raw Object properties swagger-api/swagger-core#5034 is what makes it so "additionalProperties": {} becomes "additionalProperties": {"type": "object"} This new definition does not mean the same as the first, and I would argue that the first is more correct for Map<String, Object> in Java. But it depends on if Object in the map is expected to be a Json-deserializable value or something more flat/simple.

"openapi": "3.0.1",
"info": {
"TEST": "HELLO"
"x-TEST": "HELLO"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is an example of an adjustment needed for caveat 2

},
"PageMetadata": {
"type": "object",
"type": "null",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is an example of an issue coming from Caveat 1

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.

1 participant