api-versioning
Skill293 starsChanged 4 months agoMITView on GitHub
Use when versioning Spring MVC or WebFlux APIs in Spring Boot 4 / Spring Framework 7. Covers built-in mapping versions, request version resolution, defaults, supported versions, and deprecation headers.
6 other projects use a version of this.
Adopted by
Most recently taken up by
- lgzarturo/codeconductortheir own version, first seen Sep 30, 2026
- NoorQureshi/SploitAgenttheir own version, first seen Sep 9, 2026
- codewithmukesh/dotnet-claude-kittheir own version, first seen Jul 22, 2026
- Vimalk0703/shipworthytheir own version, first seen Apr 1, 2026
- ffsshhttiikk/opencode-agents-skillstheir own version, first seen Feb 28, 2026
- wpank/aitheir own version, first seen Feb 10, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- codewithmukesh/dotnet-claude-kit★ 750same name
- NoorQureshi/SploitAgent★ 20same name
- wpank/ai★ 11same name
- Vimalk0703/shipworthy★ 6same name
- ffsshhttiikk/opencode-agents-skills★ 2same name
- lgzarturo/codeconductor★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository65 other files it gives its agents.
- ai-observabilitySkill
- api-versioningSkill
- configuration-propertiesSkill
- container-native-deploymentSkill
- domain-driven-designSkill
- event-driven-messagingSkill
- flyway-migrationsSkill
- hateoasSkill
- hexagonal-architectureSkill
- http-interface-clientsSkill
- idempotency-patternsSkill
- layered-architectureSkill
- mcp-serverSkill
- multi-module-mavenSkill
- multi-tenancySkill
- null-safetySkill
- oauth2-resource-serverSkill
- openapi-firstSkill
- problem-details-rfc9457Skill
- production-observabilitySkill
- resilience-retrySkill
- rest-api-conventionsSkill
- spring-ai-integrationSkill
- spring-batchSkill
- spring-boot-migrationSkill
- spring-cloud-gatewaySkill
- spring-data-jpaSkill
- spring-data-redisSkill
- spring-modulithSkill
- spring-security-jwtSkill
- testing-pyramidSkill
- transactional-patternsSkill
- webflux-reactive-patternsSkill
- ai-observabilitySkill
- configuration-propertiesSkill
- container-native-deploymentSkill
- domain-driven-designSkill
- event-driven-messagingSkill
- flyway-migrationsSkill
- hateoasSkill
- hexagonal-architectureSkill
- http-interface-clientsSkill
- idempotency-patternsSkill
- layered-architectureSkill
- mcp-serverSkill
- multi-module-mavenSkill
- multi-tenancySkill
- null-safetySkill
- oauth2-resource-serverSkill
- openapi-firstSkill
- problem-details-rfc9457Skill
- production-observabilitySkill
- resilience-retrySkill
- rest-api-conventionsSkill
- spring-ai-integrationSkill
- spring-batchSkill
- spring-boot-migrationSkill
- spring-cloud-gatewaySkill
- spring-data-jpaSkill
- spring-data-redisSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 29
Use semantic version strings.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
API Versioning (Boot 4 / Framework 7)
Spring Framework 7 provides API versioning in the mapping layer. Prefer it over hand-rolled
/v1 prefixes, custom HandlerMapping implementations, or version-sniffing filters.
Declare versions on mappings
@RestController
@RequestMapping("/api/orders")
class OrderController {
@GetMapping(path = "/{id}", version = "1.0")
OrderV1 getV1(@PathVariable UUID id) { ... }
@GetMapping(path = "/{id}", version = "1.2")
OrderV2 getV2(@PathVariable UUID id) { ... }
}Use semantic version strings. A + suffix means the mapping handles that version and newer
versions, for example version = "1.2+".
Configure one request resolution strategy
@Configuration
class WebConfig implements WebMvcConfigurer {
@Override
public void configureApiVersioning(ApiVersionConfigurer configurer) {
configurer
.useRequestHeader("API-Version")
.setDefaultVersion("1.0")
.addSupportedVersions("1.0", "1.2");
}
}Choose exactly one source: request header, query parameter, path segment, or media-type
parameter. Keep the choice consistent across the application. WebFlux uses the corresponding
WebFluxConfigurer hook.
Required behavior and deprecation
Versioning is required unless a default is configured or setVersionRequired(false) is used.
Missing or unsupported versions should be covered by the API error contract. Use
StandardApiVersionDeprecationHandler for Deprecation, Sunset, and Link response headers.
Boot properties can provide defaults under spring.mvc.apiversion.* or
spring.webflux.apiversion.*, but keep the resolution strategy in Java configuration when its
behavior must be explicit.
Gotchas
- Agent hand-rolls
/api/v1prefixes or a version filter - use the mappingversionattribute. - Agent writes
version = 1- the value is a semantic versionString, such as"1.0". - Agent uses
useHeaderoruseQueryParameter- useuseRequestHeaderoruseQueryParam. - Agent enables versioning without a default or
versionRequired(false)- un-versioned requests return 400. - Agent mixes a path segment and a request header - choose one source of truth.
- Agent invents custom sunset headers - use
StandardApiVersionDeprecationHandler.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

