Class AsyncApiController
java.lang.Object
be.appify.prefab.asyncapi.AsyncApiController
REST controller that exposes AsyncAPI documentation endpoints.
GET /async-api/asyncapi.json— the machine-readable AsyncAPI 2.6.0 documentGET /async-api— a human-readable HTML viewer backed by AsyncAPI Studio
The JSON document is generated at compile time by the Prefab annotation processor and
embedded in the application JAR at META-INF/async-api/asyncapi.json.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<String> Returns the machine-readable AsyncAPI 2.6.0 JSON document.
-
Constructor Details
-
AsyncApiController
public AsyncApiController()Constructs a new AsyncApiController.
-
-
Method Details
-
asyncApiJson
@GetMapping(value="/asyncapi.json", produces="application/json") public org.springframework.http.ResponseEntity<String> asyncApiJson() throws IOExceptionReturns the machine-readable AsyncAPI 2.6.0 JSON document.- Returns:
- the AsyncAPI JSON document
- Throws:
IOException- if the document cannot be read from the classpath
-