Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

melloware/quarkus-openapi-problem

Repository files navigation

Quarkus - OpenAPI Problem (RFC-9457)


Important

This extension has been archived because all of the changes here have been backported into Quarkus RestEasy Problem extension!

Version License Build

RFC9457 Problem extension for Quarkus RESTeasy/JaxRS applications. It maps Exceptions to application/problem+json HTTP responses. Inspired by Zalando Problem library, originally open sourced by Tietoevry, now part of Quarkiverse.

Differences from Quarkus RestEASY Problem

This library extends the original Quarkus RestEASY Problem library by providing first-class OpenAPI support, making it seamless to integrate with OpenAPI specifications and tooling. Opinionated changes include the following:

  • RFC-9457 support only (dropped support of RFC-7807)
  • Validation constraint violations return HTTP 422 Unprocessable Entity status
  • HttpProblem follows OpenAPI standards and is JSON serializable
  • Mapped Diagnostic Context (MDC) values are included in the context field
  • Validation errors are represented in the RFC9457 errors array
  • @ApiResponse for 4xx/5xx automatically get mapped with content = @Content(mediaType = "application/problem+json", schema = @Schema(implementation = HttpProblem.class))
  • Improve MicroProfile REST Client API to API forwarding of HttpProblem responses
  • .with(key, value) is now .withContext(key, value)

About

Unified error responses for Quarkus REST APIs via Problem Details for HTTP APIs (RFC9457)

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •