fix(starter): bundle springdoc — Swagger UI from the starter alone (0.2.1)#50
Merged
Conversation
…r alone (0.2.1)
0.2.0 shipped springdoc as compileOnly, so OpenApiAutoConfiguration only activated if
the consumer added springdoc themselves — Swagger UI did NOT appear from the starter
alone. That contradicts the kit's "add the starter, nothing else" promise. Fix: the
starter now depends on springdoc-openapi-starter-webmvc-ui via api(), so it reaches the
consumer's classpath transitively, @ConditionalOnClass(GroupedOpenApi) trips, and
/swagger-ui + /v3/api-docs serve out of the box with the admin API grouped.
Opt-out, both documented in the configuration reference:
1. devslab.kit.openapi.enabled=false — keep the jar, disable the surface (production).
2. exclude the org.springdoc dependency from the starter — drop the jar entirely.
- devslab-kit-spring-boot-starter: add api("org.springdoc:springdoc-openapi-starter-webmvc-ui").
(autoconfigure keeps its compileOnly springdoc + @ConditionalOnClass, so it still
compiles and stays dormant without springdoc; the starter is what guarantees presence.)
- sample-app: REMOVE its own springdoc dependency — the OpenApi*Tests now prove Swagger
works from the starter's transitive springdoc alone (the real "starter only" path).
- README(.ko), docs/reference/configuration(.ko): reword from "add springdoc to opt in"
to "bundled in the starter; disable via property or exclude the jar", with Gradle +
Maven exclude snippets.
- CHANGELOG(.ko): [0.2.1] entry. README + installation install coordinates bumped to 0.2.1.
Verified: full `./gradlew clean build` green — 44 tests, 0 failures (OpenApiEndpointTests
3/3 + OpenApiDisabledTests 1/1 with NO springdoc declared in sample-app); mkdocs --strict
clean.
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.
What / 무엇
Makes Swagger UI come up from the starter alone — bundle springdoc in the starter so the kit's "add the starter, nothing else" promise covers the API docs too. Ships as 0.2.1.
Swagger UI가 스타터만으로 뜨도록 — springdoc을 스타터에 포함해 "스타터만 추가하면 다 됨" 약속을 API 문서까지 확장. 0.2.1로 배포.
Why / 왜
0.2.0shipped springdoc ascompileOnly, soOpenApiAutoConfigurationonly activated if the consumer added springdoc themselves — Swagger UI did not appear from the starter alone. That contradicts the kit's whole premise.0.2.0은 springdoc을compileOnly로 배포 → 소비자가 직접 추가해야만 Swagger UI가 떴음. 킷 철학과 어긋남.How / 어떻게
api("org.springdoc:springdoc-openapi-starter-webmvc-ui"), so it reaches the consumer's classpath transitively;@ConditionalOnClass(GroupedOpenApi)trips and/swagger-ui+/v3/api-docsserve out of the box.compileOnlyspringdoc +@ConditionalOnClass, so it still compiles/stays dormant without springdoc; the starter guarantees presence.devslab.kit.openapi.enabled=false(keep jar, disable surface) orexcludetheorg.springdocdependency (drop the jar) — Gradle + Maven snippets in the config reference.Verification / 검증
Full
./gradlew clean buildgreen — 44 tests, 0 failures, with no springdoc declared in sample-app:OpenApiEndpointTests3/3 (/v3/api-docs200+valid JSON, admin group,/swagger-ui200) +OpenApiDisabledTests1/1.mkdocs --strictclean.Docs / 문서
README(.ko) Features + Config,
docs/reference/configuration(.ko)reworded with exclude snippets, CHANGELOG(.ko)[0.2.1], install coordinates → 0.2.1.