/micronaut-standards:routingfrom Micronaut Standards
OneLiteFeather's HTTP routing conventions for Micronaut REST API controllers — resource-based paths with real HTTP verbs instead of action URLs, blocking HttpResponse<T> as the standard return type, and the Pageable/Page pagination convention. Use this whenever adding a new endpoint or reviewing a controller's @Controller/@Get/@Post/@Put/@Delete usage. For where OpenAPI documentation for the same endpoint goes, see openapi; for the global exception handler, see exception-handling — this skill covers routing and pagination only.
Ships in Micronaut Standards. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Controllers use resource-based paths with the HTTP verb that actually matches the operation — never an action encoded into the URL path with every operation using the same verb.
// Correct
@Controller("/font")
public class FontController implements FontApi {
@Override
@Post
@Validated(groups = ValidationGroup.Create.class)
public HttpResponse<FontModelResponseDTO> add(@Body FontModelDTO item) { /* ... */ }
@Override
@Get("/{id}")
public HttpResponse<FontModelResponseDTO> getById(@PathVariable UUID id) { /* ... */ }
@Override
@Put("/{id}")
@Validated(groups = ValidationGroup.Update.class)
public HttpResponse<FontModelResponseDTO> update(@PathVariable UUID id, @Body FontModelDTO item) { /* ... */ }
@Override
@Delete("/{id}")
public HttpResponse<FontModelResponseDTO> remove(@PathVariable UUID id) { /* ... */ }
}
// Wrong — action encoded in the path, verb doesn't match the operation
@Post("/update/{id}")
public HttpResponse<FontModelResponseDTO> update(@PathVariable UUID id, @Body FontModelDTO item) { /* ... */ }
@Post("/delete/{id}")
public HttpResponse<FontModelResponseDTO> remove(@PathVariable UUID id) { /* ... */ }
/update/{id} and /delete/{id} via @Post both work mechanically, but they throw away the
information the HTTP verb itself already carries — a caller (or an API gateway, or a cache) can no
longer tell a mutating call from a read just by looking at the verb.
Validation-group triggers (@Validated(groups = ...)) are set on the controller method itself,
alongside its routing annotation, as in the add/update examples above — see the dto skill for the
ValidationGroup.Create/Update marker interfaces themselves and why one shared DTO uses groups instead
of separate Create/Update DTO types.
HttpResponse<T> as the standard return typeEvery endpoint returns HttpResponse<T> synchronously — no Mono<T>, Flux<T>, or Publisher<T>
return types, unless a specific, documented reason requires the reactive model for one endpoint (e.g.
streaming a genuinely unbounded response body). The blocking model is simpler to reason about, test, and
debug, and matches every other convention in this plugin (the service layer, dto/response-modeling)
which are themselves synchronous.
@Controller base path and resource naming@Controller("/font") at the class level, with the resource name singular or plural depending on
whether the endpoints operate on a collection (/fonts, GET returns a page) or a single resource
addressed by ID (/font/{id}) — pick one convention per resource and keep it consistent across all of
that resource's endpoints; don't mix /font/{id} for reads with /fonts/{id} for writes on the same
resource.
Pageable/Page<T>@Override
@Get(uris = {"/"})
@Produces(MediaType.APPLICATION_JSON)
public HttpResponse<Page<FontModelResponseDTO.FontModelDTO>> getAll(Pageable pageable) {
Page<FontModelResponseDTO.FontModelDTO> page = fontService.getAllFonts(pageable);
return HttpResponse.ok(page);
}
Micronaut Data's Pageable as a method parameter and Page<T> as (part of) the return type is the
standard shape for any endpoint that returns a collection — the caller controls page/size/sort via
query parameters Micronaut binds automatically, with no manual parsing. Documenting the pagination
envelope's own OpenAPI schema is the openapi skill's job, not this one's.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub onelitefeathernet/onelitefeather-claude-marketplace --plugin micronaut-standards14 skills in this plugin
/configurationOneLiteFeather's convention for typed application configuration in a Micronaut REST API — one @ConfigurationProperties class per functional area in a dedicated config/ package, instead of ad-hoc properties scattered across the application entry point. Use this whenever a Micronaut backend needs a new piece of externalized configuration (a feature flag, an external service URL, a limit/threshold) and you're deciding where the corresponding Java type should live./dependency-managementOneLiteFeather's Gradle/Micronaut dependency-management conventions for REST API backends — the Micronaut Application and AOT plugins, reading the Micronaut version from gradle.properties instead of hardcoding it, the mn.* platform catalog, the private OneLiteFeather Maven repo, and the optional CycloneDX SBOM plugin. Use this whenever setting up or editing a Micronaut backend's build.gradle.kts/settings.gradle.kts. For the general OneLiteFeather Gradle/BOM mechanics that apply beyond Micronaut (private repo credential split, Java toolchain pattern), see minestom-knowledge:gradle/boms instead. For observability, database-migration, Testcontainers, and security dependencies specifically, see the observability, liquibase, testcontainers, and security skills — this skill only lists that those dependencies exist and where to look, not their coordinates; the one exception is structured-logging dependencies (Logstash encoder, OpenTelemetry MDC appender), whose coordinates live directly in this skill since `logging` covers only their usage./dtoOneLiteFeather's request-DTO conventions for Micronaut REST APIs — records with @Serdeable/@Introspected, one shared Create/Update DTO controlled by JSR-380 validation groups instead of separate DTO types per action, and entity conversion methods living on the DTO itself. Use this whenever adding a new request body type to a Micronaut controller. For the response side (success/error modeling), see the response-modeling skill; for endpoint-level OpenAPI documentation, see openapi — this skill covers only the incoming request DTO and its own field-level @Schema annotations./entity-designOneLiteFeather's JPA/Micronaut Data entity conventions for Micronaut REST APIs — entities as a pure persistence layer with no Bean Validation annotations, the internal-UUID-vs-external-identifier pattern, custom AttributeConverters for complex column types, and why entities are plain Java beans rather than records or Lombok classes. Use this whenever adding or reviewing a database/entity/ class in a Micronaut backend. For where entity validation actually lives, see the dto skill; for the optional pattern of publishing entities from a separate Maven module instead of keeping them in the backend, see references/separate-model-module.md in this skill./exception-handlingOneLiteFeather's global exception-handling convention for Micronaut REST APIs — exactly one org-wide ExceptionHandlerAdvice that maps exception types to the correct HTTP status code and returns the shared ErrorResponse type from response-modeling, plus dedicated domain exception classes instead of generic RuntimeExceptions. Use this whenever adding a new failure case a Micronaut backend needs to report, or reviewing an existing global exception handler that maps everything to one status code. This is an explicit correction of a mapping-everything-to-404 pattern seen in an early reference implementation — status-code mapping by exception type is mandatory./liquibaseOneLiteFeather's mandatory Liquibase database-migration convention for Micronaut REST APIs — always XML changelogs (never YAML/SQL/JSON), the master-changelog-plus-versioned-files structure, and why this replaces Hibernate's hbm2ddl.auto=update. Use this whenever a Micronaut backend needs a schema change, or when reviewing a project still relying on hbm2ddl.auto=update for schema management. For verifying a changelog actually works against both MariaDB and PostgreSQL, see the testcontainers skill.Other plugins' skills for the same job