Inspectopedia 2025.3 Help

Misconfigured API versioning

Highlights endpoints' version attributes when a module has no API versioning configured.

API versioning can be configured in two ways:

  • in a configuration file for Spring Boot projects

  • or providing an implementation of the org.springframework.web.servlet.config.annotation.WebMvcConfigurer and overriding the configureApiVersioning method.

For example:

# For Spring Boot projects spring.mvc.apiversion.use.header=Api-Version spring.mvc.apiversion.default=1.0 spring.mvc.apiversion.detect-supported=false

or:

// This way is supported both for Spring Boot and Spring Framework projects @Configuration public class MyWebConfig implements WebMvcConfigurer { @Override public void configureApiVersioning(ApiVersionConfigurer configurer) { configurer .useRequestHeader("Api-Version") .setDefaultVersion("1.0") .detectSupportedVersions(false); } }

Locating this inspection

By ID

Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.

SpringApiVersioningConfigurationInspection
Via Settings dialog

Path to the inspection settings via IntelliJ Platform IDE Settings dialog, when you need to adjust inspection settings directly from your IDE.

Settings or Preferences | Editor | Inspections | Spring | Spring MVC

Inspection ID: SpringApiVersioningConfigurationInspection

Suppressing Inspection

You can suppress this inspection by placing the following comment marker before the code fragment where you no longer want messages from this inspection to appear:

//noinspection SpringApiVersioningConfigurationInspection

More detailed instructions as well as other ways and options that you have can be found in the product documentation:

Inspection Details

By default bundled with:

IntelliJ IDEA 2025.3, Qodana for JVM 2025.3,

Last modified: 03 December 2025