0Pricing
Spring Boot 4 Microservices & REST APIs · 강의

Swagger UI

API를 대화형으로 탐색하고 테스트해 보세요.

Swagger UI은(는) CoddyKit의 무료 Spring Boot 4 Microservices & REST APIs 강의입니다. 이것은 4개 중 4번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 Spring Boot 4 Microservices & REST APIs 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. Spring Boot 4 Microservices & REST APIs 강의에는 총 4개의 강의가 포함되어 있습니다.

이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.

What is Swagger UI?

Swagger UI renders your OpenAPI spec as an interactive web page. Developers can browse endpoints, read schemas, and send live requests - all from the browser.

Where it lives

With the -ui starter, Swagger UI is served at /swagger-ui.html by default. It loads the spec from /v3/api-docs.

// open in a browser:
// http://localhost:8080/swagger-ui.html

Try it out

Each operation has a Try it out button. You fill in parameters and body, click Execute, and the UI shows the real request URL, response status, headers and body.

Reading the schema view

The Schemas section at the bottom lists every model with field types, descriptions and examples taken from your @Schema annotations.

Changing the UI path

Relocate the UI with a property - useful when serving docs under a custom route.

# application.yml
springdoc:
  swagger-ui:
    path: /docs

Sorting endpoints and tags

By default operations appear in an unsorted order. Properties let you sort operations and tags alphabetically for a cleaner page.

springdoc:
  swagger-ui:
    operations-sorter: alpha
    tags-sorter: alpha

Trying secured endpoints

If you declared a security scheme, the UI shows an Authorize button. Enter a token once and it is attached to every secured request you try.

Filtering operations

Enable a search box to filter the long list of endpoints by name, which helps in large APIs.

springdoc:
  swagger-ui:
    filter: true

Display options

You can control how much is expanded by default and whether request duration is shown, tuning the UI for your team's taste.

springdoc:
  swagger-ui:
    doc-expansion: none      # collapse all by default
    display-request-duration: true

Securing the UI itself

Swagger UI exposes your API surface. In production, protect /swagger-ui/** and /v3/api-docs/** with Spring Security, or disable them, so they are not publicly browsable.

// permit only authenticated users
http.authorizeHttpRequests(a -> a
    .requestMatchers("/swagger-ui/**", "/v3/api-docs/**").authenticated()
    .anyRequest().permitAll());

UI vs spec - division of labor

Remember: Swagger UI is just a viewer. The source of truth is the OpenAPI spec generated from your code and annotations. Improve the docs by improving annotations, not the UI.

Quick Check

Confirm your Swagger UI knowledge.

Recap

You explored Swagger UI:

  • Served at /swagger-ui.html, backed by /v3/api-docs
  • Try it out sends live requests; Authorize adds tokens
  • Sort, filter and expansion are configurable via properties
  • Protect or disable the UI in production

자주 묻는 질문

“Swagger UI” 강의는 무료인가요?

네 — “Swagger UI” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 Spring Boot 4 Microservices & REST APIs 강의 전체를 잠금 해제할 수 있습니다. Spring Boot 4 Microservices & REST APIs 강의에는 총 4개의 강의가 포함되어 있습니다.

“Swagger UI”에서 뭘 배우나요?

API를 대화형으로 탐색하고 테스트해 보세요. 브라우저에서 직접 실행하는 실습 코드로 Spring Boot 4 Microservices & REST APIs을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.

Spring Boot 4 Microservices & REST APIs을(를) 시작하는 데 경험이 필요한가요?

사전 경험은 필요하지 않습니다. CoddyKit의 Spring Boot 4 Microservices & REST APIs은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 4번째 강의입니다.

“Swagger UI” 강의는 얼마나 걸리나요?

대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.

이 Spring Boot 4 Microservices & REST APIs 강의에서 코드를 작성하고 실행할 수 있나요?

네. 모든 Spring Boot 4 Microservices & REST APIs 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.

이 강의의 모든 강의

  1. 프로젝트에 SpringDoc 추가하기
  2. 엔드포인트와 모델 문서화
  3. OpenAPI 명세 사용자 지정
  4. Swagger UI
← Spring Boot 4 Microservices & REST APIs(으)로 돌아가기