From 0ef69da3f31365ebf5e8a8e7540310727589c09d Mon Sep 17 00:00:00 2001 From: Timon Back Date: Fri, 9 Jun 2023 17:33:32 +0200 Subject: [PATCH 1/2] feat: Add docs.json endpoint --- .../springwolf/asyncapi/controller/AsyncApiController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/springwolf-core/src/main/java/io/github/stavshamir/springwolf/asyncapi/controller/AsyncApiController.java b/springwolf-core/src/main/java/io/github/stavshamir/springwolf/asyncapi/controller/AsyncApiController.java index 983874be6..36bf384e9 100644 --- a/springwolf-core/src/main/java/io/github/stavshamir/springwolf/asyncapi/controller/AsyncApiController.java +++ b/springwolf-core/src/main/java/io/github/stavshamir/springwolf/asyncapi/controller/AsyncApiController.java @@ -18,7 +18,7 @@ public class AsyncApiController { private final AsyncApiService asyncApiService; private final AsyncApiSerializerService serializer; - @GetMapping(path ="${springwolf.paths.docs:/springwolf/docs}", produces = MediaType.APPLICATION_JSON_VALUE) + @GetMapping(path ={"${springwolf.paths.docs:/springwolf/docs}","${springwolf.paths.docs:/springwolf/docs.json}"}, produces = MediaType.APPLICATION_JSON_VALUE) public String asyncApiJson() throws JsonProcessingException { AsyncAPI asyncAPI = asyncApiService.getAsyncAPI(); return serializer.toJsonString(asyncAPI); From 8a9ceee62a2a72f777958d1a478b040ec1037905 Mon Sep 17 00:00:00 2001 From: Timon Back Date: Fri, 16 Jun 2023 15:03:21 +0200 Subject: [PATCH 2/2] Update AsyncApiController.java --- .../springwolf/asyncapi/controller/AsyncApiController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/springwolf-core/src/main/java/io/github/stavshamir/springwolf/asyncapi/controller/AsyncApiController.java b/springwolf-core/src/main/java/io/github/stavshamir/springwolf/asyncapi/controller/AsyncApiController.java index 36bf384e9..eaf291460 100644 --- a/springwolf-core/src/main/java/io/github/stavshamir/springwolf/asyncapi/controller/AsyncApiController.java +++ b/springwolf-core/src/main/java/io/github/stavshamir/springwolf/asyncapi/controller/AsyncApiController.java @@ -18,7 +18,7 @@ public class AsyncApiController { private final AsyncApiService asyncApiService; private final AsyncApiSerializerService serializer; - @GetMapping(path ={"${springwolf.paths.docs:/springwolf/docs}","${springwolf.paths.docs:/springwolf/docs.json}"}, produces = MediaType.APPLICATION_JSON_VALUE) + @GetMapping(path ={"${springwolf.paths.docs:/springwolf/docs}","${springwolf.paths.docs:/springwolf/docs}.json"}, produces = MediaType.APPLICATION_JSON_VALUE) public String asyncApiJson() throws JsonProcessingException { AsyncAPI asyncAPI = asyncApiService.getAsyncAPI(); return serializer.toJsonString(asyncAPI);