Find @PostMapping methods missing @ResponseStatus(HttpStatus.CREATED)

Proprietary

By convention, a successful POST that creates a resource should return 201 Created, not the default 200 OK. Add @ResponseStatus(HttpStatus.CREATED) to the controller method so the status is consistent with the action.

org.openrewrite.kotlin.spring.FindMissingResponseStatus$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.spring.FindMissingResponseStatus$KtRecipe'

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.