apis() {
+ GroupedOpenApi group1OpenApi = GroupedOpenApi.builder()
.group("annotatedGroup1")
.addOpenApiMethodFilter(method -> method.isAnnotationPresent(Group1.class))
.build();
- }
- @Bean
- public GroupedOpenApi group2OpenApi() {
- return GroupedOpenApi.builder()
+ GroupedOpenApi group2OpenApi = GroupedOpenApi.builder()
.group("annotatedGroup2")
.addOpenApiMethodFilter(method -> method.isAnnotationPresent(Group2.class))
.build();
- }
- @Bean
- public GroupedOpenApi group3OpenApi() {
- return GroupedOpenApi.builder()
+ GroupedOpenApi group3OpenApi = GroupedOpenApi.builder()
.group("annotatedCombinedGroup")
.addOpenApiMethodFilter(method -> method.isAnnotationPresent(Group1.class) || method.isAnnotationPresent(Group2.class))
.build();
+
+ return Arrays.asList(group1OpenApi, group2OpenApi, group3OpenApi);
}
@Bean
diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app185/Pet.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app185/Pet.java
index f02de23cc..93dc30461 100644
--- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app185/Pet.java
+++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app185/Pet.java
@@ -26,12 +26,14 @@
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import io.swagger.v3.oas.annotations.media.Schema;
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type")
@JsonSubTypes({
@JsonSubTypes.Type(Dog.class),
@JsonSubTypes.Type(Cat.class)
})
+@Schema(description = "This is a Pet")
public class Pet {
public final String name;
diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app217/SpringDocApp217Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app217/SpringDocApp217Test.java
index fd4bb77ab..820e5ce8e 100644
--- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app217/SpringDocApp217Test.java
+++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app217/SpringDocApp217Test.java
@@ -20,13 +20,11 @@
import org.junit.jupiter.api.Test;
import org.springdoc.core.customizers.SpecPropertiesCustomizer;
-import org.springdoc.core.models.GroupedOpenApi;
import org.springdoc.core.utils.Constants;
import test.org.springdoc.api.v30.AbstractSpringDocV30Test;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.context.annotation.Bean;
import org.springframework.test.context.ActiveProfiles;
import static org.hamcrest.Matchers.is;
diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app218/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app218/HelloController.java
new file mode 100644
index 000000000..e753b54f0
--- /dev/null
+++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app218/HelloController.java
@@ -0,0 +1,64 @@
+/*
+ *
+ * *
+ * * *
+ * * * * Copyright 2019-2024 the original author or authors.
+ * * * *
+ * * * * Licensed under the Apache License, Version 2.0 (the "License");
+ * * * * you may not use this file except in compliance with the License.
+ * * * * You may obtain a copy of the License at
+ * * * *
+ * * * * https://www.apache.org/licenses/LICENSE-2.0
+ * * * *
+ * * * * Unless required by applicable law or agreed to in writing, software
+ * * * * distributed under the License is distributed on an "AS IS" BASIS,
+ * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * * * * See the License for the specific language governing permissions and
+ * * * * limitations under the License.
+ * * *
+ * *
+ *
+ */
+
+package test.org.springdoc.api.v30.app218;
+
+
+import java.net.URI;
+
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.headers.Header;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+
+import org.springframework.http.HttpHeaders;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+
+@RestController
+@RequestMapping("/")
+public class HelloController {
+
+ @Operation(
+ summary = "Summary",
+ description = "This is description.",
+ tags = {"Sample"},
+ responses = {
+ @ApiResponse(
+ responseCode = "201",
+ description = "201 (Created)",
+ headers =
+ @Header(
+ name = HttpHeaders.LOCATION,
+ description = "Sample endpoint",
+ schema = @Schema(implementation = URI.class)
+ )
+ )
+ }
+ )
+ @GetMapping
+ public String get() {
+ return "Hello World!";
+ }
+}
diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app218/SpringDocApp218Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app218/SpringDocApp218Test.java
new file mode 100644
index 000000000..65013aff1
--- /dev/null
+++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app218/SpringDocApp218Test.java
@@ -0,0 +1,37 @@
+/*
+ *
+ * * Copyright 2019-2024 the original author or authors.
+ * *
+ * * Licensed under the Apache License, Version 2.0 (the "License");
+ * * you may not use this file except in compliance with the License.
+ * * You may obtain a copy of the License at
+ * *
+ * * https://www.apache.org/licenses/LICENSE-2.0
+ * *
+ * * Unless required by applicable law or agreed to in writing, software
+ * * distributed under the License is distributed on an "AS IS" BASIS,
+ * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * * See the License for the specific language governing permissions and
+ * * limitations under the License.
+ *
+ */
+
+package test.org.springdoc.api.v30.app218;
+
+import org.springdoc.core.customizers.SpecPropertiesCustomizer;
+import test.org.springdoc.api.v30.AbstractSpringDocV30Test;
+
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.test.context.SpringBootTest;
+
+/**
+ *
+ * A test for {@link SpecPropertiesCustomizer}
+ */
+@SpringBootTest
+public class SpringDocApp218Test extends AbstractSpringDocV30Test {
+
+ @SpringBootApplication
+ static class SpringDocTestApp {}
+
+}
diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app219/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app219/HelloController.java
new file mode 100644
index 000000000..0b2b37d5c
--- /dev/null
+++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app219/HelloController.java
@@ -0,0 +1,42 @@
+/*
+ *
+ * *
+ * * *
+ * * * *
+ * * * * * Copyright 2019-2022 the original author or authors.
+ * * * * *
+ * * * * * Licensed under the Apache License, Version 2.0 (the "License");
+ * * * * * you may not use this file except in compliance with the License.
+ * * * * * You may obtain a copy of the License at
+ * * * * *
+ * * * * * https://www.apache.org/licenses/LICENSE-2.0
+ * * * * *
+ * * * * * Unless required by applicable law or agreed to in writing, software
+ * * * * * distributed under the License is distributed on an "AS IS" BASIS,
+ * * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * * * * * See the License for the specific language governing permissions and
+ * * * * * limitations under the License.
+ * * * *
+ * * *
+ * *
+ *
+ */
+
+package test.org.springdoc.api.v30.app219;
+
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping(value = "/api", produces = {"application/xml"}, consumes = {"application/json"})
+public class HelloController {
+
+ @RequestMapping(value = "/testpost", method = RequestMethod.POST, produces = {"application/json"},
+ consumes = {"application/json;charset=UTF-8", "application/json; charset=UTF-8"})
+ public ResponseEntity testpost(@RequestBody TestObject dto) {
+ return ResponseEntity.ok(dto);
+ }
+}
diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app219/SpringDocApp219Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app219/SpringDocApp219Test.java
new file mode 100644
index 000000000..a9afcaf7b
--- /dev/null
+++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app219/SpringDocApp219Test.java
@@ -0,0 +1,37 @@
+/*
+ *
+ * *
+ * * *
+ * * * *
+ * * * * * Copyright 2019-2022 the original author or authors.
+ * * * * *
+ * * * * * Licensed under the Apache License, Version 2.0 (the "License");
+ * * * * * you may not use this file except in compliance with the License.
+ * * * * * You may obtain a copy of the License at
+ * * * * *
+ * * * * * https://www.apache.org/licenses/LICENSE-2.0
+ * * * * *
+ * * * * * Unless required by applicable law or agreed to in writing, software
+ * * * * * distributed under the License is distributed on an "AS IS" BASIS,
+ * * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * * * * * See the License for the specific language governing permissions and
+ * * * * * limitations under the License.
+ * * * *
+ * * *
+ * *
+ *
+ */
+
+package test.org.springdoc.api.v30.app219;
+
+import test.org.springdoc.api.v30.AbstractSpringDocV30Test;
+
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.test.context.ActiveProfiles;
+
+@ActiveProfiles("219")
+public class SpringDocApp219Test extends AbstractSpringDocV30Test {
+
+ @SpringBootApplication
+ static class SpringDocTestApp {}
+}
diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app219/TestObject.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app219/TestObject.java
new file mode 100644
index 000000000..ca336cca3
--- /dev/null
+++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app219/TestObject.java
@@ -0,0 +1,49 @@
+/*
+ *
+ * *
+ * * *
+ * * * *
+ * * * * * Copyright 2019-2022 the original author or authors.
+ * * * * *
+ * * * * * Licensed under the Apache License, Version 2.0 (the "License");
+ * * * * * you may not use this file except in compliance with the License.
+ * * * * * You may obtain a copy of the License at
+ * * * * *
+ * * * * * https://www.apache.org/licenses/LICENSE-2.0
+ * * * * *
+ * * * * * Unless required by applicable law or agreed to in writing, software
+ * * * * * distributed under the License is distributed on an "AS IS" BASIS,
+ * * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * * * * * See the License for the specific language governing permissions and
+ * * * * * limitations under the License.
+ * * * *
+ * * *
+ * *
+ *
+ */
+
+package test.org.springdoc.api.v30.app219;
+
+import java.time.LocalDateTime;
+
+public class TestObject {
+ public String stringValue;
+
+ public LocalDateTime localDateTime;
+
+ public String getStringValue() {
+ return stringValue;
+ }
+
+ public void setStringValue(String stringValue) {
+ this.stringValue = stringValue;
+ }
+
+ public LocalDateTime getLocalDateTime() {
+ return localDateTime;
+ }
+
+ public void setLocalDateTime(LocalDateTime localDateTime) {
+ this.localDateTime = localDateTime;
+ }
+}
diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app220/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app220/HelloController.java
new file mode 100644
index 000000000..f5b17bc2b
--- /dev/null
+++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app220/HelloController.java
@@ -0,0 +1,63 @@
+package test.org.springdoc.api.v30.app220;
+
+
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonSubTypes.Type;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+public class HelloController {
+
+ @PostMapping("/parent")
+ public void parentEndpoint(@RequestBody Superclass parent) {
+
+ }
+
+}
+
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "@type")
+@JsonSubTypes({
+ @Type(value = IntermediateClass.class, name = IntermediateClass.SCHEMA_NAME),
+})
+sealed class Superclass permits IntermediateClass {
+
+ public Superclass() {}
+}
+
+@Schema(name = IntermediateClass.SCHEMA_NAME)
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "@type")
+@JsonSubTypes({
+ @Type(value = FirstChildClass.class, name = FirstChildClass.SCHEMA_NAME),
+ @Type(value = SecondChildClass.class, name = SecondChildClass.SCHEMA_NAME)
+})
+sealed class IntermediateClass extends Superclass permits FirstChildClass, SecondChildClass {
+
+ public static final String SCHEMA_NAME = "IntermediateClass";
+}
+
+@Schema(name = FirstChildClass.SCHEMA_NAME)
+final class FirstChildClass extends IntermediateClass {
+
+ public static final String SCHEMA_NAME = "Image";
+}
+
+@Schema(name = SecondChildClass.SCHEMA_NAME)
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "@type")
+@JsonSubTypes({
+ @Type(value = ThirdChildClass.class, name = ThirdChildClass.SCHEMA_NAME)
+})
+sealed class SecondChildClass extends IntermediateClass {
+
+ public static final String SCHEMA_NAME = "Mail";
+}
+
+@Schema(name = ThirdChildClass.SCHEMA_NAME)
+final class ThirdChildClass extends SecondChildClass {
+
+ public static final String SCHEMA_NAME = "Home";
+}
\ No newline at end of file
diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app220/SpringDocApp220Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app220/SpringDocApp220Test.java
new file mode 100644
index 000000000..0e5f57595
--- /dev/null
+++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app220/SpringDocApp220Test.java
@@ -0,0 +1,35 @@
+/*
+ *
+ * *
+ * * *
+ * * * *
+ * * * * * Copyright 2019-2022 the original author or authors.
+ * * * * *
+ * * * * * Licensed under the Apache License, Version 2.0 (the "License");
+ * * * * * you may not use this file except in compliance with the License.
+ * * * * * You may obtain a copy of the License at
+ * * * * *
+ * * * * * https://www.apache.org/licenses/LICENSE-2.0
+ * * * * *
+ * * * * * Unless required by applicable law or agreed to in writing, software
+ * * * * * distributed under the License is distributed on an "AS IS" BASIS,
+ * * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * * * * * See the License for the specific language governing permissions and
+ * * * * * limitations under the License.
+ * * * *
+ * * *
+ * *
+ *
+ */
+
+package test.org.springdoc.api.v30.app220;
+
+import test.org.springdoc.api.v30.AbstractSpringDocV30Test;
+
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+public class SpringDocApp220Test extends AbstractSpringDocV30Test {
+
+ @SpringBootApplication
+ static class SpringDocTestApp {}
+}
diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app221/HomeApi.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app221/HomeApi.java
new file mode 100644
index 000000000..40506c3da
--- /dev/null
+++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app221/HomeApi.java
@@ -0,0 +1,23 @@
+package test.org.springdoc.api.v30.app221;
+
+import java.io.IOException;
+
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import test.org.springdoc.api.v30.app221.HomeController.HelloDto;
+import test.org.springdoc.api.v30.app221.HomeController.HelloUploadDto;
+
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE;
+import static org.springframework.http.MediaType.MULTIPART_FORM_DATA_VALUE;
+
+@Tag(name = "Hello World Api", description = "This is a test api")
+@RequestMapping("api/hello")
+public interface HomeApi {
+
+ @Operation(summary = "Upload new content", description = "Upload test content")
+ @PostMapping(produces = APPLICATION_JSON_VALUE, consumes = MULTIPART_FORM_DATA_VALUE)
+ HelloDto uploadContent(HelloUploadDto contentUploadDto) throws IOException;
+}
diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app221/HomeController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app221/HomeController.java
new file mode 100644
index 000000000..3c4115e94
--- /dev/null
+++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app221/HomeController.java
@@ -0,0 +1,24 @@
+package test.org.springdoc.api.v30.app221;
+
+import java.io.IOException;
+
+import jakarta.validation.Valid;
+import jakarta.validation.constraints.NotNull;
+
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+@RestController
+public class HomeController implements HomeApi {
+
+ @Override
+ public HelloDto uploadContent(@Valid HelloUploadDto uploadDto)
+ throws IOException {
+ var fileBytes = uploadDto.file.getBytes();
+ return new HelloDto(uploadDto.title, fileBytes);
+ }
+
+ public record HelloDto(String title, byte[] file) {}
+
+ public record HelloUploadDto(@NotNull String title, MultipartFile file) {}
+}
diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app221/SpringDocApp221Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app221/SpringDocApp221Test.java
new file mode 100644
index 000000000..d53ee8dbf
--- /dev/null
+++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app221/SpringDocApp221Test.java
@@ -0,0 +1,35 @@
+/*
+ *
+ * *
+ * * *
+ * * * *
+ * * * * * Copyright 2019-2022 the original author or authors.
+ * * * * *
+ * * * * * Licensed under the Apache License, Version 2.0 (the "License");
+ * * * * * you may not use this file except in compliance with the License.
+ * * * * * You may obtain a copy of the License at
+ * * * * *
+ * * * * * https://www.apache.org/licenses/LICENSE-2.0
+ * * * * *
+ * * * * * Unless required by applicable law or agreed to in writing, software
+ * * * * * distributed under the License is distributed on an "AS IS" BASIS,
+ * * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * * * * * See the License for the specific language governing permissions and
+ * * * * * limitations under the License.
+ * * * *
+ * * *
+ * *
+ *
+ */
+
+package test.org.springdoc.api.v30.app221;
+
+import test.org.springdoc.api.v30.AbstractSpringDocV30Test;
+
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+public class SpringDocApp221Test extends AbstractSpringDocV30Test {
+
+ @SpringBootApplication
+ static class SpringDocTestApp {}
+}
diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app222/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app222/HelloController.java
new file mode 100644
index 000000000..0415f7911
--- /dev/null
+++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app222/HelloController.java
@@ -0,0 +1,28 @@
+package test.org.springdoc.api.v30.app222;
+
+
+
+import test.org.springdoc.api.v30.app222.SpringDocApp222Test.FirstHierarchyUser;
+import test.org.springdoc.api.v30.app222.SpringDocApp222Test.SecondHierarchyUser;
+
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author bnasslahsen
+ */
+
+@RestController
+class HelloController {
+
+ @GetMapping("/hello1")
+ public FirstHierarchyUser getItems1() {
+ return null;
+ }
+
+ @GetMapping("/hello2")
+ public SecondHierarchyUser getItems2() {
+ return null;
+ }
+
+}
\ No newline at end of file
diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app222/SpringDocApp222Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app222/SpringDocApp222Test.java
new file mode 100644
index 000000000..d25dc5598
--- /dev/null
+++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app222/SpringDocApp222Test.java
@@ -0,0 +1,55 @@
+/*
+ *
+ * *
+ * * *
+ * * * *
+ * * * * * Copyright 2019-2022 the original author or authors.
+ * * * * *
+ * * * * * Licensed under the Apache License, Version 2.0 (the "License");
+ * * * * * you may not use this file except in compliance with the License.
+ * * * * * You may obtain a copy of the License at
+ * * * * *
+ * * * * * https://www.apache.org/licenses/LICENSE-2.0
+ * * * * *
+ * * * * * Unless required by applicable law or agreed to in writing, software
+ * * * * * distributed under the License is distributed on an "AS IS" BASIS,
+ * * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * * * * * See the License for the specific language governing permissions and
+ * * * * * limitations under the License.
+ * * * *
+ * * *
+ * *
+ *
+ */
+
+package test.org.springdoc.api.v30.app222;
+
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonSubTypes.Type;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeInfo.Id;
+import test.org.springdoc.api.v30.AbstractSpringDocV30Test;
+
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+public class SpringDocApp222Test extends AbstractSpringDocV30Test {
+
+ @SpringBootApplication
+ static class SpringDocTestApp {}
+
+ @JsonTypeInfo(use = Id.NAME, property = "@type")
+ @JsonSubTypes(@Type(CommonImplementor.class))
+ interface FirstHierarchy {}
+
+ @JsonTypeInfo(use = Id.NAME, property = "@type")
+ @JsonSubTypes(@Type(CommonImplementor.class))
+ interface SecondHierarchy {}
+
+ class CommonImplementor implements FirstHierarchy, SecondHierarchy {}
+
+ record CommonImplementorUser(FirstHierarchy firstHierarchy, SecondHierarchy secondHierarchy) {}
+
+ record FirstHierarchyUser(FirstHierarchy firstHierarchy) {}
+
+ record SecondHierarchyUser(SecondHierarchy secondHierarchy) {}
+}
diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app223/ARestController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app223/ARestController.java
new file mode 100644
index 000000000..8c672eb38
--- /dev/null
+++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app223/ARestController.java
@@ -0,0 +1,23 @@
+package test.org.springdoc.api.v30.app223;
+
+
+import test.org.springdoc.api.v30.app223.apiobjects.AbstractChild;
+import test.org.springdoc.api.v30.app223.apiobjects.AbstractParent;
+import test.org.springdoc.api.v30.app223.apiobjects.Response;
+
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+public class ARestController {
+ @PostMapping("/parent")
+ public Response parentEndpoint(@RequestBody AbstractParent parent) {
+ return null;
+ }
+
+ @PostMapping("/child")
+ public Response childEndpoint(@RequestBody AbstractChild child) {
+ return null;
+ }
+}
diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app223/SpringDocApp223Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app223/SpringDocApp223Test.java
new file mode 100644
index 000000000..ce55a35c6
--- /dev/null
+++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app223/SpringDocApp223Test.java
@@ -0,0 +1,35 @@
+/*
+ *
+ * *
+ * * *
+ * * * *
+ * * * * * Copyright 2019-2022 the original author or authors.
+ * * * * *
+ * * * * * Licensed under the Apache License, Version 2.0 (the "License");
+ * * * * * you may not use this file except in compliance with the License.
+ * * * * * You may obtain a copy of the License at
+ * * * * *
+ * * * * * https://www.apache.org/licenses/LICENSE-2.0
+ * * * * *
+ * * * * * Unless required by applicable law or agreed to in writing, software
+ * * * * * distributed under the License is distributed on an "AS IS" BASIS,
+ * * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * * * * * See the License for the specific language governing permissions and
+ * * * * * limitations under the License.
+ * * * *
+ * * *
+ * *
+ *
+ */
+
+package test.org.springdoc.api.v30.app223;
+
+import test.org.springdoc.api.v30.AbstractSpringDocV30Test;
+
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+public class SpringDocApp223Test extends AbstractSpringDocV30Test {
+
+ @SpringBootApplication
+ static class SpringDocTestApp {}
+}
diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app223/apiobjects/AbstractChild.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app223/apiobjects/AbstractChild.java
new file mode 100644
index 000000000..de53786c3
--- /dev/null
+++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app223/apiobjects/AbstractChild.java
@@ -0,0 +1,61 @@
+package test.org.springdoc.api.v30.app223.apiobjects;
+
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonSubTypes.Type;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeInfo.Id;
+
+@JsonTypeInfo(use = Id.NAME, property = "type")
+@JsonSubTypes({
+ @Type(ChildType1.class),
+ @Type(ChildType2.class)
+})
+public abstract class AbstractChild {
+ private int id;
+
+ public AbstractChild(int id) {
+ this.id = id;
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+}
+
+ class ChildType1 extends AbstractChild {
+ private String childType1Param;
+
+ public ChildType1(int id, String childType1Param) {
+ super(id);
+ this.childType1Param = childType1Param;
+ }
+
+ public String getChildType1Param() {
+ return childType1Param;
+ }
+
+ public void setChildType1Param(String childType1Param) {
+ this.childType1Param = childType1Param;
+ }
+}
+
+class ChildType2 extends AbstractChild {
+ private String childType2Param;
+
+ public ChildType2(int id, String childType2Param) {
+ super(id);
+ this.childType2Param = childType2Param;
+ }
+
+ public String getChildType2Param() {
+ return childType2Param;
+ }
+
+ public void setChildType2Param(String childType2Param) {
+ this.childType2Param = childType2Param;
+ }
+}
\ No newline at end of file
diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app223/apiobjects/AbstractParent.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app223/apiobjects/AbstractParent.java
new file mode 100644
index 000000000..73795f768
--- /dev/null
+++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app223/apiobjects/AbstractParent.java
@@ -0,0 +1,72 @@
+package test.org.springdoc.api.v30.app223.apiobjects;
+
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonSubTypes.Type;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeInfo.Id;
+
+
+@JsonTypeInfo(use = Id.NAME, property = "type")
+@JsonSubTypes({
+ @Type(ParentType1.class),
+ @Type(ParentType2.class)
+})
+public abstract class AbstractParent {
+ private int id;
+
+ public AbstractParent(int id) {
+ this.id = id;
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+}
+
+class ParentType1 extends AbstractParent {
+ private String parentType1Param;
+ private AbstractChild abstractChild;
+
+ public ParentType1(int id, String parentType1Param, AbstractChild abstractChild) {
+ super(id);
+ this.parentType1Param = parentType1Param;
+ this.abstractChild = abstractChild;
+ }
+
+ public String getParentType1Param() {
+ return parentType1Param;
+ }
+
+ public void setParentType1Param(String parentType1Param) {
+ this.parentType1Param = parentType1Param;
+ }
+
+ public AbstractChild getAbstractChild() {
+ return abstractChild;
+ }
+
+ public void setAbstractChild(AbstractChild abstractChild) {
+ this.abstractChild = abstractChild;
+ }
+}
+
+class ParentType2 extends AbstractParent {
+ private String parentType2Param;
+
+ public ParentType2(int id, String parentType2Param) {
+ super(id);
+ this.parentType2Param = parentType2Param;
+ }
+
+ public String getParentType2Param() {
+ return parentType2Param;
+ }
+
+ public void setParentType2Param(String parentType2Param) {
+ this.parentType2Param = parentType2Param;
+ }
+}
diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app223/apiobjects/Response.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app223/apiobjects/Response.java
new file mode 100644
index 000000000..71dfdf576
--- /dev/null
+++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app223/apiobjects/Response.java
@@ -0,0 +1,4 @@
+package test.org.springdoc.api.v30.app223.apiobjects;
+
+public record Response(AbstractParent abstractParent, AbstractChild abstractChild) {
+}
\ No newline at end of file
diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app185.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app185.json
index 699f9026b..78b116b1d 100644
--- a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app185.json
+++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app185.json
@@ -109,6 +109,7 @@
"type": "string"
}
},
+ "description": "This is a Pet",
"discriminator": {
"propertyName": "type"
}
diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app218.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app218.json
new file mode 100644
index 000000000..4aeec31eb
--- /dev/null
+++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app218.json
@@ -0,0 +1,48 @@
+{
+ "openapi": "3.0.1",
+ "info": {
+ "title": "OpenAPI definition",
+ "version": "v0"
+ },
+ "servers": [
+ {
+ "url": "http://localhost",
+ "description": "Generated server url"
+ }
+ ],
+ "paths": {
+ "/": {
+ "get": {
+ "tags": [
+ "Sample"
+ ],
+ "summary": "Summary",
+ "description": "This is description.",
+ "operationId": "get",
+ "responses": {
+ "201": {
+ "description": "201 (Created)",
+ "headers": {
+ "Location": {
+ "description": "Sample endpoint",
+ "style": "simple",
+ "schema": {
+ "type": "string",
+ "format": "uri"
+ }
+ }
+ },
+ "content": {
+ "*/*": {
+ "schema": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "components": {}
+}
diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app219.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app219.json
new file mode 100644
index 000000000..70b2fb8d5
--- /dev/null
+++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app219.json
@@ -0,0 +1,76 @@
+{
+ "openapi": "3.0.1",
+ "info": {
+ "title": "OpenAPI definition",
+ "version": "v0"
+ },
+ "servers": [
+ {
+ "url": "http://localhost",
+ "description": "Generated server url"
+ }
+ ],
+ "paths": {
+ "/api/testpost": {
+ "post": {
+ "tags": [
+ "hello-controller"
+ ],
+ "operationId": "testpost",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/TestObject"
+ }
+ },
+ "application/json;charset=UTF-8": {
+ "schema": {
+ "$ref": "#/components/schemas/TestObject"
+ }
+ },
+ "application/json; charset=UTF-8": {
+ "schema": {
+ "$ref": "#/components/schemas/TestObject"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/xml": {
+ "schema": {
+ "$ref": "#/components/schemas/TestObject"
+ }
+ },
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/TestObject"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "components": {
+ "schemas": {
+ "TestObject": {
+ "type": "object",
+ "properties": {
+ "stringValue": {
+ "type": "string"
+ },
+ "localDateTime": {
+ "type": "string",
+ "format": "date-time"
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app220.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app220.json
new file mode 100644
index 000000000..de2244501
--- /dev/null
+++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app220.json
@@ -0,0 +1,132 @@
+{
+ "openapi": "3.0.1",
+ "info": {
+ "title": "OpenAPI definition",
+ "version": "v0"
+ },
+ "servers": [
+ {
+ "url": "http://localhost",
+ "description": "Generated server url"
+ }
+ ],
+ "paths": {
+ "/parent": {
+ "post": {
+ "tags": [
+ "hello-controller"
+ ],
+ "operationId": "parentEndpoint",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/Superclass"
+ },
+ {
+ "$ref": "#/components/schemas/IntermediateClass"
+ },
+ {
+ "$ref": "#/components/schemas/Image"
+ },
+ {
+ "$ref": "#/components/schemas/Mail"
+ },
+ {
+ "$ref": "#/components/schemas/Home"
+ }
+ ]
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "OK"
+ }
+ }
+ }
+ }
+ },
+ "components": {
+ "schemas": {
+ "Home": {
+ "type": "object",
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/Mail"
+ }
+ ]
+ },
+ "Image": {
+ "type": "object",
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/IntermediateClass"
+ }
+ ]
+ },
+ "IntermediateClass": {
+ "required": [
+ "@type"
+ ],
+ "type": "object",
+ "discriminator": {
+ "propertyName": "@type"
+ },
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/Superclass"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "@type": {
+ "type": "string"
+ }
+ }
+ }
+ ]
+ },
+ "Mail": {
+ "required": [
+ "@type"
+ ],
+ "type": "object",
+ "discriminator": {
+ "propertyName": "@type"
+ },
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/IntermediateClass"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "@type": {
+ "type": "string"
+ }
+ }
+ }
+ ]
+ },
+ "Superclass": {
+ "required": [
+ "@type"
+ ],
+ "type": "object",
+ "properties": {
+ "@type": {
+ "type": "string"
+ }
+ },
+ "discriminator": {
+ "propertyName": "@type"
+ }
+ }
+ }
+ }
+}
diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app221.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app221.json
new file mode 100644
index 000000000..2554fd2f9
--- /dev/null
+++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app221.json
@@ -0,0 +1,83 @@
+{
+ "openapi": "3.0.1",
+ "info": {
+ "title": "OpenAPI definition",
+ "version": "v0"
+ },
+ "servers": [
+ {
+ "url": "http://localhost",
+ "description": "Generated server url"
+ }
+ ],
+ "tags": [
+ {
+ "name": "Hello World Api",
+ "description": "This is a test api"
+ }
+ ],
+ "paths": {
+ "/api/hello": {
+ "post": {
+ "tags": [
+ "Hello World Api"
+ ],
+ "summary": "Upload new content",
+ "description": "Upload test content",
+ "operationId": "uploadContent",
+ "requestBody": {
+ "content": {
+ "multipart/form-data": {
+ "schema": {
+ "$ref": "#/components/schemas/HelloUploadDto"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/HelloDto"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "components": {
+ "schemas": {
+ "HelloUploadDto": {
+ "required": [
+ "title"
+ ],
+ "type": "object",
+ "properties": {
+ "title": {
+ "type": "string"
+ },
+ "file": {
+ "type": "string",
+ "format": "binary"
+ }
+ }
+ },
+ "HelloDto": {
+ "type": "object",
+ "properties": {
+ "title": {
+ "type": "string"
+ },
+ "file": {
+ "type": "string",
+ "format": "byte"
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app222.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app222.json
new file mode 100644
index 000000000..cd4de9975
--- /dev/null
+++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app222.json
@@ -0,0 +1,122 @@
+{
+ "openapi": "3.0.1",
+ "info": {
+ "title": "OpenAPI definition",
+ "version": "v0"
+ },
+ "servers": [
+ {
+ "url": "http://localhost",
+ "description": "Generated server url"
+ }
+ ],
+ "paths": {
+ "/hello2": {
+ "get": {
+ "tags": [
+ "hello-controller"
+ ],
+ "operationId": "getItems2",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "*/*": {
+ "schema": {
+ "$ref": "#/components/schemas/SecondHierarchyUser"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/hello1": {
+ "get": {
+ "tags": [
+ "hello-controller"
+ ],
+ "operationId": "getItems1",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "*/*": {
+ "schema": {
+ "$ref": "#/components/schemas/FirstHierarchyUser"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "components": {
+ "schemas": {
+ "CommonImplementor": {
+ "type": "object",
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/SecondHierarchy"
+ },
+ {
+ "$ref": "#/components/schemas/FirstHierarchy"
+ }
+ ]
+ },
+ "SecondHierarchy": {
+ "required": [
+ "@type"
+ ],
+ "type": "object",
+ "properties": {
+ "@type": {
+ "type": "string"
+ }
+ },
+ "discriminator": {
+ "propertyName": "@type"
+ }
+ },
+ "SecondHierarchyUser": {
+ "type": "object",
+ "properties": {
+ "secondHierarchy": {
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/CommonImplementor"
+ }
+ ]
+ }
+ }
+ },
+ "FirstHierarchy": {
+ "required": [
+ "@type"
+ ],
+ "type": "object",
+ "properties": {
+ "@type": {
+ "type": "string"
+ }
+ },
+ "discriminator": {
+ "propertyName": "@type"
+ }
+ },
+ "FirstHierarchyUser": {
+ "type": "object",
+ "properties": {
+ "firstHierarchy": {
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/CommonImplementor"
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app223.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app223.json
new file mode 100644
index 000000000..31ab9d5f6
--- /dev/null
+++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app223.json
@@ -0,0 +1,228 @@
+{
+ "openapi": "3.0.1",
+ "info": {
+ "title": "OpenAPI definition",
+ "version": "v0"
+ },
+ "servers": [
+ {
+ "url": "http://localhost",
+ "description": "Generated server url"
+ }
+ ],
+ "paths": {
+ "/parent": {
+ "post": {
+ "tags": [
+ "a-rest-controller"
+ ],
+ "operationId": "parentEndpoint",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/ParentType1"
+ },
+ {
+ "$ref": "#/components/schemas/ParentType2"
+ }
+ ]
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "*/*": {
+ "schema": {
+ "$ref": "#/components/schemas/Response"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/child": {
+ "post": {
+ "tags": [
+ "a-rest-controller"
+ ],
+ "operationId": "childEndpoint",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/ChildType1"
+ },
+ {
+ "$ref": "#/components/schemas/ChildType2"
+ }
+ ]
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "*/*": {
+ "schema": {
+ "$ref": "#/components/schemas/Response"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "components": {
+ "schemas": {
+ "AbstractChild": {
+ "required": [
+ "type"
+ ],
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "type": {
+ "type": "string"
+ }
+ },
+ "discriminator": {
+ "propertyName": "type"
+ }
+ },
+ "AbstractParent": {
+ "required": [
+ "type"
+ ],
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "type": {
+ "type": "string"
+ }
+ },
+ "discriminator": {
+ "propertyName": "type"
+ }
+ },
+ "ChildType1": {
+ "type": "object",
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/AbstractChild"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "childType1Param": {
+ "type": "string"
+ }
+ }
+ }
+ ]
+ },
+ "ChildType2": {
+ "type": "object",
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/AbstractChild"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "childType2Param": {
+ "type": "string"
+ }
+ }
+ }
+ ]
+ },
+ "ParentType1": {
+ "type": "object",
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/AbstractParent"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "parentType1Param": {
+ "type": "string"
+ },
+ "abstractChild": {
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/ChildType1"
+ },
+ {
+ "$ref": "#/components/schemas/ChildType2"
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "ParentType2": {
+ "type": "object",
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/AbstractParent"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "parentType2Param": {
+ "type": "string"
+ }
+ }
+ }
+ ]
+ },
+ "Response": {
+ "type": "object",
+ "properties": {
+ "abstractParent": {
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/ParentType1"
+ },
+ {
+ "$ref": "#/components/schemas/ParentType2"
+ }
+ ]
+ },
+ "abstractChild": {
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/ChildType1"
+ },
+ {
+ "$ref": "#/components/schemas/ChildType2"
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app38.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app38.json
index e28206a0b..0de67a730 100644
--- a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app38.json
+++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app38.json
@@ -23,11 +23,8 @@
"content": {
"*/*": {
"schema": {
- "type": "array",
- "items": {
- "type": "string",
- "format": "byte"
- }
+ "type": "string",
+ "format": "byte"
}
}
}
diff --git a/springdoc-openapi-starter-webmvc-ui/pom.xml b/springdoc-openapi-starter-webmvc-ui/pom.xml
index d987eb1c8..3d5f5fd3d 100644
--- a/springdoc-openapi-starter-webmvc-ui/pom.xml
+++ b/springdoc-openapi-starter-webmvc-ui/pom.xml
@@ -3,7 +3,7 @@
org.springdoc
springdoc-openapi
- 2.5.0
+ 2.6.0
springdoc-openapi-starter-webmvc-ui
diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app4/SpringDocApp4Test.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app4/SpringDocApp4Test.java
index 1d809ef9f..53e2d8a1d 100644
--- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app4/SpringDocApp4Test.java
+++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app4/SpringDocApp4Test.java
@@ -37,10 +37,10 @@ public void swagger_config_for_multiple_groups() throws Exception {
.andExpect(status().isOk())
.andExpect(jsonPath("configUrl", equalTo("/v3/api-docs/swagger-config")))
.andExpect(jsonPath("url").doesNotExist())
- .andExpect(jsonPath("urls[0].url", equalTo("/v3/api-docs/stores")))
- .andExpect(jsonPath("urls[0].name", equalTo("stores")))
- .andExpect(jsonPath("urls[1].url", equalTo("/v3/api-docs/pets")))
- .andExpect(jsonPath("urls[1].name", equalTo("The pets")))
+ .andExpect(jsonPath("urls[1].url", equalTo("/v3/api-docs/stores")))
+ .andExpect(jsonPath("urls[1].name", equalTo("stores")))
+ .andExpect(jsonPath("urls[0].url", equalTo("/v3/api-docs/pets")))
+ .andExpect(jsonPath("urls[0].name", equalTo("zpets")))
.andExpect(jsonPath("$['urls.primaryName']", equalTo("pets")));
}
}
\ No newline at end of file
diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app4/SpringDocTestApp.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app4/SpringDocTestApp.java
index f8d22037f..13506213c 100644
--- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app4/SpringDocTestApp.java
+++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app4/SpringDocTestApp.java
@@ -47,7 +47,7 @@ public GroupedOpenApi groupOpenApi() {
String[] paths = { "/pet/**" };
return GroupedOpenApi.builder()
.group("pets")
- .displayName("The pets")
+ .displayName("zpets")
.pathsToMatch(paths)
.build();
}
diff --git a/springdoc-openapi-tests/pom.xml b/springdoc-openapi-tests/pom.xml
index 83ac3f9a5..7db59be14 100644
--- a/springdoc-openapi-tests/pom.xml
+++ b/springdoc-openapi-tests/pom.xml
@@ -2,7 +2,7 @@
springdoc-openapi
org.springdoc
- 2.5.0
+ 2.6.0
pom
4.0.0
diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/pom.xml b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/pom.xml
index 40ce8b31b..e4773b39b 100644
--- a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/pom.xml
+++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/pom.xml
@@ -2,7 +2,7 @@
springdoc-openapi-tests
org.springdoc
- 2.5.0
+ 2.6.0
4.0.0
diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/AbstractCommonTest.java b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/AbstractCommonTest.java
index 17446b334..14e357531 100644
--- a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/AbstractCommonTest.java
+++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/AbstractCommonTest.java
@@ -7,13 +7,17 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.springdoc.core.utils.Constants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebTestClient;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.TestPropertySource;
+import org.springframework.test.web.reactive.server.EntityExchangeResult;
import org.springframework.test.web.reactive.server.WebTestClient;
+import static org.skyscreamer.jsonassert.JSONAssert.assertEquals;
+
@AutoConfigureWebTestClient(timeout = "3600000")
@ActiveProfiles("test")
@TestPropertySource(properties = { "management.endpoints.enabled-by-default=false" })
@@ -34,4 +38,19 @@ protected String getContent(String fileName) {
throw new RuntimeException("Failed to read file: " + fileName, e);
}
}
+
+ protected void testApp(String testId, String groupName) throws Exception{
+ String result = null;
+ try {
+ EntityExchangeResult getResult = webTestClient.get().uri(Constants.DEFAULT_API_DOCS_URL + "/" + groupName).exchange()
+ .expectStatus().isOk().expectBody().returnResult();
+ result = new String(getResult.getResponseBody());
+ String expected = getContent("results/app" + testId + ".json");
+ assertEquals(expected, result, true);
+ }
+ catch (AssertionError e) {
+ LOGGER.error(result);
+ throw e;
+ }
+ }
}
diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocActuatorTest.java b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocActuatorTest.java
index b2a483d38..fa81f9c09 100644
--- a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocActuatorTest.java
+++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocActuatorTest.java
@@ -30,6 +30,8 @@
import org.springframework.test.context.TestPropertySource;
import org.springframework.web.reactive.function.client.WebClient;
+import static org.skyscreamer.jsonassert.JSONAssert.assertEquals;
+
@TestPropertySource(properties = { "management.endpoints.enabled-by-default=true" })
public abstract class AbstractSpringDocActuatorTest extends AbstractCommonTest {
@@ -43,4 +45,18 @@ void init() {
webClient = WebClient.builder().baseUrl("http://localhost:" + this.managementPort)
.build();
}
+
+ protected void testWithWebClient(String testId, String uri) throws Exception{
+ String result = null;
+ try {
+ result = webClient.get().uri(uri).retrieve()
+ .bodyToMono(String.class).block();
+ String expected = getContent("results/app"+testId+".json");
+ assertEquals(expected, result, true);
+ }
+ catch (AssertionError e) {
+ LOGGER.error(result);
+ throw e;
+ }
+ }
}
diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java
index 4b1df181d..b93e551df 100644
--- a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java
+++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java
@@ -18,41 +18,20 @@
package test.org.springdoc.api;
+import org.apache.commons.lang3.StringUtils;
import org.junit.jupiter.api.Test;
-import org.springdoc.core.utils.Constants;
import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest;
-import org.springframework.test.web.reactive.server.EntityExchangeResult;
-import org.springframework.web.reactive.function.server.HandlerFunction;
-import org.springframework.web.reactive.function.server.ServerResponse;
-
-import static org.skyscreamer.jsonassert.JSONAssert.assertEquals;
@WebFluxTest
public abstract class AbstractSpringDocTest extends AbstractCommonTest {
- public static final HandlerFunction HANDLER_FUNCTION = request -> ServerResponse.ok().build();
-
- protected String groupName = "";
-
-
@Test
public void testApp() throws Exception {
- String result = null;
- try {
- EntityExchangeResult getResult = webTestClient.get().uri(Constants.DEFAULT_API_DOCS_URL + groupName).exchange()
- .expectStatus().isOk().expectBody().returnResult();
-
- result = new String(getResult.getResponseBody());
- String className = getClass().getSimpleName();
- String testNumber = className.replaceAll("[^0-9]", "");
- String expected = getContent("results/app" + testNumber + ".json");
- assertEquals(expected, result, true);
- }
- catch (AssertionError e) {
- LOGGER.error(result);
- throw e;
- }
+ String className = getClass().getSimpleName();
+ String testId = className.replaceAll("[^0-9]", "");
+ testApp(testId, StringUtils.EMPTY);
}
+
}
diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app146/SpringDocApp146Test.java b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app146/SpringDocApp146Test.java
index 42a72b1d5..53a87de9f 100644
--- a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app146/SpringDocApp146Test.java
+++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app146/SpringDocApp146Test.java
@@ -24,10 +24,7 @@
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.web.reactive.server.EntityExchangeResult;
-
-import static org.skyscreamer.jsonassert.JSONAssert.assertEquals;
-
+import org.springframework.context.annotation.ComponentScan;
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
properties = { "management.endpoints.web.exposure.include=*",
@@ -40,31 +37,16 @@ public class SpringDocApp146Test extends AbstractSpringDocActuatorTest {
@Test
public void testApp() throws Exception {
- EntityExchangeResult getResult = webTestClient.get().uri(Constants.DEFAULT_API_DOCS_URL + "/" + Constants.ACTUATOR_DEFAULT_GROUP)
- .exchange()
- .expectStatus().isOk()
- .expectBody()
- .jsonPath("$.openapi").isEqualTo("3.0.1")
- .returnResult();
- String result = new String(getResult.getResponseBody());
- String expected = getContent("results/app146-1.json");
- assertEquals(expected, result, true);
+ super.testApp("146-1", Constants.ACTUATOR_DEFAULT_GROUP);
}
@Test
public void testApp1() throws Exception {
- EntityExchangeResult getResult = webTestClient.get().uri(Constants.DEFAULT_API_DOCS_URL + "/" + Constants.DEFAULT_GROUP_NAME)
- .exchange()
- .expectStatus().isOk()
- .expectBody()
- .jsonPath("$.openapi").isEqualTo("3.0.1")
- .returnResult();
- String result = new String(getResult.getResponseBody());
- String expected = getContent("results/app146-2.json");
- assertEquals(expected, result, true);
+ super.testApp("146-2", Constants.DEFAULT_GROUP_NAME);
}
@SpringBootApplication
+ @ComponentScan(basePackages = { "org.springdoc", "test.org.springdoc.api.app146" })
static class SpringDocTestApp {}
}
diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app147/SpringDocApp147Test.java b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app147/SpringDocApp147Test.java
index 065edeb43..83a884cbf 100644
--- a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app147/SpringDocApp147Test.java
+++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app147/SpringDocApp147Test.java
@@ -24,9 +24,6 @@
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.web.reactive.server.EntityExchangeResult;
-
-import static org.skyscreamer.jsonassert.JSONAssert.assertEquals;
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
@@ -40,28 +37,13 @@ public class SpringDocApp147Test extends AbstractSpringDocActuatorTest {
@Test
public void testApp() throws Exception {
- EntityExchangeResult getResult = webTestClient.get().uri(Constants.DEFAULT_API_DOCS_URL + "/" + Constants.ACTUATOR_DEFAULT_GROUP)
- .exchange()
- .expectStatus().isOk()
- .expectBody()
- .jsonPath("$.openapi").isEqualTo("3.0.1")
- .returnResult();
- String result = new String(getResult.getResponseBody());
- String expected = getContent("results/app147-1.json");
- assertEquals(expected, result, true);
+ super.testApp("147-1", Constants.ACTUATOR_DEFAULT_GROUP);
}
@Test
public void testApp1() throws Exception {
- EntityExchangeResult getResult = webTestClient.get().uri(Constants.DEFAULT_API_DOCS_URL + "/users")
- .exchange()
- .expectStatus().isOk()
- .expectBody()
- .jsonPath("$.openapi").isEqualTo("3.0.1")
- .returnResult();
- String result = new String(getResult.getResponseBody());
- String expected = getContent("results/app147-2.json");
- assertEquals(expected, result, true);
+ super.testApp("147-2", Constants.ACTUATOR_DEFAULT_GROUP);
+
}
@Test
diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app148/SpringDocApp148Test.java b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app148/SpringDocApp148Test.java
index d761b9d25..11b004e45 100644
--- a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app148/SpringDocApp148Test.java
+++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app148/SpringDocApp148Test.java
@@ -30,7 +30,6 @@
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;
-import static org.skyscreamer.jsonassert.JSONAssert.assertEquals;
@SpringBootTest(webEnvironment = WebEnvironment.DEFINED_PORT,
@@ -46,18 +45,12 @@ public class SpringDocApp148Test extends AbstractSpringDocActuatorTest {
@Test
public void testApp() throws Exception {
- String result = webClient.get().uri("/test/application/openapi/users").retrieve()
- .bodyToMono(String.class).block();
- String expected = getContent("results/app148-1.json");
- assertEquals(expected, result, true);
+ super.testWithWebClient("148-1","/test/application/openapi/users");
}
@Test
public void testApp2() throws Exception {
- String result = webClient.get().uri("/test/application/openapi/x-actuator").retrieve()
- .bodyToMono(String.class).block();
- String expected = getContent("results/app148-2.json");
- assertEquals(expected, result, true);
+ super.testWithWebClient("148-2","/test/application/openapi/x-actuator");
}
@Test
diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app186/SpringDocApp186Test.java b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app186/SpringDocApp186Test.java
index 989f9be43..8282d1e3a 100644
--- a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app186/SpringDocApp186Test.java
+++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app186/SpringDocApp186Test.java
@@ -27,7 +27,6 @@
import org.junit.jupiter.api.Test;
import org.springdoc.core.customizers.ActuatorOpenApiCustomizer;
-import org.springdoc.core.customizers.OpenApiCustomizer;
import org.springdoc.core.customizers.OperationCustomizer;
import org.springdoc.core.models.GroupedOpenApi;
import org.springdoc.core.utils.Constants;
@@ -59,21 +58,21 @@ public void testApp() throws Exception {
}
@Test
- public void testGroupActuatorAsCodeCheckBackwardsCompatibility() throws Exception {
+ public void testGroupActuatorAsCodeCheckBackwardsCompatibility() {
webTestClient.get().uri(Constants.DEFAULT_API_DOCS_URL + "/group-actuator-as-code-check-backwards-compatibility").exchange()
.expectStatus().isOk()
.expectBody().json(getContent("results/app186.json"), true);
}
@Test
- public void testGroupActuatorAsCode() throws Exception {
+ public void testGroupActuatorAsCode() {
webTestClient.get().uri(Constants.DEFAULT_API_DOCS_URL + "/group-actuator-as-code").exchange()
.expectStatus().isOk()
.expectBody().json(getContent("results/app186.json"), true);
}
@Test
- public void testGroupActuatorAsProperties() throws Exception {
+ public void testGroupActuatorAsProperties() {
webTestClient.get().uri(Constants.DEFAULT_API_DOCS_URL + "/group-actuator-as-properties").exchange()
.expectStatus().isOk()
.expectBody().json(getContent("results/app186.json"), true);
diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app76/SpringDocApp76Test.java b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app76/SpringDocApp76Test.java
index b0f4c1508..9f877e497 100644
--- a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app76/SpringDocApp76Test.java
+++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app76/SpringDocApp76Test.java
@@ -35,14 +35,9 @@
})
public class SpringDocApp76Test extends AbstractSpringDocTest {
- public SpringDocApp76Test() {
- this.groupName = "/actuator";
- }
-
-
@Test
public void testApp() throws Exception {
- webTestClient.get().uri(Constants.DEFAULT_API_DOCS_URL + groupName).exchange().expectStatus().isOk().expectBody()
+ webTestClient.get().uri(Constants.DEFAULT_API_DOCS_URL + "/actuator").exchange().expectStatus().isOk().expectBody()
.jsonPath("$.openapi").isEqualTo("3.0.1")
.jsonPath("$.paths./actuator/health.get.operationId").exists();
}
diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/resources/logback-test.xml b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/resources/logback-test.xml
index 24cd4646e..3fd46cfab 100644
--- a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/resources/logback-test.xml
+++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/resources/logback-test.xml
@@ -1,6 +1,5 @@
-
\ No newline at end of file
diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/resources/results/app146-1.json b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/resources/results/app146-1.json
index 4d21f4405..bcfb2e81e 100644
--- a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/resources/results/app146-1.json
+++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/resources/results/app146-1.json
@@ -176,6 +176,68 @@
}
}
},
+ "/application/sbom/{id}": {
+ "get": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'sbom-id'",
+ "operationId": "sbom-id",
+ "parameters": [
+ {
+ "name": "id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/octet-stream": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application/sbom": {
+ "get": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'sbom'",
+ "operationId": "sbom",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v2+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"/application/metrics/{requiredMetricName}": {
"get": {
"tags": [
@@ -217,6 +279,68 @@
}
}
},
+ "/application/sbom": {
+ "get": {
+ "operationId": "sbom",
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v2+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v3+json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ },
+ "description": "OK"
+ }
+ },
+ "summary": "Actuator web endpoint 'sbom'",
+ "tags": [
+ "Actuator"
+ ]
+ }
+ },
+ "/application/sbom/{id}": {
+ "get": {
+ "operationId": "sbom-id",
+ "parameters": [
+ {
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/octet-stream": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ },
+ "description": "OK"
+ }
+ },
+ "summary": "Actuator web endpoint 'sbom-id'",
+ "tags": [
+ "Actuator"
+ ]
+ }
+ },
"/application/metrics": {
"get": {
"tags": [
diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/resources/results/app147-1.json b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/resources/results/app147-1.json
index cbcf7fd50..33d159196 100644
--- a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/resources/results/app147-1.json
+++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/resources/results/app147-1.json
@@ -176,6 +176,68 @@
}
}
},
+ "/application/sbom/{id}": {
+ "get": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'sbom-id'",
+ "operationId": "sbom-id",
+ "parameters": [
+ {
+ "name": "id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/octet-stream": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application/sbom": {
+ "get": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'sbom'",
+ "operationId": "sbom",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v2+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"/application/metrics/{requiredMetricName}": {
"get": {
"tags": [
@@ -217,6 +279,68 @@
}
}
},
+ "/application/sbom": {
+ "get": {
+ "operationId": "sbom",
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v2+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v3+json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ },
+ "description": "OK"
+ }
+ },
+ "summary": "Actuator web endpoint 'sbom'",
+ "tags": [
+ "Actuator"
+ ]
+ }
+ },
+ "/application/sbom/{id}": {
+ "get": {
+ "operationId": "sbom-id",
+ "parameters": [
+ {
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/octet-stream": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ },
+ "description": "OK"
+ }
+ },
+ "summary": "Actuator web endpoint 'sbom-id'",
+ "tags": [
+ "Actuator"
+ ]
+ }
+ },
"/application/metrics": {
"get": {
"tags": [
diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/resources/results/app147-2.json b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/resources/results/app147-2.json
index e7c346c11..ebc856a6f 100644
--- a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/resources/results/app147-2.json
+++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/resources/results/app147-2.json
@@ -6,24 +6,833 @@
},
"servers": [
{
- "url": "",
+ "url": "http://localhost:9297/test",
"description": "Generated server url"
}
],
+ "tags": [
+ {
+ "name": "Actuator",
+ "description": "Monitor and interact",
+ "externalDocs": {
+ "description": "Spring Boot Actuator Web API Documentation",
+ "url": "https://docs.spring.io/spring-boot/docs/current/actuator-api/html/"
+ }
+ }
+ ],
"paths": {
- "/persons": {
+ "/application/loggers/{name}": {
+ "get": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'loggers-name'",
+ "operationId": "loggers-name",
+ "parameters": [
+ {
+ "name": "name",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v2+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ },
+ "post": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'loggers-name'",
+ "operationId": "loggers-name_2",
+ "parameters": [
+ {
+ "name": "name",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "string",
+ "enum": [
+ "TRACE",
+ "DEBUG",
+ "INFO",
+ "WARN",
+ "ERROR",
+ "FATAL",
+ "OFF"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "*/*": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application/threaddump": {
+ "get": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'threaddump'",
+ "operationId": "threaddump",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "text/plain;charset=UTF-8": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v3+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v2+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application/scheduledtasks": {
+ "get": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'scheduledtasks'",
+ "operationId": "scheduledtasks",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v2+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application/sbom/{id}": {
+ "get": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'sbom-id'",
+ "operationId": "sbom-id",
+ "parameters": [
+ {
+ "name": "id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/octet-stream": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application/sbom": {
+ "get": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'sbom'",
+ "operationId": "sbom",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v2+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application/metrics/{requiredMetricName}": {
+ "get": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'metrics-requiredMetricName'",
+ "operationId": "metrics-requiredMetricName",
+ "parameters": [
+ {
+ "name": "requiredMetricName",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v2+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application/metrics": {
+ "get": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'metrics'",
+ "operationId": "metrics",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v2+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application/mappings": {
+ "get": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'mappings'",
+ "operationId": "mappings",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v2+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application/loggers": {
+ "get": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'loggers'",
+ "operationId": "loggers",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v2+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application/info": {
+ "get": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'info'",
+ "operationId": "info",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v2+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application/heapdump": {
+ "get": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'heapdump'",
+ "operationId": "heapdump",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/octet-stream": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application/health": {
+ "get": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'health'",
+ "operationId": "health",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v2+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application/env/{toMatch}": {
"get": {
"tags": [
- "hello-controller"
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'env-toMatch'",
+ "operationId": "env-toMatch",
+ "parameters": [
+ {
+ "name": "toMatch",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
],
- "operationId": "persons",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v2+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application/env": {
+ "get": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'env'",
+ "operationId": "env",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v2+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application/configprops/{prefix}": {
+ "get": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'configprops-prefix'",
+ "operationId": "configprops-prefix",
+ "parameters": [
+ {
+ "name": "prefix",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v2+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application/configprops": {
+ "get": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'configprops'",
+ "operationId": "configprops",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v2+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application/conditions": {
+ "get": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'conditions'",
+ "operationId": "conditions",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v2+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application/caches/{cache}": {
+ "get": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'caches-cache'",
+ "operationId": "caches-cache",
+ "parameters": [
+ {
+ "name": "cache",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v2+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'caches-cache'",
+ "operationId": "caches-cache_2",
+ "parameters": [
+ {
+ "name": "cache",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v2+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application/caches": {
+ "get": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'caches'",
+ "operationId": "caches",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v2+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'caches'",
+ "operationId": "caches_2",
"responses": {
"200": {
"description": "OK",
"content": {
"*/*": {
"schema": {
- "type": "string"
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application/beans": {
+ "get": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'beans'",
+ "operationId": "beans",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v2+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application": {
+ "get": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator root web endpoint",
+ "operationId": "links",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {
+ "schema": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/components/schemas/Link"
+ }
+ }
+ }
+ },
+ "application/vnd.spring-boot.actuator.v2+json": {
+ "schema": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/components/schemas/Link"
+ }
+ }
+ }
+ },
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/components/schemas/Link"
+ }
+ }
}
}
}
@@ -32,5 +841,19 @@
}
}
},
- "components": {}
+ "components": {
+ "schemas": {
+ "Link": {
+ "type": "object",
+ "properties": {
+ "href": {
+ "type": "string"
+ },
+ "templated": {
+ "type": "boolean"
+ }
+ }
+ }
+ }
+ }
}
diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/resources/results/app148-2.json b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/resources/results/app148-2.json
index 837455a90..4b706fa5c 100644
--- a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/resources/results/app148-2.json
+++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/resources/results/app148-2.json
@@ -176,6 +176,68 @@
}
}
},
+ "/application/sbom/{id}": {
+ "get": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'sbom-id'",
+ "operationId": "sbom-id",
+ "parameters": [
+ {
+ "name": "id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/octet-stream": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application/sbom": {
+ "get": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'sbom'",
+ "operationId": "sbom",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v2+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"/application/metrics/{requiredMetricName}": {
"get": {
"tags": [
@@ -217,6 +279,68 @@
}
}
},
+ "/application/sbom": {
+ "get": {
+ "operationId": "sbom",
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v2+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v3+json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ },
+ "description": "OK"
+ }
+ },
+ "summary": "Actuator web endpoint 'sbom'",
+ "tags": [
+ "Actuator"
+ ]
+ }
+ },
+ "/application/sbom/{id}": {
+ "get": {
+ "operationId": "sbom-id",
+ "parameters": [
+ {
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/octet-stream": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ },
+ "description": "OK"
+ }
+ },
+ "summary": "Actuator web endpoint 'sbom-id'",
+ "tags": [
+ "Actuator"
+ ]
+ }
+ },
"/application/metrics": {
"get": {
"tags": [
diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/resources/results/app186.json b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/resources/results/app186.json
index 6f5111c7a..afc2239c1 100644
--- a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/resources/results/app186.json
+++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/resources/results/app186.json
@@ -176,6 +176,68 @@
}
}
},
+ "/actuator/sbom/{id}": {
+ "get": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'sbom-id'",
+ "operationId": "sbom-id",
+ "parameters": [
+ {
+ "name": "id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/octet-stream": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/actuator/sbom": {
+ "get": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'sbom'",
+ "operationId": "sbom",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v2+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"/actuator/metrics/{requiredMetricName}": {
"get": {
"tags": [
@@ -217,6 +279,68 @@
}
}
},
+ "/actuator/sbom": {
+ "get": {
+ "operationId": "sbom",
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v2+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v3+json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ },
+ "description": "OK"
+ }
+ },
+ "summary": "Actuator web endpoint 'sbom'",
+ "tags": [
+ "Actuator"
+ ]
+ }
+ },
+ "/actuator/sbom/{id}": {
+ "get": {
+ "operationId": "sbom-id",
+ "parameters": [
+ {
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/octet-stream": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ },
+ "description": "OK"
+ }
+ },
+ "summary": "Actuator web endpoint 'sbom-id'",
+ "tags": [
+ "Actuator"
+ ]
+ }
+ },
"/actuator/metrics": {
"get": {
"tags": [
diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/pom.xml b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/pom.xml
index 120f11ccd..62fe7665c 100644
--- a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/pom.xml
+++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/pom.xml
@@ -2,7 +2,7 @@
springdoc-openapi-tests
org.springdoc
- 2.5.0
+ 2.6.0
4.0.0
diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocActuatorTest.java b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocActuatorTest.java
index d76fc9525..4173589c8 100644
--- a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocActuatorTest.java
+++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocActuatorTest.java
@@ -25,6 +25,8 @@
package test.org.springdoc.api;
import jakarta.annotation.PostConstruct;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.web.server.LocalManagementPort;
@@ -32,9 +34,13 @@
import org.springframework.test.context.TestPropertySource;
import org.springframework.web.client.RestTemplate;
+import static org.skyscreamer.jsonassert.JSONAssert.assertEquals;
+
@TestPropertySource(properties = { "management.endpoints.enabled-by-default=true" })
public abstract class AbstractSpringDocActuatorTest extends AbstractCommonTest {
+ protected static final Logger LOGGER = LoggerFactory.getLogger(AbstractCommonTest.class);
+
protected RestTemplate actuatorRestTemplate;
@LocalManagementPort
@@ -48,4 +54,18 @@ void init() {
actuatorRestTemplate = restTemplateBuilder
.rootUri("http://localhost:" + this.managementPort).build();
}
+
+ protected void testWithRestTemplate(String testId, String uri) throws Exception {
+ String result = null;
+ try {
+ result = actuatorRestTemplate.getForObject(uri, String.class);
+ String expected = getContent("results/app" + testId + ".json");
+ assertEquals(expected, result, true);
+ }
+ catch (AssertionError e) {
+ LOGGER.error(result);
+ throw e;
+ }
+ }
+
}
diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app148/SpringDocApp148Test.java b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app148/SpringDocApp148Test.java
index 41241a573..3d9c4a593 100644
--- a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app148/SpringDocApp148Test.java
+++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app148/SpringDocApp148Test.java
@@ -30,7 +30,6 @@
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;
-import static org.skyscreamer.jsonassert.JSONAssert.assertEquals;
@SpringBootTest(webEnvironment = WebEnvironment.DEFINED_PORT,
@@ -48,16 +47,12 @@ public class SpringDocApp148Test extends AbstractSpringDocActuatorTest {
@Test
public void testApp() throws Exception {
- String result = actuatorRestTemplate.getForObject("/test/application/openapi/users", String.class);
- String expected = getContent("results/app148-1.json");
- assertEquals(expected, result, true);
+ super.testWithRestTemplate("148-1","/test/application/openapi/users");
}
@Test
public void testApp2() throws Exception {
- String result = actuatorRestTemplate.getForObject("/test/application/openapi/x-actuator", String.class);
- String expected = getContent("results/app148-2.json");
- assertEquals(expected, result, true);
+ super.testWithRestTemplate("148-2","/test/application/openapi/x-actuator");
}
@Test
diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/resources/application-test.properties b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/resources/application-test.properties
index b88c99251..9d2df2929 100644
--- a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/resources/application-test.properties
+++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/resources/application-test.properties
@@ -1,3 +1,4 @@
spring.main.banner-mode=off
logging.level.root=OFF
+logging.pattern.console=%m%n
spring.main.lazy-initialization=true
\ No newline at end of file
diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/resources/logback-test.xml b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/resources/logback-test.xml
index 608cb302d..3fd46cfab 100644
--- a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/resources/logback-test.xml
+++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/resources/logback-test.xml
@@ -1,4 +1,5 @@
-
+
+
\ No newline at end of file
diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/resources/results/app147-1.json b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/resources/results/app147-1.json
index 601c304ca..4483a9f2c 100644
--- a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/resources/results/app147-1.json
+++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/resources/results/app147-1.json
@@ -225,6 +225,68 @@
}
}
},
+ "/application/sbom": {
+ "get": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'sbom'",
+ "operationId": "sbom",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v2+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application/sbom/{id}": {
+ "get": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'sbom-id'",
+ "operationId": "sbom-id",
+ "parameters": [
+ {
+ "name": "id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/octet-stream": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"/application/metrics": {
"get": {
"tags": [
@@ -297,6 +359,68 @@
}
}
},
+ "/application/sbom": {
+ "get": {
+ "operationId": "sbom",
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v2+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v3+json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ },
+ "description": "OK"
+ }
+ },
+ "summary": "Actuator web endpoint 'sbom'",
+ "tags": [
+ "Actuator"
+ ]
+ }
+ },
+ "/application/sbom/{id}": {
+ "get": {
+ "operationId": "sbom-id",
+ "parameters": [
+ {
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/octet-stream": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ },
+ "description": "OK"
+ }
+ },
+ "summary": "Actuator web endpoint 'sbom-id'",
+ "tags": [
+ "Actuator"
+ ]
+ }
+ },
"/application/mappings": {
"get": {
"tags": [
diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/resources/results/app148-2.json b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/resources/results/app148-2.json
index 1d726c0ba..69726213f 100644
--- a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/resources/results/app148-2.json
+++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/resources/results/app148-2.json
@@ -225,6 +225,68 @@
}
}
},
+ "/application/sbom": {
+ "get": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'sbom'",
+ "operationId": "sbom",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v2+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application/sbom/{id}": {
+ "get": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'sbom-id'",
+ "operationId": "sbom-id",
+ "parameters": [
+ {
+ "name": "id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/octet-stream": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"/application/metrics": {
"get": {
"tags": [
@@ -297,6 +359,68 @@
}
}
},
+ "/application/sbom": {
+ "get": {
+ "operationId": "sbom",
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v2+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v3+json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ },
+ "description": "OK"
+ }
+ },
+ "summary": "Actuator web endpoint 'sbom'",
+ "tags": [
+ "Actuator"
+ ]
+ }
+ },
+ "/application/sbom/{id}": {
+ "get": {
+ "operationId": "sbom-id",
+ "parameters": [
+ {
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/octet-stream": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ },
+ "description": "OK"
+ }
+ },
+ "summary": "Actuator web endpoint 'sbom-id'",
+ "tags": [
+ "Actuator"
+ ]
+ }
+ },
"/application/mappings": {
"get": {
"tags": [
diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/resources/results/app186.json b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/resources/results/app186.json
index c136df41f..7ecd73866 100644
--- a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/resources/results/app186.json
+++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/resources/results/app186.json
@@ -225,6 +225,68 @@
}
}
},
+ "/actuator/sbom": {
+ "get": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'sbom'",
+ "operationId": "sbom",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/vnd.spring-boot.actuator.v3+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v2+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/actuator/sbom/{id}": {
+ "get": {
+ "tags": [
+ "Actuator"
+ ],
+ "summary": "Actuator web endpoint 'sbom-id'",
+ "operationId": "sbom-id",
+ "parameters": [
+ {
+ "name": "id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/octet-stream": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"/actuator/metrics": {
"get": {
"tags": [
@@ -297,6 +359,68 @@
}
}
},
+ "/actuator/sbom": {
+ "get": {
+ "operationId": "sbom",
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v2+json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "application/vnd.spring-boot.actuator.v3+json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ },
+ "description": "OK"
+ }
+ },
+ "summary": "Actuator web endpoint 'sbom'",
+ "tags": [
+ "Actuator"
+ ]
+ }
+ },
+ "/actuator/sbom/{id}": {
+ "get": {
+ "operationId": "sbom-id",
+ "parameters": [
+ {
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/octet-stream": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ },
+ "description": "OK"
+ }
+ },
+ "summary": "Actuator web endpoint 'sbom-id'",
+ "tags": [
+ "Actuator"
+ ]
+ }
+ },
"/actuator/mappings": {
"get": {
"tags": [
@@ -825,4 +949,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/pom.xml b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/pom.xml
index 00f4a96f2..6d65af1dc 100644
--- a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/pom.xml
+++ b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/pom.xml
@@ -2,7 +2,7 @@
springdoc-openapi-tests
org.springdoc
- 2.5.0
+ 2.6.0
4.0.0
springdoc-openapi-data-rest-tests
diff --git a/springdoc-openapi-tests/springdoc-openapi-function-webflux-tests/pom.xml b/springdoc-openapi-tests/springdoc-openapi-function-webflux-tests/pom.xml
index 07d7babc8..059a207db 100644
--- a/springdoc-openapi-tests/springdoc-openapi-function-webflux-tests/pom.xml
+++ b/springdoc-openapi-tests/springdoc-openapi-function-webflux-tests/pom.xml
@@ -2,7 +2,7 @@
springdoc-openapi-tests
org.springdoc
- 2.5.0
+ 2.6.0
4.0.0
diff --git a/springdoc-openapi-tests/springdoc-openapi-function-webflux-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocFunctionTest.java b/springdoc-openapi-tests/springdoc-openapi-function-webflux-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocFunctionTest.java
index 9b5b08e9e..78e2db9f8 100644
--- a/springdoc-openapi-tests/springdoc-openapi-function-webflux-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocFunctionTest.java
+++ b/springdoc-openapi-tests/springdoc-openapi-function-webflux-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocFunctionTest.java
@@ -24,8 +24,6 @@
import org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebTestClient;
import org.springframework.cloud.function.context.test.FunctionalSpringBootTest;
import org.springframework.test.web.reactive.server.EntityExchangeResult;
-import org.springframework.web.reactive.function.server.HandlerFunction;
-import org.springframework.web.reactive.function.server.ServerResponse;
import static org.skyscreamer.jsonassert.JSONAssert.assertEquals;
@@ -34,13 +32,11 @@
@AutoConfigureWebTestClient(timeout = "3600000")
public abstract class AbstractSpringDocFunctionTest extends AbstractCommonTest {
- public static final HandlerFunction HANDLER_FUNCTION = request -> ServerResponse.ok().build();
-
protected String groupName = "";
@Test
- public void testApp() throws Exception {
+ public void testApp() {
String result = null;
try {
EntityExchangeResult getResult = webTestClient.get().uri(Constants.DEFAULT_API_DOCS_URL + groupName).exchange()
diff --git a/springdoc-openapi-tests/springdoc-openapi-function-webflux-tests/src/test/resources/logback-test.xml b/springdoc-openapi-tests/springdoc-openapi-function-webflux-tests/src/test/resources/logback-test.xml
index 24cd4646e..3fd46cfab 100644
--- a/springdoc-openapi-tests/springdoc-openapi-function-webflux-tests/src/test/resources/logback-test.xml
+++ b/springdoc-openapi-tests/springdoc-openapi-function-webflux-tests/src/test/resources/logback-test.xml
@@ -1,6 +1,5 @@
-
\ No newline at end of file
diff --git a/springdoc-openapi-tests/springdoc-openapi-function-webmvc-tests/pom.xml b/springdoc-openapi-tests/springdoc-openapi-function-webmvc-tests/pom.xml
index 5e46d7d54..e3b01e3ba 100644
--- a/springdoc-openapi-tests/springdoc-openapi-function-webmvc-tests/pom.xml
+++ b/springdoc-openapi-tests/springdoc-openapi-function-webmvc-tests/pom.xml
@@ -2,7 +2,7 @@
springdoc-openapi-tests
org.springdoc
- 2.5.0
+ 2.6.0
4.0.0
diff --git a/springdoc-openapi-tests/springdoc-openapi-groovy-tests/pom.xml b/springdoc-openapi-tests/springdoc-openapi-groovy-tests/pom.xml
index d89bef434..f37fe303c 100644
--- a/springdoc-openapi-tests/springdoc-openapi-groovy-tests/pom.xml
+++ b/springdoc-openapi-tests/springdoc-openapi-groovy-tests/pom.xml
@@ -3,7 +3,7 @@
org.springdoc
springdoc-openapi-tests
- 2.5.0
+ 2.6.0
springdoc-openapi-groovy-tests
diff --git a/springdoc-openapi-tests/springdoc-openapi-groovy-tests/src/test/resources/results/app1.json b/springdoc-openapi-tests/springdoc-openapi-groovy-tests/src/test/resources/results/app1.json
index 802d051cf..a7376fb6b 100644
--- a/springdoc-openapi-tests/springdoc-openapi-groovy-tests/src/test/resources/results/app1.json
+++ b/springdoc-openapi-tests/springdoc-openapi-groovy-tests/src/test/resources/results/app1.json
@@ -151,13 +151,13 @@
"instance": {
"$ref": "#/components/schemas/AnnotatedNode"
},
+ "groovydoc": {
+ "$ref": "#/components/schemas/Groovydoc"
+ },
"hasNoRealSourcePosition": {
"type": "boolean",
"writeOnly": true
},
- "groovydoc": {
- "$ref": "#/components/schemas/Groovydoc"
- },
"text": {
"type": "string"
},
@@ -424,8 +424,9 @@
"void": {
"type": "boolean"
},
- "typeDescription": {
- "type": "string"
+ "superClassDistance": {
+ "type": "integer",
+ "format": "int32"
},
"newMetaMethods": {
"type": "array",
@@ -436,9 +437,8 @@
"callSiteLoader": {
"$ref": "#/components/schemas/CallSiteClassLoader"
},
- "superClassDistance": {
- "type": "integer",
- "format": "int32"
+ "typeDescription": {
+ "type": "string"
}
}
},
@@ -460,20 +460,6 @@
"items": {
"type": "object",
"properties": {
- "name": {
- "type": "string"
- },
- "bounds": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "typeName": {
- "type": "string"
- }
- }
- }
- },
"genericDeclaration": {
"type": "object",
"properties": {
@@ -694,20 +680,6 @@
"items": {
"type": "object",
"properties": {
- "name": {
- "type": "string"
- },
- "bounds": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "typeName": {
- "type": "string"
- }
- }
- }
- },
"genericDeclaration": {
"type": "object"
},
@@ -739,6 +711,20 @@
}
}
},
+ "name": {
+ "type": "string"
+ },
+ "bounds": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "typeName": {
+ "type": "string"
+ }
+ }
+ }
+ },
"typeName": {
"type": "string"
},
@@ -992,6 +978,20 @@
}
}
},
+ "name": {
+ "type": "string"
+ },
+ "bounds": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "typeName": {
+ "type": "string"
+ }
+ }
+ }
+ },
"typeName": {
"type": "string"
},
@@ -1220,20 +1220,6 @@
"items": {
"type": "object",
"properties": {
- "name": {
- "type": "string"
- },
- "bounds": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "typeName": {
- "type": "string"
- }
- }
- }
- },
"genericDeclaration": {
"type": "object"
},
@@ -1265,6 +1251,20 @@
}
}
},
+ "name": {
+ "type": "string"
+ },
+ "bounds": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "typeName": {
+ "type": "string"
+ }
+ }
+ }
+ },
"typeName": {
"type": "string"
},
@@ -1614,20 +1614,6 @@
"items": {
"type": "object",
"properties": {
- "name": {
- "type": "string"
- },
- "bounds": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "typeName": {
- "type": "string"
- }
- }
- }
- },
"annotatedBounds": {
"type": "array",
"items": {
@@ -1656,6 +1642,20 @@
}
}
},
+ "name": {
+ "type": "string"
+ },
+ "bounds": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "typeName": {
+ "type": "string"
+ }
+ }
+ }
+ },
"typeName": {
"type": "string"
},
@@ -1876,20 +1876,6 @@
"items": {
"type": "object",
"properties": {
- "name": {
- "type": "string"
- },
- "bounds": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "typeName": {
- "type": "string"
- }
- }
- }
- },
"genericDeclaration": {
"type": "object"
},
@@ -1921,6 +1907,20 @@
}
}
},
+ "name": {
+ "type": "string"
+ },
+ "bounds": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "typeName": {
+ "type": "string"
+ }
+ }
+ }
+ },
"typeName": {
"type": "string"
},
@@ -3114,21 +3114,34 @@
"text": {
"type": "string"
},
- "outerClass": {
- "$ref": "#/components/schemas/ClassNode"
+ "allDeclaredMethods": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/MethodNode"
+ }
},
- "genericsPlaceHolder": {
- "type": "boolean"
+ "allInterfaces": {
+ "uniqueItems": true,
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/ClassNode"
+ }
},
- "unresolvedSuperClass": {
- "$ref": "#/components/schemas/ClassNode"
+ "abstractMethods": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/MethodNode"
+ }
},
- "plainNodeReference": {
+ "outerClass": {
"$ref": "#/components/schemas/ClassNode"
},
"redirectNode": {
"type": "boolean"
},
+ "genericsPlaceHolder": {
+ "type": "boolean"
+ },
"primaryClassNode": {
"type": "boolean"
},
@@ -3150,6 +3163,9 @@
"derivedFromGroovyObject": {
"type": "boolean"
},
+ "unresolvedSuperClass": {
+ "$ref": "#/components/schemas/ClassNode"
+ },
"unresolvedInterfaces": {
"type": "array",
"items": {
@@ -3169,24 +3185,8 @@
"annotationDefinition": {
"type": "boolean"
},
- "abstractMethods": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/MethodNode"
- }
- },
- "allInterfaces": {
- "uniqueItems": true,
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/ClassNode"
- }
- },
- "allDeclaredMethods": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/MethodNode"
- }
+ "plainNodeReference": {
+ "$ref": "#/components/schemas/ClassNode"
},
"objectInitializerStatements": {
"type": "array",
@@ -3197,13 +3197,13 @@
"instance": {
"$ref": "#/components/schemas/AnnotatedNode"
},
+ "groovydoc": {
+ "$ref": "#/components/schemas/Groovydoc"
+ },
"hasNoRealSourcePosition": {
"type": "boolean",
"writeOnly": true
},
- "groovydoc": {
- "$ref": "#/components/schemas/Groovydoc"
- },
"sourcePosition": {
"$ref": "#/components/schemas/ASTNode"
},
@@ -3256,21 +3256,15 @@
"type": "string"
},
"encoded": {
- "type": "array",
- "items": {
- "type": "string",
- "format": "byte"
- }
+ "type": "string",
+ "format": "byte"
},
"publicKey": {
"type": "object",
"properties": {
"encoded": {
- "type": "array",
- "items": {
- "type": "string",
- "format": "byte"
- }
+ "type": "string",
+ "format": "byte"
},
"format": {
"type": "string"
@@ -3291,6 +3285,12 @@
"signerCertPath": {
"type": "object",
"properties": {
+ "type": {
+ "type": "string"
+ },
+ "encodings": {
+ "type": "object"
+ },
"certificates": {
"type": "array",
"items": {
@@ -3300,21 +3300,15 @@
"type": "string"
},
"encoded": {
- "type": "array",
- "items": {
- "type": "string",
- "format": "byte"
- }
+ "type": "string",
+ "format": "byte"
},
"publicKey": {
"type": "object",
"properties": {
"encoded": {
- "type": "array",
- "items": {
- "type": "string",
- "format": "byte"
- }
+ "type": "string",
+ "format": "byte"
},
"format": {
"type": "string"
@@ -3327,18 +3321,9 @@
}
}
},
- "type": {
- "type": "string"
- },
"encoded": {
- "type": "array",
- "items": {
- "type": "string",
- "format": "byte"
- }
- },
- "encodings": {
- "type": "object"
+ "type": "string",
+ "format": "byte"
}
}
},
@@ -3352,6 +3337,12 @@
"signerCertPath": {
"type": "object",
"properties": {
+ "type": {
+ "type": "string"
+ },
+ "encodings": {
+ "type": "object"
+ },
"certificates": {
"type": "array",
"items": {
@@ -3361,21 +3352,15 @@
"type": "string"
},
"encoded": {
- "type": "array",
- "items": {
- "type": "string",
- "format": "byte"
- }
+ "type": "string",
+ "format": "byte"
},
"publicKey": {
"type": "object",
"properties": {
"encoded": {
- "type": "array",
- "items": {
- "type": "string",
- "format": "byte"
- }
+ "type": "string",
+ "format": "byte"
},
"format": {
"type": "string"
@@ -3388,18 +3373,9 @@
}
}
},
- "type": {
- "type": "string"
- },
"encoded": {
- "type": "array",
- "items": {
- "type": "string",
- "format": "byte"
- }
- },
- "encodings": {
- "type": "object"
+ "type": "string",
+ "format": "byte"
}
}
}
@@ -3689,10 +3665,6 @@
"text": {
"type": "string"
},
- "annotationDefault": {
- "type": "boolean",
- "writeOnly": true
- },
"voidMethod": {
"type": "boolean"
},
@@ -3708,16 +3680,20 @@
"staticConstructor": {
"type": "boolean"
},
+ "annotationDefault": {
+ "type": "boolean",
+ "writeOnly": true
+ },
"instance": {
"$ref": "#/components/schemas/AnnotatedNode"
},
+ "groovydoc": {
+ "$ref": "#/components/schemas/Groovydoc"
+ },
"hasNoRealSourcePosition": {
"type": "boolean",
"writeOnly": true
},
- "groovydoc": {
- "$ref": "#/components/schemas/Groovydoc"
- },
"sourcePosition": {
"$ref": "#/components/schemas/ASTNode"
},
@@ -3747,16 +3723,16 @@
"configuration": {
"$ref": "#/components/schemas/CompilerConfiguration"
},
+ "errorCount": {
+ "type": "integer",
+ "format": "int32"
+ },
"warningCount": {
"type": "integer",
"format": "int32"
},
"lastError": {
"$ref": "#/components/schemas/Message"
- },
- "errorCount": {
- "type": "integer",
- "format": "int32"
}
}
},
@@ -3816,6 +3792,9 @@
"type": "integer",
"format": "int32"
},
+ "classInfo": {
+ "$ref": "#/components/schemas/ClassInfo"
+ },
"groovyObject": {
"type": "boolean"
},
@@ -3864,20 +3843,6 @@
"items": {
"type": "object",
"properties": {
- "name": {
- "type": "string"
- },
- "bounds": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "typeName": {
- "type": "string"
- }
- }
- }
- },
"annotatedBounds": {
"type": "array",
"items": {
@@ -3906,6 +3871,20 @@
}
}
},
+ "name": {
+ "type": "string"
+ },
+ "bounds": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "typeName": {
+ "type": "string"
+ }
+ }
+ }
+ },
"typeName": {
"type": "string"
},
@@ -4126,20 +4105,6 @@
"items": {
"type": "object",
"properties": {
- "name": {
- "type": "string"
- },
- "bounds": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "typeName": {
- "type": "string"
- }
- }
- }
- },
"genericDeclaration": {
"type": "object"
},
@@ -4171,6 +4136,20 @@
}
}
},
+ "name": {
+ "type": "string"
+ },
+ "bounds": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "typeName": {
+ "type": "string"
+ }
+ }
+ }
+ },
"typeName": {
"type": "string"
},
@@ -4436,20 +4415,6 @@
"items": {
"type": "object",
"properties": {
- "name": {
- "type": "string"
- },
- "bounds": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "typeName": {
- "type": "string"
- }
- }
- }
- },
"annotatedBounds": {
"type": "array",
"items": {
@@ -4478,6 +4443,20 @@
}
}
},
+ "name": {
+ "type": "string"
+ },
+ "bounds": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "typeName": {
+ "type": "string"
+ }
+ }
+ }
+ },
"typeName": {
"type": "string"
},
@@ -4698,20 +4677,6 @@
"items": {
"type": "object",
"properties": {
- "name": {
- "type": "string"
- },
- "bounds": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "typeName": {
- "type": "string"
- }
- }
- }
- },
"genericDeclaration": {
"type": "object"
},
@@ -4743,6 +4708,20 @@
}
}
},
+ "name": {
+ "type": "string"
+ },
+ "bounds": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "typeName": {
+ "type": "string"
+ }
+ }
+ }
+ },
"typeName": {
"type": "string"
},
@@ -4995,9 +4974,6 @@
}
}
}
- },
- "classInfo": {
- "$ref": "#/components/schemas/ClassInfo"
}
}
},
@@ -5038,13 +5014,13 @@
"instance": {
"$ref": "#/components/schemas/AnnotatedNode"
},
+ "groovydoc": {
+ "$ref": "#/components/schemas/Groovydoc"
+ },
"hasNoRealSourcePosition": {
"type": "boolean",
"writeOnly": true
},
- "groovydoc": {
- "$ref": "#/components/schemas/Groovydoc"
- },
"text": {
"type": "string"
},
@@ -5155,13 +5131,13 @@
"instance": {
"$ref": "#/components/schemas/AnnotatedNode"
},
+ "groovydoc": {
+ "$ref": "#/components/schemas/Groovydoc"
+ },
"hasNoRealSourcePosition": {
"type": "boolean",
"writeOnly": true
},
- "groovydoc": {
- "$ref": "#/components/schemas/Groovydoc"
- },
"text": {
"type": "string"
},
@@ -5688,13 +5664,13 @@
"instance": {
"$ref": "#/components/schemas/AnnotatedNode"
},
+ "groovydoc": {
+ "$ref": "#/components/schemas/Groovydoc"
+ },
"hasNoRealSourcePosition": {
"type": "boolean",
"writeOnly": true
},
- "groovydoc": {
- "$ref": "#/components/schemas/Groovydoc"
- },
"sourcePosition": {
"$ref": "#/components/schemas/ASTNode"
},
@@ -5891,18 +5867,31 @@
"text": {
"type": "string"
},
- "genericsPlaceHolder": {
- "type": "boolean"
+ "allDeclaredMethods": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/MethodNode"
+ }
},
- "unresolvedSuperClass": {
- "$ref": "#/components/schemas/ClassNode"
+ "allInterfaces": {
+ "uniqueItems": true,
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/ClassNode"
+ }
},
- "plainNodeReference": {
- "$ref": "#/components/schemas/ClassNode"
+ "abstractMethods": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/MethodNode"
+ }
},
"redirectNode": {
"type": "boolean"
},
+ "genericsPlaceHolder": {
+ "type": "boolean"
+ },
"primaryClassNode": {
"type": "boolean"
},
@@ -5924,6 +5913,9 @@
"derivedFromGroovyObject": {
"type": "boolean"
},
+ "unresolvedSuperClass": {
+ "$ref": "#/components/schemas/ClassNode"
+ },
"unresolvedInterfaces": {
"type": "array",
"items": {
@@ -5943,24 +5935,8 @@
"annotationDefinition": {
"type": "boolean"
},
- "abstractMethods": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/MethodNode"
- }
- },
- "allInterfaces": {
- "uniqueItems": true,
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/ClassNode"
- }
- },
- "allDeclaredMethods": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/MethodNode"
- }
+ "plainNodeReference": {
+ "$ref": "#/components/schemas/ClassNode"
},
"objectInitializerStatements": {
"type": "array",
@@ -5971,13 +5947,13 @@
"instance": {
"$ref": "#/components/schemas/AnnotatedNode"
},
+ "groovydoc": {
+ "$ref": "#/components/schemas/Groovydoc"
+ },
"hasNoRealSourcePosition": {
"type": "boolean",
"writeOnly": true
},
- "groovydoc": {
- "$ref": "#/components/schemas/Groovydoc"
- },
"sourcePosition": {
"$ref": "#/components/schemas/ASTNode"
},
@@ -6226,10 +6202,6 @@
"text": {
"type": "string"
},
- "annotationDefault": {
- "type": "boolean",
- "writeOnly": true
- },
"voidMethod": {
"type": "boolean"
},
@@ -6245,16 +6217,20 @@
"staticConstructor": {
"type": "boolean"
},
+ "annotationDefault": {
+ "type": "boolean",
+ "writeOnly": true
+ },
"instance": {
"$ref": "#/components/schemas/AnnotatedNode"
},
+ "groovydoc": {
+ "$ref": "#/components/schemas/Groovydoc"
+ },
"hasNoRealSourcePosition": {
"type": "boolean",
"writeOnly": true
},
- "groovydoc": {
- "$ref": "#/components/schemas/Groovydoc"
- },
"sourcePosition": {
"$ref": "#/components/schemas/ASTNode"
},
@@ -6439,21 +6415,34 @@
"text": {
"type": "string"
},
- "outerClass": {
- "$ref": "#/components/schemas/ClassNode"
+ "allDeclaredMethods": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/MethodNode"
+ }
},
- "genericsPlaceHolder": {
- "type": "boolean"
+ "allInterfaces": {
+ "uniqueItems": true,
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/ClassNode"
+ }
},
- "unresolvedSuperClass": {
- "$ref": "#/components/schemas/ClassNode"
+ "abstractMethods": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/MethodNode"
+ }
},
- "plainNodeReference": {
+ "outerClass": {
"$ref": "#/components/schemas/ClassNode"
},
"redirectNode": {
"type": "boolean"
},
+ "genericsPlaceHolder": {
+ "type": "boolean"
+ },
"primaryClassNode": {
"type": "boolean"
},
@@ -6475,6 +6464,9 @@
"derivedFromGroovyObject": {
"type": "boolean"
},
+ "unresolvedSuperClass": {
+ "$ref": "#/components/schemas/ClassNode"
+ },
"unresolvedInterfaces": {
"type": "array",
"items": {
@@ -6494,24 +6486,8 @@
"annotationDefinition": {
"type": "boolean"
},
- "abstractMethods": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/MethodNode"
- }
- },
- "allInterfaces": {
- "uniqueItems": true,
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/ClassNode"
- }
- },
- "allDeclaredMethods": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/MethodNode"
- }
+ "plainNodeReference": {
+ "$ref": "#/components/schemas/ClassNode"
},
"objectInitializerStatements": {
"type": "array",
@@ -6522,13 +6498,13 @@
"instance": {
"$ref": "#/components/schemas/AnnotatedNode"
},
+ "groovydoc": {
+ "$ref": "#/components/schemas/Groovydoc"
+ },
"hasNoRealSourcePosition": {
"type": "boolean",
"writeOnly": true
},
- "groovydoc": {
- "$ref": "#/components/schemas/Groovydoc"
- },
"sourcePosition": {
"$ref": "#/components/schemas/ASTNode"
},
@@ -6617,12 +6593,12 @@
"statementBlock": {
"$ref": "#/components/schemas/BlockStatement"
},
- "empty": {
- "type": "boolean"
- },
"packageName": {
"type": "string"
},
+ "empty": {
+ "type": "boolean"
+ },
"package": {
"$ref": "#/components/schemas/PackageNode"
},
@@ -6695,13 +6671,13 @@
"instance": {
"$ref": "#/components/schemas/AnnotatedNode"
},
+ "groovydoc": {
+ "$ref": "#/components/schemas/Groovydoc"
+ },
"hasNoRealSourcePosition": {
"type": "boolean",
"writeOnly": true
},
- "groovydoc": {
- "$ref": "#/components/schemas/Groovydoc"
- },
"sourcePosition": {
"$ref": "#/components/schemas/ASTNode"
},
@@ -6781,13 +6757,13 @@
"instance": {
"$ref": "#/components/schemas/AnnotatedNode"
},
+ "groovydoc": {
+ "$ref": "#/components/schemas/Groovydoc"
+ },
"hasNoRealSourcePosition": {
"type": "boolean",
"writeOnly": true
},
- "groovydoc": {
- "$ref": "#/components/schemas/Groovydoc"
- },
"text": {
"type": "string"
},
@@ -6869,6 +6845,9 @@
"type": "integer",
"format": "int32"
},
+ "type": {
+ "$ref": "#/components/schemas/ClassNode"
+ },
"name": {
"type": "string"
},
@@ -6878,15 +6857,9 @@
"public": {
"type": "boolean"
},
- "type": {
- "$ref": "#/components/schemas/ClassNode"
- },
"private": {
"type": "boolean"
},
- "dynamicTyped": {
- "type": "boolean"
- },
"initialExpression": {
"$ref": "#/components/schemas/Expression"
},
@@ -6900,6 +6873,9 @@
"originType": {
"$ref": "#/components/schemas/ClassNode"
},
+ "dynamicTyped": {
+ "type": "boolean"
+ },
"getterNameOrDefault": {
"type": "string"
},
@@ -6909,13 +6885,13 @@
"instance": {
"$ref": "#/components/schemas/AnnotatedNode"
},
+ "groovydoc": {
+ "$ref": "#/components/schemas/Groovydoc"
+ },
"hasNoRealSourcePosition": {
"type": "boolean",
"writeOnly": true
},
- "groovydoc": {
- "$ref": "#/components/schemas/Groovydoc"
- },
"text": {
"type": "string"
},
@@ -6933,12 +6909,12 @@
"ReaderSource": {
"type": "object",
"properties": {
- "reader": {
- "type": "object"
- },
"uri": {
"type": "string",
"format": "uri"
+ },
+ "reader": {
+ "type": "object"
}
}
},
@@ -6988,13 +6964,13 @@
"instance": {
"$ref": "#/components/schemas/AnnotatedNode"
},
+ "groovydoc": {
+ "$ref": "#/components/schemas/Groovydoc"
+ },
"hasNoRealSourcePosition": {
"type": "boolean",
"writeOnly": true
},
- "groovydoc": {
- "$ref": "#/components/schemas/Groovydoc"
- },
"text": {
"type": "string"
},
@@ -7185,9 +7161,6 @@
"type": {
"$ref": "#/components/schemas/ClassNode"
},
- "dynamicTyped": {
- "type": "boolean"
- },
"initialExpression": {
"$ref": "#/components/schemas/Expression"
},
@@ -7199,6 +7172,9 @@
},
"originType": {
"$ref": "#/components/schemas/ClassNode"
+ },
+ "dynamicTyped": {
+ "type": "boolean"
}
}
},
diff --git a/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/pom.xml b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/pom.xml
index fc5b3cb86..75a2200e1 100644
--- a/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/pom.xml
+++ b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/pom.xml
@@ -2,7 +2,7 @@
springdoc-openapi-tests
org.springdoc
- 2.5.0
+ 2.6.0
4.0.0
springdoc-openapi-hateoas-tests
diff --git a/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app10/Dummy.java b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app10/Dummy.java
new file mode 100644
index 000000000..761794ae2
--- /dev/null
+++ b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app10/Dummy.java
@@ -0,0 +1,34 @@
+/*
+ *
+ * *
+ * * *
+ * * * * Copyright 2019-2024 the original author or authors.
+ * * * *
+ * * * * Licensed under the Apache License, Version 2.0 (the "License");
+ * * * * you may not use this file except in compliance with the License.
+ * * * * You may obtain a copy of the License at
+ * * * *
+ * * * * https://www.apache.org/licenses/LICENSE-2.0
+ * * * *
+ * * * * Unless required by applicable law or agreed to in writing, software
+ * * * * distributed under the License is distributed on an "AS IS" BASIS,
+ * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * * * * See the License for the specific language governing permissions and
+ * * * * limitations under the License.
+ * * *
+ * *
+ *
+ */
+
+package test.org.springdoc.api.app10;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+
+@Data
+@AllArgsConstructor
+public class Dummy {
+
+ private T value;
+
+}
diff --git a/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app10/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app10/HelloController.java
new file mode 100644
index 000000000..00d143fbf
--- /dev/null
+++ b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app10/HelloController.java
@@ -0,0 +1,75 @@
+/*
+ *
+ * *
+ * * *
+ * * * * Copyright 2019-2024 the original author or authors.
+ * * * *
+ * * * * Licensed under the Apache License, Version 2.0 (the "License");
+ * * * * you may not use this file except in compliance with the License.
+ * * * * You may obtain a copy of the License at
+ * * * *
+ * * * * https://www.apache.org/licenses/LICENSE-2.0
+ * * * *
+ * * * * Unless required by applicable law or agreed to in writing, software
+ * * * * distributed under the License is distributed on an "AS IS" BASIS,
+ * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * * * * See the License for the specific language governing permissions and
+ * * * * limitations under the License.
+ * * *
+ * *
+ *
+ */
+
+package test.org.springdoc.api.app10;
+
+import java.util.List;
+
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageImpl;
+import org.springframework.data.web.PagedModel;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@SuppressWarnings("rawtypes")
+@RestController
+public class HelloController {
+
+ @GetMapping("/page-simple")
+ public Page pageSimple() {
+ return pageImpl("test");
+ }
+
+ @GetMapping("/paged-model-simple")
+ public PagedModel pagedModelSimple() {
+ return pagedModel("test");
+ }
+
+ @GetMapping("/page-complex")
+ public Page>> pageComplex() {
+ return pageImpl(new Dummy<>(List.of("test")));
+ }
+
+ @GetMapping("/paged-model-complex")
+ public PagedModel>> pagedModelComplex() {
+ return pagedModel(new Dummy<>(List.of("test")));
+ }
+
+ @GetMapping("/page-raw")
+ public Page pageRaw() {
+ return pageSimple();
+ }
+
+ @GetMapping("/paged-model-raw")
+ public PagedModel pagedModelRaw() {
+ return pagedModelSimple();
+ }
+
+ private PagedModel pagedModel(T value) {
+ return new PagedModel<>(pageImpl(value));
+ }
+
+ private Page pageImpl(T value) {
+ return new PageImpl<>(List.of(value));
+ }
+
+}
diff --git a/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app10/SpringDocApp10DirectTest.java b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app10/SpringDocApp10DirectTest.java
new file mode 100644
index 000000000..4dba111c1
--- /dev/null
+++ b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app10/SpringDocApp10DirectTest.java
@@ -0,0 +1,55 @@
+/*
+ *
+ * *
+ * * *
+ * * * * Copyright 2019-2024 the original author or authors.
+ * * * *
+ * * * * Licensed under the Apache License, Version 2.0 (the "License");
+ * * * * you may not use this file except in compliance with the License.
+ * * * * You may obtain a copy of the License at
+ * * * *
+ * * * * https://www.apache.org/licenses/LICENSE-2.0
+ * * * *
+ * * * * Unless required by applicable law or agreed to in writing, software
+ * * * * distributed under the License is distributed on an "AS IS" BASIS,
+ * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * * * * See the License for the specific language governing permissions and
+ * * * * limitations under the License.
+ * * *
+ * *
+ *
+ */
+
+package test.org.springdoc.api.app10;
+
+import org.junit.jupiter.api.Test;
+import org.springdoc.core.utils.Constants;
+import test.org.springdoc.api.AbstractSpringDocTest;
+
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.data.web.config.EnableSpringDataWebSupport;
+
+import static org.hamcrest.Matchers.is;
+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
+
+public class SpringDocApp10DirectTest extends AbstractSpringDocTest {
+
+ @Override
+ @Test
+ public void testApp() throws Exception {
+ mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL))
+ .andExpect(status().isOk())
+ .andExpect(jsonPath("$.openapi", is("3.0.1")))
+ .andExpect(content().json(getContent("results/app10-direct.json"), true));
+ }
+
+ @SpringBootApplication
+ @EnableSpringDataWebSupport(pageSerializationMode = EnableSpringDataWebSupport.PageSerializationMode.DIRECT)
+ public static class SpringDocTestApp {
+
+ }
+
+}
diff --git a/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app10/SpringDocApp10NotSpecifiedTest.java b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app10/SpringDocApp10NotSpecifiedTest.java
new file mode 100644
index 000000000..91985d75e
--- /dev/null
+++ b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app10/SpringDocApp10NotSpecifiedTest.java
@@ -0,0 +1,68 @@
+/*
+ *
+ * *
+ * * *
+ * * * * Copyright 2019-2024 the original author or authors.
+ * * * *
+ * * * * Licensed under the Apache License, Version 2.0 (the "License");
+ * * * * you may not use this file except in compliance with the License.
+ * * * * You may obtain a copy of the License at
+ * * * *
+ * * * * https://www.apache.org/licenses/LICENSE-2.0
+ * * * *
+ * * * * Unless required by applicable law or agreed to in writing, software
+ * * * * distributed under the License is distributed on an "AS IS" BASIS,
+ * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * * * * See the License for the specific language governing permissions and
+ * * * * limitations under the License.
+ * * *
+ * *
+ *
+ */
+
+package test.org.springdoc.api.app10;
+
+import java.util.Optional;
+
+import io.swagger.v3.core.converter.ModelConverter;
+import io.swagger.v3.core.converter.ModelConverters;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+import org.springdoc.core.converters.PageOpenAPIConverter;
+import org.springdoc.core.utils.Constants;
+import test.org.springdoc.api.AbstractSpringDocTest;
+
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+import static org.hamcrest.Matchers.is;
+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
+
+public class SpringDocApp10NotSpecifiedTest extends AbstractSpringDocTest {
+
+
+ @BeforeAll
+ public static void init() {
+ Optional pageOpenAPIConverter =
+ ModelConverters.getInstance().getConverters()
+ .stream().filter(modelConverter -> modelConverter instanceof PageOpenAPIConverter).findAny();
+ pageOpenAPIConverter.ifPresent(ModelConverters.getInstance()::removeConverter);
+ }
+
+ @Override
+ @Test
+ public void testApp() throws Exception {
+ mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL))
+ .andExpect(status().isOk())
+ .andExpect(jsonPath("$.openapi", is("3.0.1")))
+ .andExpect(content().json(getContent("results/app10-direct.json"), true));
+ }
+
+ @SpringBootApplication
+ public static class SpringDocTestApp {
+
+ }
+
+}
diff --git a/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app10/SpringDocApp10ViaDtoTest.java b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app10/SpringDocApp10ViaDtoTest.java
new file mode 100644
index 000000000..22e8cc2ea
--- /dev/null
+++ b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app10/SpringDocApp10ViaDtoTest.java
@@ -0,0 +1,55 @@
+/*
+ *
+ * *
+ * * *
+ * * * * Copyright 2019-2024 the original author or authors.
+ * * * *
+ * * * * Licensed under the Apache License, Version 2.0 (the "License");
+ * * * * you may not use this file except in compliance with the License.
+ * * * * You may obtain a copy of the License at
+ * * * *
+ * * * * https://www.apache.org/licenses/LICENSE-2.0
+ * * * *
+ * * * * Unless required by applicable law or agreed to in writing, software
+ * * * * distributed under the License is distributed on an "AS IS" BASIS,
+ * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * * * * See the License for the specific language governing permissions and
+ * * * * limitations under the License.
+ * * *
+ * *
+ *
+ */
+
+package test.org.springdoc.api.app10;
+
+import org.junit.jupiter.api.Test;
+import org.springdoc.core.utils.Constants;
+import test.org.springdoc.api.AbstractSpringDocTest;
+
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.data.web.config.EnableSpringDataWebSupport;
+
+import static org.hamcrest.Matchers.is;
+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
+
+public class SpringDocApp10ViaDtoTest extends AbstractSpringDocTest {
+
+ @Override
+ @Test
+ public void testApp() throws Exception {
+ mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL))
+ .andExpect(status().isOk())
+ .andExpect(jsonPath("$.openapi", is("3.0.1")))
+ .andExpect(content().json(getContent("results/app10-via_dto.json"), true));
+ }
+
+ @SpringBootApplication
+ @EnableSpringDataWebSupport(pageSerializationMode = EnableSpringDataWebSupport.PageSerializationMode.VIA_DTO)
+ public static class SpringDocTestApp {
+
+ }
+
+}
diff --git a/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app9/FooConfiguration.java b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app9/FooConfiguration.java
index 11065e4b9..c5a21f1c1 100644
--- a/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app9/FooConfiguration.java
+++ b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app9/FooConfiguration.java
@@ -1,5 +1,7 @@
package test.org.springdoc.api.app9;
+import java.util.List;
+
import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
@@ -8,12 +10,10 @@
import io.swagger.v3.oas.models.media.Schema;
import io.swagger.v3.oas.models.security.SecurityScheme;
import io.swagger.v3.oas.models.tags.Tag;
-import org.springdoc.core.models.GroupedOpenApi;
+
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
-import java.util.List;
-
@Configuration
public class FooConfiguration {
@Bean
diff --git a/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app9/SpringDocApp9Test.java b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app9/SpringDocApp9Test.java
index ba02d6e00..2e4cab1b2 100644
--- a/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app9/SpringDocApp9Test.java
+++ b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app9/SpringDocApp9Test.java
@@ -18,9 +18,10 @@
package test.org.springdoc.api.app9;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
import test.org.springdoc.api.AbstractSpringDocTest;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
public class SpringDocApp9Test extends AbstractSpringDocTest {
@SpringBootApplication
diff --git a/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app9/application/FooController.java b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app9/application/FooController.java
index dd5864ae1..8600ded15 100644
--- a/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app9/application/FooController.java
+++ b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app9/application/FooController.java
@@ -1,17 +1,22 @@
package test.org.springdoc.api.app9.application;
+import java.util.List;
+import java.util.UUID;
+
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.MediaType;
-import org.springframework.web.bind.annotation.*;
-import test.org.springdoc.api.app9.application.dto.ResponseData;
import test.org.springdoc.api.app9.application.dto.FeedResponse;
+import test.org.springdoc.api.app9.application.dto.ResponseData;
-import java.util.List;
-import java.util.UUID;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseStatus;
+import org.springframework.web.bind.annotation.RestController;
@Tag(name = "ResponseDataController")
@RestController
@RequestMapping(value = "/some-route", produces = MediaType.APPLICATION_JSON_VALUE)
diff --git a/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app9/application/dto/FeedResponse.java b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app9/application/dto/FeedResponse.java
index 9fc1e3e66..a9819e55d 100644
--- a/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app9/application/dto/FeedResponse.java
+++ b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app9/application/dto/FeedResponse.java
@@ -1,15 +1,19 @@
package test.org.springdoc.api.app9.application.dto;
+import java.util.List;
+import java.util.UUID;
+
import com.fasterxml.jackson.annotation.JsonProperty;
import jakarta.validation.constraints.NotNull;
-import lombok.*;
+import lombok.AccessLevel;
+import lombok.Builder;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
import lombok.experimental.Accessors;
-import org.springframework.hateoas.IanaLinkRelations;
-import org.springframework.hateoas.RepresentationModel;
import test.org.springdoc.api.app9.application.FooController;
-import java.util.List;
-import java.util.UUID;
+import org.springframework.hateoas.IanaLinkRelations;
+import org.springframework.hateoas.RepresentationModel;
import static org.springframework.hateoas.server.mvc.WebMvcLinkBuilder.linkTo;
import static org.springframework.hateoas.server.mvc.WebMvcLinkBuilder.methodOn;
diff --git a/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app9/application/dto/ResponseData.java b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app9/application/dto/ResponseData.java
index 7d0860484..4481194c6 100644
--- a/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app9/application/dto/ResponseData.java
+++ b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app9/application/dto/ResponseData.java
@@ -1,13 +1,13 @@
package test.org.springdoc.api.app9.application.dto;
+import java.time.LocalDate;
+import java.util.UUID;
+
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Builder;
-import java.time.LocalDate;
-import java.util.UUID;
-
@Builder
public record ResponseData(
@JsonProperty(value = "DATA_ID", required = true)
diff --git a/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/resources/results/app10-direct.json b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/resources/results/app10-direct.json
new file mode 100644
index 000000000..886b96496
--- /dev/null
+++ b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/resources/results/app10-direct.json
@@ -0,0 +1,409 @@
+{
+ "openapi": "3.0.1",
+ "info": {
+ "title": "OpenAPI definition",
+ "version": "v0"
+ },
+ "servers": [
+ {
+ "url": "http://localhost",
+ "description": "Generated server url"
+ }
+ ],
+ "paths": {
+ "/paged-model-simple": {
+ "get": {
+ "tags": [
+ "hello-controller"
+ ],
+ "operationId": "pagedModelSimple",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "*/*": {
+ "schema": {
+ "$ref": "#/components/schemas/PagedModelString"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/paged-model-raw": {
+ "get": {
+ "tags": [
+ "hello-controller"
+ ],
+ "operationId": "pagedModelRaw",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "*/*": {
+ "schema": {
+ "$ref": "#/components/schemas/PagedModel"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/paged-model-complex": {
+ "get": {
+ "tags": [
+ "hello-controller"
+ ],
+ "operationId": "pagedModelComplex",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "*/*": {
+ "schema": {
+ "$ref": "#/components/schemas/PagedModelDummyListString"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/page-simple": {
+ "get": {
+ "tags": [
+ "hello-controller"
+ ],
+ "operationId": "pageSimple",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "*/*": {
+ "schema": {
+ "$ref": "#/components/schemas/PageString"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/page-raw": {
+ "get": {
+ "tags": [
+ "hello-controller"
+ ],
+ "operationId": "pageRaw",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "*/*": {
+ "schema": {
+ "$ref": "#/components/schemas/Page"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/page-complex": {
+ "get": {
+ "tags": [
+ "hello-controller"
+ ],
+ "operationId": "pageComplex",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "*/*": {
+ "schema": {
+ "$ref": "#/components/schemas/PageDummyListString"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "components": {
+ "schemas": {
+ "PageMetadata": {
+ "type": "object",
+ "properties": {
+ "size": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "number": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "totalElements": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "totalPages": {
+ "type": "integer",
+ "format": "int64"
+ }
+ }
+ },
+ "PagedModelString": {
+ "type": "object",
+ "properties": {
+ "content": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "page": {
+ "$ref": "#/components/schemas/PageMetadata"
+ }
+ }
+ },
+ "PagedModel": {
+ "type": "object",
+ "properties": {
+ "content": {
+ "type": "array",
+ "items": {
+ "type": "object"
+ }
+ },
+ "page": {
+ "$ref": "#/components/schemas/PageMetadata"
+ }
+ }
+ },
+ "DummyListString": {
+ "type": "object",
+ "properties": {
+ "value": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "PagedModelDummyListString": {
+ "type": "object",
+ "properties": {
+ "content": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/DummyListString"
+ }
+ },
+ "page": {
+ "$ref": "#/components/schemas/PageMetadata"
+ }
+ }
+ },
+ "PageString": {
+ "type": "object",
+ "properties": {
+ "totalPages": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "totalElements": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "pageable": {
+ "$ref": "#/components/schemas/PageableObject"
+ },
+ "first": {
+ "type": "boolean"
+ },
+ "last": {
+ "type": "boolean"
+ },
+ "size": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "content": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "number": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "sort": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/SortObject"
+ }
+ },
+ "numberOfElements": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "empty": {
+ "type": "boolean"
+ }
+ }
+ },
+ "PageableObject": {
+ "type": "object",
+ "properties": {
+ "paged": {
+ "type": "boolean"
+ },
+ "pageNumber": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "pageSize": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "offset": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "sort": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/SortObject"
+ }
+ },
+ "unpaged": {
+ "type": "boolean"
+ }
+ }
+ },
+ "SortObject": {
+ "type": "object",
+ "properties": {
+ "direction": {
+ "type": "string"
+ },
+ "nullHandling": {
+ "type": "string"
+ },
+ "ascending": {
+ "type": "boolean"
+ },
+ "property": {
+ "type": "string"
+ },
+ "ignoreCase": {
+ "type": "boolean"
+ }
+ }
+ },
+ "Page": {
+ "type": "object",
+ "properties": {
+ "totalPages": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "totalElements": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "pageable": {
+ "$ref": "#/components/schemas/PageableObject"
+ },
+ "first": {
+ "type": "boolean"
+ },
+ "last": {
+ "type": "boolean"
+ },
+ "size": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "content": {
+ "type": "array",
+ "items": {
+ "type": "object"
+ }
+ },
+ "number": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "sort": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/SortObject"
+ }
+ },
+ "numberOfElements": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "empty": {
+ "type": "boolean"
+ }
+ }
+ },
+ "PageDummyListString": {
+ "type": "object",
+ "properties": {
+ "totalPages": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "totalElements": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "pageable": {
+ "$ref": "#/components/schemas/PageableObject"
+ },
+ "first": {
+ "type": "boolean"
+ },
+ "last": {
+ "type": "boolean"
+ },
+ "size": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "content": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/DummyListString"
+ }
+ },
+ "number": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "sort": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/SortObject"
+ }
+ },
+ "numberOfElements": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "empty": {
+ "type": "boolean"
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/resources/results/app10-via_dto.json b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/resources/results/app10-via_dto.json
new file mode 100644
index 000000000..32cad61c1
--- /dev/null
+++ b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/resources/results/app10-via_dto.json
@@ -0,0 +1,213 @@
+{
+ "openapi": "3.0.1",
+ "info": {
+ "title": "OpenAPI definition",
+ "version": "v0"
+ },
+ "servers": [
+ {
+ "url": "http://localhost",
+ "description": "Generated server url"
+ }
+ ],
+ "paths": {
+ "/paged-model-simple": {
+ "get": {
+ "tags": [
+ "hello-controller"
+ ],
+ "operationId": "pagedModelSimple",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "*/*": {
+ "schema": {
+ "$ref": "#/components/schemas/PagedModelString"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/paged-model-raw": {
+ "get": {
+ "tags": [
+ "hello-controller"
+ ],
+ "operationId": "pagedModelRaw",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "*/*": {
+ "schema": {
+ "$ref": "#/components/schemas/PagedModel"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/paged-model-complex": {
+ "get": {
+ "tags": [
+ "hello-controller"
+ ],
+ "operationId": "pagedModelComplex",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "*/*": {
+ "schema": {
+ "$ref": "#/components/schemas/PagedModelDummyListString"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/page-simple": {
+ "get": {
+ "tags": [
+ "hello-controller"
+ ],
+ "operationId": "pageSimple",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "*/*": {
+ "schema": {
+ "$ref": "#/components/schemas/PagedModelString"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/page-raw": {
+ "get": {
+ "tags": [
+ "hello-controller"
+ ],
+ "operationId": "pageRaw",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "*/*": {
+ "schema": {
+ "$ref": "#/components/schemas/PagedModel"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/page-complex": {
+ "get": {
+ "tags": [
+ "hello-controller"
+ ],
+ "operationId": "pageComplex",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "*/*": {
+ "schema": {
+ "$ref": "#/components/schemas/PagedModelDummyListString"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "components": {
+ "schemas": {
+ "PageMetadata": {
+ "type": "object",
+ "properties": {
+ "size": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "number": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "totalElements": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "totalPages": {
+ "type": "integer",
+ "format": "int64"
+ }
+ }
+ },
+ "PagedModelString": {
+ "type": "object",
+ "properties": {
+ "content": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "page": {
+ "$ref": "#/components/schemas/PageMetadata"
+ }
+ }
+ },
+ "PagedModel": {
+ "type": "object",
+ "properties": {
+ "content": {
+ "type": "array",
+ "items": {
+ "type": "object"
+ }
+ },
+ "page": {
+ "$ref": "#/components/schemas/PageMetadata"
+ }
+ }
+ },
+ "DummyListString": {
+ "type": "object",
+ "properties": {
+ "value": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "PagedModelDummyListString": {
+ "type": "object",
+ "properties": {
+ "content": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/DummyListString"
+ }
+ },
+ "page": {
+ "$ref": "#/components/schemas/PageMetadata"
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/pom.xml b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/pom.xml
index e3c0655f7..5499ce7d1 100644
--- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/pom.xml
+++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/pom.xml
@@ -2,7 +2,7 @@
org.springdoc
springdoc-openapi-tests
- 2.5.0
+ 2.6.0
4.0.0
diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app105-3.json b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app105-3.json
index bccc4af1b..ff9c8392e 100644
--- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app105-3.json
+++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app105-3.json
@@ -34,12 +34,12 @@
"requestBody": {
"description": "Pet object that needs to be added to the store",
"content": {
- "application/json": {
+ "application/xml": {
"schema": {
"$ref": "#/components/schemas/Pet"
}
},
- "application/xml": {
+ "application/json": {
"schema": {
"$ref": "#/components/schemas/Pet"
}
@@ -87,12 +87,12 @@
"requestBody": {
"description": "Pet object that needs to be added to the store",
"content": {
- "application/json": {
+ "application/xml": {
"schema": {
"$ref": "#/components/schemas/Pet"
}
},
- "application/xml": {
+ "application/json": {
"schema": {
"$ref": "#/components/schemas/Pet"
}
@@ -128,142 +128,6 @@
]
}
},
- "/pet/findByStatus": {
- "get": {
- "tags": [
- "pet"
- ],
- "summary": "Finds Pets by status",
- "description": "Multiple status values can be provided with comma separated strings",
- "operationId": "findPetsByStatus",
- "parameters": [
- {
- "name": "status",
- "in": "query",
- "description": "Status values that need to be considered for filter",
- "required": true,
- "schema": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Pet"
- }
- }
- },
- "application/xml": {
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Pet"
- }
- }
- }
- }
- },
- "400": {
- "description": "Invalid status value",
- "content": {
- "*/*": {
- "schema": {
- "type": "object",
- "additionalProperties": {
- "type": "object"
- }
- }
- }
- }
- }
- },
- "security": [
- {
- "petstore_auth": [
- "write:pets",
- "read:pets"
- ]
- }
- ]
- }
- },
- "/pet/findByTags": {
- "get": {
- "tags": [
- "pet"
- ],
- "summary": "Finds Pets by tags",
- "description": "Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",
- "operationId": "findPetsByTags",
- "parameters": [
- {
- "name": "tags",
- "in": "query",
- "description": "Tags to filter by",
- "required": true,
- "schema": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Pet"
- }
- }
- },
- "application/xml": {
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Pet"
- }
- }
- }
- }
- },
- "400": {
- "description": "Invalid tag value",
- "content": {
- "*/*": {
- "schema": {
- "type": "object",
- "additionalProperties": {
- "type": "object"
- }
- }
- }
- }
- }
- },
- "security": [
- {
- "petstore_auth": [
- "write:pets",
- "read:pets"
- ]
- }
- ]
- }
- },
"/pet/{petId}": {
"get": {
"tags": [
@@ -285,21 +149,6 @@
}
],
"responses": {
- "200": {
- "description": "successful operation",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Pet"
- }
- },
- "application/xml": {
- "schema": {
- "$ref": "#/components/schemas/Pet"
- }
- }
- }
- },
"400": {
"description": "Invalid ID supplied",
"content": {
@@ -316,15 +165,30 @@
"404": {
"description": "Pet not found",
"content": {
- "application/json": {
+ "application/xml": {
"schema": {
"$ref": "#/components/schemas/Pet"
}
},
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Pet"
+ }
+ }
+ }
+ },
+ "200": {
+ "description": "successful operation",
+ "content": {
"application/xml": {
"schema": {
"$ref": "#/components/schemas/Pet"
}
+ },
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Pet"
+ }
}
}
}
@@ -504,6 +368,19 @@
}
},
"responses": {
+ "400": {
+ "description": "the map",
+ "content": {
+ "*/*": {
+ "schema": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ },
"200": {
"description": "successful operation",
"content": {
@@ -513,9 +390,111 @@
}
}
}
+ }
+ },
+ "security": [
+ {
+ "petstore_auth": [
+ "write:pets",
+ "read:pets"
+ ]
+ }
+ ]
+ }
+ },
+ "/pet/findByTags": {
+ "get": {
+ "tags": [
+ "pet"
+ ],
+ "summary": "Finds Pets by tags",
+ "description": "Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",
+ "operationId": "findPetsByTags",
+ "parameters": [
+ {
+ "name": "tags",
+ "in": "query",
+ "description": "Tags to filter by",
+ "required": true,
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ ],
+ "responses": {
+ "400": {
+ "description": "Invalid tag value",
+ "content": {
+ "*/*": {
+ "schema": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object"
+ }
+ }
+ }
+ }
},
+ "200": {
+ "description": "successful operation",
+ "content": {
+ "application/xml": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Pet"
+ }
+ }
+ },
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Pet"
+ }
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "petstore_auth": [
+ "write:pets",
+ "read:pets"
+ ]
+ }
+ ]
+ }
+ },
+ "/pet/findByStatus": {
+ "get": {
+ "tags": [
+ "pet"
+ ],
+ "summary": "Finds Pets by status",
+ "description": "Multiple status values can be provided with comma separated strings",
+ "operationId": "findPetsByStatus",
+ "parameters": [
+ {
+ "name": "status",
+ "in": "query",
+ "description": "Status values that need to be considered for filter",
+ "required": true,
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ ],
+ "responses": {
"400": {
- "description": "the map",
+ "description": "Invalid status value",
"content": {
"*/*": {
"schema": {
@@ -526,6 +505,27 @@
}
}
}
+ },
+ "200": {
+ "description": "successful operation",
+ "content": {
+ "application/xml": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Pet"
+ }
+ }
+ },
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Pet"
+ }
+ }
+ }
+ }
}
},
"security": [
@@ -553,26 +553,8 @@
"type": "string",
"description": "The Name."
}
- }
- },
- "ModelApiResponse": {
- "type": "object",
- "properties": {
- "code": {
- "type": "integer",
- "description": "The Code.",
- "format": "int32"
- },
- "message": {
- "type": "string",
- "description": "The Message."
- },
- "type": {
- "type": "string",
- "description": "The Type."
- }
},
- "description": "The type Model api response."
+ "description": "The type Category."
},
"Pet": {
"required": [
@@ -581,14 +563,14 @@
],
"type": "object",
"properties": {
- "category": {
- "$ref": "#/components/schemas/Category"
- },
"id": {
"type": "integer",
"description": "The Id.",
"format": "int64"
},
+ "category": {
+ "$ref": "#/components/schemas/Category"
+ },
"name": {
"type": "string",
"description": "The Name.",
@@ -601,6 +583,13 @@
"type": "string"
}
},
+ "tags": {
+ "type": "array",
+ "description": "The Tags.",
+ "items": {
+ "$ref": "#/components/schemas/Tag"
+ }
+ },
"status": {
"type": "string",
"description": "pet status in the store",
@@ -609,13 +598,6 @@
"pending",
"sold"
]
- },
- "tags": {
- "type": "array",
- "description": "The Tags.",
- "items": {
- "$ref": "#/components/schemas/Tag"
- }
}
},
"description": "The type Pet."
@@ -632,7 +614,27 @@
"type": "string",
"description": "The Name."
}
- }
+ },
+ "description": "The type Tag."
+ },
+ "ModelApiResponse": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "description": "The Code.",
+ "format": "int32"
+ },
+ "type": {
+ "type": "string",
+ "description": "The Type."
+ },
+ "message": {
+ "type": "string",
+ "description": "The Message."
+ }
+ },
+ "description": "The type Model api response."
}
},
"securitySchemes": {
@@ -646,8 +648,8 @@
"implicit": {
"authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
"scopes": {
- "read:pets": "read your pets",
- "write:pets": "modify pets in your account"
+ "write:pets": "modify pets in your account",
+ "read:pets": "read your pets"
}
}
}
diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app2.json b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app2.json
index a0c5620f9..3a0de8a56 100644
--- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app2.json
+++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app2.json
@@ -193,12 +193,12 @@
"requestBody": {
"description": "Pet object that needs to be added to the store",
"content": {
- "application/json": {
+ "application/xml": {
"schema": {
"$ref": "#/components/schemas/Pet"
}
},
- "application/xml": {
+ "application/json": {
"schema": {
"$ref": "#/components/schemas/Pet"
}
@@ -246,12 +246,12 @@
"requestBody": {
"description": "Pet object that needs to be added to the store",
"content": {
- "application/json": {
+ "application/xml": {
"schema": {
"$ref": "#/components/schemas/Pet"
}
},
- "application/xml": {
+ "application/json": {
"schema": {
"$ref": "#/components/schemas/Pet"
}
@@ -1163,7 +1163,8 @@
"type": "string",
"description": "The Name."
}
- }
+ },
+ "description": "The type Category."
},
"Pet": {
"required": [
@@ -1223,7 +1224,8 @@
"type": "string",
"description": "The Name."
}
- }
+ },
+ "description": "The type Tag."
},
"Order": {
"type": "object",
diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app38.json b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app38.json
index b6127e78c..d1e0f9d27 100644
--- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app38.json
+++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app38.json
@@ -31,11 +31,8 @@
"content": {
"*/*": {
"schema": {
- "type": "array",
- "items": {
- "type": "string",
- "format": "byte"
- }
+ "type": "string",
+ "format": "byte"
}
}
}
@@ -45,4 +42,4 @@
}
},
"components": {}
-}
\ No newline at end of file
+}
diff --git a/springdoc-openapi-tests/springdoc-openapi-kotlin-webflux-tests/pom.xml b/springdoc-openapi-tests/springdoc-openapi-kotlin-webflux-tests/pom.xml
index 0b104114e..c16a98152 100644
--- a/springdoc-openapi-tests/springdoc-openapi-kotlin-webflux-tests/pom.xml
+++ b/springdoc-openapi-tests/springdoc-openapi-kotlin-webflux-tests/pom.xml
@@ -2,7 +2,7 @@
springdoc-openapi-tests
org.springdoc
- 2.5.0
+ 2.6.0
4.0.0
springdoc-openapi-kotlin-webflux-tests
diff --git a/springdoc-openapi-tests/springdoc-openapi-kotlin-webmvc-tests/pom.xml b/springdoc-openapi-tests/springdoc-openapi-kotlin-webmvc-tests/pom.xml
index 58eb8b1e3..d1fc090ec 100644
--- a/springdoc-openapi-tests/springdoc-openapi-kotlin-webmvc-tests/pom.xml
+++ b/springdoc-openapi-tests/springdoc-openapi-kotlin-webmvc-tests/pom.xml
@@ -2,7 +2,7 @@
springdoc-openapi-tests
org.springdoc
- 2.5.0
+ 2.6.0
4.0.0
springdoc-openapi-kotlin-webmvc-tests
@@ -78,6 +78,36 @@