api-versioning
/api-versioning
Prowadzi wersjonowanie API Spring MVC i WebFlux w Spring Boot 3 i Spring Framework 6: jawne strategie URL, nagłówka i typu mediów, reguły zgodności i obsługa deprecjacji.
- Autor
- rrezartprebreza ↗
- Repozytorium
- spring-boot-skills ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 22.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 4
- Skrypty
- 2
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 22.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
- 2 skrypty w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.
Skrypty: examples/bad-versioned-controller.java, examples/good-versioned-controller.java
Co robi i kiedy
Prowadzi wersjonowanie API Spring MVC i WebFlux w Spring Boot 3 i Spring Framework 6: jawne strategie URL, nagłówka i typu mediów, reguły zgodności i obsługa deprecjacji.
Oryginalny opis (EN)
Use when versioning Spring MVC or WebFlux APIs in Spring Boot 3 / Spring Framework 6. Covers explicit URL, header, and media-type strategies, compatibility rules, and deprecation handling.
Jak działa
- Prefer a visible, testable contract
- Migration boundary
- Gotchas
Podgląd SKILL.md
---
name: api-versioning
description: >
Use when versioning Spring MVC or WebFlux APIs in Spring Boot 3 / Spring Framework 6. Covers
explicit URL, header, and media-type strategies, compatibility rules, and deprecation handling.
---
# API Versioning (Boot 3 / Framework 6)
Boot 3 does not provide Boot 4's built-in mapping `version` attribute. Choose one explicit
strategy and keep it consistent: URL segments, a request header, or media-type parameters.
## Prefer a visible, testable contract
For a public API, `/api/v1/orders` and `/api/v2/orders` are usually the clearest choice. If URLs
must remain stable, resolve a request header at the web boundary and route to versioned handlers.
Do not hide version selection in business services or duplicate it across filters and controllers.
```java
@RestController
@RequestMapping("/api/v1/orders")
class OrderV1Controller {
@GetMapping("/{id}")
OrderV1 get(@PathVariable UUID id) { ... }
}
```
Document supported versions in OpenAPI, define a removal policy, and return a consistent error for
unsupported versions. Add `Deprecation`, `Sunset`, and `Link` headers through a response advice or
filter when retiring a version.
## Migration boundary
Keep version-specific DTOs and controllers thin. Map both versions to the same application use
case, and do not copy domain logic into each version. Add contract tests for every supported
version and verify content negotiation if using media types.
## Gotchas
- Agent uses Boot 4's `version` attribute on Boot 3 - it is not available; choose an explicit routing strategy.
- Agent mixes URL, header, and media-type resolution - select one source of truth.
- Agent puts version branching in services - keep compatibility at the web adapter boundary.
- Agent changes response fields without versioning - preserve old contracts or publish a new version.
- Agent invents deprecation headers per controller - centralize them in advice or a filter.
- Agent documents only the latest version - keep OpenAPI and contract tests for every supported version.
Pliki w paczce (4)
- SKILL.md 2 KB
- agents/openai.yaml 1 KB
- examples/bad-versioned-controller.java 1 KB
- examples/good-versioned-controller.java 1 KB
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · rrezartprebreza/spring-boot-skills | 100 | MIT |
| TerminalSkills/skills | 100 | Apache-2.0 |
| claude-dev-suite/claude-dev-suite | 100 | MIT |
| rrezartprebreza/spring-boot-skills | 100 | MIT |
| codewithmukesh/dotnet-claude-kit | 100 | MIT |
| ThibautBaissac/rails_ai_agents | 100 | MIT |
| tmj-90/gaffer | 90 | Apache-2.0 |
| Amey-Thakur/AI-SKILLS | 90 | MIT |
Migawka bazy z 13.11.2026 · wersja paczki c70c23a91ba4 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 90spring-boot
Pomaga zmieniać aplikacje Java oparte na Spring Boot: MVC, Spring Security, Spring Data i konfigurację zarządzaną przez Spring. - 100spring-boot-java
Pilnuje zasad i dobrych praktyk w projektach Spring Boot w Javie, od JPA po WebFlux i bezpieczeństwo. - 100spring-boot-kotlin
Pilnuje wzorców Spring Boot w Kotlinie, w tym korutyn, WebFlux, JPA i zabezpieczeń. - 95backend-spring-web
Przegląda kontrolery Spring MVC i WebFlux: wzorce RestController, wstrzykiwanie zależności, walidację @Valid i obsługę wyjątków. - 90spring-boot-architecture
Pilnuje architektury Spring Boot: pakietów wg funkcji, architektury heksagonalnej, właściwych stereotypów i wstrzykiwania przez konstruktor. - 100spring-boot-expert
Wspiera pracę z Spring Boot, Spring Framework, API REST i mikroserwisami w Javie.