- Quarkus Spring Web + Quarkus SmallRye OpenAPI
- Quarkus Spring Web - Spring Boot Bootstrap application
SmallRye OpenAPI generates incorrect content type when using Spring Web annotations
Verify correct content types in OpenAPI endpoint output (/q/openapi
).
- Define application endpoints using Spring Web annotations.
- Use all available REST annotations:
@RequestMapping
,@DeleteMapping
,@GetMapping
,@PatchMapping
,@PostMapping
,@PutMapping
. - Define content type using attributes of these annotations. Where possible, define request and response content type.
- Combine content type definition on class and method level.
- Use all available REST annotations:
- Generate OpenAPI schema using
quarkus-smallrye-openapi
. - Access the OpenAPI schema by invoking
/q/openapi
endpoint. - Verify content types in the schema. The types should correspond to the definitions in Spring annotations.
- JDK 1.8+
- GraalVM
Document: Using the Quarkus Extension for Spring Web API
Spring Web: @ExceptionHandler response does not override @ResponseStatus
Test CRUD resource BookController
:
- Verify response status.
- Verify modified data in write operations.
- Verify custom error handler.
Test home page HTML response and value injection in SimpleController
.
- JDK 1.8+
- GraalVM