Swagger UI
API'leri etkileşimli olarak keşfedin ve test edin.
Swagger UI, CoddyKit'te ücretsiz bir Spring Boot 4 Microservices & REST APIs dersidir. Bu, 4 dersinin 4. dersidir. Aşağıdan dersin tamamını ücretsiz okuyabilir, sonra tarayıcıda yerleşik kod editörü ve 7/24 yapay zeka koçu ile uygulamalı olarak pratik yapabilirsin. Bu, Spring Boot 4 Microservices & REST APIs öğrenme yolunun bir parçasıdır ve ilerlemeniz web ve CoddyKit uygulaması arasında senkronize olur. Spring Boot 4 Microservices & REST APIs kursu toplamda 4 dersten oluşur.
Bu dersin bazı bölümleri henüz çevrilmemiş olup İngilizce olarak gösterilmektedir.
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.htmlTry 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: /docsSorting 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: alphaTrying 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: trueDisplay 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: trueSecuring 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
Sıkça Sorulan Sorular
“Swagger UI” dersi ücretsiz mi?
Evet — “Swagger UI” dersin tüm metni burada web'de ücretsiz olarak okunabilir. Etkileşimli olarak pratik yapmak (yerleşik kod editörü ve 7/24 yapay zeka koçu) ve Spring Boot 4 Microservices & REST APIs kursunun geri kalanını açmak için CoddyKit PRO'ya yükselt. Spring Boot 4 Microservices & REST APIs kursu toplamda 4 dersten oluşur.
“Swagger UI” dersinde ne öğreneceğim?
API'leri etkileşimli olarak keşfedin ve test edin. Spring Boot 4 Microservices & REST APIs ile uygulamalı kodu tarayıcıda doğrudan çalıştırarak pratik yaparsın ve 7/24 yapay zeka koçu dersi çalışırken sorularını yanıtlar.
Spring Boot 4 Microservices & REST APIs öğrenmeye başlamak için deneyim gerekli mi?
Önceden deneyim gerekmez. CoddyKit'te Spring Boot 4 Microservices & REST APIs, başlangıçtan ileri seviyeye kadar yapılandırıldığı için buradan başlayabilir veya başından başlayıp kendi hızında ilerleme yapabilirsin. Bu, 4 dersinin 4. dersidir.
“Swagger UI” dersi ne kadar sürer?
Çoğu CoddyKit dersi yaklaşık 5–10 dakika sürer. Her biri kısa ve etkileşimli olduğu için sabit ilerleme yaparsın ve web ile uygulama arasında tam olarak bıraktığın yerden devam edebilirsin.
Bu Spring Boot 4 Microservices & REST APIs dersinde kod yazıp çalıştırabilir miyim?
Evet. Her Spring Boot 4 Microservices & REST APIs dersi yerleşik bir kod editörü içerir, bu sayede tarayıcıda gerçek kod yazıp çalıştırabilir ve anlık yapay zeka geri bildirimi alırsın — yerel kurulum gerekli değildir.
Bu kursun tüm dersleri
- Projenize SpringDoc Ekleme
- Uç Noktaları ve Modelleri Belgeleme
- OpenAPI Belirtimini Özelleştirme
- Swagger UI