Repository navigation
[online] Replace springfox with springdoc - #25818
Merged
wing328 merged 1 commit intoNov 29, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 9 files
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
ChihweiLHBird
force-pushed
the
chore/online-springdoc
branch
from
November 25, 2026 08:56
97cd11d to
7eb1eb4
Compare
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 3 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
ChihweiLHBird
force-pushed
the
chore/online-springdoc
branch
from
November 25, 2026 17:53
7eb1eb4 to
ffdabe5
Compare
springfox 3.0.0 is no longer maintained and does not work with the path matcher that Spring Boot uses by default since 2.6. Replace it with springdoc-openapi 1.8.0, the line for Spring Boot 2. - /api-docs is now an OpenAPI 3.0 document instead of Swagger 2.0, with the same seven operations, operation ids, tags and models, and the paths in the same alphabetical order. - The Docket configuration becomes an OpenAPI bean. GENERATOR_HOST still sets the public address; it is now the server URL of the document, without trailing slashes. A value that is neither a URL with a host nor a path is logged and ignored. - Without GENERATOR_HOST, the server URL derived from the request leaves out an http scheme, as the springfox document left out the scheme, so behind a proxy that terminates TLS clients use the scheme of the page. - Swagger 1 annotations become their OpenAPI 3 equivalents. - ParameterAllowableValuesPlugin, a springfox plugin that had no visible effect on the generated document, is removed. - The spring.mvc.pathmatch.matching-strategy workaround is removed. - springdoc's own swagger-core is excluded so that the generator keeps the version its swagger-parser needs. - A test checks that /api-docs describes the API.
ChihweiLHBird
force-pushed
the
chore/online-springdoc
branch
from
November 28, 2026 22:23
ffdabe5 to
6459412
Compare
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.
Replace springfox 3.0.0 with springdoc-openapi 1.8.0 in
openapi-generator-online.springfox is unmaintained (last release July 2020) and only works on Spring Boot 2.6+ with the
ant-path-matcherworkaround added in #25731. springdoc 1.8.0 is springdoc's Spring Boot 2 line.Changes
Docketbecomes anOpenAPIbean, and the Swagger 1 annotations become OpenAPI 3 ones.ant-path-matcherworkaround andParameterAllowableValuesPlugin(which had no visible effect) are removed.GENERATOR_HOSTbecomes the server URL, without trailing slashes./api-docs.What changes for users
/api-docsis OpenAPI 3.0.1 instead of Swagger 2.0, with the same operations and models./swagger-resourcesendpoints are gone, and URLs with a doubled slash return 404.-Dspringfox.documentation.swagger.v2.hostno longer applies; useGENERATOR_HOST.PR checklist
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
Summary by cubic
Replaces springfox with springdoc-openapi in
openapi-generator-onlineso/api-docsnow serves an OpenAPI 3.0.1 document instead of Swagger 2.0, with the same seven operations, tags, models, and alphabetical path order.User-facing changes
/swagger-resourcesendpoints are gone, and URLs with a doubled slash return 404.-Dspringfox.documentation.swagger.v2.hostno longer applies; useGENERATOR_HOST.Implementation notes
specfield as an object.ant-path-matcherworkaround and theParameterAllowableValuesPluginare removed.GENERATOR_HOSTbecomes the server URL, without trailing slashes; unparseable values are logged and ignored.GENERATOR_HOST, the server URL from the request drops anhttpscheme.springdoc'sswagger-coreis excluded so the generator keeps the version itsswagger-parserneeds./api-docsto verify the API description and server URL handling.Written for commit 6459412. Summary will update on new commits.