diff --git a/CHANGELOG.md b/CHANGELOG.md index 47b5a8111..1a6a50d9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,16 +5,100 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [2.5.0] - 2024-04-01 +## [2.7.0] - 2024-23-11 + +### Added +- #2777 - Add SortAsQueryParam annotation + +### Changed +- Upgrade spring-boot to 3.4.0 +- Upgrade swagger-ui to 5.18.2 +- Upgrade spring-security-oauth2-authorization-server to 1.4.0 + +## [2.7.0-RC1] - 2024-11-06 + +### Added +- #2649 - Add Encoding to multiple files and JSON payloads request test case +- #2653 - Trim indent apply schema description +- #2664 - Refactor Replace hardcoded schema prefix length +- #2509, #2668 - Replace swagger urls in org.springdoc.core.properties.AbstractSwaggerUiConfigProperties#urls only if url is changed +- #2727 - Display nullable request body with map type +- #2746 - Readme.md add gradle import +- #2760 - Added support for RequestBody as a meta-annotation +- #2703 - Display nullable request body with map type +- #2657 - Add support for OAS v3.1 webhooks + +### Changed +- Upgrade spring-boot to 3.4.0-RC1 +- Upgrade swagger-core to 2.2.25 +- Upgrade swagger-ui to 5.18.1 +- Upgrade spring-cloud-function to 4.2.0-M1 +- Upgrade spring-security-oauth2-authorization-server to 1.4.0-M2 + +### Fixed +- #2752 - Swagger doesn't work after custom annotation replacing request parameters +- #2747 - Move to webjars-locator-lite, in preparation for spring-boot 3.4 GA +- #2705 - @Schema oneOf config is ignored when generate the api-docs +- #2744 - SpringDocUI doest add Javadoc into swagger from abstract class +- #2708 - Spring Boot (Webflux) - Swagger UI - redirect URI does not include Gateway Prefix +- #2725 - Serialization to openapi of org.springframework.data.domain.Sort is wrong for Spring Boot >2.x +- #2740 - Swagger-ui ignores property springdoc.swagger-ui.supported-submit-methods +- #2733 - Bad schema return type when created a generic wrapper class for response entity +- #2687 - Failed to load api definition after spring boot 3.4.0-M2 +- #2642 - Calling Swagger UI via different context paths fails +- #2709 - Annotation @Hidden on rest controller class level doesn't work due to spring default proxying mechanism CGLIB +- #2642 - Calling Swagger UI via different context paths fails +- #2663 - Content definition in @ApiResponse remove schema generated based on the returned value +- #2646 - The operationId is unnecessarily deduplicated for a requestBody with multiple content types +- #2643 - UpperSnakeCaseStrategy is not working with spring boot and ParameterObject +- #2640 - @JsonUnwrapped is ignored when PolymorphicConverter is enabled +- #2638 - Boolean Parameter with @Schema Annotation Changes Type to string in OpenAPI Documentation +- #2659 - Fix typo in SpringSecurityLoginEndpointCustomizer method name +- #2660 - Update Response Code +- #2442, #2669 - Fix SpringDocApp193Test for Java 21 and above +- #2671 - Ensure default media type order is preserved using LinkedHashSet in mergeArrays +- #2711 - Missing descriptions on Kotlin ByteArray fields +- #2733 - Bad schema return type when created a generic wrapper class for response entity + +## [2.6.0] - 2024-06-30 ### Added +- #2561 - NPE occurs when outputting an OpenAPI document since 2.5.0 +- #2579 - Add support for leading tab characters with trim-kotlin-indent. +- #2589 - Pass HttpRequest to ServerBaseUrlCustomizer +- #2596, #2600 - consumes and produces calculation. Fixes +- #2625, #2626 - Replace Page schema with PagedModel when pageSerializationMode is set to VIA_DTO +- #2627 - Ensure compatibility with previous version of spring data +- #2576 - GroupedApi orders by displayName instead of name. +- #2584 - Dynamically define ApiGroups does not work. +- #2595 - Spring security support of @RegisteredOAuth2AuthorizedClient + +### Changed +- Upgrade spring-boot to 3.3.0 +- Upgrade swagger-core to 2.2.22 +- Upgrade swagger-ui to 5.17.14 +- Upgrade spring-cloud-function to 4.1.2 +- Upgrade spring-security-oauth2-authorization-server to 1.3.0 +### Fixed +- #2577 - Fix missing exception response types in OpenAPI spec +- #2591 - When an entity class contains fields of Class type, an infinite loop. +- #2603 - PolymorphicModelConverter only handles direct subtypes and misses indirect. +- #2606 - Spring Authorization Server Metadata Endpoint not compatible. +- #2621 - Content-type for POST endpoints with multipart/form-data does not work since v2.4.0. +- #2622 - Kotlin enums are always marked as required if used in Java controllers. +- #2601 - Multiple Superclasses Are Not Mapped To Multiple allOf If Used In Different Services. +- #2597 - Polymorphic fields on polymorphic parents don't get correct oneOf docs generated. + +## [2.5.0] - 2024-04-01 + +### Added - #2318 - Add Info to GroupedOpenAPI properties - #2554 - Remove duplicate words from comments - #2418 - Improve support for externalizing strings in generated openapi - #2535 - Add 'springdoc.trim-kotlin-indent' property to handle Kotlin multiline string indentation -### Changed +### Changed - Upgrade spring-boot to 3.2.4 - Upgrade swagger-core to 2.2.21 - Upgrade swagger-ui to 5.13.0 @@ -28,19 +112,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [2.4.0] - 2024-03-12 ### Added - - #2443 - Respect schema annotations when using spring mvc with kotlin - #2492, #2488 - Support dynamic evaluation of description field in the RequestBody - #2510 - Option to disable root api-docs path when using groups ### Changed - - Upgrade spring-boot to 3.2.3 - Upgrade swagger-core to 2.2.20 - Upgrade swagger-ui to 5.11.8 ### Fixed - - #2453 - Fix CODE_OF_CONDUCT.md links - #2454 - Fix typo in SwaggerWelcomeWebMvc - #2507 - Fix typo in Constants @@ -63,7 +144,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [2.3.0] - 2023-12-03 ### Added - - #2340 - Add support OIDC with Spring Authorization Server - #2345 - Support Schema added in OpenAPI Specification v3.1 - #2387 - Support get javadoc description from getter method @@ -73,7 +153,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - #2438, #2315 - Support for @JsonProperty with Javadoc Change in springdoc-openapi ### Changed - - Upgrade spring-boot to 3.2.0 - Upgrade swagger-core to 2.2.19 - Upgrade swagger-ui to 5.10.3 @@ -92,7 +171,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [2.2.0] - 2023-08-06 ### Added - - #2189 - Add support for swagger-ui.url property - #2200 - Support schema.requiredMode() on ParameterObject - #2309 - Added function to preload by specifying locale diff --git a/README.md b/README.md index 1295fcf39..65257d011 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,7 @@ This is a community-based project, not maintained by the Spring Framework Contri * Add the `springdoc-openapi-ui` library to the list of your project dependencies (No additional configuration is needed): +Maven ```xml org.springdoc @@ -106,6 +107,11 @@ This is a community-based project, not maintained by the Spring Framework Contri ``` +Gradle +```groovy +implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:latest' +``` + * This step is optional: For custom path of the swagger documentation in HTML format, add a custom springdoc property, in your spring-boot configuration file: @@ -144,6 +150,7 @@ springdoc.swagger-ui.path=/swagger-ui.html * Add the library to the list of your project dependencies. (No additional configuration is needed) +Maven ```xml org.springdoc @@ -152,6 +159,11 @@ springdoc.swagger-ui.path=/swagger-ui.html ``` +Gradle +```groovy +implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:latest' +``` + * This step is optional: For custom path of the OpenAPI documentation in Json format, add a custom springdoc property, in your spring-boot configuration file: @@ -189,6 +201,7 @@ and `@SecurityScheme` annotations within a Spring managed bean. * Add the library to the list of your project dependencies (No additional configuration is needed) +Maven ```xml org.springdoc @@ -197,6 +210,11 @@ and `@SecurityScheme` annotations within a Spring managed bean. ``` +Gradle +```groovy +implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:latest' +``` + * This step is optional: For custom path of the swagger documentation in HTML format, add a custom springdoc property, in your spring-boot configuration file: diff --git a/pom.xml b/pom.xml index a5c49cdbb..68f3029b2 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 org.springdoc springdoc-openapi - 2.5.0 + 2.7.0 pom Spring openapi documentation Spring openapi documentation @@ -11,7 +11,7 @@ org.springframework.boot spring-boot-starter-parent - 3.2.4 + 3.4.0 @@ -35,7 +35,7 @@ scm:git:git@github.com:springdoc/springdoc-openapi.git scm:git:git@github.com:springdoc/springdoc-openapi.git - v2.5.0 + v2.7.0 @@ -60,15 +60,13 @@ 1.6 2.5.3 1.6.8 - 2.2.21 - 5.13.0 + 2.2.25 + 5.18.2 1.13.1 - 2.1 - 1.1 0.9.1 0.15.0 - 4.0.0 - 1.0.1 + 4.2.0-M1 + 1.4.0 @@ -321,6 +319,14 @@ true + + spring-milestones + Spring Milestones + https://repo.spring.io/milestone + + false + + diff --git a/springdoc-openapi-starter-common/pom.xml b/springdoc-openapi-starter-common/pom.xml index 958f25193..d70197f4c 100644 --- a/springdoc-openapi-starter-common/pom.xml +++ b/springdoc-openapi-starter-common/pom.xml @@ -3,7 +3,7 @@ org.springdoc springdoc-openapi - 2.5.0 + 2.7.0 springdoc-openapi-starter-common @@ -51,6 +51,11 @@ spring-security-oauth2-authorization-server true + + org.springframework.security + spring-security-oauth2-client + true + com.fasterxml.jackson.module diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/api/AbstractOpenApiResource.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/api/AbstractOpenApiResource.java index 2dda6e1c2..c1ce2781a 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/api/AbstractOpenApiResource.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/api/AbstractOpenApiResource.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.api; @@ -49,6 +51,8 @@ import java.util.concurrent.Executors; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import java.util.stream.Collectors; import com.fasterxml.jackson.annotation.JsonView; @@ -60,6 +64,8 @@ import io.swagger.v3.core.filter.SpecFilter; import io.swagger.v3.core.util.ReflectionUtils; import io.swagger.v3.oas.annotations.Hidden; +import io.swagger.v3.oas.annotations.Webhook; +import io.swagger.v3.oas.annotations.Webhooks; import io.swagger.v3.oas.annotations.callbacks.Callback; import io.swagger.v3.oas.annotations.enums.ParameterIn; import io.swagger.v3.oas.models.Components; @@ -69,6 +75,7 @@ import io.swagger.v3.oas.models.PathItem.HttpMethod; import io.swagger.v3.oas.models.Paths; import io.swagger.v3.oas.models.SpecVersion; +import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.media.StringSchema; import io.swagger.v3.oas.models.parameters.Parameter; import io.swagger.v3.oas.models.responses.ApiResponses; @@ -100,6 +107,7 @@ import org.springdoc.core.service.GenericResponseService; import org.springdoc.core.service.OpenAPIService; import org.springdoc.core.service.OperationService; +import org.springdoc.core.utils.PropertyResolverUtils; import org.springdoc.core.utils.SpringDocUtils; import org.springframework.aop.support.AopUtils; @@ -109,6 +117,7 @@ import org.springframework.core.annotation.AnnotationUtils; import org.springframework.core.env.Environment; import org.springframework.util.AntPathMatcher; +import org.springframework.util.ClassUtils; import org.springframework.util.CollectionUtils; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; @@ -208,17 +217,23 @@ public abstract class AbstractOpenApiResource extends SpecFilter { */ private final Lock reentrantLock = new ReentrantLock(); + /** + * The Path pattern. + */ + private final Pattern pathPattern = Pattern.compile("\\{(.*?)}"); + + /** * Instantiates a new Abstract open api resource. * - * @param groupName the group name + * @param groupName the group name * @param openAPIBuilderObjectFactory the open api builder object factory - * @param requestBuilder the request builder - * @param responseBuilder the response builder - * @param operationParser the operation parser - * @param springDocConfigProperties the spring doc config properties - * @param springDocProviders the spring doc providers - * @param springDocCustomizers the spring doc customizers + * @param requestBuilder the request builder + * @param responseBuilder the response builder + * @param operationParser the operation parser + * @param springDocConfigProperties the spring doc config properties + * @param springDocProviders the spring doc providers + * @param springDocCustomizers the spring doc customizers */ protected AbstractOpenApiResource(String groupName, ObjectFactory openAPIBuilderObjectFactory, AbstractRequestService requestBuilder, @@ -237,7 +252,8 @@ protected AbstractOpenApiResource(String groupName, ObjectFactory this.getOpenApi(Locale.forLanguageTag(locale))); } @@ -301,7 +317,7 @@ public static boolean containsResponseBody(HandlerMethod handlerMethod) { * @return the boolean */ public static boolean isHiddenRestControllers(Class rawClass) { - return HIDDEN_REST_CONTROLLERS.stream().anyMatch(clazz -> clazz.isAssignableFrom(rawClass)); + return HIDDEN_REST_CONTROLLERS.stream().anyMatch(clazz -> ClassUtils.getUserClass(clazz).isAssignableFrom(rawClass)); } /** @@ -341,9 +357,10 @@ protected OpenAPI getOpenApi(Locale locale) { .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (a1, a2) -> a1)); Map findControllerAdvice = openAPIService.getControllerAdviceMap(); - if (OpenApiVersion.OPENAPI_3_1 == springDocConfigProperties.getApiDocs().getVersion()){ + if (OpenApiVersion.OPENAPI_3_1 == springDocConfigProperties.getApiDocs().getVersion()) { openAPI.openapi(OpenApiVersion.OPENAPI_3_1.getVersion()); openAPI.specVersion(SpecVersion.V31); + calculateWebhooks(openAPI, locale); } if (springDocConfigProperties.isDefaultOverrideWithGenericResponse()) { if (!CollectionUtils.isEmpty(mappingsMap)) @@ -352,6 +369,9 @@ protected OpenAPI getOpenApi(Locale locale) { } getPaths(mappingsMap, finalLocale, openAPI); + if (springDocConfigProperties.isTrimKotlinIndent()) + this.trimIndent(openAPI); + Optional cloudFunctionProviderOptional = springDocProviders.getSpringCloudFunctionProvider(); cloudFunctionProviderOptional.ifPresent(cloudFunctionProvider -> { List routerOperationList = cloudFunctionProvider.getRouterOperations(openAPI); @@ -368,7 +388,7 @@ protected OpenAPI getOpenApi(Locale locale) { if (springDocConfigProperties.isRemoveBrokenReferenceDefinitions()) this.removeBrokenReferenceDefinitions(openAPI); - // run the optional customisers + // run the optional customizers List servers = openAPI.getServers(); List serversCopy = null; try { @@ -384,7 +404,6 @@ protected OpenAPI getOpenApi(Locale locale) { if (!CollectionUtils.isEmpty(openAPI.getServers()) && !openAPI.getServers().equals(serversCopy)) openAPIService.setServersPresent(true); - openAPIService.setCachedOpenAPI(openAPI, finalLocale); LOGGER.info("Init duration for springdoc-openapi is: {} ms", @@ -396,28 +415,120 @@ protected OpenAPI getOpenApi(Locale locale) { openAPIService.updateServers(openAPI); } openAPIService.updateServers(openAPI); - return openAPI; } + return openAPI; + } finally { this.reentrantLock.unlock(); } } + /** + * Indents are removed for properties that are mainly used as “explanations” using Open API. + * + * @param openAPI the open api + */ + private void trimIndent(OpenAPI openAPI) { + trimComponents(openAPI); + trimPaths(openAPI); + } + + /** + * Trim the indent for descriptions in the 'components' of open api. + * + * @param openAPI the open api + */ + private void trimComponents(OpenAPI openAPI) { + final PropertyResolverUtils propertyResolverUtils = operationParser.getPropertyResolverUtils(); + if (openAPI.getComponents() == null || openAPI.getComponents().getSchemas() == null) { + return; + } + for (Schema schema : openAPI.getComponents().getSchemas().values()) { + schema.description(propertyResolverUtils.trimIndent(schema.getDescription())); + if (schema.getProperties() == null) { + continue; + } + for (Object prop : schema.getProperties().values()) { + if (prop instanceof Schema schemaProp) { + schemaProp.setDescription(propertyResolverUtils.trimIndent(schemaProp.getDescription())); + } + } + } + } + + /** + * Trim the indent for descriptions in the 'paths' of open api. + * + * @param openAPI the open api + */ + private void trimPaths(OpenAPI openAPI) { + final PropertyResolverUtils propertyResolverUtils = operationParser.getPropertyResolverUtils(); + if (openAPI.getPaths() == null) { + return; + } + for (PathItem value : openAPI.getPaths().values()) { + value.setDescription(propertyResolverUtils.trimIndent(value.getDescription())); + trimIndentOperation(value.getGet()); + trimIndentOperation(value.getPut()); + trimIndentOperation(value.getPost()); + trimIndentOperation(value.getDelete()); + trimIndentOperation(value.getOptions()); + trimIndentOperation(value.getHead()); + trimIndentOperation(value.getPatch()); + trimIndentOperation(value.getTrace()); + } + } + + /** + * Trim the indent for 'operation' + * + * @param operation the operation + */ + private void trimIndentOperation(Operation operation) { + final PropertyResolverUtils propertyResolverUtils = operationParser.getPropertyResolverUtils(); + if (operation == null) { + return; + } + operation.setSummary(propertyResolverUtils.trimIndent(operation.getSummary())); + operation.setDescription(propertyResolverUtils.trimIndent(operation.getDescription())); + } + /** * Gets paths. * * @param findRestControllers the find rest controllers - * @param locale the locale - * @param openAPI the open api + * @param locale the locale + * @param openAPI the open api */ protected abstract void getPaths(Map findRestControllers, Locale locale, OpenAPI openAPI); + + /** + * Calculate webhooks. + * + * @param calculatedOpenAPI the calculated open api + * @param locale the locale + */ + protected void calculateWebhooks(OpenAPI calculatedOpenAPI, Locale locale) { + Webhooks[] webhooksAttr = openAPIService.getWebhooks(); + var webhooks = Arrays.stream(webhooksAttr).map(Webhooks::value).flatMap(Arrays::stream).toArray(Webhook[]::new); + Arrays.stream(webhooks).forEach(webhook -> { + io.swagger.v3.oas.annotations.Operation apiOperation = webhook.operation(); + Operation operation = new Operation(); + MethodAttributes methodAttributes = new MethodAttributes(springDocConfigProperties.getDefaultConsumesMediaType(), + springDocConfigProperties.getDefaultProducesMediaType(), locale); + operationParser.parse(apiOperation, operation, calculatedOpenAPI, methodAttributes); + PathItem pathItem = new PathItem().post(operation); + calculatedOpenAPI.addWebhooks(webhook.name(), pathItem); + }); + } + /** * Calculate path. * - * @param handlerMethod the handler method + * @param handlerMethod the handler method * @param routerOperation the router operation - * @param locale the locale - * @param openAPI the open api + * @param locale the locale + * @param openAPI the open api */ protected void calculatePath(HandlerMethod handlerMethod, RouterOperation routerOperation, Locale locale, OpenAPI openAPI) { routerOperation = customizeRouterOperation(routerOperation, handlerMethod); @@ -525,17 +636,28 @@ protected void calculatePath(HandlerMethod handlerMethod, RouterOperation router operation = customizeOperation(operation, handlerMethod); PathItem pathItemObject = buildPathItem(requestMethod, operation, operationPath, paths); - paths.addPathItem(operationPath, pathItemObject); + + if (!StringUtils.contains(operationPath, "**")) { + if(StringUtils.contains(operationPath,"*")){ + Matcher matcher = pathPattern.matcher(operationPath); + while (matcher.find()) { + String pathParam = matcher.group(1); + String newPathParam = pathParam.replace("*", ""); + operationPath = operationPath.replace("{" + pathParam + "}", "{" + newPathParam + "}"); + } + } + paths.addPathItem(operationPath, pathItemObject); + } } } /** * Build callbacks. * - * @param openAPI the open api + * @param openAPI the open api * @param methodAttributes the method attributes - * @param operation the operation - * @param apiCallbacks the api callbacks + * @param operation the operation + * @param apiCallbacks the api callbacks */ private void buildCallbacks(OpenAPI openAPI, MethodAttributes methodAttributes, Operation operation, Set apiCallbacks) { if (!CollectionUtils.isEmpty(apiCallbacks)) @@ -547,8 +669,8 @@ private void buildCallbacks(OpenAPI openAPI, MethodAttributes methodAttributes, * Calculate path. * * @param routerOperationList the router operation list - * @param locale the locale - * @param openAPI the open api + * @param locale the locale + * @param openAPI the open api */ protected void calculatePath(List routerOperationList, Locale locale, OpenAPI openAPI) { ApplicationContext applicationContext = openAPIService.getContext(); @@ -597,7 +719,8 @@ else if (routerOperation.getOperationModel() != null && StringUtils.isNotBlank(r * Calculate path. * * @param routerOperation the router operation - * @param locale the locale + * @param locale the locale + * @param openAPI the open api */ protected void calculatePath(RouterOperation routerOperation, Locale locale, OpenAPI openAPI) { routerOperation = customizeDataRestRouterOperation(routerOperation); @@ -623,7 +746,7 @@ protected void calculatePath(RouterOperation routerOperation, Locale locale, Ope if (apiOperation != null) openAPI = operationParser.parse(apiOperation, operation, openAPI, methodAttributes); - String operationId = operationParser.getOperationId(operation.getOperationId(), openAPI); + String operationId = operation.getOperationId(); operation.setOperationId(operationId); fillParametersList(operation, queryParams, methodAttributes); @@ -650,9 +773,9 @@ protected void calculatePath(RouterOperation routerOperation, Locale locale, Ope * @return the router operation */ private RouterOperation customizeDataRestRouterOperation(RouterOperation routerOperation) { - Optional> optionalDataRestRouterOperationCustomizers = springDocCustomizers.getDataRestRouterOperationCustomizers(); + Optional> optionalDataRestRouterOperationCustomizers = springDocCustomizers.getDataRestRouterOperationCustomizers(); if (optionalDataRestRouterOperationCustomizers.isPresent()) { - List dataRestRouterOperationCustomizerList = optionalDataRestRouterOperationCustomizers.get(); + Set dataRestRouterOperationCustomizerList = optionalDataRestRouterOperationCustomizers.get(); for (DataRestRouterOperationCustomizer dataRestRouterOperationCustomizer : dataRestRouterOperationCustomizerList) { routerOperation = dataRestRouterOperationCustomizer.customize(routerOperation); } @@ -663,13 +786,15 @@ private RouterOperation customizeDataRestRouterOperation(RouterOperation routerO /** * Calculate path. * - * @param handlerMethod the handler method - * @param operationPath the operation path + * @param handlerMethod the handler method + * @param operationPath the operation path * @param requestMethods the request methods - * @param consumes the consumes - * @param produces the produces - * @param headers the headers - * @param locale the locale + * @param consumes the consumes + * @param produces the produces + * @param headers the headers + * @param params the params + * @param locale the locale + * @param openAPI the open api */ protected void calculatePath(HandlerMethod handlerMethod, String operationPath, Set requestMethods, String[] consumes, String[] produces, String[] headers, String[] params, Locale locale, OpenAPI openAPI) { @@ -679,10 +804,10 @@ protected void calculatePath(HandlerMethod handlerMethod, String operationPath, /** * Gets router function paths. * - * @param beanName the bean name + * @param beanName the bean name * @param routerFunctionVisitor the router function visitor - * @param locale the locale - * @param openAPI the open api + * @param locale the locale + * @param openAPI the open api */ protected void getRouterFunctionPaths(String beanName, AbstractRouterFunctionVisitor routerFunctionVisitor, Locale locale, OpenAPI openAPI) { @@ -718,9 +843,9 @@ protected void getRouterFunctionPaths(String beanName, AbstractRouterFunctionVis * * @param handlerMethod the handler method * @param operationPath the operation path - * @param produces the produces - * @param consumes the consumes - * @param headers the headers + * @param produces the produces + * @param consumes the consumes + * @param headers the headers * @return the boolean */ protected boolean isFilterCondition(HandlerMethod handlerMethod, String operationPath, String[] produces, String[] consumes, String[] headers) { @@ -746,7 +871,7 @@ protected boolean isMethodToFilter(HandlerMethod handlerMethod) { * Is condition to match boolean. * * @param existingConditions the existing conditions - * @param conditionType the condition type + * @param conditionType the condition type * @return the boolean */ protected boolean isConditionToMatch(String[] existingConditions, ConditionType conditionType) { @@ -838,15 +963,15 @@ protected String decode(String requestURI) { * @return the boolean */ protected boolean isAdditionalRestController(Class rawClass) { - return ADDITIONAL_REST_CONTROLLERS.stream().anyMatch(clazz -> clazz.isAssignableFrom(rawClass)); + return ADDITIONAL_REST_CONTROLLERS.stream().anyMatch(clazz -> ClassUtils.getUserClass(clazz).isAssignableFrom(rawClass)); } /** * Is rest controller boolean. * * @param restControllers the rest controllers - * @param handlerMethod the handler method - * @param operationPath the operation path + * @param handlerMethod the handler method + * @param operationPath the operation path * @return the boolean */ protected boolean isRestController(Map restControllers, HandlerMethod handlerMethod, @@ -871,14 +996,14 @@ protected Set getDefaultAllowedHttpMethods() { /** * Customise operation. * - * @param operation the operation + * @param operation the operation * @param handlerMethod the handler method * @return the operation */ protected Operation customizeOperation(Operation operation, HandlerMethod handlerMethod) { - Optional> optionalOperationCustomizers = springDocCustomizers.getOperationCustomizers(); + Optional> optionalOperationCustomizers = springDocCustomizers.getOperationCustomizers(); if (optionalOperationCustomizers.isPresent()) { - List operationCustomizerList = optionalOperationCustomizers.get(); + Set operationCustomizerList = optionalOperationCustomizers.get(); for (OperationCustomizer operationCustomizer : operationCustomizerList) operation = operationCustomizer.customize(operation, handlerMethod); } @@ -889,13 +1014,13 @@ protected Operation customizeOperation(Operation operation, HandlerMethod handle * Customise router operation * * @param routerOperation the router operation - * @param handlerMethod the handler method + * @param handlerMethod the handler method * @return the router operation */ protected RouterOperation customizeRouterOperation(RouterOperation routerOperation, HandlerMethod handlerMethod) { - Optional> optionalRouterOperationCustomizers = springDocCustomizers.getRouterOperationCustomizers(); + Optional> optionalRouterOperationCustomizers = springDocCustomizers.getRouterOperationCustomizers(); if (optionalRouterOperationCustomizers.isPresent()) { - List routerOperationCustomizerList = optionalRouterOperationCustomizers.get(); + Set routerOperationCustomizerList = optionalRouterOperationCustomizers.get(); for (RouterOperationCustomizer routerOperationCustomizer : routerOperationCustomizerList) { routerOperation = routerOperationCustomizer.customize(routerOperation, handlerMethod); } @@ -994,9 +1119,9 @@ && isEqualArrays(routerFunctionData1.getConsumes(), routerOperation.getConsumes( /** * Calculate json view. * - * @param apiOperation the api operation + * @param apiOperation the api operation * @param methodAttributes the method attributes - * @param method the method + * @param method the method */ private void calculateJsonView(io.swagger.v3.oas.annotations.Operation apiOperation, MethodAttributes methodAttributes, Method method) { @@ -1053,8 +1178,8 @@ private boolean isEqualMethods(RequestMethod[] requestMethods1, RequestMethod[] /** * Fill parameters list. * - * @param operation the operation - * @param queryParams the query params + * @param operation the operation + * @param queryParams the query params * @param methodAttributes the method attributes */ private void fillParametersList(Operation operation, Map queryParams, MethodAttributes methodAttributes) { @@ -1087,7 +1212,7 @@ private void fillParametersList(Operation operation, Map queryPa * Fill router operation. * * @param routerFunctionData the router function data - * @param routerOperation the router operation + * @param routerOperation the router operation */ private void fillRouterOperation(RouterFunctionData routerFunctionData, RouterOperation routerOperation) { if (ArrayUtils.isEmpty(routerOperation.getConsumes())) @@ -1106,9 +1231,9 @@ private void fillRouterOperation(RouterFunctionData routerFunctionData, RouterOp * Build path item. * * @param requestMethod the request method - * @param operation the operation + * @param operation the operation * @param operationPath the operation path - * @param paths the paths + * @param paths the paths * @return the path item */ private PathItem buildPathItem(RequestMethod requestMethod, Operation operation, String operationPath, @@ -1121,7 +1246,7 @@ private PathItem buildPathItem(RequestMethod requestMethod, Operation operation, if (ParameterIn.PATH.toString().equals(parameter.getIn())) { // check it's present in the path String name = parameter.getName(); - if(!StringUtils.containsAny(operationPath, "{" + name + "}", "{*" + name + "}")) + if (!StringUtils.containsAny(operationPath, "{" + name + "}", "{*" + name + "}")) paramIt.remove(); } } @@ -1166,7 +1291,7 @@ private PathItem buildPathItem(RequestMethod requestMethod, Operation operation, /** * Gets existing operation. * - * @param operationMap the operation map + * @param operationMap the operation map * @param requestMethod the request method * @return the existing operation */ @@ -1207,7 +1332,7 @@ private Operation getExistingOperation(Map operationMap, /** * Gets operation. * - * @param routerOperation the router operation + * @param routerOperation the router operation * @param existingOperation the existing operation * @return the operation */ @@ -1266,7 +1391,7 @@ protected byte[] writeYamlValue(OpenAPI openAPI) throws JsonProcessingException * Gets actuator uri. * * @param scheme the scheme - * @param host the host + * @param host the host * @return the actuator uri */ protected URI getActuatorURI(String scheme, String host) { @@ -1335,7 +1460,7 @@ protected byte[] writeJsonValue(OpenAPI openAPI) throws JsonProcessingException * Gets conditions to match. * * @param conditionType the condition type - * @param groupConfigs the group configs + * @param groupConfigs the group configs * @return the conditions to match */ private List getConditionsToMatch(ConditionType conditionType, GroupConfig... groupConfigs) { @@ -1363,9 +1488,9 @@ private List getConditionsToMatch(ConditionType conditionType, GroupConf * Is filter condition boolean. * * @param operationPath the operation path - * @param produces the produces - * @param consumes the consumes - * @param headers the headers + * @param produces the produces + * @param consumes the consumes + * @param headers the headers * @return the boolean */ private boolean isFilterCondition(String operationPath, String[] produces, String[] consumes, String[] headers) { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/api/ErrorMessage.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/api/ErrorMessage.java index 35c9d48a9..034d96972 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/api/ErrorMessage.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/api/ErrorMessage.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.api; diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/api/OpenApiResourceNotFoundException.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/api/OpenApiResourceNotFoundException.java index 10d77eea4..cff51003c 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/api/OpenApiResourceNotFoundException.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/api/OpenApiResourceNotFoundException.java @@ -3,29 +3,32 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.api; /** * The type Open api resource not found exception. + * * @author bnasslahsen */ public class OpenApiResourceNotFoundException extends RuntimeException { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/annotations/ParameterObject.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/annotations/ParameterObject.java index 0fe189eb3..6693bb7c6 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/annotations/ParameterObject.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/annotations/ParameterObject.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.annotations; @@ -31,6 +33,7 @@ /** * The interface Parameter object. + * * @author bnasslahsen */ @Target({ ElementType.PARAMETER, ElementType.TYPE }) diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/annotations/RouterOperation.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/annotations/RouterOperation.java index cb7364ea2..0a8540d50 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/annotations/RouterOperation.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/annotations/RouterOperation.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.annotations; @@ -48,6 +50,7 @@ /** * The path mapping URIs (e.g. {@code "/profile"}). * Path mapping URIs may contain placeholders (e.g. "/${profile_path}"). + * * @return the string */ String path() default ""; @@ -55,6 +58,7 @@ /** * The HTTP request methods to map to, narrowing the primary mapping: * GET, POST, HEAD, OPTIONS, PUT, PATCH, DELETE, TRACE. + * * @return the request method [ ] */ RequestMethod[] method() default {}; @@ -68,6 +72,7 @@ * consumes = {"text/plain", "application/*"} * consumes = MediaType.TEXT_PLAIN_VALUE * + * * @return the string [ ] */ String[] consumes() default {}; @@ -84,6 +89,7 @@ * produces = MediaType.TEXT_PLAIN_VALUE * produces = "text/plain;charset=UTF-8" * + * * @return the string [ ] */ String[] produces() default {}; @@ -93,6 +99,7 @@ *

Same format for any environment: a sequence of "My-Header=myValue" style * expressions, with a request only mapped if each such header is found * to have the given value. + * * @return the string [ ] */ String[] headers() default {}; @@ -101,24 +108,28 @@ * The parameters of the mapped request, narrowing the primary mapping. * Same format for any environment: a sequence of "myParam=myValue" style expressions, * with a request only mapped if each such parameter is found to have the given value. + * * @return the string [ ] */ String[] params() default {}; /** * The class of the Handler bean. + * * @return the class of the Bean */ Class beanClass() default Void.class; /** * The method of the handler Bean. + * * @return The method of the handler Bean. */ String beanMethod() default ""; /** * The parameters of the handler method. + * * @return The parameters of the handler method. */ Class[] parameterTypes() default {}; @@ -126,6 +137,7 @@ /** * The swagger operation description * Alias for {@link Operation}. + * * @return The operation */ Operation operation() default @Operation(); diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/annotations/RouterOperations.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/annotations/RouterOperations.java index 175a76916..f2241a337 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/annotations/RouterOperations.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/annotations/RouterOperations.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.annotations; @@ -36,7 +38,7 @@ * Container for repeatable {@link RouterOperation} annotation * * @author bnasslahsen - * @see RouterOperation + * @see RouterOperation */ @Target({ METHOD, ANNOTATION_TYPE }) @Retention(RetentionPolicy.RUNTIME) diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/conditions/CacheOrGroupedOpenApiCondition.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/conditions/CacheOrGroupedOpenApiCondition.java index 79497ccdc..b4d95e0ff 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/conditions/CacheOrGroupedOpenApiCondition.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/conditions/CacheOrGroupedOpenApiCondition.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.conditions; @@ -35,6 +37,7 @@ /** * The type Cache or grouped open api condition. + * * @author bnasslahsen */ public class CacheOrGroupedOpenApiCondition extends AnyNestedCondition { @@ -48,6 +51,7 @@ public class CacheOrGroupedOpenApiCondition extends AnyNestedCondition { /** * The type On multiple open api support condition. + * * @author bnasslahsen */ @Conditional(MultipleOpenApiSupportCondition.class) @@ -55,6 +59,7 @@ static class OnMultipleOpenApiSupportCondition {} /** * The type On cache disabled. + * * @author bnasslahsen */ @ConditionalOnProperty(name = SPRINGDOC_CACHE_DISABLED) diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/conditions/MultipleOpenApiGroupsCondition.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/conditions/MultipleOpenApiGroupsCondition.java index 63a1ab686..27123ae9a 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/conditions/MultipleOpenApiGroupsCondition.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/conditions/MultipleOpenApiGroupsCondition.java @@ -3,27 +3,31 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.conditions; +import java.util.Collection; + import org.springdoc.core.models.GroupedOpenApi; import org.springframework.boot.autoconfigure.condition.AnyNestedCondition; @@ -34,6 +38,7 @@ /** * The type Multiple open api support condition. + * * @author bnasslahsen */ public class MultipleOpenApiGroupsCondition extends AnyNestedCondition { @@ -47,6 +52,7 @@ public class MultipleOpenApiGroupsCondition extends AnyNestedCondition { /** * The type On grouped open api bean. + * * @author bnasslahsen */ @ConditionalOnBean(GroupedOpenApi.class) @@ -54,9 +60,15 @@ static class OnGroupedOpenApiBean {} /** * The type On group config property. + * * @author bnasslahsen */ @ConditionalOnProperty(name = GROUP_CONFIG_FIRST_PROPERTY) static class OnGroupConfigProperty {} + /** + * The type On list grouped open api bean. + */ + @ConditionalOnBean(value = GroupedOpenApi.class, parameterizedContainer = Collection.class) + static class OnListGroupedOpenApiBean {} } \ No newline at end of file diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/conditions/MultipleOpenApiSupportCondition.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/conditions/MultipleOpenApiSupportCondition.java index bf2136c0b..77239a9f0 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/conditions/MultipleOpenApiSupportCondition.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/conditions/MultipleOpenApiSupportCondition.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.conditions; @@ -34,6 +36,7 @@ /** * The type Multiple open api support condition. + * * @author bnasslashen */ public class MultipleOpenApiSupportCondition extends AnyNestedCondition { @@ -47,6 +50,7 @@ public class MultipleOpenApiSupportCondition extends AnyNestedCondition { /** * The type On multiple open api support condition. + * * @author bnasslahsen */ @Conditional(MultipleOpenApiGroupsCondition.class) @@ -54,6 +58,7 @@ static class OnMultipleOpenApiSupportCondition {} /** * The type On actuator different port. + * * @author bnasslashen */ @ConditionalOnManagementPort(ManagementPortType.DIFFERENT) diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/conditions/SpecPropertiesCondition.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/conditions/SpecPropertiesCondition.java index f7bc019fd..def8a40d9 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/conditions/SpecPropertiesCondition.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/conditions/SpecPropertiesCondition.java @@ -1,3 +1,29 @@ +/* + * + * * + * * * + * * * * + * * * * * + * * * * * * 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 org.springdoc.core.conditions; /** diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocConfiguration.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocConfiguration.java index 3a51f92e2..15dcd9014 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocConfiguration.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocConfiguration.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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. * * * * * * * * * - * + * */ @@ -31,6 +33,7 @@ import java.util.Locale; import java.util.Map; import java.util.Optional; +import java.util.Set; import com.fasterxml.jackson.databind.node.ObjectNode; import com.querydsl.core.types.Predicate; @@ -54,7 +57,6 @@ import org.springdoc.core.converters.ResponseSupportConverter; import org.springdoc.core.converters.SchemaPropertyDeprecatingConverter; import org.springdoc.core.converters.WebFluxSupportConverter; -import org.springdoc.core.customizers.ActuatorOpenApiCustomizer; import org.springdoc.core.customizers.ActuatorOperationCustomizer; import org.springdoc.core.customizers.DataRestRouterOperationCustomizer; import org.springdoc.core.customizers.DelegatingMethodParameterCustomizer; @@ -63,6 +65,8 @@ import org.springdoc.core.customizers.OpenApiBuilderCustomizer; import org.springdoc.core.customizers.OpenApiCustomizer; import org.springdoc.core.customizers.OperationCustomizer; +import org.springdoc.core.customizers.OperationIdCustomizer; +import org.springdoc.core.customizers.ParameterObjectNamingStrategyCustomizer; import org.springdoc.core.customizers.PropertyCustomizer; import org.springdoc.core.customizers.QuerydslPredicateOperationCustomizer; import org.springdoc.core.customizers.RouterOperationCustomizer; @@ -72,7 +76,6 @@ import org.springdoc.core.filters.GlobalOpenApiMethodFilter; import org.springdoc.core.filters.OpenApiMethodFilter; import org.springdoc.core.models.GroupedOpenApi; -import org.springdoc.core.parsers.ReturnTypeParser; import org.springdoc.core.properties.SpringDocConfigProperties; import org.springdoc.core.providers.ActuatorProvider; import org.springdoc.core.providers.CloudFunctionProvider; @@ -131,6 +134,7 @@ /** * The type Spring doc configuration. + * * @author bnasslahsen */ @Lazy(false) @@ -269,13 +273,13 @@ PolymorphicModelConverter polymorphicModelConverter(ObjectMapperProvider objectM /** * Open api builder open api builder. * - * @param openAPI the open api - * @param securityParser the security parser + * @param openAPI the open api + * @param securityParser the security parser * @param springDocConfigProperties the spring doc config properties - * @param propertyResolverUtils the property resolver utils + * @param propertyResolverUtils the property resolver utils * @param openApiBuilderCustomisers the open api builder customisers - * @param serverBaseUrlCustomisers the server base url customisers - * @param javadocProvider the javadoc provider + * @param serverBaseUrlCustomisers the server base url customisers + * @param javadocProvider the javadoc provider * @return the open api builder */ @Bean @@ -305,9 +309,9 @@ ModelConverterRegistrar modelConverterRegistrar(Optional> m /** * Operation builder operation service. * - * @param parameterBuilder the parameter builder - * @param requestBodyService the request body service - * @param securityParser the security parser + * @param parameterBuilder the parameter builder + * @param requestBodyService the request body service + * @param securityParser the security parser * @param propertyResolverUtils the property resolver utils * @return the operation service */ @@ -323,8 +327,8 @@ OperationService operationBuilder(GenericParameterService parameterBuilder, Requ /** * Property resolver utils property resolver utils. * - * @param factory the factory - * @param messageSource the message source + * @param factory the factory + * @param messageSource the message source * @param springDocConfigProperties the spring doc config properties * @return the property resolver utils */ @@ -337,7 +341,8 @@ PropertyResolverUtils propertyResolverUtils(ConfigurableBeanFactory factory, Mes /** * Request body builder request body builder. * - * @param parameterBuilder the parameter builder + * @param parameterBuilder the parameter builder + * @param propertyResolverUtils the property resolver utils * @return the request body builder */ @Bean @@ -360,34 +365,23 @@ SecurityService securityParser(PropertyResolverUtils propertyResolverUtils) { return new SecurityService(propertyResolverUtils); } - /** - * Generic return type parser return type parser. - * - * @return the return type parser - */ - @Bean - @Lazy(false) - ReturnTypeParser genericReturnTypeParser() { - return new ReturnTypeParser() {}; - } - /** * Parameter builder generic parameter builder. * - * @param propertyResolverUtils the property resolver utils - * @param optionalDelegatingMethodParameterCustomizer the optional delegating method parameter customizer - * @param optionalWebConversionServiceProvider the optional web conversion service provider - * @param objectMapperProvider the object mapper provider - * @param javadocProvider the javadoc provider + * @param propertyResolverUtils the property resolver utils + * @param optionalDelegatingMethodParameterCustomizers the optional list delegating method parameter customizer + * @param optionalWebConversionServiceProvider the optional web conversion service provider + * @param objectMapperProvider the object mapper provider + * @param javadocProvider the javadoc provider * @return the generic parameter builder */ @Bean @ConditionalOnMissingBean @Lazy(false) GenericParameterService parameterBuilder(PropertyResolverUtils propertyResolverUtils, - Optional optionalDelegatingMethodParameterCustomizer, + Optional> optionalDelegatingMethodParameterCustomizers, Optional optionalWebConversionServiceProvider, ObjectMapperProvider objectMapperProvider, Optional javadocProvider) { - return new GenericParameterService(propertyResolverUtils, optionalDelegatingMethodParameterCustomizer, + return new GenericParameterService(propertyResolverUtils, optionalDelegatingMethodParameterCustomizers, optionalWebConversionServiceProvider, objectMapperProvider, javadocProvider); } @@ -412,14 +406,13 @@ GlobalOpenApiCustomizer propertiesResolverForSchema(OpenAPIService openAPIServic /** * Spring doc providers spring doc providers. * - * @param actuatorProvider the actuator provider - * @param springCloudFunctionProvider the spring cloud function provider - * @param springSecurityOAuth2Provider the spring security o auth 2 provider + * @param actuatorProvider the actuator provider + * @param springCloudFunctionProvider the spring cloud function provider + * @param springSecurityOAuth2Provider the spring security o auth 2 provider * @param repositoryRestResourceProvider the repository rest resource provider - * @param routerFunctionProvider the router function provider - * @param springWebProvider the spring web provider - * @param webConversionServiceProvider the web conversion service provider - * @param objectMapperProvider the object mapper provider + * @param routerFunctionProvider the router function provider + * @param springWebProvider the spring web provider + * @param objectMapperProvider the object mapper provider * @return the spring doc providers */ @Bean @@ -427,10 +420,10 @@ GlobalOpenApiCustomizer propertiesResolverForSchema(OpenAPIService openAPIServic @Lazy(false) SpringDocProviders springDocProviders(Optional actuatorProvider, Optional springCloudFunctionProvider, Optional springSecurityOAuth2Provider, Optional repositoryRestResourceProvider, Optional routerFunctionProvider, - Optional springWebProvider, Optional webConversionServiceProvider, + Optional springWebProvider, ObjectMapperProvider objectMapperProvider) { objectMapperProvider.jsonMapper().registerModule(new SpringDocRequiredModule()); - return new SpringDocProviders(actuatorProvider, springCloudFunctionProvider, springSecurityOAuth2Provider, repositoryRestResourceProvider, routerFunctionProvider, springWebProvider, webConversionServiceProvider, objectMapperProvider); + return new SpringDocProviders(actuatorProvider, springCloudFunctionProvider, springSecurityOAuth2Provider, repositoryRestResourceProvider, routerFunctionProvider, springWebProvider, objectMapperProvider); } /** @@ -448,6 +441,7 @@ ObjectMapperProvider springdocObjectMapperProvider(SpringDocConfigProperties spr /** * The type Spring doc web mvc actuator configuration. + * * @author bnasslashen */ @ConditionalOnClass(WebEndpointProperties.class) @@ -457,7 +451,7 @@ static class SpringDocActuatorConfiguration { /** * Springdoc bean factory post processor 3 bean factory post processor. * - * @param groupedOpenApis the grouped open apis + * @param groupedOpenApis the grouped open apis * @return the bean factory post processor */ @Bean @@ -481,23 +475,11 @@ GlobalOperationCustomizer actuatorCustomizer(SpringDocConfigProperties springDoc return new ActuatorOperationCustomizer(springDocConfigProperties); } - /** - * Actuator customizer OpenAPI customiser. - * - * @param webEndpointProperties the web endpoint properties - * @return the OpenAPI customiser - */ - @Bean - @Lazy(false) - @ConditionalOnManagementPort(ManagementPortType.SAME) - GlobalOpenApiCustomizer actuatorOpenApiCustomizer(WebEndpointProperties webEndpointProperties) { - return new ActuatorOpenApiCustomizer(webEndpointProperties); - } - } /** * The type Web conversion service configuration. + * * @author bnasslashen */ @ConditionalOnClass(WebConversionService.class) @@ -576,6 +558,7 @@ WebFluxSupportConverter webFluxSupportConverter(ObjectMapperProvider objectMappe /** * The type Open api resource advice. + * * @author bnasslashen */ @RestControllerAdvice @@ -597,25 +580,26 @@ public ResponseEntity handleNoHandlerFound(OpenApiResourceNotFound /** * Spring doc customizers spring doc customizers. * - * @param openApiCustomizers the open api customizers - * @param operationCustomizers the operation customizers - * @param routerOperationCustomizers the router operation customizers + * @param openApiCustomizers the open api customizers + * @param operationCustomizers the operation customizers + * @param routerOperationCustomizers the router operation customizers * @param dataRestRouterOperationCustomizers the data rest router operation customizers - * @param methodFilters the method filters - * @param globalOpenApiCustomizers the global open api customizers - * @param globalOperationCustomizers the global operation customizers - * @param globalOpenApiMethodFilters the global open api method filters + * @param methodFilters the method filters + * @param globalOpenApiCustomizers the global open api customizers + * @param globalOperationCustomizers the global operation customizers + * @param globalOpenApiMethodFilters the global open api method filters * @return the spring doc customizers */ @Bean @ConditionalOnMissingBean @Lazy(false) - public SpringDocCustomizers springDocCustomizers(Optional> openApiCustomizers, - Optional> operationCustomizers, - Optional> routerOperationCustomizers, - Optional> dataRestRouterOperationCustomizers, - Optional> methodFilters, Optional> globalOpenApiCustomizers, Optional> globalOperationCustomizers, - Optional> globalOpenApiMethodFilters){ + public SpringDocCustomizers springDocCustomizers(Optional> openApiCustomizers, + Optional> operationCustomizers, + Optional> routerOperationCustomizers, + Optional> dataRestRouterOperationCustomizers, + Optional> methodFilters, Optional> globalOpenApiCustomizers, + Optional> globalOperationCustomizers, + Optional> globalOpenApiMethodFilters){ return new SpringDocCustomizers(openApiCustomizers, operationCustomizers, routerOperationCustomizers, @@ -625,6 +609,7 @@ public SpringDocCustomizers springDocCustomizers(Optional repository /** * The type Spring repository rest resource provider configuration. + * * @author bnasslashen */ @Lazy(false) @@ -121,14 +125,14 @@ static class SpringRepositoryRestResourceProviderConfiguration { /** * Spring repository rest resource provider spring repository rest resource provider. * - * @param mappings the mappings - * @param repositories the repositories - * @param associations the associations - * @param applicationContext the application context + * @param mappings the mappings + * @param repositories the repositories + * @param associations the associations + * @param applicationContext the application context * @param dataRestRouterOperationService the data rest router operation service - * @param persistentEntities the persistent entities - * @param mapper the mapper - * @param springDocDataRestUtils the spring doc data rest utils + * @param persistentEntities the persistent entities + * @param mapper the mapper + * @param springDocDataRestUtils the spring doc data rest utils * @return the spring repository rest resource provider */ @Bean @@ -145,10 +149,10 @@ SpringRepositoryRestResourceProvider springRepositoryRestResourceProvider(Resour /** * Data rest router operation builder data rest router operation service. * - * @param dataRestOperationService the data rest operation service - * @param springDocConfigProperties the spring doc config properties + * @param dataRestOperationService the data rest operation service + * @param springDocConfigProperties the spring doc config properties * @param repositoryRestConfiguration the repository rest configuration - * @param dataRestHalProvider the data rest hal provider + * @param dataRestHalProvider the data rest hal provider * @return the data rest router operation service */ @Bean @@ -162,10 +166,10 @@ DataRestRouterOperationService dataRestRouterOperationBuilder(DataRestOperationS /** * Data rest operation builder data rest operation builder. * - * @param dataRestRequestService the data rest request builder - * @param tagsBuilder the tags builder + * @param dataRestRequestService the data rest request builder + * @param tagsBuilder the tags builder * @param dataRestResponseService the data rest response builder - * @param operationService the operation service + * @param operationService the operation service * @return the data rest operation builder */ @Bean @@ -180,10 +184,10 @@ DataRestOperationService dataRestOperationBuilder(DataRestRequestService dataRes * Data rest request builder data rest request builder. * * @param localSpringDocParameterNameDiscoverer the local spring doc parameter name discoverer - * @param parameterBuilder the parameter builder - * @param requestBodyService the request body builder - * @param requestBuilder the request builder - * @param springDocDataRestUtils the spring doc data rest utils + * @param parameterBuilder the parameter builder + * @param requestBodyService the request body builder + * @param requestBuilder the request builder + * @param springDocDataRestUtils the spring doc data rest utils * @return the data rest request builder */ @Bean @@ -225,7 +229,7 @@ DataRestTagsService dataRestTagsBuilder(OpenAPIService openAPIService) { /** * Spring doc data rest utils spring doc data rest utils. * - * @param linkRelationProvider the link relation provider + * @param linkRelationProvider the link relation provider * @param repositoryRestConfiguration the repository rest configuration * @return the spring doc data rest utils */ diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocFunctionCatalogConfiguration.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocFunctionCatalogConfiguration.java index 6735bfe6d..7db8ef5d0 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocFunctionCatalogConfiguration.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocFunctionCatalogConfiguration.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.configuration; @@ -43,6 +45,7 @@ /** * The type Spring doc function catalog configuration. + * * @author bnasslahsen */ @Lazy(false) @@ -56,7 +59,7 @@ public class SpringDocFunctionCatalogConfiguration { /** * Spring cloud function provider spring cloud function provider. * - * @param functionCatalog the function catalog + * @param functionCatalog the function catalog * @param springDocConfigProperties the spring doc config properties * @return the spring cloud function provider */ diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocGroovyConfiguration.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocGroovyConfiguration.java index 68d96b7fc..c98ac1227 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocGroovyConfiguration.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocGroovyConfiguration.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.configuration; @@ -40,6 +42,7 @@ /** * The type Spring doc groovy configuration. + * * @author bnasslahsen */ @Lazy(false) diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocHateoasConfiguration.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocHateoasConfiguration.java index 54f13f9b2..f9ab95450 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocHateoasConfiguration.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocHateoasConfiguration.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.configuration; @@ -52,6 +54,7 @@ /** * The type Spring doc hateoas configuration. + * * @author bnasslahsen */ @Lazy(false) @@ -66,7 +69,7 @@ public class SpringDocHateoasConfiguration { * Hateoas hal provider hateoas hal provider. * * @param hateoasPropertiesOptional the hateoas properties optional - * @param objectMapperProvider the object mapper provider + * @param objectMapperProvider the object mapper provider * @return the hateoas hal provider */ @Bean @@ -79,7 +82,7 @@ HateoasHalProvider hateoasHalProvider(Optional hateoasPropert /** * Collection model content converter collection model content converter. * - * @param halProvider the hal provider + * @param halProvider the hal provider * @param linkRelationProvider the link relation provider * @return the collection model content converter */ @@ -94,11 +97,11 @@ CollectionModelContentConverter collectionModelContentConverter(HateoasHalProvid * Registers an OpenApiCustomizer and a jackson mixin to ensure the definition of `Links` matches the serialized * output. This is done because the customer serializer converts the data to a map before serializing it. * - * @param halProvider the hal provider + * @param halProvider the hal provider * @param springDocConfigProperties the spring doc config properties - * @param objectMapperProvider the object mapper provider + * @param objectMapperProvider the object mapper provider * @return the open api customizer - * @see org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalLinkListSerializer#serialize(Links, JsonGenerator, SerializerProvider) org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalLinkListSerializer#serialize(Links, JsonGenerator, SerializerProvider)org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalLinkListSerializer#serialize(Links, JsonGenerator, SerializerProvider)org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalLinkListSerializer#serialize(Links, JsonGenerator, SerializerProvider)org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalLinkListSerializer#serialize(Links, JsonGenerator, SerializerProvider)org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalLinkListSerializer#serialize(Links, JsonGenerator, SerializerProvider) + * @see org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalLinkListSerializer#serialize(Links, JsonGenerator, SerializerProvider) org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalLinkListSerializer#serialize(Links, JsonGenerator, SerializerProvider)org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalLinkListSerializer#serialize(Links, JsonGenerator, SerializerProvider)org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalLinkListSerializer#serialize(Links, JsonGenerator, SerializerProvider)org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalLinkListSerializer#serialize(Links, JsonGenerator, SerializerProvider)org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalLinkListSerializer#serialize(Links, JsonGenerator, SerializerProvider)org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalLinkListSerializer#serialize(Links, JsonGenerator, SerializerProvider) */ @Bean(Constants.LINKS_SCHEMA_CUSTOMISER) @ConditionalOnMissingBean(name = Constants.LINKS_SCHEMA_CUSTOMISER) diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocJacksonKotlinModuleConfiguration.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocJacksonKotlinModuleConfiguration.java index a8fb5b41a..bffa81467 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocJacksonKotlinModuleConfiguration.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocJacksonKotlinModuleConfiguration.java @@ -1,3 +1,29 @@ +/* + * + * * + * * * + * * * * + * * * * * + * * * * * * 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 org.springdoc.core.configuration; import com.fasterxml.jackson.module.kotlin.KotlinModule; @@ -24,14 +50,14 @@ @ConditionalOnExpression("${springdoc.api-docs.enabled:true} and ${springdoc.enable-kotlin:true}") @ConditionalOnWebApplication @ConditionalOnBean(SpringDocConfiguration.class) -class SpringDocJacksonKotlinModuleConfiguration { +public class SpringDocJacksonKotlinModuleConfiguration { /** * Instantiates a new objectMapperProvider with a kotlin module. * * @param springDocConfigProperties the spring doc config properties + * @return the object mapper provider */ - @Bean @Primary ObjectMapperProvider springdocKotlinObjectMapperProvider(SpringDocConfigProperties springDocConfigProperties) { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocJavadocConfiguration.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocJavadocConfiguration.java index 76adbdcbf..9d94a0761 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocJavadocConfiguration.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocJavadocConfiguration.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.configuration; @@ -38,9 +40,12 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Lazy; +import org.springframework.core.Ordered; +import org.springframework.core.annotation.Order; /** * The type Spring doc security configuration. + * * @author bnasslahsen */ @Lazy(false) @@ -66,13 +71,14 @@ SpringDocJavadocProvider springDocJavadocProvider() { /** * Javadoc property customizer javadoc property customizer. * - * @param javadocProvider the javadoc provider + * @param javadocProvider the javadoc provider * @param objectMapperProvider the object mapper provider * @return the javadoc property customizer */ @Bean @ConditionalOnMissingBean @Lazy(false) + @Order(Ordered.HIGHEST_PRECEDENCE) JavadocPropertyCustomizer javadocPropertyCustomizer(JavadocProvider javadocProvider, ObjectMapperProvider objectMapperProvider) { return new JavadocPropertyCustomizer(javadocProvider, objectMapperProvider); } diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocKotlinConfiguration.kt b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocKotlinConfiguration.kt index 7c7dd6070..dd0f423e8 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocKotlinConfiguration.kt +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocKotlinConfiguration.kt @@ -1,9 +1,33 @@ +/* + * + * * + * * * + * * * * + * * * * * + * * * * * * 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 org.springdoc.core.configuration import io.swagger.v3.oas.annotations.Parameter -import io.swagger.v3.oas.models.media.ByteArraySchema import org.springdoc.core.customizers.ParameterCustomizer -import org.springdoc.core.parsers.KotlinCoroutinesReturnTypeParser import org.springdoc.core.utils.Constants import org.springdoc.core.utils.SpringDocUtils import org.springframework.boot.autoconfigure.condition.ConditionalOnBean @@ -44,22 +68,9 @@ class SpringDocKotlinConfiguration() { init { SpringDocUtils.getConfig() .addRequestWrapperToIgnore(Continuation::class.java) - .replaceWithSchema(ByteArray::class.java, ByteArraySchema()) .addDeprecatedType(Deprecated::class.java) } - /** - * Kotlin coroutines return type parser kotlin coroutines return type parser. - * - * @return the kotlin coroutines return type parser - */ - @Bean - @Lazy(false) - @ConditionalOnMissingBean - fun kotlinCoroutinesReturnTypeParser(): KotlinCoroutinesReturnTypeParser { - return KotlinCoroutinesReturnTypeParser() - } - /** * Kotlin springdoc-openapi ParameterCustomizer * @@ -92,9 +103,13 @@ class SpringDocKotlinConfiguration() { // parameter is not required if a default value is provided in @RequestParam else if (requestParam != null && requestParam.defaultValue != ValueConstants.DEFAULT_NONE) parameterModel.required = false - else + else{ + val isJavaNullableAnnotationPresent = methodParameter.parameterAnnotations.any { + it.annotationClass.qualifiedName == "jakarta.annotation.Nullable" + } parameterModel.required = - kParameter.type.isMarkedNullable == false + kParameter.type.isMarkedNullable == false && !isJavaNullableAnnotationPresent + } } } return@ParameterCustomizer parameterModel diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocKotlinxConfiguration.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocKotlinxConfiguration.java index f80b58154..62002637a 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocKotlinxConfiguration.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocKotlinxConfiguration.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.configuration; @@ -37,6 +39,7 @@ /** * The type Spring doc kotlinx configuration. + * * @author bnasslahsen */ @Lazy(false) diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocPageableConfiguration.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocPageableConfiguration.java index 0dd0a9e50..7f1e351de 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocPageableConfiguration.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocPageableConfiguration.java @@ -3,32 +3,34 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.configuration; import java.util.Optional; +import org.springdoc.core.converters.PageOpenAPIConverter; import org.springdoc.core.converters.PageableOpenAPIConverter; import org.springdoc.core.customizers.DataRestDelegatingMethodParameterCustomizer; -import org.springdoc.core.customizers.DelegatingMethodParameterCustomizer; import org.springdoc.core.providers.ObjectMapperProvider; import org.springdoc.core.providers.RepositoryRestConfigurationProvider; import org.springdoc.core.providers.SpringDataWebPropertiesProvider; @@ -42,6 +44,9 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Lazy; import org.springframework.data.domain.Pageable; +import org.springframework.data.web.PagedModel; +import org.springframework.data.web.config.EnableSpringDataWebSupport; +import org.springframework.data.web.config.SpringDataWebSettings; import static org.springdoc.core.utils.Constants.SPRINGDOC_ENABLED; import static org.springdoc.core.utils.Constants.SPRINGDOC_PAGEABLE_CONVERTER_ENABLED; @@ -49,6 +54,7 @@ /** * The type Spring doc pageable configuration. + * * @author bnasslahsen */ @Lazy(false) @@ -75,17 +81,36 @@ PageableOpenAPIConverter pageableOpenAPIConverter(ObjectMapperProvider objectMap return new PageableOpenAPIConverter(objectMapperProvider); } + /** + * Page open api converter. + * + * @param settings the settings + * @param objectMapperProvider the object mapper provider + * @return the page open api converter + */ + @Bean + @ConditionalOnMissingBean + @ConditionalOnClass({ PagedModel.class, SpringDataWebSettings.class }) + @Lazy(false) + PageOpenAPIConverter pageOpenAPIConverter(Optional settings, + ObjectMapperProvider objectMapperProvider) { + boolean replacePageWithPagedModel = settings.map(SpringDataWebSettings::pageSerializationMode) + .map(EnableSpringDataWebSupport.PageSerializationMode.VIA_DTO::equals) + .orElse(false); + return new PageOpenAPIConverter(replacePageWithPagedModel, objectMapperProvider); + } + /** * Delegating method parameter customizer delegating method parameter customizer. * * @param optionalSpringDataWebPropertiesProvider the optional spring data web properties - * @param optionalRepositoryRestConfiguration the optional repository rest configuration + * @param optionalRepositoryRestConfiguration the optional repository rest configuration * @return the delegating method parameter customizer */ @Bean @ConditionalOnMissingBean @Lazy(false) - DelegatingMethodParameterCustomizer delegatingMethodParameterCustomizer(Optional optionalSpringDataWebPropertiesProvider, Optional optionalRepositoryRestConfiguration) { + DataRestDelegatingMethodParameterCustomizer dataRestDelegatingMethodParameterCustomizer(Optional optionalSpringDataWebPropertiesProvider, Optional optionalRepositoryRestConfiguration) { return new DataRestDelegatingMethodParameterCustomizer(optionalSpringDataWebPropertiesProvider, optionalRepositoryRestConfiguration); } } \ No newline at end of file diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocRequiredModule.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocRequiredModule.java index 7278ca597..64258a469 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocRequiredModule.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocRequiredModule.java @@ -2,22 +2,26 @@ * * * * * * - * * * * 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 + * * * * * + * * * * * * 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. + * * * * * * * * * - * * * * 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 org.springdoc.core.configuration; diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocSecurityConfiguration.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocSecurityConfiguration.java index 465a9bc4a..ddbc478da 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocSecurityConfiguration.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocSecurityConfiguration.java @@ -3,29 +3,30 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.configuration; -import java.lang.reflect.Field; import java.util.Optional; import io.swagger.v3.oas.models.Operation; @@ -58,10 +59,10 @@ import org.springframework.http.HttpStatus; import org.springframework.security.core.Authentication; import org.springframework.security.core.annotation.AuthenticationPrincipal; +import org.springframework.security.oauth2.client.annotation.RegisteredOAuth2AuthorizedClient; import org.springframework.security.oauth2.server.authorization.OAuth2AuthorizationService; import org.springframework.security.web.FilterChainProxy; import org.springframework.security.web.SecurityFilterChain; -import org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter; import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; import org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter; import org.springframework.security.web.context.AbstractSecurityWebApplicationInitializer; @@ -73,6 +74,7 @@ /** * The type Spring doc security configuration. + * * @author bnasslahsen */ @Lazy(false) @@ -84,6 +86,9 @@ @ImportRuntimeHints(SpringDocSecurityHints.class) public class SpringDocSecurityConfiguration { + /** + * The constant LOGGER. + */ private static final Logger LOGGER = LoggerFactory.getLogger(SpringDocSecurityConfiguration.class); static { @@ -109,7 +114,7 @@ class SpringSecurityLoginEndpointConfiguration { @Bean @ConditionalOnProperty(SPRINGDOC_SHOW_LOGIN_ENDPOINT) @Lazy(false) - OpenApiCustomizer springSecurityLoginEndpointCustomiser(ApplicationContext applicationContext) { + OpenApiCustomizer springSecurityLoginEndpointCustomizer(ApplicationContext applicationContext) { FilterChainProxy filterChainProxy = applicationContext.getBean(AbstractSecurityWebApplicationInitializer.DEFAULT_FILTER_NAME, FilterChainProxy.class); return openAPI -> { for (SecurityFilterChain filterChain : filterChainProxy.getFilterChains()) { @@ -132,9 +137,8 @@ OpenApiCustomizer springSecurityLoginEndpointCustomiser(ApplicationContext appli String mediaType = org.springframework.http.MediaType.APPLICATION_JSON_VALUE; if (optionalDefaultLoginPageGeneratingFilter.isPresent()) { DefaultLoginPageGeneratingFilter defaultLoginPageGeneratingFilter = optionalDefaultLoginPageGeneratingFilter.get(); - Field formLoginEnabledField = FieldUtils.getDeclaredField(DefaultLoginPageGeneratingFilter.class, "formLoginEnabled", true); try { - boolean formLoginEnabled = (boolean) formLoginEnabledField.get(defaultLoginPageGeneratingFilter); + boolean formLoginEnabled = (boolean) FieldUtils.readDeclaredField(defaultLoginPageGeneratingFilter, "formLoginEnabled", true); if (formLoginEnabled) mediaType = org.springframework.http.MediaType.APPLICATION_FORM_URLENCODED_VALUE; } @@ -146,19 +150,16 @@ OpenApiCustomizer springSecurityLoginEndpointCustomiser(ApplicationContext appli operation.requestBody(requestBody); ApiResponses apiResponses = new ApiResponses(); apiResponses.addApiResponse(String.valueOf(HttpStatus.OK.value()), new ApiResponse().description(HttpStatus.OK.getReasonPhrase())); - apiResponses.addApiResponse(String.valueOf(HttpStatus.FORBIDDEN.value()), new ApiResponse().description(HttpStatus.FORBIDDEN.getReasonPhrase())); + apiResponses.addApiResponse(String.valueOf(HttpStatus.UNAUTHORIZED.value()), new ApiResponse().description(HttpStatus.UNAUTHORIZED.getReasonPhrase())); operation.responses(apiResponses); operation.addTagsItem("login-endpoint"); PathItem pathItem = new PathItem().post(operation); try { - Field requestMatcherField = AbstractAuthenticationProcessingFilter.class.getDeclaredField("requiresAuthenticationRequestMatcher"); - requestMatcherField.setAccessible(true); - AntPathRequestMatcher requestMatcher = (AntPathRequestMatcher) requestMatcherField.get(usernamePasswordAuthenticationFilter); + AntPathRequestMatcher requestMatcher = (AntPathRequestMatcher)FieldUtils.readField(usernamePasswordAuthenticationFilter, "requiresAuthenticationRequestMatcher", true); String loginPath = requestMatcher.getPattern(); - requestMatcherField.setAccessible(false); openAPI.getPaths().addPathItem(loginPath, pathItem); } - catch (NoSuchFieldException | IllegalAccessException | + catch (IllegalAccessException | ClassCastException ignored) { // Exception escaped LOGGER.trace(ignored.getMessage()); @@ -169,6 +170,9 @@ OpenApiCustomizer springSecurityLoginEndpointCustomiser(ApplicationContext appli } } + /** + * The type Spring doc security o auth 2 configuration. + */ @Lazy(false) @Configuration(proxyBeanMethods = false) @ConditionalOnClass(OAuth2AuthorizationService.class) @@ -186,4 +190,19 @@ GlobalOpenApiCustomizer springDocSecurityOAuth2Customizer() { return new SpringDocSecurityOAuth2Customizer(); } } + + /** + * The type Spring doc security o auth 2 client configuration. + */ + @Lazy(false) + @Configuration(proxyBeanMethods = false) + @ConditionalOnClass(RegisteredOAuth2AuthorizedClient.class) + class SpringDocSecurityOAuth2ClientConfiguration { + + static { + getConfig() + .addAnnotationsToIgnore(RegisteredOAuth2AuthorizedClient.class); + } + + } } \ No newline at end of file diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocSecurityOAuth2Customizer.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocSecurityOAuth2Customizer.java index 871ebdbb6..026287bfa 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocSecurityOAuth2Customizer.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocSecurityOAuth2Customizer.java @@ -1,3 +1,29 @@ +/* + * + * * + * * * + * * * * + * * * * * + * * * * * * 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 org.springdoc.core.configuration; import java.lang.reflect.Field; @@ -18,6 +44,7 @@ import io.swagger.v3.oas.models.media.StringSchema; import io.swagger.v3.oas.models.parameters.HeaderParameter; import io.swagger.v3.oas.models.parameters.Parameter; +import io.swagger.v3.oas.models.parameters.PathParameter; import io.swagger.v3.oas.models.parameters.RequestBody; import io.swagger.v3.oas.models.responses.ApiResponse; import io.swagger.v3.oas.models.responses.ApiResponses; @@ -55,6 +82,7 @@ import org.springframework.security.web.util.matcher.AntPathRequestMatcher; import org.springframework.security.web.util.matcher.OrRequestMatcher; import org.springframework.security.web.util.matcher.RequestMatcher; +import org.springframework.util.ReflectionUtils; import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE; import static org.springframework.http.MediaType.TEXT_HTML_VALUE; @@ -110,7 +138,7 @@ public void customise(OpenAPI openAPI) { * @param securityFilterChain the security filter chain * @param openapi31 the openapi 31 */ - private void getOAuth2TokenRevocationEndpointFilter(OpenAPI openAPI, SecurityFilterChain securityFilterChain, boolean openapi31) { + private void getOAuth2TokenRevocationEndpointFilter(OpenAPI openAPI, SecurityFilterChain securityFilterChain, boolean openapi31) { Object oAuth2EndpointFilter = new SpringDocSecurityOAuth2EndpointUtils(OAuth2TokenRevocationEndpointFilter.class).findEndpoint(securityFilterChain); if (oAuth2EndpointFilter != null) { @@ -168,14 +196,24 @@ private void getOAuth2TokenIntrospectionEndpointFilter(OpenAPI openAPI, Security * @param openapi31 the openapi 31 */ private void getOAuth2AuthorizationServerMetadataEndpoint(OpenAPI openAPI, SecurityFilterChain securityFilterChain, boolean openapi31) { + ClassauthorizationServerMetadataEndpointClass = OAuth2AuthorizationServerMetadataEndpointFilter.class; Object oAuth2EndpointFilter = - new SpringDocSecurityOAuth2EndpointUtils(OAuth2AuthorizationServerMetadataEndpointFilter.class).findEndpoint(securityFilterChain); + new SpringDocSecurityOAuth2EndpointUtils(authorizationServerMetadataEndpointClass).findEndpoint(securityFilterChain); if (oAuth2EndpointFilter != null) { ApiResponses apiResponses = new ApiResponses(); buildApiResponsesOnSuccess(apiResponses, AnnotationsUtils.resolveSchemaFromType(SpringDocOAuth2AuthorizationServerMetadata.class, openAPI.getComponents(), null, openapi31)); buildApiResponsesOnInternalServerError(apiResponses); Operation operation = buildOperation(apiResponses); - buildPath(oAuth2EndpointFilter, REQUEST_MATCHER, openAPI, operation, HttpMethod.GET); + Field field = ReflectionUtils.findField(authorizationServerMetadataEndpointClass, "DEFAULT_OAUTH2_AUTHORIZATION_SERVER_METADATA_ENDPOINT_URI"); + if (field != null) { + ReflectionUtils.makeAccessible(field); + String defaultOauth2MetadataUri = (String) ReflectionUtils.getField(field, null); + openAPI.getPaths().addPathItem(defaultOauth2MetadataUri , new PathItem().get(operation)); + operation = buildOperation(apiResponses); + operation.addParametersItem(new PathParameter().name("subpath").schema(new StringSchema())); + operation.summary("Valid when multiple issuers are allowed"); + openAPI.getPaths().addPathItem(defaultOauth2MetadataUri+"/{subpath}" , new PathItem().get(operation)); + } } } @@ -245,7 +283,7 @@ private void getOAuth2TokenEndpoint(OpenAPI openAPI, SecurityFilterChain securit String mediaType = org.springframework.http.MediaType.APPLICATION_FORM_URLENCODED_VALUE; RequestBody requestBody = new RequestBody().content(new Content().addMediaType(mediaType, new MediaType().schema(requestSchema))); operation.setRequestBody(requestBody); - operation.addParametersItem(new HeaderParameter().name("Authorization")); + operation.addParametersItem(new HeaderParameter().name("Authorization").schema(new StringSchema())); buildPath(oAuth2EndpointFilter, "tokenEndpointMatcher", openAPI, operation, HttpMethod.POST); } @@ -270,8 +308,8 @@ private void getOAuth2AuthorizationEndpoint(OpenAPI openAPI, SecurityFilterChain apiResponses.addApiResponse(String.valueOf(HttpStatus.OK.value()), response); buildApiResponsesOnInternalServerError(apiResponses); buildApiResponsesOnBadRequest(apiResponses, openAPI, openapi31); - apiResponses.addApiResponse(String.valueOf(HttpStatus.MOVED_TEMPORARILY.value()), - new ApiResponse().description(HttpStatus.MOVED_TEMPORARILY.getReasonPhrase()) + apiResponses.addApiResponse(String.valueOf(HttpStatus.FOUND.value()), + new ApiResponse().description(HttpStatus.FOUND.getReasonPhrase()) .addHeaderObject("Location", new Header().schema(new StringSchema()))); Operation operation = buildOperation(apiResponses); Schema schema = new ObjectSchema().additionalProperties(new StringSchema()); @@ -288,22 +326,33 @@ private void getOAuth2AuthorizationEndpoint(OpenAPI openAPI, SecurityFilterChain * @param openapi31 the openapi 31 */ private void getOidcProviderConfigurationEndpoint(OpenAPI openAPI, SecurityFilterChain securityFilterChain, boolean openapi31) { + Class oidcProviderConfigurationEndpointFilterClass = OidcProviderConfigurationEndpointFilter.class; Object oAuth2EndpointFilter = - new SpringDocSecurityOAuth2EndpointUtils(OidcProviderConfigurationEndpointFilter.class).findEndpoint(securityFilterChain); + new SpringDocSecurityOAuth2EndpointUtils(oidcProviderConfigurationEndpointFilterClass).findEndpoint(securityFilterChain); if (oAuth2EndpointFilter != null) { ApiResponses apiResponses = new ApiResponses(); buildApiResponsesOnSuccess(apiResponses, AnnotationsUtils.resolveSchemaFromType(SpringDocOidcProviderConfiguration.class, openAPI.getComponents(), null, openapi31)); buildApiResponsesOnInternalServerError(apiResponses); Operation operation = buildOperation(apiResponses); - buildPath(oAuth2EndpointFilter, REQUEST_MATCHER, openAPI, operation, HttpMethod.GET); + + Field field = ReflectionUtils.findField(oidcProviderConfigurationEndpointFilterClass, "DEFAULT_OIDC_PROVIDER_CONFIGURATION_ENDPOINT_URI"); + if (field != null) { + ReflectionUtils.makeAccessible(field); + String defaultOidcConfigUri = (String) ReflectionUtils.getField(field, null); + openAPI.getPaths().addPathItem(defaultOidcConfigUri , new PathItem().get(operation)); + operation = buildOperation(apiResponses); + operation.addParametersItem(new PathParameter().name("subpath").schema(new StringSchema())); + operation.summary("Valid when multiple issuers are allowed"); + openAPI.getPaths().addPathItem("/{subpath}"+defaultOidcConfigUri , new PathItem().get(operation)); + } } } /** * Gets OpenID UserInfo endpoint filter * - * @param openAPI the open api + * @param openAPI the open api * @param securityFilterChain the security filter chain */ private void getOidcUserInfoEndpoint(OpenAPI openAPI, SecurityFilterChain securityFilterChain) { @@ -346,7 +395,7 @@ private void getOidcClientRegistrationEndpoint(OpenAPI openAPI, SecurityFilterCh String mediaType = APPLICATION_JSON_VALUE; RequestBody requestBody = new RequestBody().content(new Content().addMediaType(mediaType, new MediaType().schema(schema))); operation.setRequestBody(requestBody); - operation.addParametersItem(new HeaderParameter().name("Authorization")); + operation.addParametersItem(new HeaderParameter().name("Authorization").schema(new StringSchema())); buildPath(oAuth2EndpointFilter, "clientRegistrationEndpointMatcher", openAPI, operation, HttpMethod.POST); } @@ -369,7 +418,7 @@ private Operation buildOperation(ApiResponses apiResponses) { * Build api responses api responses on success. * * @param apiResponses the api responses - * @param schema the schema + * @param schema the schema * @return the api responses */ private ApiResponses buildApiResponsesOnSuccess(ApiResponses apiResponses, Schema schema) { @@ -384,7 +433,7 @@ private ApiResponses buildApiResponsesOnSuccess(ApiResponses apiResponses, Schem * Build api responses api responses on created. * * @param apiResponses the api responses - * @param schema the schema + * @param schema the schema * @return the api responses */ private ApiResponses buildApiResponsesOnCreated(ApiResponses apiResponses, Schema schema) { @@ -437,26 +486,23 @@ private static void buildOAuth2Error(OpenAPI openAPI, ApiResponses apiResponses, /** * Build path. * - * @param oAuth2EndpointFilter the o auth 2 endpoint filter + * @param oAuth2EndpointFilter the o auth 2 endpoint filter * @param authorizationEndpointMatcher the authorization endpoint matcher - * @param openAPI the open api - * @param operation the operation - * @param requestMethod the request method + * @param openAPI the open api + * @param operation the operation + * @param requestMethod the request method */ private void buildPath(Object oAuth2EndpointFilter, String authorizationEndpointMatcher, OpenAPI openAPI, Operation operation, HttpMethod requestMethod) { try { - Field tokenEndpointMatcherField = FieldUtils.getDeclaredField(oAuth2EndpointFilter.getClass(), authorizationEndpointMatcher, true); - RequestMatcher endpointMatcher = (RequestMatcher) tokenEndpointMatcherField.get(oAuth2EndpointFilter); + RequestMatcher endpointMatcher = (RequestMatcher) FieldUtils.readDeclaredField(oAuth2EndpointFilter, authorizationEndpointMatcher, true); String path = null; if (endpointMatcher instanceof AntPathRequestMatcher antPathRequestMatcher) path = antPathRequestMatcher.getPattern(); else if (endpointMatcher instanceof OrRequestMatcher endpointMatchers) { - Field requestMatchersField = FieldUtils.getDeclaredField(OrRequestMatcher.class, "requestMatchers", true); - Iterable requestMatchers = (Iterable) requestMatchersField.get(endpointMatchers); + Iterable requestMatchers = (Iterable) FieldUtils.readDeclaredField(endpointMatchers, "requestMatchers", true); for (RequestMatcher requestMatcher : requestMatchers) { if (requestMatcher instanceof OrRequestMatcher orRequestMatcher) { - requestMatchersField = FieldUtils.getDeclaredField(OrRequestMatcher.class, "requestMatchers", true); - requestMatchers = (Iterable) requestMatchersField.get(orRequestMatcher); + requestMatchers = (Iterable) FieldUtils.readDeclaredField(orRequestMatcher, "requestMatchers", true); for (RequestMatcher matcher : requestMatchers) { if (matcher instanceof AntPathRequestMatcher antPathRequestMatcher) path = antPathRequestMatcher.getPattern(); diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocSecurityOAuth2EndpointUtils.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocSecurityOAuth2EndpointUtils.java index 7d9881357..dd7b1ba5f 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocSecurityOAuth2EndpointUtils.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocSecurityOAuth2EndpointUtils.java @@ -1,3 +1,29 @@ +/* + * + * * + * * * + * * * * + * * * * * + * * * * * * 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 org.springdoc.core.configuration; import java.util.Optional; diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocSortConfiguration.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocSortConfiguration.java index 5e512d170..f1f79de3c 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocSortConfiguration.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocSortConfiguration.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.configuration; @@ -27,9 +29,7 @@ import java.util.Optional; import org.springdoc.core.converters.SortOpenAPIConverter; -import org.springdoc.core.converters.models.SortObject; import org.springdoc.core.customizers.DataRestDelegatingMethodParameterCustomizer; -import org.springdoc.core.customizers.DelegatingMethodParameterCustomizer; import org.springdoc.core.providers.ObjectMapperProvider; import org.springdoc.core.providers.RepositoryRestConfigurationProvider; import org.springdoc.core.providers.SpringDataWebPropertiesProvider; @@ -50,6 +50,7 @@ /** * The type Spring doc pageable configuration. + * * @author bnasslahsen */ @Lazy(false) @@ -72,7 +73,6 @@ public class SpringDocSortConfiguration { @Lazy(false) SortOpenAPIConverter sortOpenAPIConverter(ObjectMapperProvider objectMapperProvider) { getConfig().replaceParameterObjectWithClass(org.springframework.data.domain.Sort.class, org.springdoc.core.converters.models.Sort.class); - getConfig().replaceWithClass(org.springframework.data.domain.Sort.class, SortObject.class); return new SortOpenAPIConverter(objectMapperProvider); } @@ -80,13 +80,13 @@ SortOpenAPIConverter sortOpenAPIConverter(ObjectMapperProvider objectMapperProvi * Delegating method parameter customizer delegating method parameter customizer. * * @param optionalSpringDataWebPropertiesProvider the optional spring data web properties - * @param optionalRepositoryRestConfiguration the optional repository rest configuration + * @param optionalRepositoryRestConfiguration the optional repository rest configuration * @return the delegating method parameter customizer */ @Bean @ConditionalOnMissingBean @Lazy(false) - DelegatingMethodParameterCustomizer delegatingMethodParameterCustomizer(Optional optionalSpringDataWebPropertiesProvider, Optional optionalRepositoryRestConfiguration) { + DataRestDelegatingMethodParameterCustomizer dataRestDelegatingMethodParameterCustomizer(Optional optionalSpringDataWebPropertiesProvider, Optional optionalRepositoryRestConfiguration) { return new DataRestDelegatingMethodParameterCustomizer(optionalSpringDataWebPropertiesProvider, optionalRepositoryRestConfiguration); } } \ No newline at end of file diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocSpecPropertiesConfiguration.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocSpecPropertiesConfiguration.java index bc2deb485..99136c420 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocSpecPropertiesConfiguration.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocSpecPropertiesConfiguration.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.configuration; @@ -53,13 +55,14 @@ @Conditional(SpecPropertiesCondition.class) public class SpringDocSpecPropertiesConfiguration { - /** - * Springdoc customizer that takes care of the specification string properties customization. - * Will be applied to general openapi schema. - * - * @return the springdoc customizer - */ - @Bean + /** + * Springdoc customizer that takes care of the specification string properties customization. + * Will be applied to general openapi schema. + * + * @param springDocConfigProperties the spring doc config properties + * @return the springdoc customizer + */ + @Bean @ConditionalOnMissingBean @Lazy(false) SpecPropertiesCustomizer specificationStringPropertiesCustomizer( @@ -68,13 +71,14 @@ SpecPropertiesCustomizer specificationStringPropertiesCustomizer( return new SpecPropertiesCustomizer(springDocConfigProperties); } - /** - * Bean post processor that applies the specification string properties customization to - * grouped openapi schemas by using group name as a prefix for properties. - * - * @return the bean post processor - */ - @Bean + /** + * Bean post processor that applies the specification string properties customization to + * grouped openapi schemas by using group name as a prefix for properties. + * + * @param springDocConfigProperties the spring doc config properties + * @return the bean post processor + */ + @Bean @ConditionalOnMissingBean @Lazy(false) SpecificationStringPropertiesCustomizerBeanPostProcessor specificationStringPropertiesCustomizerBeanPostProcessor( @@ -89,9 +93,17 @@ SpecificationStringPropertiesCustomizerBeanPostProcessor specificationStringProp */ private static class SpecificationStringPropertiesCustomizerBeanPostProcessor implements BeanPostProcessor { - private final SpringDocConfigProperties springDocConfigProperties; + /** + * The Spring doc config properties. + */ + private final SpringDocConfigProperties springDocConfigProperties; - public SpecificationStringPropertiesCustomizerBeanPostProcessor( + /** + * Instantiates a new Specification string properties customizer bean post processor. + * + * @param springDocConfigProperties the spring doc config properties + */ + public SpecificationStringPropertiesCustomizerBeanPostProcessor( SpringDocConfigProperties springDocConfigProperties ) { this.springDocConfigProperties = springDocConfigProperties; diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocUIConfiguration.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocUIConfiguration.java index 07da137fa..d54cb124c 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocUIConfiguration.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocUIConfiguration.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.configuration; @@ -43,6 +45,7 @@ /** * The type Spring doc Native Configuration. + * * @author bnasslahsen */ @Lazy(false) diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/hints/SpringDocDataRestHints.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/hints/SpringDocDataRestHints.java index ea83aa73a..e15d4c5ff 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/hints/SpringDocDataRestHints.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/hints/SpringDocDataRestHints.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.configuration.hints; @@ -36,11 +38,15 @@ /** * The type Spring doc DataRest hints. + * * @author bnasslahsen */ public class SpringDocDataRestHints implements RuntimeHintsRegistrar { - //spring-data-rest + /** + * The Spring data rest type names. + */ +//spring-data-rest static String[] springDataRestTypeNames = { "org.springframework.data.rest.webmvc.config.DelegatingHandlerMapping", "org.springframework.data.rest.webmvc.support.DelegatingHandlerMapping", "org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController", diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/hints/SpringDocHints.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/hints/SpringDocHints.java index e4ac1f7b3..55428fa3d 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/hints/SpringDocHints.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/hints/SpringDocHints.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.configuration.hints; @@ -82,10 +84,14 @@ /** * The type Spring doc hints. + * * @author bnasslahsen */ public class SpringDocHints implements RuntimeHintsRegistrar { + /** + * The Types to register. + */ static Class[] typesToRegister = { //swagger-models io.swagger.v3.oas.models.security.SecurityScheme.Type.class, diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/hints/SpringDocSecurityHints.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/hints/SpringDocSecurityHints.java index 22930100e..9bd3d02c5 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/hints/SpringDocSecurityHints.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/hints/SpringDocSecurityHints.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.configuration.hints; @@ -32,11 +34,15 @@ /** * The type Spring doc DataRest hints. + * * @author bnasslahsen */ public class SpringDocSecurityHints implements RuntimeHintsRegistrar { - //spring-security + /** + * The Spring security type names. + */ +//spring-security static String[] springSecurityTypeNames = { "org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter", "org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter", "org.springframework.security.web.util.matcher.OrRequestMatcher" diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/oauth2/SpringDocOAuth2AuthorizationServerMetadata.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/oauth2/SpringDocOAuth2AuthorizationServerMetadata.java index f16e14158..ad57c68a1 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/oauth2/SpringDocOAuth2AuthorizationServerMetadata.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/oauth2/SpringDocOAuth2AuthorizationServerMetadata.java @@ -1,3 +1,29 @@ +/* + * + * * + * * * + * * * * + * * * * * + * * * * * * 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 org.springdoc.core.configuration.oauth2; import java.util.List; @@ -10,45 +36,105 @@ /** * The type Spring doc o auth 2 authorization server metadata. * - * @see OAuth2AuthorizationServerMetadata * @author bnasslahsen * @author yuta.saito + * @see OAuth2AuthorizationServerMetadata */ @Schema(name = "OAuth2AuthorizationServerMetadata") public interface SpringDocOAuth2AuthorizationServerMetadata { + /** + * Issuer string. + * + * @return the string + */ @JsonProperty(OAuth2AuthorizationServerMetadataClaimNames.ISSUER) String issuer(); + /** + * Authorization endpoint string. + * + * @return the string + */ @JsonProperty(OAuth2AuthorizationServerMetadataClaimNames.AUTHORIZATION_ENDPOINT) String authorizationEndpoint(); + /** + * Token endpoint string. + * + * @return the string + */ @JsonProperty(OAuth2AuthorizationServerMetadataClaimNames.TOKEN_ENDPOINT) String tokenEndpoint(); + /** + * Token endpoint auth methods supported list. + * + * @return the list + */ @JsonProperty(OAuth2AuthorizationServerMetadataClaimNames.TOKEN_ENDPOINT_AUTH_METHODS_SUPPORTED) List tokenEndpointAuthMethodsSupported(); + /** + * Jwks uri string. + * + * @return the string + */ @JsonProperty(OAuth2AuthorizationServerMetadataClaimNames.JWKS_URI) String jwksUri(); + /** + * Response types supported list. + * + * @return the list + */ @JsonProperty(OAuth2AuthorizationServerMetadataClaimNames.RESPONSE_TYPES_SUPPORTED) List responseTypesSupported(); + /** + * Grant types supported list. + * + * @return the list + */ @JsonProperty(OAuth2AuthorizationServerMetadataClaimNames.GRANT_TYPES_SUPPORTED) List grantTypesSupported(); + /** + * Revocation endpoint string. + * + * @return the string + */ @JsonProperty(OAuth2AuthorizationServerMetadataClaimNames.REVOCATION_ENDPOINT) String revocationEndpoint(); + /** + * Revocation endpoint auth methods supported list. + * + * @return the list + */ @JsonProperty(OAuth2AuthorizationServerMetadataClaimNames.REVOCATION_ENDPOINT_AUTH_METHODS_SUPPORTED) List revocationEndpointAuthMethodsSupported(); + /** + * Introspection endpoint string. + * + * @return the string + */ @JsonProperty(OAuth2AuthorizationServerMetadataClaimNames.INTROSPECTION_ENDPOINT) String introspectionEndpoint(); + /** + * Introspection endpoint auth methods supported list. + * + * @return the list + */ @JsonProperty(OAuth2AuthorizationServerMetadataClaimNames.INTROSPECTION_ENDPOINT_AUTH_METHODS_SUPPORTED) List introspectionEndpointAuthMethodsSupported(); + /** + * Code challenge methods supported list. + * + * @return the list + */ @JsonProperty(OAuth2AuthorizationServerMetadataClaimNames.CODE_CHALLENGE_METHODS_SUPPORTED) List codeChallengeMethodsSupported(); } diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/oauth2/SpringDocOAuth2Token.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/oauth2/SpringDocOAuth2Token.java index 4aedaf5ec..369fafc39 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/oauth2/SpringDocOAuth2Token.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/oauth2/SpringDocOAuth2Token.java @@ -1,3 +1,29 @@ +/* + * + * * + * * * + * * * * + * * * * * + * * * * * * 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 org.springdoc.core.configuration.oauth2; import com.fasterxml.jackson.databind.PropertyNamingStrategies; @@ -7,19 +33,44 @@ /** * The type Spring doc o auth 2 token. * - * @see DefaultOAuth2AccessTokenResponseMapConverter * @author yuta.saito + * @see DefaultOAuth2AccessTokenResponseMapConverter */ @Schema(name = "OAuth2Token") @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) public interface SpringDocOAuth2Token { + /** + * Gets access token. + * + * @return the access token + */ String getAccessToken(); + /** + * Gets token type. + * + * @return the token type + */ String getTokenType(); + /** + * Gets expires in. + * + * @return the expires in + */ long getExpiresIn(); + /** + * Gets scope. + * + * @return the scope + */ String getScope(); + /** + * Gets refresh token. + * + * @return the refresh token + */ String getRefreshToken(); } diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/oauth2/SpringDocOAuth2TokenIntrospection.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/oauth2/SpringDocOAuth2TokenIntrospection.java index ae2cc9ee0..13b34a0b7 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/oauth2/SpringDocOAuth2TokenIntrospection.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/oauth2/SpringDocOAuth2TokenIntrospection.java @@ -1,3 +1,29 @@ +/* + * + * * + * * * + * * * * + * * * * * + * * * * * * 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 org.springdoc.core.configuration.oauth2; import java.util.List; @@ -10,46 +36,106 @@ /** * The type Spring doc o auth 2 token introspection. * - * @see OAuth2TokenIntrospectionHttpMessageConverter - * @see OAuth2TokenIntrospection * @author bnasslahsen * @author yuta.saito + * @see OAuth2TokenIntrospectionHttpMessageConverter + * @see OAuth2TokenIntrospection */ @Schema(name = "OAuth2TokenIntrospection") public interface SpringDocOAuth2TokenIntrospection { + /** + * Gets active. + * + * @return the active + */ @JsonProperty(OAuth2TokenIntrospectionClaimNames.ACTIVE) boolean getActive(); + /** + * Gets scope. + * + * @return the scope + */ @JsonProperty(OAuth2TokenIntrospectionClaimNames.SCOPE) String getScope(); + /** + * Gets client id. + * + * @return the client id + */ @JsonProperty(OAuth2TokenIntrospectionClaimNames.CLIENT_ID) String getClientId(); + /** + * Gets username. + * + * @return the username + */ @JsonProperty(OAuth2TokenIntrospectionClaimNames.USERNAME) String getUsername(); + /** + * Gets token type. + * + * @return the token type + */ @JsonProperty(OAuth2TokenIntrospectionClaimNames.TOKEN_TYPE) String getTokenType(); + /** + * Gets expires at. + * + * @return the expires at + */ @JsonProperty(OAuth2TokenIntrospectionClaimNames.EXP) long getExpiresAt(); + /** + * Gets issue at. + * + * @return the issue at + */ @JsonProperty(OAuth2TokenIntrospectionClaimNames.IAT) long getIssueAt(); + /** + * Gets not before. + * + * @return the not before + */ @JsonProperty(OAuth2TokenIntrospectionClaimNames.NBF) long getNotBefore(); + /** + * Gets subject. + * + * @return the subject + */ @JsonProperty(OAuth2TokenIntrospectionClaimNames.SUB) String getSubject(); + /** + * Gets audience. + * + * @return the audience + */ @JsonProperty(OAuth2TokenIntrospectionClaimNames.AUD) List getAudience(); + /** + * Gets issuer. + * + * @return the issuer + */ @JsonProperty(OAuth2TokenIntrospectionClaimNames.ISS) String getIssuer(); + /** + * Gets id. + * + * @return the id + */ @JsonProperty(OAuth2TokenIntrospectionClaimNames.JTI) String getId(); } diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/oauth2/SpringDocOidcClientRegistrationRequest.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/oauth2/SpringDocOidcClientRegistrationRequest.java index 984d7539a..97c0c327d 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/oauth2/SpringDocOidcClientRegistrationRequest.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/oauth2/SpringDocOidcClientRegistrationRequest.java @@ -1,3 +1,29 @@ +/* + * + * * + * * * + * * * * + * * * * * + * * * * * * 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 org.springdoc.core.configuration.oauth2; import java.time.Instant; @@ -11,48 +37,113 @@ /** * The type Spring doc OpenID Client Registration Request * + * @author yuta.saito * @see OidcClientRegistration * @see OidcClientRegistrationHttpMessageConverter - * @author yuta.saito */ @Schema(name = "ClientRegistrationRequest") public interface SpringDocOidcClientRegistrationRequest { + /** + * Client id string. + * + * @return the string + */ @JsonProperty(OidcClientMetadataClaimNames.CLIENT_ID) String clientId(); + /** + * Client id issued at instant. + * + * @return the instant + */ @JsonProperty(OidcClientMetadataClaimNames.CLIENT_ID_ISSUED_AT) Instant clientIdIssuedAt(); + /** + * Client secret string. + * + * @return the string + */ @JsonProperty(OidcClientMetadataClaimNames.CLIENT_SECRET) String clientSecret(); + /** + * Client secret expires at instant. + * + * @return the instant + */ @JsonProperty(OidcClientMetadataClaimNames.CLIENT_SECRET_EXPIRES_AT) Instant CLIENT_SECRET_EXPIRES_AT(); + /** + * Client name string. + * + * @return the string + */ @JsonProperty(OidcClientMetadataClaimNames.CLIENT_NAME) String clientName(); + /** + * Redirect uris list. + * + * @return the list + */ @JsonProperty(OidcClientMetadataClaimNames.REDIRECT_URIS) List redirectUris(); + /** + * Token endpoint authentication method string. + * + * @return the string + */ @JsonProperty(OidcClientMetadataClaimNames.TOKEN_ENDPOINT_AUTH_METHOD) String tokenEndpointAuthenticationMethod(); + /** + * Token endpoint authentication signing algorithm string. + * + * @return the string + */ @JsonProperty(OidcClientMetadataClaimNames.TOKEN_ENDPOINT_AUTH_SIGNING_ALG) String tokenEndpointAuthenticationSigningAlgorithm(); + /** + * Grant types list. + * + * @return the list + */ @JsonProperty(OidcClientMetadataClaimNames.GRANT_TYPES) List grantTypes(); + /** + * Response type list. + * + * @return the list + */ @JsonProperty(OidcClientMetadataClaimNames.RESPONSE_TYPES) List responseType(); + /** + * Scopes string. + * + * @return the string + */ @JsonProperty(OidcClientMetadataClaimNames.SCOPE) String scopes(); + /** + * Jwk set url string. + * + * @return the string + */ @JsonProperty(OidcClientMetadataClaimNames.JWKS_URI) String jwkSetUrl(); + /** + * Id token signed response algorithm string. + * + * @return the string + */ @JsonProperty(OidcClientMetadataClaimNames.ID_TOKEN_SIGNED_RESPONSE_ALG) String idTokenSignedResponseAlgorithm(); } diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/oauth2/SpringDocOidcClientRegistrationResponse.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/oauth2/SpringDocOidcClientRegistrationResponse.java index f62c8d0c0..ecd9d852b 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/oauth2/SpringDocOidcClientRegistrationResponse.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/oauth2/SpringDocOidcClientRegistrationResponse.java @@ -1,3 +1,29 @@ +/* + * + * * + * * * + * * * * + * * * * * + * * * * * * 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 org.springdoc.core.configuration.oauth2; import java.util.List; @@ -10,54 +36,129 @@ /** * The type Spring doc OpenID Client Registration Request * + * @author yuta.saito * @see OidcClientRegistration * @see OidcClientRegistrationHttpMessageConverter - * @author yuta.saito */ @Schema(name = "ClientRegistrationResponse") public interface SpringDocOidcClientRegistrationResponse { + /** + * Client id string. + * + * @return the string + */ @JsonProperty(OidcClientMetadataClaimNames.CLIENT_ID) String clientId(); + /** + * Client id issued at long. + * + * @return the long + */ @JsonProperty(OidcClientMetadataClaimNames.CLIENT_ID_ISSUED_AT) long clientIdIssuedAt(); + /** + * Client secret string. + * + * @return the string + */ @JsonProperty(OidcClientMetadataClaimNames.CLIENT_SECRET) String clientSecret(); + /** + * Client secret expires at long. + * + * @return the long + */ @JsonProperty(OidcClientMetadataClaimNames.CLIENT_SECRET_EXPIRES_AT) long CLIENT_SECRET_EXPIRES_AT(); + /** + * Client name string. + * + * @return the string + */ @JsonProperty(OidcClientMetadataClaimNames.CLIENT_NAME) String clientName(); + /** + * Redirect uris list. + * + * @return the list + */ @JsonProperty(OidcClientMetadataClaimNames.REDIRECT_URIS) List redirectUris(); + /** + * Token endpoint authentication method string. + * + * @return the string + */ @JsonProperty(OidcClientMetadataClaimNames.TOKEN_ENDPOINT_AUTH_METHOD) String tokenEndpointAuthenticationMethod(); + /** + * Token endpoint authentication signing algorithm string. + * + * @return the string + */ @JsonProperty(OidcClientMetadataClaimNames.TOKEN_ENDPOINT_AUTH_SIGNING_ALG) String tokenEndpointAuthenticationSigningAlgorithm(); + /** + * Grant types list. + * + * @return the list + */ @JsonProperty(OidcClientMetadataClaimNames.GRANT_TYPES) List grantTypes(); + /** + * Response type list. + * + * @return the list + */ @JsonProperty(OidcClientMetadataClaimNames.RESPONSE_TYPES) List responseType(); + /** + * Scopes string. + * + * @return the string + */ @JsonProperty(OidcClientMetadataClaimNames.SCOPE) String scopes(); + /** + * Jwk set url string. + * + * @return the string + */ @JsonProperty(OidcClientMetadataClaimNames.JWKS_URI) String jwkSetUrl(); + /** + * Id token signed response algorithm string. + * + * @return the string + */ @JsonProperty(OidcClientMetadataClaimNames.ID_TOKEN_SIGNED_RESPONSE_ALG) String idTokenSignedResponseAlgorithm(); + /** + * Registration access token string. + * + * @return the string + */ @JsonProperty(OidcClientMetadataClaimNames.REGISTRATION_ACCESS_TOKEN) String registrationAccessToken(); + /** + * Registration client url string. + * + * @return the string + */ @JsonProperty(OidcClientMetadataClaimNames.REGISTRATION_CLIENT_URI) String registrationClientUrl(); } diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/oauth2/SpringDocOidcProviderConfiguration.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/oauth2/SpringDocOidcProviderConfiguration.java index 15f7f99c4..9cc97461a 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/oauth2/SpringDocOidcProviderConfiguration.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/oauth2/SpringDocOidcProviderConfiguration.java @@ -1,3 +1,29 @@ +/* + * + * * + * * * + * * * * + * * * * * + * * * * * * 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 org.springdoc.core.configuration.oauth2; import java.util.List; @@ -11,56 +37,136 @@ /** * The type Spring doc OpenID Provider Configuration * - * @see OidcProviderConfiguration * @author yuta.saito + * @see OidcProviderConfiguration */ @Schema(name = "OidcProviderConfiguration") public interface SpringDocOidcProviderConfiguration { + /** + * Issuer string. + * + * @return the string + */ @JsonProperty(OAuth2AuthorizationServerMetadataClaimNames.ISSUER) String issuer(); + /** + * Authorization endpoint string. + * + * @return the string + */ @JsonProperty(OAuth2AuthorizationServerMetadataClaimNames.AUTHORIZATION_ENDPOINT) String authorizationEndpoint(); + /** + * Token endpoint string. + * + * @return the string + */ @JsonProperty(OAuth2AuthorizationServerMetadataClaimNames.TOKEN_ENDPOINT) String tokenEndpoint(); + /** + * Token endpoint auth methods supported list. + * + * @return the list + */ @JsonProperty(OAuth2AuthorizationServerMetadataClaimNames.TOKEN_ENDPOINT_AUTH_METHODS_SUPPORTED) List tokenEndpointAuthMethodsSupported(); + /** + * Jwks uri string. + * + * @return the string + */ @JsonProperty(OAuth2AuthorizationServerMetadataClaimNames.JWKS_URI) String jwksUri(); + /** + * User info endpoint string. + * + * @return the string + */ @JsonProperty(OidcProviderMetadataClaimNames.USER_INFO_ENDPOINT) String userInfoEndpoint(); + /** + * Response types supported list. + * + * @return the list + */ @JsonProperty(OAuth2AuthorizationServerMetadataClaimNames.RESPONSE_TYPES_SUPPORTED) List responseTypesSupported(); + /** + * Grant types supported list. + * + * @return the list + */ @JsonProperty(OAuth2AuthorizationServerMetadataClaimNames.GRANT_TYPES_SUPPORTED) List grantTypesSupported(); + /** + * Revocation endpoint string. + * + * @return the string + */ @JsonProperty(OAuth2AuthorizationServerMetadataClaimNames.REVOCATION_ENDPOINT) String revocationEndpoint(); + /** + * Revocation endpoint auth methods supported list. + * + * @return the list + */ @JsonProperty(OAuth2AuthorizationServerMetadataClaimNames.REVOCATION_ENDPOINT_AUTH_METHODS_SUPPORTED) List revocationEndpointAuthMethodsSupported(); + /** + * Introspection endpoint string. + * + * @return the string + */ @JsonProperty(OAuth2AuthorizationServerMetadataClaimNames.INTROSPECTION_ENDPOINT) String introspectionEndpoint(); + /** + * Introspection endpoint auth methods supported list. + * + * @return the list + */ @JsonProperty(OAuth2AuthorizationServerMetadataClaimNames.INTROSPECTION_ENDPOINT_AUTH_METHODS_SUPPORTED) List introspectionEndpointAuthMethodsSupported(); + /** + * Subject types supported string. + * + * @return the string + */ @JsonProperty(OidcProviderMetadataClaimNames.SUBJECT_TYPES_SUPPORTED) String subjectTypesSupported(); + /** + * Id token signing alg values supported string. + * + * @return the string + */ @JsonProperty(OidcProviderMetadataClaimNames.ID_TOKEN_SIGNING_ALG_VALUES_SUPPORTED) String idTokenSigningAlgValuesSupported(); + /** + * Scope supported string. + * + * @return the string + */ @JsonProperty(OAuth2AuthorizationServerMetadataClaimNames.SCOPES_SUPPORTED) String scopeSupported(); + /** + * Code challenge methods supported list. + * + * @return the list + */ @JsonProperty(OAuth2AuthorizationServerMetadataClaimNames.CODE_CHALLENGE_METHODS_SUPPORTED) List codeChallengeMethodsSupported(); } diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configurer/SpringdocActuatorBeanFactoryConfigurer.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configurer/SpringdocActuatorBeanFactoryConfigurer.java index 0bfcdf5d4..6e5294201 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configurer/SpringdocActuatorBeanFactoryConfigurer.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configurer/SpringdocActuatorBeanFactoryConfigurer.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.configurer; @@ -27,7 +29,6 @@ import java.util.ArrayList; import java.util.List; -import org.springdoc.core.customizers.ActuatorOpenApiCustomizer; import org.springdoc.core.customizers.ActuatorOperationCustomizer; import org.springdoc.core.models.GroupedOpenApi; import org.springdoc.core.properties.SpringDocConfigProperties; @@ -47,6 +48,7 @@ /** * The type Springdoc bean factory configurer. + * * @author bnasslahsen */ public class SpringdocActuatorBeanFactoryConfigurer extends SpringdocBeanFactoryConfigurer { @@ -59,7 +61,7 @@ public class SpringdocActuatorBeanFactoryConfigurer extends SpringdocBeanFactory /** * Instantiates a new Springdoc actuator bean factory configurer. * - * @param groupedOpenApis the grouped open apis + * @param groupedOpenApis the grouped open apis */ public SpringdocActuatorBeanFactoryConfigurer(List groupedOpenApis) { this.groupedOpenApis = groupedOpenApis; @@ -76,9 +78,7 @@ public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) WebEndpointProperties webEndpointProperties = result.get(); SpringDocConfigProperties springDocConfigProperties = springDocConfigPropertiesBindResult.get(); List newGroups = new ArrayList<>(); - - ActuatorOpenApiCustomizer actuatorOpenApiCustomizer = new ActuatorOpenApiCustomizer(webEndpointProperties); - beanFactory.registerSingleton("actuatorOpenApiCustomizer", actuatorOpenApiCustomizer); + ActuatorOperationCustomizer actuatorCustomizer = new ActuatorOperationCustomizer(springDocConfigProperties); beanFactory.registerSingleton("actuatorCustomizer", actuatorCustomizer); diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configurer/SpringdocBeanFactoryConfigurer.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configurer/SpringdocBeanFactoryConfigurer.java index a67ff7e25..845b389f3 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configurer/SpringdocBeanFactoryConfigurer.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configurer/SpringdocBeanFactoryConfigurer.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.configurer; diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/AdditionalModelsConverter.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/AdditionalModelsConverter.java index c565255db..1e8b673dc 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/AdditionalModelsConverter.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/AdditionalModelsConverter.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.converters; @@ -41,6 +43,7 @@ /** * The type Additional models converter. + * * @author bnasslahsen */ public class AdditionalModelsConverter implements ModelConverter { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/CollectionModelContentConverter.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/CollectionModelContentConverter.java index 0b8b6ae6e..72adf3a81 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/CollectionModelContentConverter.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/CollectionModelContentConverter.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.converters; @@ -46,8 +48,8 @@ * Override resolved schema as there is a custom serializer that converts the data to a map before serializing it. * * @author bnasslahsen - * @see org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalResourcesSerializer - * @see org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalResourcesSerializer#serialize(Collection, JsonGenerator, SerializerProvider) org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalResourcesSerializer#serialize(Collection, JsonGenerator, SerializerProvider)org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalResourcesSerializer#serialize(Collection, JsonGenerator, SerializerProvider)org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalResourcesSerializer#serialize(Collection, JsonGenerator, SerializerProvider)org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalResourcesSerializer#serialize(Collection, JsonGenerator, SerializerProvider) + * @see org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalResourcesSerializer + * @see org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalResourcesSerializer#serialize(Collection, JsonGenerator, SerializerProvider) org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalResourcesSerializer#serialize(Collection, JsonGenerator, SerializerProvider)org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalResourcesSerializer#serialize(Collection, JsonGenerator, SerializerProvider)org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalResourcesSerializer#serialize(Collection, JsonGenerator, SerializerProvider)org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalResourcesSerializer#serialize(Collection, JsonGenerator, SerializerProvider)org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalResourcesSerializer#serialize(Collection, JsonGenerator, SerializerProvider) */ public class CollectionModelContentConverter implements ModelConverter { @@ -85,7 +87,7 @@ public Schema resolve(AnnotatedType type, ModelConverterContext context, Iter /** * Gets entity type. * - * @param type the type + * @param type the type * @return the entity type */ private Class getEntityType(AnnotatedType type) { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/ConverterUtils.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/ConverterUtils.java index 98b165ee9..247bc235e 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/ConverterUtils.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/ConverterUtils.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.converters; diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/FileSupportConverter.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/FileSupportConverter.java index 9192f4471..8d5fce596 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/FileSupportConverter.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/FileSupportConverter.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.converters; @@ -40,6 +42,7 @@ /** * The type File support converter. + * * @author bnasslahsen */ public class FileSupportConverter implements ModelConverter { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/JavaTypeToIgnoreConverter.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/JavaTypeToIgnoreConverter.java index 093e2f68e..b40659070 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/JavaTypeToIgnoreConverter.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/JavaTypeToIgnoreConverter.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.converters; @@ -35,6 +37,7 @@ /** * The type Request type to ignore converter. + * * @author bnasslahsen */ public class JavaTypeToIgnoreConverter implements ModelConverter { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/ModelConverterRegistrar.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/ModelConverterRegistrar.java index d97926ce1..0cc94cb40 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/ModelConverterRegistrar.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/ModelConverterRegistrar.java @@ -3,28 +3,29 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.converters; -import java.lang.reflect.Field; import java.util.List; import java.util.Optional; @@ -37,6 +38,7 @@ /** * Wrapper for model converters to only register converters once + * * @author bnasslahsen */ public class ModelConverterRegistrar { @@ -75,8 +77,7 @@ public ModelConverterRegistrar(List modelConverters, SpringDocCo @SuppressWarnings("unchecked") private Optional getRegisteredConverterSameAs(ModelConverter modelConverter) { try { - Field convertersField = FieldUtils.getDeclaredField(ModelConverters.class, "converters", true); - List modelConverters = (List) convertersField.get(modelConvertersInstance); + List modelConverters = (List) FieldUtils.readDeclaredField(modelConvertersInstance, "converters", true); return modelConverters.stream() .filter(registeredModelConverter -> isSameConverter(registeredModelConverter, modelConverter)) .findFirst(); diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/PageOpenAPIConverter.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/PageOpenAPIConverter.java new file mode 100644 index 000000000..2799e5077 --- /dev/null +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/PageOpenAPIConverter.java @@ -0,0 +1,124 @@ +/* + * + * * + * * * + * * * * + * * * * * + * * * * * * 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 org.springdoc.core.converters; + +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; +import java.util.Iterator; + +import com.fasterxml.jackson.databind.JavaType; +import io.swagger.v3.core.converter.AnnotatedType; +import io.swagger.v3.core.converter.ModelConverter; +import io.swagger.v3.core.converter.ModelConverterContext; +import io.swagger.v3.oas.models.media.Schema; +import org.apache.commons.lang3.StringUtils; +import org.springdoc.core.providers.ObjectMapperProvider; + +import org.springframework.core.ResolvableType; +import org.springframework.data.web.PagedModel; + +/** + * The Spring Data Page type model converter. + * + * @author Claudio Nave + */ +public class PageOpenAPIConverter implements ModelConverter { + + /** + * The constant PAGE_TO_REPLACE. + */ + private static final String PAGE_TO_REPLACE = "org.springframework.data.domain.Page"; + + /** + * The constant PAGED_MODEL. + */ + private static final AnnotatedType PAGED_MODEL = new AnnotatedType(PagedModel.class).resolveAsRef(true); + + /** + * The Spring doc object mapper. + */ + private final ObjectMapperProvider springDocObjectMapper; + + /** + * Flag to replace Page with PagedModel or not. + */ + private final boolean replacePageWithPagedModel; + + /** + * Instantiates a new Page open api converter. + * + * @param replacePageWithPagedModel flag to replace Page with PagedModel or not + * @param springDocObjectMapper the spring doc object mapper + */ + public PageOpenAPIConverter(boolean replacePageWithPagedModel, ObjectMapperProvider springDocObjectMapper) { + this.replacePageWithPagedModel = replacePageWithPagedModel; + this.springDocObjectMapper = springDocObjectMapper; + } + + /** + * Resolve schema. + * @param type the type + * @param context the context + * @param chain the chain + * @return the schema + */ + @Override + public Schema resolve(AnnotatedType type, ModelConverterContext context, Iterator chain) { + JavaType javaType = springDocObjectMapper.jsonMapper().constructType(type.getType()); + if (javaType != null) { + Class cls = javaType.getRawClass(); + if (replacePageWithPagedModel && PAGE_TO_REPLACE.equals(cls.getCanonicalName())) { + if (!type.isSchemaProperty()) + type = resolvePagedModelType(type); + else + type.name(cls.getSimpleName() + StringUtils.capitalize(type.getParent().getType())); + } + } + return (chain.hasNext()) ? chain.next().resolve(type, context, chain) : null; + } + + /** + * Resolve paged model type annotated type. + * + * @param type the type + * @return the annotated type + */ + private AnnotatedType resolvePagedModelType(AnnotatedType type) { + Type pageType = type.getType(); + if (pageType instanceof ParameterizedType) { + Type argumentType = ((ParameterizedType) type.getType()).getActualTypeArguments()[0]; + Type pagedModelType = ResolvableType + .forClassWithGenerics(PagedModel.class, ResolvableType.forType(argumentType)) + .getType(); + return new AnnotatedType(pagedModelType).resolveAsRef(true); + } + else { + return PAGED_MODEL; + } + } + +} \ No newline at end of file diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/PageableOpenAPIConverter.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/PageableOpenAPIConverter.java index 8bf14d5ea..2faf74dd0 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/PageableOpenAPIConverter.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/PageableOpenAPIConverter.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.converters; @@ -37,6 +39,7 @@ /** * The Pageable Type models converter. + * * @author bnasslahsen */ public class PageableOpenAPIConverter implements ModelConverter { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/PolymorphicModelConverter.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/PolymorphicModelConverter.java index 2f04a52c8..12cec2add 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/PolymorphicModelConverter.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/PolymorphicModelConverter.java @@ -3,44 +3,53 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.converters; +import java.lang.reflect.Field; import java.lang.reflect.Modifier; +import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.Iterator; import java.util.List; +import com.fasterxml.jackson.annotation.JsonUnwrapped; import com.fasterxml.jackson.databind.JavaType; import io.swagger.v3.core.converter.AnnotatedType; import io.swagger.v3.core.converter.ModelConverter; import io.swagger.v3.core.converter.ModelConverterContext; import io.swagger.v3.core.util.AnnotationsUtils; +import io.swagger.v3.oas.models.Components; import io.swagger.v3.oas.models.media.ComposedSchema; import io.swagger.v3.oas.models.media.ObjectSchema; import io.swagger.v3.oas.models.media.Schema; +import org.apache.commons.lang3.reflect.FieldUtils; import org.springdoc.core.providers.ObjectMapperProvider; /** * The type Polymorphic model converter. + * * @author bnasslahsen */ public class PolymorphicModelConverter implements ModelConverter { @@ -50,6 +59,17 @@ public class PolymorphicModelConverter implements ModelConverter { */ private final ObjectMapperProvider springDocObjectMapper; + /** + * The constant PARENT_TYPES_TO_IGNORE. + */ + private static final List PARENT_TYPES_TO_IGNORE = Collections.synchronizedList(new ArrayList<>()); + + static { + PARENT_TYPES_TO_IGNORE.add("JsonSchema"); + PARENT_TYPES_TO_IGNORE.add("Pageable"); + PARENT_TYPES_TO_IGNORE.add("EntityModel"); + } + /** * Instantiates a new Polymorphic model converter. * @@ -59,12 +79,30 @@ public PolymorphicModelConverter(ObjectMapperProvider springDocObjectMapper) { this.springDocObjectMapper = springDocObjectMapper; } - private static Schema getResolvedSchema(JavaType javaType, Schema resolvedSchema) { + /** + * Add parent type. + * + * @param parentTypes the parent types + */ + public static void addParentType(String... parentTypes) { + PARENT_TYPES_TO_IGNORE.addAll(List.of(parentTypes)); + } + + /** + * Gets resolved schema. + * + * @param javaType the java type + * @param resolvedSchema the resolved schema + * @return the resolved schema + */ + private Schema getResolvedSchema(JavaType javaType, Schema resolvedSchema) { if (resolvedSchema instanceof ObjectSchema && resolvedSchema.getProperties() != null) { - if (resolvedSchema.getProperties().containsKey(javaType.getRawClass().getName())) + if (resolvedSchema.getProperties().containsKey(javaType.getRawClass().getName())) { resolvedSchema = resolvedSchema.getProperties().get(javaType.getRawClass().getName()); - else if (resolvedSchema.getProperties().containsKey(javaType.getRawClass().getSimpleName())) + } + else if (resolvedSchema.getProperties().containsKey(javaType.getRawClass().getSimpleName())) { resolvedSchema = resolvedSchema.getProperties().get(javaType.getRawClass().getSimpleName()); + } } return resolvedSchema; } @@ -73,11 +111,27 @@ else if (resolvedSchema.getProperties().containsKey(javaType.getRawClass().getSi public Schema resolve(AnnotatedType type, ModelConverterContext context, Iterator chain) { JavaType javaType = springDocObjectMapper.jsonMapper().constructType(type.getType()); if (javaType != null) { + for (Field field : FieldUtils.getAllFields(javaType.getRawClass())) { + if (field.isAnnotationPresent(JsonUnwrapped.class)) { + PARENT_TYPES_TO_IGNORE.add(javaType.getRawClass().getSimpleName()); + } + } if (chain.hasNext()) { + if (!type.isResolveAsRef() && type.getParent() != null + && PARENT_TYPES_TO_IGNORE.stream().noneMatch(ignore -> type.getParent().getName().startsWith(ignore))) + type.resolveAsRef(true); Schema resolvedSchema = chain.next().resolve(type, context, chain); resolvedSchema = getResolvedSchema(javaType, resolvedSchema); - if (resolvedSchema == null || resolvedSchema.get$ref() == null) + if (resolvedSchema == null || resolvedSchema.get$ref() == null) { return resolvedSchema; + } + if(resolvedSchema.get$ref().contains(Components.COMPONENTS_SCHEMAS_REF)) { + String schemaName = resolvedSchema.get$ref().substring(Components.COMPONENTS_SCHEMAS_REF.length()); + Schema existingSchema = context.getDefinedModels().get(schemaName); + if (existingSchema != null && existingSchema.getOneOf() != null) { + return resolvedSchema; + } + } return composePolymorphicSchema(type, resolvedSchema, context.getDefinedModels().values()); } } @@ -87,13 +141,31 @@ public Schema resolve(AnnotatedType type, ModelConverterContext context, Iterato /** * Compose polymorphic schema. * - * @param type the type - * @param schema the schema + * @param type the type + * @param schema the schema * @param schemas the schemas * @return the schema */ private Schema composePolymorphicSchema(AnnotatedType type, Schema schema, Collection schemas) { String ref = schema.get$ref(); + List composedSchemas = findComposedSchemas(ref, schemas); + + if (composedSchemas.isEmpty()) return schema; + + ComposedSchema result = new ComposedSchema(); + if (isConcreteClass(type)) result.addOneOfItem(schema); + composedSchemas.forEach(result::addOneOfItem); + return result; + } + + /** + * Find composed schemas recursively. + * + * @param ref the reference of the schema + * @param schemas the collection of schemas to search in + * @return the list of composed schemas + */ + private List findComposedSchemas(String ref, Collection schemas) { List composedSchemas = schemas.stream() .filter(ComposedSchema.class::isInstance) .map(ComposedSchema.class::cast) @@ -101,12 +173,15 @@ private Schema composePolymorphicSchema(AnnotatedType type, Schema schema, Colle .filter(s -> s.getAllOf().stream().anyMatch(s2 -> ref.equals(s2.get$ref()))) .map(s -> new Schema().$ref(AnnotationsUtils.COMPONENTS_REF + s.getName())) .toList(); - if (composedSchemas.isEmpty()) return schema; - ComposedSchema result = new ComposedSchema(); - if (isConcreteClass(type)) result.addOneOfItem(schema); - composedSchemas.forEach(result::addOneOfItem); - return result; + List resultSchemas = new ArrayList<>(composedSchemas); + + for (Schema childSchema : composedSchemas) { + String childSchemaRef = childSchema.get$ref(); + resultSchemas.addAll(findComposedSchemas(childSchemaRef, schemas)); + } + + return resultSchemas; } /** diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/PropertyCustomizingConverter.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/PropertyCustomizingConverter.java index f82afbb45..188f97537 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/PropertyCustomizingConverter.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/PropertyCustomizingConverter.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.converters; @@ -36,6 +38,7 @@ /** * The type Property customizing converter. + * * @author bnasslahsen */ public class PropertyCustomizingConverter implements ModelConverter { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/RepresentationModelLinksOASMixin.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/RepresentationModelLinksOASMixin.java index 6a5f3e7a7..cfdc65127 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/RepresentationModelLinksOASMixin.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/RepresentationModelLinksOASMixin.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.converters; @@ -32,6 +34,7 @@ /** * The type Representation model links oas mixin. + * * @author bnasslahsen */ public abstract class RepresentationModelLinksOASMixin extends RepresentationModelMixin { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/ResponseSupportConverter.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/ResponseSupportConverter.java index 6ce3e79e5..b820589ef 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/ResponseSupportConverter.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/ResponseSupportConverter.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.converters; @@ -35,12 +37,15 @@ import io.swagger.v3.oas.models.media.StringSchema; import org.springdoc.core.providers.ObjectMapperProvider; +import org.springframework.http.ResponseEntity; + import static org.springdoc.core.converters.ConverterUtils.isFluxTypeWrapper; import static org.springdoc.core.converters.ConverterUtils.isResponseTypeToIgnore; import static org.springdoc.core.converters.ConverterUtils.isResponseTypeWrapper; /** * The type Response support converter. + * * @author bnasslahsen */ public class ResponseSupportConverter implements ModelConverter { @@ -65,7 +70,7 @@ public Schema resolve(AnnotatedType type, ModelConverterContext context, Iterato if (javaType != null) { Class cls = javaType.getRawClass(); if (isResponseTypeWrapper(cls) && !isFluxTypeWrapper(cls)) { - JavaType innerType = javaType.getBindings().getBoundType(0); + JavaType innerType = findResponseEntity(javaType).containedType(0); if (innerType == null) return new StringSchema(); return context.resolve(new AnnotatedType(innerType) @@ -79,4 +84,18 @@ else if (isResponseTypeToIgnore(cls)) return (chain.hasNext()) ? chain.next().resolve(type, context, chain) : null; } + /** + * Find response entity java type. + * + * @param javaType the java type + * @return the java type + */ + private JavaType findResponseEntity(JavaType javaType){ + if(ResponseEntity.class.isAssignableFrom(javaType.getRawClass())){ + while (ResponseEntity.class != javaType.getRawClass()) + javaType = javaType.getSuperClass(); + } + return javaType; + } + } diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/SchemaPropertyDeprecatingConverter.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/SchemaPropertyDeprecatingConverter.java index 919484a4a..d08f6c7dd 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/SchemaPropertyDeprecatingConverter.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/SchemaPropertyDeprecatingConverter.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.converters; @@ -41,6 +43,7 @@ /** * The type Schema property deprecating converter. + * * @author bnasslahsen */ public class SchemaPropertyDeprecatingConverter implements ModelConverter { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/SortOpenAPIConverter.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/SortOpenAPIConverter.java index bc8fe5ce4..5dc533013 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/SortOpenAPIConverter.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/SortOpenAPIConverter.java @@ -1,27 +1,31 @@ -package org.springdoc.core.converters; - /* * * * * * * - * * * * 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 + * * * * * + * * * * * * 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. + * * * * * * * * * - * * * * 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 org.springdoc.core.converters; + import java.util.Iterator; import com.fasterxml.jackson.databind.JavaType; @@ -35,10 +39,14 @@ /** * The Spring Data Sort type model converter. - * @author daniel-shuy + * + * @author daniel -shuy */ public class SortOpenAPIConverter implements ModelConverter { + /** + * The constant SORT_TO_REPLACE. + */ private static final String SORT_TO_REPLACE = "org.springframework.data.domain.Sort"; /** diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/WebFluxSupportConverter.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/WebFluxSupportConverter.java index 08137e942..434d8ff02 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/WebFluxSupportConverter.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/WebFluxSupportConverter.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.converters; @@ -44,6 +46,7 @@ /** * The type Web flux support converter. + * * @author bnasslahsen */ public class WebFluxSupportConverter implements ModelConverter { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/models/DefaultPageable.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/models/DefaultPageable.java index b33db51e0..fa59c38b7 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/models/DefaultPageable.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/models/DefaultPageable.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.converters.models; @@ -30,6 +32,7 @@ /** * The type Default pageable. + * * @author bnasslahsen */ @ParameterObject diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/models/MonetaryAmount.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/models/MonetaryAmount.java index 34cd2654c..2b63c3a14 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/models/MonetaryAmount.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/models/MonetaryAmount.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.converters.models; @@ -31,6 +33,7 @@ /** * The type Monetary amount. + * * @author bnasslahsen */ @Schema diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/models/Pageable.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/models/Pageable.java index b97360821..cd5d5b601 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/models/Pageable.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/models/Pageable.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.converters.models; @@ -34,6 +36,7 @@ /** * The type Pageable. + * * @author bnasslahsen */ public class Pageable { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/models/PageableAsQueryParam.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/models/PageableAsQueryParam.java index 7ab5f3a6a..ebd89348e 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/models/PageableAsQueryParam.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/models/PageableAsQueryParam.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.converters.models; @@ -36,6 +38,7 @@ /** * The interface Pageable as query param. + * * @author bnasslahsen */ @Target({ ElementType.METHOD, ElementType.ANNOTATION_TYPE }) diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/models/Sort.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/models/Sort.java index d698a9a2b..16ea63f3b 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/models/Sort.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/models/Sort.java @@ -1,27 +1,31 @@ -package org.springdoc.core.converters.models; - /* * * * * * * - * * * * 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 + * * * * * + * * * * * * 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. + * * * * * * * * * - * * * * 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 org.springdoc.core.converters.models; + import java.util.List; import java.util.Objects; @@ -31,7 +35,8 @@ /** * The Sort type. - * @author daniel-shuy + * + * @author daniel -shuy */ public class Sort { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/models/SortAsQueryParam.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/models/SortAsQueryParam.java new file mode 100644 index 000000000..b1eaf3dfd --- /dev/null +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/models/SortAsQueryParam.java @@ -0,0 +1,26 @@ +package org.springdoc.core.converters.models; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ArraySchema; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * The Sort class as query param. + * + * @author ondrejkrpec + */ +@Target({ ElementType.METHOD, ElementType.ANNOTATION_TYPE }) +@Retention(RetentionPolicy.RUNTIME) +@Parameter(in = ParameterIn.QUERY + , description = "Sorting criteria in the format: property,(asc|desc). " + + "Default sort order is ascending. " + "Multiple sort criteria are supported." + , name = "sort" + , array = @ArraySchema(schema = @Schema(type = "string")) +) +public @interface SortAsQueryParam {} diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/models/SortObject.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/models/SortObject.java index c1b851270..131adef31 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/models/SortObject.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/models/SortObject.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.converters.models; @@ -29,6 +31,7 @@ /** * The type Sort response. + * * @author bnasslahsen */ @ArraySchema(arraySchema = @Schema(implementation = SortObject.class)) diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/ActuatorOpenApiCustomizer.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/ActuatorOpenApiCustomizer.java index 93c367b22..27d85889a 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/ActuatorOpenApiCustomizer.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/ActuatorOpenApiCustomizer.java @@ -3,59 +3,52 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.customizers; import java.util.Comparator; import java.util.HashSet; -import java.util.List; import java.util.Map.Entry; import java.util.Optional; import java.util.Set; -import java.util.regex.Matcher; -import java.util.regex.Pattern; import java.util.stream.Stream; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.PathItem; import io.swagger.v3.oas.models.Paths; -import io.swagger.v3.oas.models.media.StringSchema; -import io.swagger.v3.oas.models.parameters.Parameter; -import io.swagger.v3.oas.models.parameters.PathParameter; import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointProperties; -import org.springframework.util.CollectionUtils; - -import static org.springframework.util.AntPathMatcher.DEFAULT_PATH_SEPARATOR; /** - * The type Actuator open api customiser. + * The type Actuator open api customizer. + * * @author bnasslahsen + * @since 2.7.0 + * @deprecated as not anymore required, use your own {@link org.springdoc.core.customizers.GlobalOpenApiCustomizer} instead */ +@Deprecated(since = "2.7.0") public class ActuatorOpenApiCustomizer implements GlobalOpenApiCustomizer { - /** - * The Path pathern. - */ - private final Pattern pathPathern = Pattern.compile("\\{(.*?)}"); /** * The Web endpoint properties. @@ -71,6 +64,13 @@ public ActuatorOpenApiCustomizer(WebEndpointProperties webEndpointProperties) { this.webEndpointProperties = webEndpointProperties; } + /** + * Actuator path entry stream stream. + * + * @param openApi the open api + * @param relativeSubPath the relative sub path + * @return the stream + */ private Stream> actuatorPathEntryStream(OpenAPI openApi, String relativeSubPath) { String pathPrefix = webEndpointProperties.getBasePath() + Optional.ofNullable(relativeSubPath).orElse(""); return Optional.ofNullable(openApi.getPaths()) @@ -80,30 +80,16 @@ private Stream> actuatorPathEntryStream(OpenAPI openApi, .orElse(Stream.empty()); } - private void handleActuatorPathParam(OpenAPI openApi) { - actuatorPathEntryStream(openApi, DEFAULT_PATH_SEPARATOR).forEach(stringPathItemEntry -> { - String path = stringPathItemEntry.getKey(); - Matcher matcher = pathPathern.matcher(path); - while (matcher.find()) { - String pathParam = matcher.group(1); - PathItem pathItem = stringPathItemEntry.getValue(); - pathItem.readOperations().forEach(operation -> { - List existingParameters = operation.getParameters(); - Optional existingParam = Optional.empty(); - if (!CollectionUtils.isEmpty(existingParameters)) - existingParam = existingParameters.stream().filter(p -> pathParam.equals(p.getName())).findAny(); - if (!existingParam.isPresent()) - operation.addParametersItem(new PathParameter().name(pathParam).schema(new StringSchema())); - }); - } - }); - } - + /** + * Handle actuator operation id uniqueness. + * + * @param openApi the open api + */ private void handleActuatorOperationIdUniqueness(OpenAPI openApi) { Set usedOperationIds = new HashSet<>(); actuatorPathEntryStream(openApi, null) .sorted(Comparator.comparing(Entry::getKey)) - .forEachOrdered(stringPathItemEntry -> { + .forEachOrdered(stringPathItemEntry -> stringPathItemEntry.getValue().readOperations().forEach(operation -> { String initialOperationId = operation.getOperationId(); String uniqueOperationId = operation.getOperationId(); @@ -112,13 +98,12 @@ private void handleActuatorOperationIdUniqueness(OpenAPI openApi) { uniqueOperationId = initialOperationId + "_" + ++counter; } operation.setOperationId(uniqueOperationId); - }); - }); + }) + ); } @Override public void customise(OpenAPI openApi) { - handleActuatorPathParam(openApi); handleActuatorOperationIdUniqueness(openApi); } } diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/ActuatorOperationCustomizer.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/ActuatorOperationCustomizer.java index 985513421..8843ac3b5 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/ActuatorOperationCustomizer.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/ActuatorOperationCustomizer.java @@ -3,54 +3,61 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.customizers; import java.lang.reflect.Field; import java.lang.reflect.Parameter; -import java.util.regex.Matcher; -import java.util.regex.Pattern; import io.swagger.v3.core.util.AnnotationsUtils; +import io.swagger.v3.oas.annotations.enums.ParameterIn; import io.swagger.v3.oas.models.Operation; import io.swagger.v3.oas.models.media.Content; import io.swagger.v3.oas.models.media.MediaType; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.parameters.RequestBody; +import io.swagger.v3.oas.models.responses.ApiResponse; +import io.swagger.v3.oas.models.responses.ApiResponses; import org.apache.commons.lang3.reflect.FieldUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springdoc.core.properties.SpringDocConfigProperties; -import org.springframework.boot.actuate.endpoint.OperationType; +import org.springframework.boot.actuate.endpoint.ApiVersion; +import org.springframework.boot.actuate.endpoint.SecurityContext; import org.springframework.boot.actuate.endpoint.annotation.AbstractDiscoveredOperation; import org.springframework.boot.actuate.endpoint.annotation.Selector; import org.springframework.boot.actuate.endpoint.invoke.OperationParameter; import org.springframework.boot.actuate.endpoint.invoke.reflect.OperationMethod; +import org.springframework.boot.actuate.endpoint.web.WebServerNamespace; +import org.springframework.http.HttpStatus; import org.springframework.web.method.HandlerMethod; import static org.springdoc.core.providers.ActuatorProvider.getTag; /** * The type Actuator operation customizer. + * * @author bnasslahsen */ public class ActuatorOperationCustomizer implements GlobalOperationCustomizer { @@ -70,11 +77,6 @@ public class ActuatorOperationCustomizer implements GlobalOperationCustomizer { */ private static final Logger LOGGER = LoggerFactory.getLogger(ActuatorOperationCustomizer.class); - /** - * The regex pattern for operationId lookup. - */ - private static final Pattern pattern = Pattern.compile(".*'([^']*)'.*"); - /** * The Spring doc config properties. */ @@ -92,44 +94,178 @@ public ActuatorOperationCustomizer(SpringDocConfigProperties springDocConfigProp @Override public Operation customize(Operation operation, HandlerMethod handlerMethod) { - if (operation.getTags() != null && operation.getTags().contains(getTag().getName())) { - Field operationFiled = FieldUtils.getDeclaredField(handlerMethod.getBean().getClass(), OPERATION, true); - Object actuatorOperation; - if (operationFiled != null) { - try { - actuatorOperation = operationFiled.get(handlerMethod.getBean()); - Field actuatorOperationFiled = FieldUtils.getDeclaredField(actuatorOperation.getClass(), OPERATION, true); - if (actuatorOperationFiled != null) { - AbstractDiscoveredOperation discoveredOperation = (AbstractDiscoveredOperation) actuatorOperationFiled.get(actuatorOperation); - OperationMethod operationMethod = discoveredOperation.getOperationMethod(); - if (OperationType.WRITE.equals(operationMethod.getOperationType())) { - for (OperationParameter operationParameter : operationMethod.getParameters()) { - Field parameterField = FieldUtils.getDeclaredField(operationParameter.getClass(), PARAMETER, true); - Parameter parameter = (Parameter) parameterField.get(operationParameter); - Schema schema = AnnotationsUtils.resolveSchemaFromType(parameter.getType(), null, null, springDocConfigProperties.isOpenapi31()); - if (parameter.getAnnotation(Selector.class) == null) { - operation.setRequestBody(new RequestBody() - .content(new Content().addMediaType(org.springframework.http.MediaType.APPLICATION_JSON_VALUE, new MediaType().schema(schema)))); - } - } - } - } - } - catch (IllegalAccessException e) { - LOGGER.warn(e.getMessage()); - } + if (operationHasValidTag(operation)) { + Field operationField = FieldUtils.getDeclaredField(handlerMethod.getBean().getClass(), OPERATION,true); + if (operationField != null) { + processOperationField(handlerMethod, operation, operationField); } + setOperationSummary(operation, handlerMethod); + } + return operation; + } - String summary = handlerMethod.toString(); - Matcher matcher = pattern.matcher(summary); - String operationId = operation.getOperationId(); - while (matcher.find()) { - operationId = matcher.group(1); + /** + * Operation has valid tag boolean. + * + * @param operation the operation + * @return the boolean + */ + private boolean operationHasValidTag(Operation operation) { + return operation.getTags() != null && operation.getTags().contains(getTag().getName()); + } + + /** + * Process operation field. + * + * @param handlerMethod the handler method + * @param operation the operation + * @param operationField the operation field + */ + private void processOperationField(HandlerMethod handlerMethod, Operation operation, Field operationField) { + try { + Object actuatorOperation = operationField.get(handlerMethod.getBean()); + Field actuatorOperationField = FieldUtils.getDeclaredField(actuatorOperation.getClass(), OPERATION, true); + if (actuatorOperationField != null) { + AbstractDiscoveredOperation discoveredOperation = + (AbstractDiscoveredOperation) actuatorOperationField.get(actuatorOperation); + handleOperationMethod(discoveredOperation.getOperationMethod(), operation); + } + } + catch (IllegalAccessException e) { + LOGGER.warn(e.getMessage()); + } + } + + /** + * Handle operation method. + * + * @param operationMethod the operation method + * @param operation the operation + */ + private void handleOperationMethod(OperationMethod operationMethod, Operation operation) { + String operationId = operationMethod.getMethod().getName(); + operation.setOperationId(operationId); + + switch (operationMethod.getOperationType()) { + case READ: + addParameters(operationMethod, operation, ParameterIn.QUERY); + break; + case WRITE: + addWriteParameters(operationMethod, operation); + operation.setResponses(new ApiResponses() + .addApiResponse(String.valueOf(HttpStatus.NO_CONTENT.value()), new ApiResponse().description(HttpStatus.NO_CONTENT.getReasonPhrase())) + .addApiResponse(String.valueOf(HttpStatus.BAD_REQUEST.value()), new ApiResponse().description(HttpStatus.BAD_REQUEST.getReasonPhrase()))); + break; + case DELETE: + operation.setResponses(new ApiResponses().addApiResponse(String.valueOf(HttpStatus.NO_CONTENT.value()), new ApiResponse().description(HttpStatus.NO_CONTENT.getReasonPhrase()))); + addParameters(operationMethod, operation, ParameterIn.QUERY); + break; + default: + break; + } + } + + /** + * Add parameters. + * + * @param operationMethod the operation method + * @param operation the operation + * @param parameterIn the parameter in + */ + private void addParameters(OperationMethod operationMethod, Operation operation, ParameterIn parameterIn) { + for (OperationParameter operationParameter : operationMethod.getParameters()) { + Parameter parameter = getParameterFromField(operationParameter); + if(parameter == null) continue; + Schema schema = resolveSchema(parameter); + if (parameter.getAnnotation(Selector.class) != null) { + operation.addParametersItem(new io.swagger.v3.oas.models.parameters.PathParameter() + .name(parameter.getName()) + .schema(schema)); + operation.getResponses().addApiResponse(String.valueOf(HttpStatus.NOT_FOUND.value()), new ApiResponse().description(HttpStatus.NOT_FOUND.getReasonPhrase())); + } + else if (isValidParameterType(parameter)) { + operation.addParametersItem(new io.swagger.v3.oas.models.parameters.Parameter() + .name(parameter.getName()) + .in(parameterIn.toString()) + .schema(schema)); + } + } + } + + /** + * Add write parameters. + * + * @param operationMethod the operation method + * @param operation the operation + */ + private void addWriteParameters(OperationMethod operationMethod, Operation operation) { + for (OperationParameter operationParameter : operationMethod.getParameters()) { + Parameter parameter = getParameterFromField(operationParameter); + if(parameter == null) continue; + Schema schema = resolveSchema(parameter); + if (parameter.getAnnotation(Selector.class) != null) { + operation.addParametersItem(new io.swagger.v3.oas.models.parameters.PathParameter() + .name(parameter.getName()) + .schema(schema)); + } + else { + operation.setRequestBody(new RequestBody() + .content(new Content() + .addMediaType(org.springframework.http.MediaType.APPLICATION_JSON_VALUE, + new MediaType().schema(schema)))); } - if (operation.getSummary() == null && !summary.contains("$")) - operation.setSummary(summary); - operation.setOperationId(operationId); } - return operation; } + + /** + * Gets parameter from field. + * + * @param operationParameter the operation parameter + * @return the parameter from field + */ + private Parameter getParameterFromField(OperationParameter operationParameter) { + try { + return (Parameter) FieldUtils.readDeclaredField(operationParameter, PARAMETER, true); + } + catch (IllegalAccessException e) { + LOGGER.warn(e.getMessage()); + return null; + } + } + + /** + * Resolve schema schema. + * + * @param parameter the parameter + * @return the schema + */ + private Schema resolveSchema(Parameter parameter) { + return AnnotationsUtils.resolveSchemaFromType(parameter.getType(), null, null, springDocConfigProperties.isOpenapi31()); + } + + /** + * Is valid parameter type boolean. + * + * @param parameter the parameter + * @return the boolean + */ + private boolean isValidParameterType(Parameter parameter) { + return !ApiVersion.class.isAssignableFrom(parameter.getType()) && + !WebServerNamespace.class.isAssignableFrom(parameter.getType()) && + !SecurityContext.class.isAssignableFrom(parameter.getType()); + } + + /** + * Sets operation summary. + * + * @param operation the operation + * @param handlerMethod the handler method + */ + private void setOperationSummary(Operation operation, HandlerMethod handlerMethod) { + String summary = handlerMethod.toString(); + if (operation.getSummary() == null && !summary.contains("$")) { + operation.setSummary(summary); + } + } + } diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/DataRestDelegatingMethodParameterCustomizer.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/DataRestDelegatingMethodParameterCustomizer.java index 8918b2bc4..6aea22f12 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/DataRestDelegatingMethodParameterCustomizer.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/DataRestDelegatingMethodParameterCustomizer.java @@ -2,28 +2,31 @@ * * * * * * - * * * * 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 + * * * * * + * * * * * * 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. + * * * * * * * * * - * * * * 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 org.springdoc.core.customizers; import java.lang.annotation.Annotation; -import java.lang.reflect.Field; import java.util.Arrays; import java.util.List; import java.util.Objects; @@ -50,7 +53,6 @@ import org.apache.commons.lang3.reflect.FieldUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springdoc.core.extractor.DelegatingMethodParameter; import org.springdoc.core.providers.RepositoryRestConfigurationProvider; import org.springdoc.core.providers.SpringDataWebPropertiesProvider; @@ -86,7 +88,7 @@ public class DataRestDelegatingMethodParameterCustomizer implements DelegatingMe /** * Instantiates a new Data rest delegating method parameter customizer. * - * @param optionalSpringDataWebPropertiesProvider the optional spring data web properties provider + * @param optionalSpringDataWebPropertiesProvider the optional spring data web properties provider * @param optionalRepositoryRestConfigurationProvider the optional repository rest configuration provider */ public DataRestDelegatingMethodParameterCustomizer(Optional optionalSpringDataWebPropertiesProvider, Optional optionalRepositoryRestConfigurationProvider) { @@ -103,9 +105,8 @@ public void customize(MethodParameter originalParameter, MethodParameter methodP (Pageable.class.isAssignableFrom(parameterType) || Sort.class.isAssignableFrom(parameterType)) && (isSpringDataWebPropertiesPresent() || isRepositoryRestConfigurationPresent()) )) { - Field field = FieldUtils.getDeclaredField(DelegatingMethodParameter.class, "additionalParameterAnnotations", true); try { - Annotation[] parameterAnnotations = (Annotation[]) field.get(methodParameter); + Annotation[] parameterAnnotations = (Annotation[]) FieldUtils.readDeclaredField(methodParameter, "additionalParameterAnnotations", true); if (ArrayUtils.isNotEmpty(parameterAnnotations)) for (int i = 0; i < parameterAnnotations.length; i++) { if (Parameter.class.equals(parameterAnnotations[i].annotationType())) { @@ -126,15 +127,14 @@ public void customize(MethodParameter originalParameter, MethodParameter methodP * * @param methodParameter the method parameter * @param pageableDefault the pageable default + * @param sortDefault the sort default * @return the new parameter annotation for field */ private Optional getNewParameterAnnotationForField(MethodParameter methodParameter, PageableDefault pageableDefault, SortDefault sortDefault) { String parameterName = methodParameter.getParameterName(); - Field field; Parameter parameterNew; try { - field = methodParameter.getContainingClass().getDeclaredField(parameterName); - Parameter parameter = field.getAnnotation(Parameter.class); + Parameter parameter = methodParameter.getContainingClass().getDeclaredField(parameterName).getAnnotation(Parameter.class); parameterNew = new Parameter() { @Override public Class annotationType() { @@ -189,6 +189,10 @@ public boolean allowReserved() { @Override public Schema schema() { return new Schema() { + @Override + public SchemaResolution schemaResolution() { + return parameterSchema.schemaResolution(); + } private Schema parameterSchema = parameter.schema(); @@ -938,6 +942,11 @@ public String[] examples() { public String _const() { return schema._const(); } + + @Override + public SchemaResolution schemaResolution() { + return schema.schemaResolution(); + } }; } @@ -1030,7 +1039,7 @@ public String ref() { * Gets name. * * @param parameterName the parameter name - * @param originalName the original name + * @param originalName the original name * @return the name */ private String getName(String parameterName, String originalName) { @@ -1062,8 +1071,7 @@ else if (isSpringDataWebPropertiesPresent()) else name = originalName; break; - case "direction": - case "caseSensitive": + case "direction", "caseSensitive": name = originalName; break; default: @@ -1076,7 +1084,7 @@ else if (isSpringDataWebPropertiesPresent()) /** * Gets description. * - * @param parameterName the parameter name + * @param parameterName the parameter name * @param originalDescription the original description * @return the description */ @@ -1090,8 +1098,8 @@ private String getDescription(String parameterName, String originalDescription) /** * Gets default value. * - * @param parameterName the parameter name - * @param pageableDefault the pageable default + * @param parameterName the parameter name + * @param pageableDefault the pageable default * @param defaultSchemaVal the default schema val * @return the default value */ @@ -1140,9 +1148,9 @@ else if (isSpringDataWebPropertiesPresent() && optionalSpringDataWebPropertiesPr /** * Gets default value. * - * @param parameterName the parameter name - * @param pageableDefault the pageable default - * @param sortDefault the sort default + * @param parameterName the parameter name + * @param pageableDefault the pageable default + * @param sortDefault the sort default * @param defaultSchemaVal the default schema val * @return the default value */ @@ -1167,7 +1175,7 @@ private String getArrayDefaultValue(String parameterName, PageableDefault pageab * Gets default sort. * * @param pageableDefault the pageable default - * @param sortDefault the sort default + * @param sortDefault the sort default * @return the default sort */ private DefaultSort getDefaultSort(PageableDefault pageableDefault, SortDefault sortDefault) { @@ -1222,23 +1230,52 @@ private boolean isRepositoryRestConfigurationPresent() { return optionalRepositoryRestConfigurationProvider.isPresent() && optionalRepositoryRestConfigurationProvider.get().isRepositoryRestConfigurationPresent(); } + /** + * The type Default sort. + */ private static class DefaultSort { + /** + * The constant DIRECTION_GROUP. + */ private static final String DIRECTION_GROUP = Arrays.stream(Sort.Direction.values()).map(Enum::name).collect(Collectors.joining("|")); + /** + * The constant DIRECTED_REGEXP. + */ private static final String DIRECTED_REGEXP = "\\w+(\\.\\w+)*,\\s*(" + DIRECTION_GROUP + ')'; + /** + * The constant DIRECTED_PATTERN. + */ private static final Pattern DIRECTED_PATTERN = Pattern.compile(DIRECTED_REGEXP, Pattern.CASE_INSENSITIVE); + /** + * The Direction. + */ private final Sort.Direction direction; + /** + * The Properties. + */ private final String[] properties; + /** + * Instantiates a new Default sort. + * + * @param direction the direction + * @param properties the properties + */ DefaultSort(Sort.Direction direction, String... properties) { this.direction = direction; this.properties = properties; } + /** + * Gets effective properties. + * + * @return the effective properties + */ List getEffectiveProperties() { return Arrays.stream(properties) .map(p -> { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/DataRestRouterOperationCustomizer.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/DataRestRouterOperationCustomizer.java index b9f968a4d..51a79aaec 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/DataRestRouterOperationCustomizer.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/DataRestRouterOperationCustomizer.java @@ -1,3 +1,29 @@ +/* + * + * * + * * * + * * * * + * * * * * + * * * * * * 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 org.springdoc.core.customizers; import org.springdoc.core.fn.RouterOperation; diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/DelegatingMethodParameterCustomizer.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/DelegatingMethodParameterCustomizer.java index 74a3bac4d..0c1cc5cb4 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/DelegatingMethodParameterCustomizer.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/DelegatingMethodParameterCustomizer.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.customizers; @@ -36,7 +38,7 @@ public interface DelegatingMethodParameterCustomizer { * Customize. * * @param originalParameter the original parameter - * @param methodParameter the method parameter + * @param methodParameter the method parameter */ void customize(MethodParameter originalParameter, MethodParameter methodParameter); diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/GlobalOpenApiCustomizer.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/GlobalOpenApiCustomizer.java index 8b5130cdc..a095e05f9 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/GlobalOpenApiCustomizer.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/GlobalOpenApiCustomizer.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.customizers; @@ -29,7 +31,7 @@ * customize Open api on default OpenAPI description and groups. * * @author christophejan - * @see OpenApiCustomizer customize default OpenAPI description but not groups + * @see OpenApiCustomizer default OpenAPI description but not groups */ public interface GlobalOpenApiCustomizer extends OpenApiCustomizer { } diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/GlobalOperationCustomizer.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/GlobalOperationCustomizer.java index 9dc560053..ed9ab472c 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/GlobalOperationCustomizer.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/GlobalOperationCustomizer.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.customizers; @@ -30,7 +32,7 @@ * description and groups * * @author christophejan - * @see OperationCustomizer customize operations on default OpenAPI description but not groups + * @see OperationCustomizer operations on default OpenAPI description but not groups */ public interface GlobalOperationCustomizer extends OperationCustomizer { } diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/JavadocPropertyCustomizer.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/JavadocPropertyCustomizer.java index e81ea2225..fd76c76a4 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/JavadocPropertyCustomizer.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/JavadocPropertyCustomizer.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * Copyright 2019-2023 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.customizers; @@ -44,6 +46,7 @@ import io.swagger.v3.core.converter.ModelConverterContext; import io.swagger.v3.core.converter.ModelConverterContextImpl; import io.swagger.v3.core.util.AnnotationsUtils; +import io.swagger.v3.oas.models.Components; import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.reflect.FieldUtils; @@ -64,6 +67,9 @@ public record JavadocPropertyCustomizer(JavadocProvider javadocProvider, ObjectMapperProvider objectMapperProvider) implements ModelConverter { + /** + * The constant LOGGER. + */ private static final Logger LOGGER = LoggerFactory.getLogger(DelegatingMethodParameter.class); /** @@ -95,7 +101,7 @@ public Schema resolve(AnnotatedType type, ModelConverterContext context, Iterato setJavadocDescription(cls, fields, clsProperties, existingSchema, false); } else if (resolvedSchema != null && resolvedSchema.get$ref() != null && resolvedSchema.get$ref().contains(AnnotationsUtils.COMPONENTS_REF)) { - String schemaName = resolvedSchema.get$ref().substring(21); + String schemaName = resolvedSchema.get$ref().substring(Components.COMPONENTS_SCHEMAS_REF.length()); Schema existingSchema = context.getDefinedModels().get(schemaName); setJavadocDescription(cls, fields, clsProperties, existingSchema, false); } diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/OpenApiBuilderCustomizer.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/OpenApiBuilderCustomizer.java index 25d8d467e..b1b673a25 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/OpenApiBuilderCustomizer.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/OpenApiBuilderCustomizer.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.customizers; @@ -28,6 +30,7 @@ /** * The interface Open api builder customizer. + * * @author bnasslahsen */ @FunctionalInterface diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/OpenApiCustomizer.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/OpenApiCustomizer.java index 970203322..122a34d42 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/OpenApiCustomizer.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/OpenApiCustomizer.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.customizers; @@ -31,7 +33,7 @@ * Open api on default OpenAPI description but not on groups * * @author bnasslahsen - * @see GlobalOpenApiCustomizer customize default OpenAPI description and groups + * @see GlobalOpenApiCustomizer default OpenAPI description and groups */ @FunctionalInterface public interface OpenApiCustomizer { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/OpenApiHateoasLinksCustomizer.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/OpenApiHateoasLinksCustomizer.java index 4c1d80b0e..bb77dab38 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/OpenApiHateoasLinksCustomizer.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/OpenApiHateoasLinksCustomizer.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.customizers; @@ -39,6 +41,7 @@ /** * The type Open api hateoas links customiser. + * * @author bnasslahsen */ public class OpenApiHateoasLinksCustomizer extends SpecFilter implements GlobalOpenApiCustomizer { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/OpenApiLocaleCustomizer.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/OpenApiLocaleCustomizer.java index 568945325..4ee54f1fd 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/OpenApiLocaleCustomizer.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/OpenApiLocaleCustomizer.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.customizers; @@ -30,6 +32,7 @@ /** * The interface Open api locale customizer. + * * @author bnasslahsen */ @FunctionalInterface @@ -39,7 +42,7 @@ public interface OpenApiLocaleCustomizer { * Customise. * * @param openApi the open api - * @param locale the locale + * @param locale the locale */ void customise(OpenAPI openApi, Locale locale); diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/OperationCustomizer.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/OperationCustomizer.java index 015f4afc7..d0016c9ef 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/OperationCustomizer.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/OperationCustomizer.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.customizers; @@ -34,7 +36,7 @@ * groups * * @author bnasslahsen - * @see GlobalOperationCustomizer customize operations on default OpenAPI description and groups + * @see GlobalOperationCustomizer operations on default OpenAPI description and groups */ @FunctionalInterface public interface OperationCustomizer { @@ -42,7 +44,7 @@ public interface OperationCustomizer { /** * Customize operation. * - * @param operation input operation + * @param operation input operation * @param handlerMethod original handler method * @return customized operation */ diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/OperationIdCustomizer.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/OperationIdCustomizer.java new file mode 100644 index 000000000..58bf1a162 --- /dev/null +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/OperationIdCustomizer.java @@ -0,0 +1,92 @@ +/* + * + * * + * * * + * * * * + * * * * * + * * * * * * 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 org.springdoc.core.customizers; + +import java.util.HashMap; +import java.util.Map; + +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.Operation; +import io.swagger.v3.oas.models.PathItem; + +/** + * The type Operation id customizer. + * + * @author bnasslahsen + */ +public class OperationIdCustomizer implements GlobalOpenApiCustomizer { + + @Override + public void customise(OpenAPI openApi) { + // Map to store operationId counts + Map operationIdCount = new HashMap<>(); + + // Iterate through all the paths + for (Map.Entry pathEntry : openApi.getPaths().entrySet()) { + PathItem pathItem = pathEntry.getValue(); + + // Process all HTTP methods for the path (GET, POST, PUT, DELETE, etc.) + processOperation(pathItem.getGet(), operationIdCount); + processOperation(pathItem.getPost(), operationIdCount); + processOperation(pathItem.getPut(), operationIdCount); + processOperation(pathItem.getDelete(), operationIdCount); + processOperation(pathItem.getPatch(), operationIdCount); + processOperation(pathItem.getHead(), operationIdCount); + processOperation(pathItem.getOptions(), operationIdCount); + processOperation(pathItem.getTrace(), operationIdCount); + } + } + + /** + * Process operation. + * + * @param operation the operation + * @param operationIdCount the operation id count + */ +// Helper method to process each operation and handle duplicate operationId + private void processOperation(Operation operation, Map operationIdCount) { + if (operation != null) { + String originalOperationId = operation.getOperationId(); + + // Check if operationId already exists + if (operationIdCount.containsKey(originalOperationId)) { + // Get the count for the current operationId and increment + int count = operationIdCount.get(originalOperationId); + count++; + operationIdCount.put(originalOperationId, count); + + // Create new unique operationId by appending _x + String newOperationId = originalOperationId + "_" + count; + operation.setOperationId(newOperationId); + } + else { + // First time this operationId is seen, initialize the count + operationIdCount.put(originalOperationId, 0); + } + } + } + +} \ No newline at end of file diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/ParameterCustomizer.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/ParameterCustomizer.java index 7dbaa0d3c..61fc363cc 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/ParameterCustomizer.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/ParameterCustomizer.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.customizers; @@ -31,6 +33,7 @@ /** * Implement and register a bean of type {@link ParameterCustomizer} to customize a parameter * based on the parameter and handler method input + * * @author bnasslahsen */ @FunctionalInterface @@ -38,7 +41,7 @@ public interface ParameterCustomizer { /** * Customize parameter. * - * @param parameterModel to be customized + * @param parameterModel to be customized * @param methodParameter original parameter from handler method * @return customized parameter */ diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/ParameterObjectNamingStrategyCustomizer.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/ParameterObjectNamingStrategyCustomizer.java new file mode 100644 index 000000000..464dcef43 --- /dev/null +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/ParameterObjectNamingStrategyCustomizer.java @@ -0,0 +1,70 @@ +/* + * + * * + * * * + * * * * + * * * * * + * * * * * * 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 org.springdoc.core.customizers; + +import java.lang.reflect.Field; + +import com.fasterxml.jackson.databind.PropertyNamingStrategies; +import com.fasterxml.jackson.databind.annotation.JsonNaming; +import org.apache.commons.lang3.reflect.FieldUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.springframework.core.MethodParameter; +import org.springframework.core.annotation.AnnotatedElementUtils; + +/** + * The type Parameter object naming strategy customizer. + * + * @author bnasslahsen + */ +public class ParameterObjectNamingStrategyCustomizer implements DelegatingMethodParameterCustomizer { + + /** + * The constant LOGGER. + */ + private static final Logger LOGGER = LoggerFactory.getLogger(ParameterObjectNamingStrategyCustomizer.class); + + @Override + public void customize(MethodParameter originalParameter, MethodParameter methodParameter) { + if (AnnotatedElementUtils.isAnnotated(methodParameter.getContainingClass(), JsonNaming.class)) { + JsonNaming jsonNaming = methodParameter.getContainingClass().getAnnotation(JsonNaming.class); + if (jsonNaming.value().equals(PropertyNamingStrategies.UpperSnakeCaseStrategy.class)) { + try { + Field parameterNameField = FieldUtils.getDeclaredField(methodParameter.getClass(), "parameterName", + true); + parameterNameField.set(methodParameter, + PropertyNamingStrategies.UpperSnakeCaseStrategy.INSTANCE.translate( + methodParameter.getParameterName())); + } + catch (IllegalAccessException e) { + LOGGER.warn(e.getMessage()); + } + } + } + } +} diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/PropertyCustomizer.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/PropertyCustomizer.java index 447958c3e..ebbb9b3b5 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/PropertyCustomizer.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/PropertyCustomizer.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.customizers; @@ -30,6 +32,7 @@ /** * Implement and register a bean of type {@link PropertyCustomizer} to customize a schema property * based on annotated type + * * @author bnasslahsen */ @FunctionalInterface @@ -39,7 +42,7 @@ public interface PropertyCustomizer { * Customize schema. * * @param property to be customized - * @param type form the model class + * @param type form the model class * @return customized property */ Schema customize(Schema property, AnnotatedType type); diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/QuerydslPredicateOperationCustomizer.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/QuerydslPredicateOperationCustomizer.java index bbd45e5d3..c06aee89d 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/QuerydslPredicateOperationCustomizer.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/QuerydslPredicateOperationCustomizer.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.customizers; @@ -62,6 +64,7 @@ /** * The type Querydsl predicate operation customizer. + * * @author Gibah Joseph Email: gibahjoe@gmail.com Mar, 2020 */ @SuppressWarnings("unchecked") @@ -149,17 +152,14 @@ public Operation customize(Operation operation, HandlerMethod handlerMethod) { /** * Gets field value of boolean. * - * @param instance the instance - * @param fieldName the field name + * @param instance the instance + * @param fieldName the field name * @return the field value of boolean */ private boolean getFieldValueOfBoolean(QuerydslBindings instance, String fieldName) { try { - Field field = FieldUtils.getDeclaredField(instance.getClass(), fieldName, true); - if (field != null) - return (boolean) field.get(instance); - } - catch (IllegalAccessException e) { + return (boolean) FieldUtils.readDeclaredField(instance, fieldName, true); + } catch (IllegalAccessException e) { LOGGER.warn(e.getMessage()); } return false; @@ -168,7 +168,7 @@ private boolean getFieldValueOfBoolean(QuerydslBindings instance, String fieldNa /** * Extract qdsl bindings querydsl bindings. * - * @param predicate the predicate + * @param predicate the predicate * @return the querydsl bindings */ private QuerydslBindings extractQdslBindings(QuerydslPredicate predicate) { @@ -187,9 +187,9 @@ private QuerydslBindings extractQdslBindings(QuerydslPredicate predicate) { /** * Gets field values. * - * @param instance the instance - * @param fieldName the field name - * @param alternativeFieldName the alternative field name + * @param instance the instance + * @param fieldName the field name + * @param alternativeFieldName the alternative field name * @return the field values */ private Set getFieldValues(QuerydslBindings instance, String fieldName, String alternativeFieldName) { @@ -209,14 +209,13 @@ private Set getFieldValues(QuerydslBindings instance, String fieldName, /** * Gets path spec. * - * @param instance the instance - * @param fieldName the field name + * @param instance the instance + * @param fieldName the field name * @return the path spec */ private Map getPathSpec(QuerydslBindings instance, String fieldName) { try { - Field field = FieldUtils.getDeclaredField(instance.getClass(), fieldName, true); - return (Map) field.get(instance); + return (Map) FieldUtils.readDeclaredField(instance, fieldName, true); } catch (IllegalAccessException e) { LOGGER.warn(e.getMessage()); @@ -227,7 +226,7 @@ private Map getPathSpec(QuerydslBindings instance, String fieldN /** * Gets path from path spec. * - * @param instance the instance + * @param instance the instance * @return the path from path spec */ private Optional> getPathFromPathSpec(Object instance) { @@ -235,8 +234,7 @@ private Optional> getPathFromPathSpec(Object instance) { if (instance == null) { return Optional.empty(); } - Field field = FieldUtils.getDeclaredField(instance.getClass(), "path", true); - return (Optional>) field.get(instance); + return (Optional>) FieldUtils.readDeclaredField(instance, "path", true); } catch (IllegalAccessException e) { LOGGER.warn(e.getMessage()); @@ -246,9 +244,9 @@ private Optional> getPathFromPathSpec(Object instance) { /*** * Tries to figure out the Type of the field. It first checks the Qdsl pathSpecMap before checking the root class. Defaults to String.class - * @param fieldName The name of the field used as reference to get the type - * @param pathSpecMap The Qdsl path specifications as defined in the resolved bindings - * @param root The root type where the paths are gotten + * @param fieldName The name of the field used as reference to get the type + * @param pathSpecMap The Qdsl path specifications as defined in the resolved bindings + * @param root The root type where the paths are gotten * @return The type of the field. Returns */ private Type getFieldType(String fieldName, Map pathSpecMap, Class root) { @@ -273,8 +271,8 @@ private Type getFieldType(String fieldName, Map pathSpecMap, Cla /*** * Constructs the parameter - * @param type The type of the parameter - * @param name The name of the parameter + * @param type The type of the parameter + * @param name The name of the parameter * @return The swagger parameter */ private Parameter buildParam(Type type, String name) { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/RouterOperationCustomizer.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/RouterOperationCustomizer.java index 2bf93dc60..196e2ef7d 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/RouterOperationCustomizer.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/RouterOperationCustomizer.java @@ -1,3 +1,29 @@ +/* + * + * * + * * * + * * * * + * * * * * + * * * * * * 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 org.springdoc.core.customizers; import org.springdoc.core.fn.RouterOperation; @@ -17,7 +43,7 @@ public interface RouterOperationCustomizer { * Customize router operation. * * @param routerOperation input operation - * @param handlerMethod original handler method + * @param handlerMethod original handler method * @return customized router operation */ RouterOperation customize(RouterOperation routerOperation, HandlerMethod handlerMethod); diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/ServerBaseUrlCustomizer.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/ServerBaseUrlCustomizer.java index b209ba72e..229427559 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/ServerBaseUrlCustomizer.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/ServerBaseUrlCustomizer.java @@ -3,29 +3,34 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.customizers; +import org.springframework.http.HttpRequest; + /** * The interface Server Base URL customiser. + * * @author skylar -stark */ @FunctionalInterface @@ -35,7 +40,8 @@ public interface ServerBaseUrlCustomizer { * Customise. * * @param serverBaseUrl the serverBaseUrl. + * @param request the request. * @return the customised serverBaseUrl */ - String customize(String serverBaseUrl); + String customize(String serverBaseUrl, HttpRequest request); } diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/SpecPropertiesCustomizer.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/SpecPropertiesCustomizer.java index f87f36eca..a25957473 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/SpecPropertiesCustomizer.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/SpecPropertiesCustomizer.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.customizers; diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/SpringDocCustomizers.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/SpringDocCustomizers.java index 10ce504c6..286c331cc 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/SpringDocCustomizers.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/SpringDocCustomizers.java @@ -3,30 +3,32 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.customizers; -import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Optional; +import java.util.Set; import org.springdoc.core.filters.GlobalOpenApiMethodFilter; import org.springdoc.core.filters.OpenApiMethodFilter; @@ -49,23 +51,23 @@ public class SpringDocCustomizers implements ApplicationContextAware, Initializi /** * The Open api customisers. */ - private final Optional> openApiCustomizers; + private final Optional> openApiCustomizers; /** * The Operation customizers. */ - private final Optional> operationCustomizers; + private final Optional> operationCustomizers; /** * The RouterOperation customizers. */ - private final Optional> routerOperationCustomizers; + private final Optional> routerOperationCustomizers; /** * The Data rest router operation customizers. */ - private final Optional> dataRestRouterOperationCustomizers; + private final Optional> dataRestRouterOperationCustomizers; /** * The Context. @@ -75,43 +77,43 @@ public class SpringDocCustomizers implements ApplicationContextAware, Initializi /** * The method filters to use. */ - private final Optional> methodFilters; + private final Optional> methodFilters; /** * The Global open api customizers. */ - private Optional> globalOpenApiCustomizers; + private Optional> globalOpenApiCustomizers; /** * The Global operation customizers. */ - private Optional> globalOperationCustomizers; + private Optional> globalOperationCustomizers; /** * The Global open api method filters. */ - private Optional> globalOpenApiMethodFilters; + private Optional> globalOpenApiMethodFilters; /** * Instantiates a new Spring doc customizers. * - * @param openApiCustomizers the open api customizers - * @param operationCustomizers the operation customizers - * @param routerOperationCustomizers the router operation customizers + * @param openApiCustomizers the open api customizers + * @param operationCustomizers the operation customizers + * @param routerOperationCustomizers the router operation customizers * @param dataRestRouterOperationCustomizers the data rest router operation customizers - * @param methodFilters the method filters - * @param globalOpenApiCustomizers the global open api customizers - * @param globalOperationCustomizers the global operation customizers - * @param globalOpenApiMethodFilters the global open api method filters - */ - public SpringDocCustomizers(Optional> openApiCustomizers, - Optional> operationCustomizers, - Optional> routerOperationCustomizers, - Optional> dataRestRouterOperationCustomizers, - Optional> methodFilters, - Optional> globalOpenApiCustomizers, Optional> globalOperationCustomizers, - Optional> globalOpenApiMethodFilters) { + * @param methodFilters the method filters + * @param globalOpenApiCustomizers the global open api customizers + * @param globalOperationCustomizers the global operation customizers + * @param globalOpenApiMethodFilters the global open api method filters + */ + public SpringDocCustomizers(Optional> openApiCustomizers, + Optional> operationCustomizers, + Optional> routerOperationCustomizers, + Optional> dataRestRouterOperationCustomizers, + Optional> methodFilters, + Optional> globalOpenApiCustomizers, Optional> globalOperationCustomizers, + Optional> globalOpenApiMethodFilters) { this.openApiCustomizers = openApiCustomizers; this.operationCustomizers = operationCustomizers; this.globalOpenApiCustomizers = globalOpenApiCustomizers; @@ -126,13 +128,13 @@ public SpringDocCustomizers(Optional> openApiCustomizers /** * Instantiates a new Spring doc customizers. * - * @param openApiCustomizers the open api customizers - * @param operationCustomizers the operation customizers + * @param openApiCustomizers the open api customizers + * @param operationCustomizers the operation customizers * @param routerOperationCustomizers the router operation customizers - * @param openApiMethodFilters the open api method filters + * @param openApiMethodFilters the open api method filters */ - public SpringDocCustomizers(Optional> openApiCustomizers, Optional> operationCustomizers, - Optional> routerOperationCustomizers, Optional> openApiMethodFilters) { + public SpringDocCustomizers(Optional> openApiCustomizers, Optional> operationCustomizers, + Optional> routerOperationCustomizers, Optional> openApiMethodFilters) { this.openApiCustomizers = openApiCustomizers; this.operationCustomizers = operationCustomizers; this.routerOperationCustomizers = routerOperationCustomizers; @@ -145,7 +147,7 @@ public SpringDocCustomizers(Optional> openApiCustomizers * * @return the open api customizers */ - public Optional> getOpenApiCustomizers() { + public Optional> getOpenApiCustomizers() { return openApiCustomizers; } @@ -154,7 +156,7 @@ public Optional> getOpenApiCustomizers() { * * @return the operation customizers */ - public Optional> getOperationCustomizers() { + public Optional> getOperationCustomizers() { return operationCustomizers; } @@ -163,7 +165,7 @@ public Optional> getOperationCustomizers() { * * @return the router operation customizers */ - public Optional> getRouterOperationCustomizers() { + public Optional> getRouterOperationCustomizers() { return routerOperationCustomizers; } @@ -172,7 +174,7 @@ public Optional> getRouterOperationCustomizers() * * @return the data rest router operation customizers */ - public Optional> getDataRestRouterOperationCustomizers() { + public Optional> getDataRestRouterOperationCustomizers() { return dataRestRouterOperationCustomizers; } @@ -181,7 +183,7 @@ public Optional> getDataRestRouterOperat * * @return the method filters */ - public Optional> getMethodFilters() { + public Optional> getMethodFilters() { return methodFilters; } @@ -195,7 +197,7 @@ public void setApplicationContext(ApplicationContext applicationContext) throws * * @return the global open api customizers */ - public Optional> getGlobalOpenApiCustomizers() { + public Optional> getGlobalOpenApiCustomizers() { return globalOpenApiCustomizers; } @@ -204,7 +206,7 @@ public Optional> getGlobalOpenApiCustomizers() { * * @return the global operation customizers */ - public Optional> getGlobalOperationCustomizers() { + public Optional> getGlobalOperationCustomizers() { return globalOperationCustomizers; } @@ -213,7 +215,7 @@ public Optional> getGlobalOperationCustomizers() * * @return the global open api method filters */ - public Optional> getGlobalOpenApiMethodFilters() { + public Optional> getGlobalOpenApiMethodFilters() { return globalOpenApiMethodFilters; } diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/ControllerType.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/ControllerType.java index 8a6bde515..c23d148ce 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/ControllerType.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/ControllerType.java @@ -3,50 +3,53 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.data; /** * The enum Controller type. + * * @author bnasslahsen */ public enum ControllerType { /** - *Entity controller type. + * Entity controller type. */ ENTITY, /** - *Search controller type. + * Search controller type. */ SEARCH, /** - *Schema controller type. + * Schema controller type. */ SCHEMA, /** - *PROPERTY controller type. + * PROPERTY controller type. */ PROPERTY, /** - *GENERAL controller type. + * GENERAL controller type. */ GENERAL } diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/DataRestOperationService.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/DataRestOperationService.java index 7fd17b417..71f93b67b 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/DataRestOperationService.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/DataRestOperationService.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.data; @@ -59,6 +61,7 @@ /** * The type Data rest operation builder. + * * @author bnasslahsen */ public class DataRestOperationService { @@ -96,10 +99,10 @@ public class DataRestOperationService { /** * Instantiates a new Data rest operation builder. * - * @param dataRestRequestService the data rest request builder - * @param tagsBuilder the tags builder + * @param dataRestRequestService the data rest request builder + * @param tagsBuilder the tags builder * @param dataRestResponseService the data rest response builder - * @param operationService the operation service + * @param operationService the operation service */ public DataRestOperationService(DataRestRequestService dataRestRequestService, DataRestTagsService tagsBuilder, DataRestResponseService dataRestResponseService, OperationService operationService) { @@ -112,15 +115,15 @@ public DataRestOperationService(DataRestRequestService dataRestRequestService, D /** * Build operation. * - * @param handlerMethod the handler method - * @param dataRestRepository the repository data rest - * @param openAPI the open api - * @param requestMethod the request method - * @param operationPath the operation path - * @param methodAttributes the method attributes - * @param resourceMetadata the resource metadata + * @param handlerMethod the handler method + * @param dataRestRepository the repository data rest + * @param openAPI the open api + * @param requestMethod the request method + * @param operationPath the operation path + * @param methodAttributes the method attributes + * @param resourceMetadata the resource metadata * @param methodResourceMapping the method resource mapping - * @param controllerType the controller type + * @param controllerType the controller type * @return the operation */ public Operation buildOperation(HandlerMethod handlerMethod, DataRestRepository dataRestRepository, @@ -143,13 +146,13 @@ else if (ControllerType.SEARCH.equals(controllerType)) { /** * Build entity operation. * - * @param handlerMethod the handler method + * @param handlerMethod the handler method * @param dataRestRepository the repository data rest - * @param openAPI the open api - * @param requestMethod the request method - * @param operationPath the operation path - * @param methodAttributes the method attributes - * @param resourceMetadata the resource metadata + * @param openAPI the open api + * @param requestMethod the request method + * @param operationPath the operation path + * @param methodAttributes the method attributes + * @param resourceMetadata the resource metadata * @return the operation */ private Operation buildEntityOperation(HandlerMethod handlerMethod, DataRestRepository dataRestRepository, @@ -170,13 +173,13 @@ private Operation buildEntityOperation(HandlerMethod handlerMethod, DataRestRepo /** * Build search operation. * - * @param handlerMethod the handler method - * @param dataRestRepository the repository data rest - * @param openAPI the open api - * @param requestMethod the request method - * @param methodAttributes the method attributes + * @param handlerMethod the handler method + * @param dataRestRepository the repository data rest + * @param openAPI the open api + * @param requestMethod the request method + * @param methodAttributes the method attributes * @param methodResourceMapping the method resource mapping - * @param resourceMetadata the resource metadata + * @param resourceMetadata the resource metadata * @return the operation */ private Operation buildSearchOperation(HandlerMethod handlerMethod, DataRestRepository dataRestRepository, @@ -235,8 +238,8 @@ else if (CollectionUtils.isEmpty(operation.getParameters())) /** * Gets parameter type. * - * @param pName the p name - * @param method the method + * @param pName the p name + * @param method the method * @param description the description * @return the parameter type */ @@ -268,10 +271,10 @@ private Type getParameterType(String pName, Method method, ResourceDescription d /** * Update parameter from annotations parameter. * - * @param openAPI the open api + * @param openAPI the open api * @param methodAttributes the method attributes - * @param method the method - * @param pName the p name + * @param method the method + * @param pName the p name * @return the parameter */ private Parameter getParameterFromAnnotations(OpenAPI openAPI, MethodAttributes methodAttributes, Method method, String pName) { @@ -295,7 +298,7 @@ private Parameter getParameterFromAnnotations(OpenAPI openAPI, MethodAttributes * Init operation. * * @param handlerMethod the handler method - * @param domainType the domain type + * @param domainType the domain type * @param requestMethod the request method * @return the operation */ @@ -313,9 +316,10 @@ private Operation initOperation(HandlerMethod handlerMethod, Class domainType /** * Add operation description. - * @param operation the operation - * @param requestMethod the request method - * @param entity the entity + * + * @param operation the operation + * @param requestMethod the request method + * @param entity the entity * @param dataRestRepository the data rest repository */ private void addOperationDescription(Operation operation, RequestMethod requestMethod, String entity, DataRestRepository dataRestRepository) { @@ -343,8 +347,8 @@ private void addOperationDescription(Operation operation, RequestMethod requestM /** * Create description. * - * @param action the action - * @param entity the entity + * @param action the action + * @param entity the entity * @param dataRestRepository the data rest repository * @return the string */ diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/DataRestRepository.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/DataRestRepository.java index 12234f84e..87874be1e 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/DataRestRepository.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/DataRestRepository.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.data; @@ -30,6 +32,7 @@ /** * The type Data rest repository. + * * @author bnasslahsen */ public class DataRestRepository { @@ -82,9 +85,9 @@ public class DataRestRepository { /** * Instantiates a new Data rest repository. * - * @param domainType the domain type + * @param domainType the domain type * @param repositoryType the repository type - * @param locale the locale + * @param locale the locale */ public DataRestRepository(Class domainType, Class repositoryType, Locale locale) { this.domainType = domainType; diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/DataRestRequestService.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/DataRestRequestService.java index b756e7a87..a00aad09e 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/DataRestRequestService.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/DataRestRequestService.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.data; @@ -63,8 +65,11 @@ import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.method.HandlerMethod; +import static org.springdoc.core.utils.SpringDocUtils.getParameterAnnotations; + /** * The type Data rest request builder. + * * @author bnasslahsen */ public class DataRestRequestService { @@ -98,10 +103,10 @@ public class DataRestRequestService { * Instantiates a new Data rest request builder. * * @param localSpringDocParameterNameDiscoverer the local spring doc parameter name discoverer - * @param parameterBuilder the parameter builder - * @param requestBodyService the request body builder - * @param requestBuilder the request builder - * @param springDocDataRestUtils the spring doc data rest utils + * @param parameterBuilder the parameter builder + * @param requestBodyService the request body builder + * @param requestBuilder the request builder + * @param springDocDataRestUtils the spring doc data rest utils */ public DataRestRequestService(SpringDocParameterNameDiscoverer localSpringDocParameterNameDiscoverer, GenericParameterService parameterBuilder, RequestBodyService requestBodyService, AbstractRequestService requestBuilder, SpringDocDataRestUtils springDocDataRestUtils) { @@ -115,12 +120,12 @@ public DataRestRequestService(SpringDocParameterNameDiscoverer localSpringDocPar /** * Build parameters. * - * @param openAPI the open api - * @param handlerMethod the handler method - * @param requestMethod the request method - * @param methodAttributes the method attributes - * @param operation the operation - * @param resourceMetadata the resource metadata + * @param openAPI the open api + * @param handlerMethod the handler method + * @param requestMethod the request method + * @param methodAttributes the method attributes + * @param operation the operation + * @param resourceMetadata the resource metadata * @param dataRestRepository the data rest repository */ public void buildParameters(OpenAPI openAPI, HandlerMethod handlerMethod, RequestMethod requestMethod, MethodAttributes methodAttributes, @@ -141,17 +146,17 @@ public void buildParameters(OpenAPI openAPI, HandlerMethod handlerMethod, Reques /** * Build common parameters. * - * @param openAPI the open api - * @param requestMethod the request method - * @param methodAttributes the method attributes - * @param operation the operation - * @param pNames the p names - * @param parameters the parameters + * @param openAPI the open api + * @param requestMethod the request method + * @param methodAttributes the method attributes + * @param operation the operation + * @param pNames the p names + * @param parameters the parameters * @param dataRestRepository the data rest repository */ public void buildCommonParameters(OpenAPI openAPI, RequestMethod requestMethod, MethodAttributes methodAttributes, Operation operation, String[] pNames, MethodParameter[] parameters, DataRestRepository dataRestRepository) { - parameters = DelegatingMethodParameter.customize(pNames, parameters, parameterBuilder.getDelegatingMethodParameterCustomizer(), requestBuilder.isDefaultFlatParamObject()); + parameters = DelegatingMethodParameter.customize(pNames, parameters, parameterBuilder.getOptionalDelegatingMethodParameterCustomizers(), requestBuilder.isDefaultFlatParamObject()); Class domainType = dataRestRepository.getDomainType(); for (MethodParameter methodParameter : parameters) { final String pName = methodParameter.getParameterName(); @@ -161,7 +166,7 @@ public void buildCommonParameters(OpenAPI openAPI, RequestMethod requestMethod, ParameterInfo parameterInfo = new ParameterInfo(pName, methodParameter, parameterBuilder, parameterDoc); if (isParamToIgnore(methodParameter)) { if (PersistentEntityResource.class.equals(methodParameter.getParameterType())) { - Schema schema = SpringDocAnnotationsUtils.resolveSchemaFromType(domainType, openAPI.getComponents(), null, methodParameter.getParameterAnnotations(), openAPI.getSpecVersion()); + Schema schema = SpringDocAnnotationsUtils.resolveSchemaFromType(domainType, openAPI.getComponents(), null, getParameterAnnotations(methodParameter), openAPI.getSpecVersion()); parameterInfo.setParameterModel(new Parameter().schema(schema)); } else if (methodParameter.getParameterAnnotation(BackendId.class) != null) { @@ -175,7 +180,7 @@ else if (methodParameter.getParameterAnnotation(BackendId.class) != null) { parameterInfo.setParameterModel(parameter); } if (!ArrayUtils.isEmpty(methodParameter.getParameterAnnotations())) - parameter = requestBuilder.buildParams(parameterInfo, openAPI.getComponents(), requestMethod, null, + parameter = requestBuilder.buildParams(parameterInfo, openAPI.getComponents(), requestMethod, methodAttributes, openAPI.getOpenapi()); addParameters(openAPI, requestMethod, methodAttributes, operation, methodParameter, parameterInfo, parameter); } @@ -185,10 +190,10 @@ else if (methodParameter.getParameterAnnotation(BackendId.class) != null) { /** * Build parameter from doc parameter. * - * @param parameterDoc the parameter doc - * @param components the components + * @param parameterDoc the parameter doc + * @param components the components * @param jsonViewAnnotation the json view annotation - * @param locale the locale + * @param locale the locale * @return the parameter */ public Parameter buildParameterFromDoc(io.swagger.v3.oas.annotations.Parameter parameterDoc, Components components, JsonView jsonViewAnnotation, Locale locale) { @@ -210,17 +215,17 @@ private boolean isParamToIgnore(MethodParameter methodParameter) { /** * Add parameters. * - * @param openAPI the open api - * @param requestMethod the request method + * @param openAPI the open api + * @param requestMethod the request method * @param methodAttributes the method attributes - * @param operation the operation - * @param methodParameter the method parameter - * @param parameterInfo the parameter info - * @param parameter the parameter + * @param operation the operation + * @param methodParameter the method parameter + * @param parameterInfo the parameter info + * @param parameter the parameter */ private void addParameters(OpenAPI openAPI, RequestMethod requestMethod, MethodAttributes methodAttributes, Operation operation, MethodParameter methodParameter, ParameterInfo parameterInfo, Parameter parameter) { - List parameterAnnotations = Arrays.asList(methodParameter.getParameterAnnotations()); + List parameterAnnotations = Arrays.asList(getParameterAnnotations(methodParameter)); if (requestBuilder.isValidParameter(parameter)) { requestBuilder.applyBeanValidatorAnnotations(parameter, parameterAnnotations); operation.addParametersItem(parameter); diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/DataRestResponseService.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/DataRestResponseService.java index cc4967231..7f5d7af35 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/DataRestResponseService.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/DataRestResponseService.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.data; @@ -39,10 +41,10 @@ import io.swagger.v3.oas.models.responses.ApiResponse; import io.swagger.v3.oas.models.responses.ApiResponses; import org.springdoc.core.models.MethodAttributes; -import org.springdoc.core.parsers.ReturnTypeParser; import org.springdoc.core.service.GenericResponseService; import org.springdoc.core.utils.SpringDocDataRestUtils; +import org.springframework.core.GenericTypeResolver; import org.springframework.core.MethodParameter; import org.springframework.core.ResolvableType; import org.springframework.data.rest.core.mapping.MethodResourceMapping; @@ -62,6 +64,7 @@ /** * The type Data rest response builder. + * * @author bnasslahsen */ public class DataRestResponseService { @@ -94,14 +97,15 @@ public DataRestResponseService(GenericResponseService genericResponseService, Sp /** * Build search response. - * @param operation the operation - * @param handlerMethod the handler method - * @param openAPI the open api + * + * @param operation the operation + * @param handlerMethod the handler method + * @param openAPI the open api * @param methodResourceMapping the method resource mapping - * @param domainType the domain type - * @param methodAttributes the method attributes - * @param resourceMetadata the resource metadata - * @param dataRestRepository the data rest repository + * @param domainType the domain type + * @param methodAttributes the method attributes + * @param resourceMetadata the resource metadata + * @param dataRestRepository the data rest repository */ public void buildSearchResponse(Operation operation, HandlerMethod handlerMethod, OpenAPI openAPI, MethodResourceMapping methodResourceMapping, Class domainType, MethodAttributes methodAttributes, ResourceMetadata resourceMetadata, @@ -130,14 +134,15 @@ public void buildSearchResponse(Operation operation, HandlerMethod handlerMethod /** * Build entity response. - * @param operation the operation - * @param handlerMethod the handler method - * @param openAPI the open api - * @param requestMethod the request method - * @param operationPath the operation path - * @param methodAttributes the method attributes + * + * @param operation the operation + * @param handlerMethod the handler method + * @param openAPI the open api + * @param requestMethod the request method + * @param operationPath the operation path + * @param methodAttributes the method attributes * @param dataRestRepository the data rest repository - * @param resourceMetadata the resource metadata + * @param resourceMetadata the resource metadata */ public void buildEntityResponse(Operation operation, HandlerMethod handlerMethod, OpenAPI openAPI, RequestMethod requestMethod, String operationPath, MethodAttributes methodAttributes, DataRestRepository dataRestRepository, ResourceMetadata resourceMetadata) { @@ -157,8 +162,8 @@ public void buildEntityResponse(Operation operation, HandlerMethod handlerMethod * * @param requestMethod the request method * @param operationPath the operation path - * @param apiResponses the api responses - * @param apiResponse the api response + * @param apiResponses the api responses + * @param apiResponse the api response */ private void addResponse(RequestMethod requestMethod, String operationPath, ApiResponses apiResponses, ApiResponse apiResponse) { switch (requestMethod) { @@ -192,12 +197,12 @@ private void addResponse(RequestMethod requestMethod, String operationPath, ApiR * Find search return type. * * @param methodResourceMapping the method resource mapping - * @param domainType the domain type + * @param domainType the domain type * @return the type */ private Type findSearchReturnType(MethodResourceMapping methodResourceMapping, Class domainType) { Type returnType; - Type returnRepoType = ReturnTypeParser.resolveType(methodResourceMapping.getMethod().getGenericReturnType(), methodResourceMapping.getMethod().getDeclaringClass()); + Type returnRepoType = GenericTypeResolver.resolveType(methodResourceMapping.getMethod().getGenericReturnType(), methodResourceMapping.getMethod().getDeclaringClass()); if (methodResourceMapping.isPagingResource()) { returnType = resolveGenericType(PagedModel.class, EntityModel.class, domainType); } @@ -218,29 +223,27 @@ else if (ClassUtils.isPrimitiveOrWrapper(methodResourceMapping.getReturnedDomain * Gets type. * * @param methodParameterReturn the method parameter return - * @param requestMethod the request method - * @param dataRestRepository the data rest repository - * @param resourceMetadata the resource metadata + * @param requestMethod the request method + * @param dataRestRepository the data rest repository + * @param resourceMetadata the resource metadata * @return the type */ private Type getType(MethodParameter methodParameterReturn, RequestMethod requestMethod, DataRestRepository dataRestRepository, ResourceMetadata resourceMetadata) { - Type returnType = ReturnTypeParser.resolveType(methodParameterReturn.getGenericParameterType(), methodParameterReturn.getContainingClass()); + Type returnType = GenericTypeResolver.resolveType(methodParameterReturn.getGenericParameterType(), methodParameterReturn.getContainingClass()); Class returnedEntityType = dataRestRepository.getReturnType(); - if (returnType instanceof ParameterizedType) { - ParameterizedType parameterizedType = (ParameterizedType) returnType; + if (returnType instanceof ParameterizedType parameterizedType) { if ((ResponseEntity.class.equals(parameterizedType.getRawType()))) { return getTypeForResponseEntity(requestMethod, dataRestRepository, returnedEntityType, parameterizedType); } else if ((HttpEntity.class.equals(parameterizedType.getRawType()) - && parameterizedType.getActualTypeArguments()[0] instanceof ParameterizedType)) { - ParameterizedType wildcardTypeUpperBound = (ParameterizedType) parameterizedType.getActualTypeArguments()[0]; + && parameterizedType.getActualTypeArguments()[0] instanceof ParameterizedType wildcardTypeUpperBound)) { if (RepresentationModel.class.equals(wildcardTypeUpperBound.getRawType())) { return resolveGenericType(HttpEntity.class, RepresentationModel.class, returnedEntityType); } } else if ((CollectionModel.class.equals(parameterizedType.getRawType()) - && Object.class.equals(parameterizedType.getActualTypeArguments()[0]))) { + && parameterizedType.getActualTypeArguments()[0]!=null)) { return getTypeForCollectionModel(returnedEntityType, resourceMetadata.isPagingResource()); } } @@ -250,10 +253,10 @@ else if ((CollectionModel.class.equals(parameterizedType.getRawType()) /** * Gets type for response entity. * - * @param requestMethod the request method + * @param requestMethod the request method * @param dataRestRepository the data rest repository * @param returnedEntityType the returned entity type - * @param parameterizedType the parameterized type + * @param parameterizedType the parameterized type * @return the type for response entity */ private Type getTypeForResponseEntity(RequestMethod requestMethod, DataRestRepository dataRestRepository, Class returnedEntityType, ParameterizedType parameterizedType) { @@ -273,7 +276,7 @@ else if (parameterizedType.getActualTypeArguments()[0] instanceof WildcardType) * Gets type for collection model. * * @param returnedEntityType the returned entity type - * @param pagingResource the paging resource + * @param pagingResource the paging resource * @return the type for collection model */ private Type getTypeForCollectionModel(Class returnedEntityType, boolean pagingResource) { @@ -286,16 +289,15 @@ private Type getTypeForCollectionModel(Class returnedEntityType, boolean pagingR /** * Gets type for wildcard type. * - * @param requestMethod the request method + * @param requestMethod the request method * @param dataRestRepository the data rest repository * @param returnedEntityType the returned entity type - * @param parameterizedType the parameterized type + * @param parameterizedType the parameterized type * @return the type for wildcard type */ private Type getTypeForWildcardType(RequestMethod requestMethod, DataRestRepository dataRestRepository, Class returnedEntityType, ParameterizedType parameterizedType) { WildcardType wildcardType = (WildcardType) parameterizedType.getActualTypeArguments()[0]; - if (wildcardType.getUpperBounds()[0] instanceof ParameterizedType) { - ParameterizedType wildcardTypeUpperBound = (ParameterizedType) wildcardType.getUpperBounds()[0]; + if (wildcardType.getUpperBounds()[0] instanceof ParameterizedType wildcardTypeUpperBound) { if (RepresentationModel.class.equals(wildcardTypeUpperBound.getRawType())) { Class type = findType(requestMethod, dataRestRepository); if (MapModel.class.equals(type)) @@ -310,10 +312,10 @@ private Type getTypeForWildcardType(RequestMethod requestMethod, DataRestReposit /** * Gets type. * - * @param requestMethod the request method + * @param requestMethod the request method * @param dataRestRepository the data rest repository * @param returnedEntityType the returned entity type - * @param parameterizedType the parameterized type + * @param parameterizedType the parameterized type * @return the type */ private Type getTypeForParameterizedType(RequestMethod requestMethod, DataRestRepository dataRestRepository, Class returnedEntityType, ParameterizedType parameterizedType) { @@ -335,7 +337,7 @@ else if (EntityModel.class.equals(parameterizedType1.getRawType())) { /** * Find type class. * - * @param requestMethod the request method + * @param requestMethod the request method * @param dataRestRepository the data rest repository * @return the class */ @@ -358,8 +360,8 @@ else if (dataRestRepository.isMap()) /** * Resolve generic type type. * - * @param container the container - * @param generic the generic + * @param container the container + * @param generic the generic * @param domainType the domain type * @return the type */ @@ -372,7 +374,7 @@ private Type resolveGenericType(Class container, Class generic, Class d * Add response 200. * * @param apiResponses the api responses - * @param apiResponse the api response + * @param apiResponse the api response */ private void addResponse200(ApiResponses apiResponses, ApiResponse apiResponse) { apiResponses.put(String.valueOf(HttpStatus.OK.value()), apiResponse.description(HttpStatus.OK.getReasonPhrase())); @@ -398,6 +400,7 @@ private void addResponse404(ApiResponses apiResponses) { /** * The type Map model. + * * @author bnasslashen */ private static class MapModel extends RepresentationModel { @@ -410,7 +413,7 @@ private static class MapModel extends RepresentationModel { * Instantiates a new Map model. * * @param content the content - * @param links the links + * @param links the links */ public MapModel(Map content, Link... links) { super(Arrays.asList(links)); diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/DataRestRouterOperationService.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/DataRestRouterOperationService.java index 917a66d99..85cd00e74 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/DataRestRouterOperationService.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/DataRestRouterOperationService.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.data; @@ -59,6 +61,7 @@ /** * The type Data rest router operation builder. + * * @author bnasslahsen */ public class DataRestRouterOperationService { @@ -96,10 +99,10 @@ public class DataRestRouterOperationService { /** * Instantiates a new Data rest router operation builder. * - * @param dataRestOperationService the data rest operation builder - * @param springDocConfigProperties the spring doc config properties + * @param dataRestOperationService the data rest operation builder + * @param springDocConfigProperties the spring doc config properties * @param repositoryRestConfiguration the repository rest configuration - * @param dataRestHalProvider the data rest hal provider + * @param dataRestHalProvider the data rest hal provider */ public DataRestRouterOperationService(DataRestOperationService dataRestOperationService, SpringDocConfigProperties springDocConfigProperties, RepositoryRestConfiguration repositoryRestConfiguration, DataRestHalProvider dataRestHalProvider) { @@ -113,10 +116,10 @@ public DataRestRouterOperationService(DataRestOperationService dataRestOperation * Build entity router operation list. * * @param routerOperationList the router operation list - * @param handlerMethodMap the handler method map - * @param resourceMetadata the resource metadata - * @param dataRestRepository the repository data rest - * @param openAPI the open api + * @param handlerMethodMap the handler method map + * @param resourceMetadata the resource metadata + * @param dataRestRepository the repository data rest + * @param openAPI the open api */ public void buildEntityRouterOperationList(List routerOperationList, Map handlerMethodMap, ResourceMetadata resourceMetadata, @@ -131,11 +134,11 @@ public void buildEntityRouterOperationList(List routerOperation /** * Build search router operation list. * - * @param routerOperationList the router operation list - * @param handlerMethodMap the handler method map - * @param resourceMetadata the resource metadata - * @param dataRestRepository the repository data rest - * @param openAPI the open api + * @param routerOperationList the router operation list + * @param handlerMethodMap the handler method map + * @param resourceMetadata the resource metadata + * @param dataRestRepository the repository data rest + * @param openAPI the open api * @param methodResourceMapping the method resource mapping */ public void buildSearchRouterOperationList(List routerOperationList, @@ -153,14 +156,14 @@ public void buildSearchRouterOperationList(List routerOperation /** * Build router operation list. * - * @param routerOperationList the router operation list - * @param resourceMetadata the resource metadata - * @param dataRestRepository the repository data rest - * @param openAPI the open api - * @param path the path - * @param entry the entry - * @param subPath the sub path - * @param controllerType the controllerType + * @param routerOperationList the router operation list + * @param resourceMetadata the resource metadata + * @param dataRestRepository the repository data rest + * @param openAPI the open api + * @param path the path + * @param entry the entry + * @param subPath the sub path + * @param controllerType the controllerType * @param methodResourceMapping the method resource mapping */ private void buildRouterOperationList(List routerOperationList, ResourceMetadata resourceMetadata, @@ -200,18 +203,18 @@ private void buildRouterOperationList(List routerOperationList, /** * Build router operation. * - * @param routerOperationList the router operation list - * @param resourceMetadata the resource metadata - * @param dataRestRepository the data rest repository - * @param openAPI the open api - * @param path the path - * @param subPath the sub path - * @param controllerType the controller type - * @param methodResourceMapping the method resource mapping - * @param requestMappingInfo the request mapping info - * @param handlerMethod the handler method + * @param routerOperationList the router operation list + * @param resourceMetadata the resource metadata + * @param dataRestRepository the data rest repository + * @param openAPI the open api + * @param path the path + * @param subPath the sub path + * @param controllerType the controller type + * @param methodResourceMapping the method resource mapping + * @param requestMappingInfo the request mapping info + * @param handlerMethod the handler method * @param requestMethodsCollection the request methods collection - * @param collection the collection + * @param collection the collection */ private void buildRouterOperation(List routerOperationList, ResourceMetadata resourceMetadata, DataRestRepository dataRestRepository, OpenAPI openAPI, String path, String subPath, ControllerType controllerType, MethodResourceMapping methodResourceMapping, RequestMappingInfo requestMappingInfo, @@ -235,13 +238,13 @@ private void buildRouterOperation(List routerOperationList, Res /** * Calculate operation path string. * - * @param path the path - * @param subPath the sub path - * @param patterns the patterns - * @param regexMap the regex map + * @param path the path + * @param subPath the sub path + * @param patterns the patterns + * @param regexMap the regex map * @param controllerType the controller type - * @param relationName the relation name - * @param resourceType the resource type + * @param relationName the relation name + * @param resourceType the resource type * @return the string */ private String calculateOperationPath(String path, String subPath, Set patterns, @@ -265,15 +268,15 @@ else if (ControllerType.PROPERTY.equals(controllerType)) /** * Build router operation. * - * @param routerOperationList the router operation list - * @param dataRestRepository the repository data rest - * @param openAPI the open api + * @param routerOperationList the router operation list + * @param dataRestRepository the repository data rest + * @param openAPI the open api * @param methodResourceMapping the method resource mapping - * @param handlerMethod the handler method - * @param requestMethod the request method - * @param resourceMetadata the resource metadata - * @param operationPath the operation path - * @param controllerType the controller type + * @param handlerMethod the handler method + * @param requestMethod the request method + * @param resourceMetadata the resource metadata + * @param operationPath the operation path + * @param controllerType the controller type */ private void buildRouterOperation (List routerOperationList, DataRestRepository @@ -297,7 +300,7 @@ else if (ControllerType.PROPERTY.equals(controllerType)) * Gets search entry. * * @param handlerMethodMap the handler method map - * @param locale the locale + * @param locale the locale * @return the search entry */ private Optional> getSearchEntry @@ -319,9 +322,9 @@ else if (ControllerType.PROPERTY.equals(controllerType)) * Is search controller present boolean. * * @param requestMappingInfo the request mapping info - * @param handlerMethod the handler method - * @param requestMethod the request method - * @param locale the locale + * @param handlerMethod the handler method + * @param requestMethod the request method + * @param locale the locale * @return the boolean */ private boolean isSearchControllerPresent(RequestMappingInfo requestMappingInfo, HandlerMethod handlerMethod, RequestMethod requestMethod, Locale locale) { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/DataRestTagsService.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/DataRestTagsService.java index d8c53e613..f6e1797fc 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/DataRestTagsService.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/DataRestTagsService.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.data; @@ -41,6 +43,7 @@ /** * The type Data rest tags builder. + * * @author bnasslahsen */ public class DataRestTagsService { @@ -62,10 +65,10 @@ public DataRestTagsService(OpenAPIService openAPIService) { /** * Build search tags. * - * @param operation the operation - * @param handlerMethod the handler method + * @param operation the operation + * @param handlerMethod the handler method * @param dataRestRepository the repository data rest - * @param method the method + * @param method the method */ public void buildSearchTags(Operation operation, HandlerMethod handlerMethod, DataRestRepository dataRestRepository, Method method) { @@ -75,8 +78,8 @@ public void buildSearchTags(Operation operation, HandlerMethod handlerMethod, /** * Build entity tags. * - * @param operation the operation - * @param handlerMethod the handler method + * @param operation the operation + * @param handlerMethod the handler method * @param dataRestRepository the repository data rest */ public void buildEntityTags(Operation operation, HandlerMethod handlerMethod, @@ -86,10 +89,11 @@ public void buildEntityTags(Operation operation, HandlerMethod handlerMethod, /** * Build tags. - * @param operation the operation - * @param handlerMethod the handler method + * + * @param operation the operation + * @param handlerMethod the handler method * @param dataRestRepository the repository data rest - * @param method + * @param method the method */ private void buildTags(Operation operation, HandlerMethod handlerMethod, DataRestRepository dataRestRepository, Method method) { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/discoverer/SpringDocParameterNameDiscoverer.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/discoverer/SpringDocParameterNameDiscoverer.java index db57f082f..10344c6d9 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/discoverer/SpringDocParameterNameDiscoverer.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/discoverer/SpringDocParameterNameDiscoverer.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * Copyright 2019-2023 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.discoverer; diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/extractor/DelegatingMethodParameter.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/extractor/DelegatingMethodParameter.java index d3320398e..e704d51a4 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/extractor/DelegatingMethodParameter.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/extractor/DelegatingMethodParameter.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * Copyright 2019-2023 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.extractor; @@ -56,6 +58,7 @@ /** * The type Delegating method parameter. + * * @author zarebski.m */ public class DelegatingMethodParameter extends MethodParameter { @@ -85,6 +88,11 @@ public class DelegatingMethodParameter extends MethodParameter { */ private final boolean isParameterObject; + /** + * The Method annotations. + */ + private final Annotation[] methodAnnotations; + /** * The Is not required. */ @@ -93,32 +101,34 @@ public class DelegatingMethodParameter extends MethodParameter { /** * Instantiates a new Delegating method parameter. * - * @param delegate the delegate - * @param parameterName the parameter name + * @param delegate the delegate + * @param parameterName the parameter name * @param additionalParameterAnnotations the additional parameter annotations - * @param isParameterObject the is parameter object - * @param isNotRequired the is required + * @param methodAnnotations the method annotations + * @param isParameterObject the is parameter object + * @param isNotRequired the is required */ - DelegatingMethodParameter(MethodParameter delegate, String parameterName, Annotation[] additionalParameterAnnotations, boolean isParameterObject, boolean isNotRequired) { + DelegatingMethodParameter(MethodParameter delegate, String parameterName, Annotation[] additionalParameterAnnotations, Annotation[] methodAnnotations, boolean isParameterObject, boolean isNotRequired) { super(delegate); this.delegate = delegate; this.additionalParameterAnnotations = additionalParameterAnnotations; this.parameterName = parameterName; this.isParameterObject = isParameterObject; this.isNotRequired = isNotRequired; + this.methodAnnotations =methodAnnotations; } /** * Customize method parameter [ ]. * - * @param pNames the p names - * @param parameters the parameters - * @param optionalDelegatingMethodParameterCustomizer the optional delegating method parameter customizer - * @param defaultFlatParamObject the default flat param object + * @param pNames the p names + * @param parameters the parameters + * @param optionalDelegatingMethodParameterCustomizers the optional list delegating method parameter customizer + * @param defaultFlatParamObject the default flat param object * @return the method parameter [ ] */ public static MethodParameter[] customize(String[] pNames, MethodParameter[] parameters, - Optional optionalDelegatingMethodParameterCustomizer, boolean defaultFlatParamObject) { + Optional> optionalDelegatingMethodParameterCustomizers, boolean defaultFlatParamObject) { List explodedParameters = new ArrayList<>(); for (int i = 0; i < parameters.length; ++i) { MethodParameter p = parameters[i]; @@ -130,13 +140,13 @@ public static MethodParameter[] customize(String[] pNames, MethodParameter[] par if (!MethodParameterPojoExtractor.isSimpleType(paramClass) && (hasFlatAnnotation || (defaultFlatParamObject && !hasNotFlatAnnotation && !AbstractRequestService.isRequestTypeToIgnore(paramClass)))) { MethodParameterPojoExtractor.extractFrom(paramClass).forEach(methodParameter -> { - optionalDelegatingMethodParameterCustomizer.ifPresent(customizer -> customizer.customize(p, methodParameter)); + optionalDelegatingMethodParameterCustomizers.ifPresent(delegatingMethodParameterCustomizers -> delegatingMethodParameterCustomizers.forEach(customizer -> customizer.customize(p, methodParameter))); explodedParameters.add(methodParameter); }); } else { String name = pNames != null ? pNames[i] : p.getParameterName(); - explodedParameters.add(new DelegatingMethodParameter(p, name, null, false, false)); + explodedParameters.add(new DelegatingMethodParameter(p, name, null, null, false, false)); } } return explodedParameters.toArray(new MethodParameter[0]); @@ -145,10 +155,11 @@ public static MethodParameter[] customize(String[] pNames, MethodParameter[] par /** * Return a variant of this {@code MethodParameter} which refers to the * given containing class. + * * @param methodParameter the method parameter * @param containingClass a specific containing class (potentially a subclass of the declaring class, e.g. substituting a type variable) A copy of spring withContainingClass, to keep compatibility with older spring versions * @return the method parameter - * @see #getParameterType() #getParameterType() + * @see #getParameterType() #getParameterType()#getParameterType() */ public static MethodParameter changeContainingClass(MethodParameter methodParameter, @Nullable Class containingClass) { MethodParameter result = methodParameter.clone(); @@ -167,7 +178,8 @@ public static MethodParameter changeContainingClass(MethodParameter methodParame @Override @NonNull public Annotation[] getParameterAnnotations() { - return ArrayUtils.addAll(delegate.getParameterAnnotations(), additionalParameterAnnotations); + Annotation[] methodAnnotations = ArrayUtils.addAll(delegate.getParameterAnnotations(), this.methodAnnotations); + return ArrayUtils.addAll(methodAnnotations, additionalParameterAnnotations); } @Override diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/extractor/MethodParameterPojoExtractor.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/extractor/MethodParameterPojoExtractor.java index ff8e3f0c1..837c79b29 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/extractor/MethodParameterPojoExtractor.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/extractor/MethodParameterPojoExtractor.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.extractor; @@ -52,14 +54,15 @@ import io.swagger.v3.core.util.PrimitiveType; import io.swagger.v3.oas.annotations.Parameter; -import org.springdoc.core.parsers.ReturnTypeParser; +import org.springframework.core.GenericTypeResolver; import org.springframework.core.MethodParameter; import static org.springdoc.core.utils.Constants.DOT; /** * The type Method parameter pojo extractor. + * * @author bnasslahsen */ public class MethodParameterPojoExtractor { @@ -88,6 +91,7 @@ public class MethodParameterPojoExtractor { SIMPLE_TYPES.add(Iterable.class); SIMPLE_TYPES.add(Duration.class); SIMPLE_TYPES.add(LocalTime.class); + SIMPLE_TYPES.add(Class.class); SIMPLE_TYPE_PREDICATES.add(Class::isPrimitive); SIMPLE_TYPE_PREDICATES.add(Class::isEnum); @@ -115,7 +119,7 @@ static Stream extractFrom(Class clazz) { /** * Extract from stream. * - * @param clazz the clazz + * @param clazz the clazz * @param fieldNamePrefix the field name prefix * @return the stream */ @@ -129,8 +133,8 @@ private static Stream extractFrom(Class clazz, String fieldN /** * From getter of field stream. * - * @param paramClass the param class - * @param field the field + * @param paramClass the param class + * @param field the field * @param fieldNamePrefix the field name prefix * @return the stream */ @@ -150,14 +154,15 @@ private static Stream fromGetterOfField(Class paramClass, Fi /** * Extract the type - * @param paramClass - * @param field + * + * @param paramClass the param class + * @param field the field * @return The revoled type or null if it was not a reifiable type */ private static Class extractType(Class paramClass, Field field) { Class type = field.getType(); if (field.getGenericType() instanceof TypeVariable) { - Type fieldType = ReturnTypeParser.resolveType(field.getGenericType(), paramClass); + Type fieldType = GenericTypeResolver.resolveType(field.getGenericType(), paramClass); if (fieldType instanceof Class) type = (Class) fieldType; @@ -171,8 +176,8 @@ private static Class extractType(Class paramClass, Field field) { /** * From simple class stream. * - * @param paramClass the param class - * @param field the field + * @param paramClass the param class + * @param field the field * @param fieldNamePrefix the field name prefix * @return the stream */ @@ -187,7 +192,7 @@ private static Stream fromSimpleClass(Class paramClass, Fiel .map(RecordComponent::getAccessor) .map(method -> new MethodParameter(method, -1)) .map(methodParameter -> DelegatingMethodParameter.changeContainingClass(methodParameter, paramClass)) - .map(param -> new DelegatingMethodParameter(param, fieldNamePrefix + field.getName(), fieldAnnotations, true, isNotRequired)); + .map(param -> new DelegatingMethodParameter(param, fieldNamePrefix + field.getName(), fieldAnnotations, param.getMethodAnnotations(), true, isNotRequired)); } else @@ -197,7 +202,7 @@ private static Stream fromSimpleClass(Class paramClass, Fiel .filter(Objects::nonNull) .map(method -> new MethodParameter(method, -1)) .map(methodParameter -> DelegatingMethodParameter.changeContainingClass(methodParameter, paramClass)) - .map(param -> new DelegatingMethodParameter(param, fieldNamePrefix + field.getName(), fieldAnnotations, true, isNotRequired)); + .map(param -> new DelegatingMethodParameter(param, fieldNamePrefix + field.getName(), fieldAnnotations, param.getMethodAnnotations(), true, isNotRequired)); } catch (IntrospectionException e) { return Stream.of(); diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/filters/GlobalOpenApiMethodFilter.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/filters/GlobalOpenApiMethodFilter.java index d170a768b..df86a27de 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/filters/GlobalOpenApiMethodFilter.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/filters/GlobalOpenApiMethodFilter.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.filters; @@ -30,7 +32,7 @@ * and groups. * * @author michael.clarke - * @see OpenApiMethodFilter filter methods in default OpenAPI description but not groups + * @see OpenApiMethodFilter methods in default OpenAPI description but not groups */ @FunctionalInterface public interface GlobalOpenApiMethodFilter extends OpenApiMethodFilter { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/filters/OpenApiMethodFilter.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/filters/OpenApiMethodFilter.java index c5fe4563d..edbccd7de 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/filters/OpenApiMethodFilter.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/filters/OpenApiMethodFilter.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.filters; @@ -32,7 +34,7 @@ * but not groups * * @author michael.clarke - * @see GlobalOpenApiMethodFilter filter methods in default OpenAPI description and groups + * @see GlobalOpenApiMethodFilter methods in default OpenAPI description and groups */ @FunctionalInterface public interface OpenApiMethodFilter { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/AbstractRouterFunctionVisitor.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/AbstractRouterFunctionVisitor.java index 8bd7cbe00..5f10fc44b 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/AbstractRouterFunctionVisitor.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/AbstractRouterFunctionVisitor.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.fn; @@ -39,6 +41,7 @@ /** * The type Abstract router function visitor. + * * @author bnasslahsen */ public class AbstractRouterFunctionVisitor { @@ -141,7 +144,7 @@ else if (this.level > 0) { /** * Header. * - * @param name the name + * @param name the name * @param value the value */ public void header(String name, String value) { @@ -165,7 +168,7 @@ public List getRouterFunctionDatas() { /** * Query param. * - * @param name the name + * @param name the name * @param value the value */ public void queryParam(String name, String value) { @@ -187,7 +190,7 @@ public void pathExtension(String extension) { /** * Param. * - * @param name the name + * @param name the name * @param value the value */ public void param(String name, String value) { @@ -287,9 +290,9 @@ protected void commonRoute() { /** * Calculate header. * - * @param value the value + * @param value the value * @param headers the headers - * @param header the header + * @param header the header */ private void calculateHeader(String value, List headers, String header) { if (value.contains(",")) { @@ -326,8 +329,8 @@ private void createRouterFunctionData(String path) { /** * Add header. * - * @param mediaType the media type - * @param header the header + * @param mediaType the media type + * @param header the header * @param routerFunctionData the router function data */ private void addHeader(String mediaType, String header, RouterFunctionData routerFunctionData) { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/AbstractSpringdocRouteBuilder.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/AbstractSpringdocRouteBuilder.java index 1741bd194..a19283c2a 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/AbstractSpringdocRouteBuilder.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/AbstractSpringdocRouteBuilder.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.fn; @@ -30,6 +32,7 @@ /** * The type Abstract springdoc route builder. + * * @author bnasslahsen */ public abstract class AbstractSpringdocRouteBuilder { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/RouterFunctionData.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/RouterFunctionData.java index 1cca044de..fb9e03425 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/RouterFunctionData.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/RouterFunctionData.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.fn; @@ -40,6 +42,7 @@ /** * The type Router function data. + * * @author bnasslahsen */ public class RouterFunctionData { @@ -138,7 +141,7 @@ public Map getQueryParams() { /** * Add query params. * - * @param name the name + * @param name the name * @param value the value */ public void addQueryParams(String name, String value) { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/RouterOperation.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/RouterOperation.java index 8540fb5f9..0d70c08ee 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/RouterOperation.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/RouterOperation.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.fn; @@ -40,6 +42,7 @@ /** * The type Router operation. + * * @author bnasslahsen */ public class RouterOperation implements Comparable { @@ -132,7 +135,7 @@ public RouterOperation(org.springdoc.core.annotations.RouterOperation routerOper * Instantiates a new Router operation. * * @param routerOperationAnnotation the router operation annotation - * @param routerFunctionData the router function data + * @param routerFunctionData the router function data */ public RouterOperation(org.springdoc.core.annotations.RouterOperation routerOperationAnnotation, RouterFunctionData routerFunctionData) { this.path = StringUtils.isBlank(routerOperationAnnotation.path()) ? routerFunctionData.getPath() : routerOperationAnnotation.path(); @@ -151,11 +154,12 @@ public RouterOperation(org.springdoc.core.annotations.RouterOperation routerOper /** * Instantiates a new Router operation. * - * @param path the path - * @param methods the methods + * @param path the path + * @param methods the methods * @param consumes the consumes * @param produces the produces - * @param headers the headers + * @param headers the headers + * @param params the params */ public RouterOperation(String path, RequestMethod[] methods, String[] consumes, String[] produces, String[] headers, String[] params) { this.path = path; @@ -195,7 +199,7 @@ public RouterOperation(RouterFunctionData routerFunctionData) { * Instantiates a new Router operation. * * @param routerOperation the router operation - * @param requestMethod the request method + * @param requestMethod the request method */ public RouterOperation(org.springdoc.core.annotations.RouterOperation routerOperation, RequestMethod requestMethod) { this(routerOperation); @@ -394,7 +398,7 @@ public String[] getParams() { /** * Sets params. * - * @param params + * @param params the params */ public void setParams(String[] params) { this.params = params; diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/apiresponse/Builder.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/apiresponse/Builder.java index 915ae1124..7a8c8f8c4 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/apiresponse/Builder.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/apiresponse/Builder.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.fn.builders.apiresponse; @@ -35,6 +37,7 @@ /** * The type Api response builder. + * * @author bnasslahsen */ public class Builder { @@ -46,37 +49,31 @@ public class Builder { /** * A short description of the response. - * */ private String description = ""; /** * The HTTP response code, or 'default', for the supplied response. May only have 1 default entry. - * */ private String responseCode = "default"; /** * An array of response headers. Allows additional information to be included with response. - * */ private Header[] headers = {}; /** * An array of operation links that can be followed from the response. - * */ private Link[] links = {}; /** * An array containing descriptions of potential response payloads, for different media types. - * */ private Content[] content = {}; /** * The list of optional extensions - * */ private Extension[] extensions = {}; diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/arrayschema/Builder.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/arrayschema/Builder.java index d6d8882f7..278b276d4 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/arrayschema/Builder.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/arrayschema/Builder.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.fn.builders.arrayschema; diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/content/Builder.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/content/Builder.java index 827fbe58c..92ac322a1 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/content/Builder.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/content/Builder.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.fn.builders.content; diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/discriminatormapping/Builder.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/discriminatormapping/Builder.java index 93ee0b3fc..0944436e1 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/discriminatormapping/Builder.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/discriminatormapping/Builder.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.fn.builders.discriminatormapping; @@ -31,19 +33,18 @@ /** * The type Discriminator mapping builder. + * * @author bnasslahsen */ public class Builder { /** * The property value that will be mapped to a Schema - * */ private String value = ""; /** * The schema that is being mapped to a property value - * */ private Class schema = Void.class; diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/encoding/Builder.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/encoding/Builder.java index b9983b635..04f94375f 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/encoding/Builder.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/encoding/Builder.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.fn.builders.encoding; @@ -33,6 +35,7 @@ /** * The type Encoding builder. + * * @author bnasslahsen */ public class Builder { @@ -41,45 +44,38 @@ public class Builder { * The name of this encoding object instance. * This property is a key in encoding map of MediaType object and * MUST exist in a schema as a property. - * */ private String name = ""; /** * The Content-Type for encoding a specific property. - * */ private String contentType = ""; /** * Describes how a specific property value will be serialized depending on its type - * */ private String style = ""; /** * When this is true, property values of type array or object generate separate parameters for each value of the array, * or key-value-pair of the map. - * */ private boolean explode; /** * Determines whether the parameter value SHOULD allow reserved characters, * as defined by RFC3986 to be included without percent-encoding. - * */ private boolean allowReserved; /** * An array of header objects - * */ private Header[] headers = {}; /** * The list of optional extensions - * */ private Extension[] extensions = {}; diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/exampleobject/Builder.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/exampleobject/Builder.java index 97b6e86a7..3d41d0cda 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/exampleobject/Builder.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/exampleobject/Builder.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.fn.builders.exampleobject; @@ -32,6 +34,7 @@ /** * The type Example object builder. + * * @author bnasslahsen */ public class Builder { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/extension/Builder.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/extension/Builder.java index bcfbfa188..be3bd437d 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/extension/Builder.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/extension/Builder.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.fn.builders.extension; @@ -32,19 +34,18 @@ /** * The type Extension builder. + * * @author bnasslahsen */ public class Builder { /** * An option name for these extensions. - * */ private String name = ""; /** * The extension properties. - * */ private ExtensionProperty[] properties; diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/extensionproperty/Builder.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/extensionproperty/Builder.java index 292472741..28365ceb9 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/extensionproperty/Builder.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/extensionproperty/Builder.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.fn.builders.extensionproperty; @@ -30,25 +32,23 @@ /** * The type Extension property builder. + * * @author bnasslahsen */ public class Builder { /** * The name of the property. - * */ private String name; /** * The value of the property. - * */ private String value; /** * If set to true, field `value` will be parsed and serialized as JSON/YAML - * */ private boolean parseValue; diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/externaldocumentation/Builder.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/externaldocumentation/Builder.java index 92d54bb1e..96aa0d096 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/externaldocumentation/Builder.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/externaldocumentation/Builder.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.fn.builders.externaldocumentation; @@ -32,25 +34,23 @@ /** * The type External documentation builder. + * * @author bnasslahsen */ public class Builder { /** * A short description of the target documentation. - * */ private String description = ""; /** * The URL for the target documentation. Value must be in the format of a URL. - * */ private String url = ""; /** * The list of optional extensions - * */ private Extension[] extensions = {}; diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/header/Builder.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/header/Builder.java index b48504be1..86950dcd7 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/header/Builder.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/header/Builder.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.fn.builders.header; @@ -220,7 +222,7 @@ public Builder examples(ExampleObject[] val) { examples = val; return this; } - + /** * Build header. * diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/link/Builder.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/link/Builder.java index afaf2ebec..dc2d9d3ae 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/link/Builder.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/link/Builder.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.fn.builders.link; @@ -34,54 +36,47 @@ /** * The type Link builder. + * * @author bnasslahsen */ public class Builder { /** * The name of this link. - * */ private String name = ""; /** * A relative or absolute reference to an OAS operation. This field is mutually exclusive of the operationId field, and must point to an Operation Object. Relative operationRef values may be used to locate an existing Operation Object in the OpenAPI definition. Ignored if the operationId property is specified. - * */ private String operationRef = ""; /** * The name of an existing, resolvable OAS operation, as defined with a unique operationId. This field is mutually exclusive of the operationRef field. - * */ private String operationId = ""; /** * Array of parameters to pass to an operation as specified with operationId or identified via operationRef. - * */ private LinkParameter[] parameters = {}; /** * A description of the link. CommonMark syntax may be used for rich text representation. - * */ private String description = ""; /** * A literal value or {expression} to use as a request body when calling the target operation. - * */ private String requestBody = ""; /** * An alternative server to service this operation. - * */ private Server server = org.springdoc.core.fn.builders.server.Builder.serverBuilder().build(); /** * The list of optional extensions - * */ private Extension[] extensions = {}; diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/linkparameter/Builder.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/linkparameter/Builder.java index aa33b92b8..c59fdb181 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/linkparameter/Builder.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/linkparameter/Builder.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.fn.builders.linkparameter; @@ -30,18 +32,17 @@ /** * The type Link parameter builder. + * * @author bnasslahsen */ public class Builder { /** * The name of this link parameter. - * */ private String name = ""; /** * A constant or an expression to be evaluated and passed to the linked operation. - * */ private String expression = ""; diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/operation/Builder.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/operation/Builder.java index 795b3ca70..d17b65d74 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/operation/Builder.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/operation/Builder.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.fn.builders.operation; @@ -40,6 +42,7 @@ /** * The type Operation builder. + * * @author bnasslahsen */ public class Builder { @@ -62,91 +65,76 @@ public class Builder { /** * The HTTP method for this operation. - * */ private String method = ""; /** * Tags can be used for logical grouping of operations by resources or any other qualifier. - * */ private String[] tags = {}; /** * Provides a brief description of this operation. Should be 120 characters or less for proper visibility in Swagger-UI. - * */ private String summary = ""; /** * A verbose description of the operation. - * */ private String description = ""; /** * Request body associated to the operation. - * */ private RequestBody requestBody = org.springdoc.core.fn.builders.requestbody.Builder.requestBodyBuilder().build(); /** * Additional external documentation for this operation. - * */ private ExternalDocumentation externalDocs = org.springdoc.core.fn.builders.externaldocumentation.Builder.externalDocumentationBuilder().build(); /** * The operationId is used by third-party tools to uniquely identify this operation. - * */ private String operationId = ""; /** * An optional array of parameters which will be added to any automatically detected parameters in the method itself. - * */ private Parameter[] parameters = {}; /** * The list of possible responses as they are returned from executing this operation. - * */ private ApiResponse[] responses = {}; /** * Allows an operation to be marked as deprecated. Alternatively use the @Deprecated annotation - * */ private boolean deprecated; /** * A declaration of which security mechanisms can be used for this operation. - * */ private SecurityRequirement[] security = {}; /** * An alternative server array to service this operation. - * */ private Server[] servers = {}; /** * The list of optional extensions - * */ private Extension[] extensions = {}; /** * Allows this operation to be marked as hidden - * */ private boolean hidden; /** * Ignores JsonView annotations while resolving operations and types. - * */ private boolean ignoreJsonView; diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/parameter/Builder.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/parameter/Builder.java index 93b5ab27a..780e28d6f 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/parameter/Builder.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/parameter/Builder.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.fn.builders.parameter; @@ -39,102 +41,87 @@ /** * The type Parameter builder. + * * @author bnasslahsen */ public class Builder { /** * The name of the parameter. - * */ private String name = ""; /** * The location of the parameter. Possible values are "query", "header", "path" or "cookie". Ignored when empty string. - * */ private ParameterIn in = ParameterIn.DEFAULT; /** * Additional description data to provide on the purpose of the parameter - * */ private String description = ""; /** * Determines whether this parameter is mandatory. If the parameter location is "path", this property is required and its value must be true. Otherwise, the property may be included and its default value is false. - * */ private boolean required; /** * Specifies that a parameter is deprecated and should be transitioned out of usage. - * */ private boolean deprecated; /** * When true, allows sending an empty value. If false, the parameter will be considered \"null\" if no value is present. This may create validation errors when the parameter is required. - * */ private boolean allowEmptyValue; /** * Describes how the parameter value will be serialized depending on the type of the parameter value. Default values (based on value of in): for query - form; for path - simple; for header - simple; for cookie - form. Ignored if the properties content or array are specified. - * */ private ParameterStyle style = ParameterStyle.DEFAULT; /** * When this is true, parameter values of type array or object generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters this property has no effect. When style is form, the default value is true. For all other styles, the default value is false. Ignored if the properties content or array are specified. - * */ private Explode explode = Explode.DEFAULT; /** * Determines whether the parameter value should allow reserved characters, as defined by RFC3986. This property only applies to parameters with an in value of query. The default value is false. Ignored if the properties content or array are specified. - * */ private boolean allowReserved; /** * The schema defining the type used for the parameter. Ignored if the properties content or array are specified. - * */ private Schema schema = org.springdoc.core.fn.builders.schema.Builder.schemaBuilder().build(); /** * The schema of the array that defines this parameter. Ignored if the property content is specified. - * */ private ArraySchema array = org.springdoc.core.fn.builders.arrayschema.Builder.arraySchemaBuilder().build(); /** * The representation of this parameter, for different media types. - * */ private Content[] content = {}; /** * Allows this parameter to be marked as hidden - * */ private boolean hidden; /** * An array of examples of the schema used to show the use of the associated schema. - * */ private ExampleObject[] examples = {}; /** * Provides an example of the schema. When associated with a specific media type, the example string shall be parsed by the consumer to be treated as an object or an array. Ignored if the properties examples, content or array are specified. - * */ private String example = ""; /** * The list of optional extensions - * */ private Extension[] extensions = {}; diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/requestbody/Builder.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/requestbody/Builder.java index 6c0bb9b8f..1dad234d3 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/requestbody/Builder.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/requestbody/Builder.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.fn.builders.requestbody; @@ -33,31 +35,28 @@ /** * The type Request body builder. + * * @author bnasslahsen */ public class Builder { /** * A brief description of the request body. - * */ private String description = ""; /** * The content of the request body. - * */ private Content[] content = {}; /** * Determines if the request body is required in the request. Defaults to false. - * */ private boolean required; /** * The list of optional extensions - * */ private Extension[] extensions = {}; @@ -68,6 +67,9 @@ public class Builder { */ private String ref = ""; + /** + * The Use parameter type schema. + */ private boolean useParameterTypeSchema = false; diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/schema/Builder.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/schema/Builder.java index 6746a69a1..a326d22b5 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/schema/Builder.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/schema/Builder.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.fn.builders.schema; @@ -35,6 +37,7 @@ import io.swagger.v3.oas.annotations.media.Schema.AccessMode; import io.swagger.v3.oas.annotations.media.Schema.AdditionalPropertiesValue; import io.swagger.v3.oas.annotations.media.Schema.RequiredMode; +import io.swagger.v3.oas.annotations.media.Schema.SchemaResolution; import org.apache.commons.lang3.ArrayUtils; /** @@ -228,6 +231,11 @@ public class Builder { */ private Extension[] extensions = {}; + /** + * The Schema resolution. + */ + private SchemaResolution schemaResolution; + /** * Allows to specify the additionalProperties value * AdditionalPropertiesValue.TRUE: set to TRUE @@ -818,6 +826,17 @@ public Builder requiredMode(RequiredMode requiredMode) { return this; } + /** + * Schema resolution builder. + * + * @param schemaResolution the schema resolution + * @return the builder + */ + public Builder schemaResolution(SchemaResolution schemaResolution) { + this.schemaResolution = schemaResolution; + return this; + } + /** * Additional properties builder. * @@ -1195,6 +1214,11 @@ public String[] examples() { public String _const() { return _const; } + + @Override + public SchemaResolution schemaResolution() { + return schemaResolution; + } }; } } diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/securityrequirement/Builder.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/securityrequirement/Builder.java index fb977cce0..823f49b88 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/securityrequirement/Builder.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/securityrequirement/Builder.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.fn.builders.securityrequirement; @@ -30,19 +32,18 @@ /** * The type Security requirement builder. + * * @author bnasslahsen */ public class Builder { /** * This name must correspond to a declared SecurityRequirement. - * */ private String name; /** * If the security scheme is of type "oauth2" or "openIdConnect", then the value is a list of scope names required for the execution. * For other security scheme types, the array must be empty. - * */ private String[] scopes = {}; diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/server/Builder.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/server/Builder.java index 662adb9dd..ae981c420 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/server/Builder.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/server/Builder.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.fn.builders.server; @@ -33,6 +35,7 @@ /** * The type Server builder. + * * @author bnasslahsen */ public class Builder { @@ -40,25 +43,21 @@ public class Builder { * Required. A URL to the target host. * This URL supports Server Variables and may be relative, to indicate that the host location is relative to the location where the * OpenAPI definition is being served. Variable substitutions will be made when a variable is named in {brackets}. - * */ private String url = ""; /** * An optional string describing the host designated by the URL. CommonMark syntax MAY be used for rich text representation. - * */ private String description = ""; /** * An array of variables used for substitution in the server's URL template. - * */ private ServerVariable[] variables = {}; /** * The list of optional extensions - * */ private Extension[] extensions = {}; diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/servervariable/Builder.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/servervariable/Builder.java index df517e6b9..ae54dc2bd 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/servervariable/Builder.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/servervariable/Builder.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.fn.builders.servervariable; @@ -32,37 +34,32 @@ /** * The type Server variable builder. + * * @author bnasslahsen */ public class Builder { /** * Required. The name of this variable. - * */ private String name; /** * An array of allowable values for this variable. This field map to the enum property in the OAS schema. - * - * @return String array of allowableValues */ private String[] allowableValues = {}; /** * Required. The default value of this variable. - * */ private String defaultValue; /** * An optional description for the server variable. - * */ private String description = ""; /** * The list of optional extensions - * */ private Extension[] extensions = {}; diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/mixins/SortedOpenAPIMixin.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/mixins/SortedOpenAPIMixin.java index dcd9afd3a..a9e8bd3cf 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/mixins/SortedOpenAPIMixin.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/mixins/SortedOpenAPIMixin.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.mixins; @@ -37,6 +39,7 @@ /** * The interface Sorted open api mixin. + * * @author bnasslashen */ @JsonPropertyOrder(value = { "openapi", "info", "externalDocs", "servers", "security", "tags", "paths", "components" }, alphabetic = true) @@ -55,7 +58,7 @@ public interface SortedOpenAPIMixin { /** * Add extension. * - * @param name the name + * @param name the name * @param value the value */ @JsonAnySetter diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/mixins/SortedOpenAPIMixin31.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/mixins/SortedOpenAPIMixin31.java index 77c14fdc8..d1f9392f3 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/mixins/SortedOpenAPIMixin31.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/mixins/SortedOpenAPIMixin31.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.mixins; @@ -37,6 +39,7 @@ /** * The interface Sorted open api mixin 31. + * * @author bnasslashen */ @JsonPropertyOrder(value = { "openapi", "info", "externalDocs", "servers", "security", "tags", "paths", "components", "webhooks" }, alphabetic = true) @@ -55,7 +58,7 @@ public interface SortedOpenAPIMixin31 { /** * Add extension. * - * @param name the name + * @param name the name * @param value the value */ @JsonAnySetter diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/mixins/SortedSchemaMixin.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/mixins/SortedSchemaMixin.java index 17113e2ca..38f3aba05 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/mixins/SortedSchemaMixin.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/mixins/SortedSchemaMixin.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.mixins; @@ -37,6 +39,7 @@ /** * The interface Sorted schema mixin. + * * @author bnasslashen */ @JsonPropertyOrder(value = { "type", "format" }, alphabetic = true) @@ -54,7 +57,7 @@ public interface SortedSchemaMixin { /** * Add extension. * - * @param name the name + * @param name the name * @param value the value */ @JsonAnySetter diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/mixins/SortedSchemaMixin31.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/mixins/SortedSchemaMixin31.java index f7bb66f28..f7775f55a 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/mixins/SortedSchemaMixin31.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/mixins/SortedSchemaMixin31.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.mixins; @@ -37,6 +39,7 @@ /** * The interface Sorted schema mixin 31. + * * @author bnasslashen */ @JsonPropertyOrder(value = { "type", "format" }, alphabetic = true) @@ -118,7 +121,7 @@ public interface SortedSchemaMixin31 { /** * Add extension. * - * @param name the name + * @param name the name * @param value the value */ @JsonAnySetter diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/models/ControllerAdviceInfo.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/models/ControllerAdviceInfo.java index 745775fcd..3008aa98a 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/models/ControllerAdviceInfo.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/models/ControllerAdviceInfo.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.models; @@ -81,10 +83,20 @@ public Map getApiResponseMap() { return apiResponseMap; } + /** + * Gets method advice infos. + * + * @return the method advice infos + */ public List getMethodAdviceInfos() { return methodAdviceInfos; } + /** + * Add method advice infos. + * + * @param methodAdviceInfo the method advice info + */ public void addMethodAdviceInfos(MethodAdviceInfo methodAdviceInfo) { this.methodAdviceInfos.add(methodAdviceInfo); } diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/models/GroupedOpenApi.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/models/GroupedOpenApi.java index 1727b4479..1fce141de 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/models/GroupedOpenApi.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/models/GroupedOpenApi.java @@ -3,32 +3,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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.models; -import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; +import java.util.LinkedHashSet; import java.util.List; import java.util.Objects; +import java.util.Set; import org.apache.commons.lang3.StringUtils; import org.springdoc.core.customizers.OpenApiCustomizer; @@ -43,6 +46,7 @@ /** * The type Grouped open api. + * * @author bnasslahsen */ public class GroupedOpenApi { @@ -95,22 +99,22 @@ public class GroupedOpenApi { /** * The Open api customisers. */ - private List openApiCustomizers; + private Set openApiCustomizers; /** * The Operation customizers. */ - private List operationCustomizers; + private Set operationCustomizers; /** * The Router Operation customizers. */ - private List routerOperationCustomizers; + private Set routerOperationCustomizers; /** * The method filters to use. */ - private List openApiMethodFilters; + private Set openApiMethodFilters; /** * Instantiates a new Grouped open api. @@ -231,7 +235,7 @@ public List getPathsToExclude() { * * @return the open api customisers */ - public List getOpenApiCustomizers() { + public Set getOpenApiCustomizers() { return openApiCustomizers; } @@ -240,7 +244,7 @@ public List getOpenApiCustomizers() { * * @return the operation customizers */ - public List getOperationCustomizers() { + public Set getOperationCustomizers() { return operationCustomizers; } @@ -249,7 +253,7 @@ public List getOperationCustomizers() { * * @return the open api method filters */ - public List getOpenApiMethodFilters() { + public Set getOpenApiMethodFilters() { return openApiMethodFilters; } @@ -258,7 +262,7 @@ public List getOpenApiMethodFilters() { * * @return the router operation customizers */ - public List getRouterOperationCustomizers() { + public Set getRouterOperationCustomizers() { return routerOperationCustomizers; } @@ -278,7 +282,7 @@ public String getDisplayName() { * @return the grouped open api */ public GroupedOpenApi addAllOpenApiCustomizer(Collection openApiCustomizerCollection) { - List result = new ArrayList<>(); + Set result = new LinkedHashSet<>(); result.addAll(openApiCustomizerCollection); result.addAll(openApiCustomizers); openApiCustomizers = result; @@ -292,7 +296,7 @@ public GroupedOpenApi addAllOpenApiCustomizer(Collection operationCustomizerCollection) { - List result = new ArrayList<>(); + Set result = new LinkedHashSet<>(); result.addAll(operationCustomizerCollection); result.addAll(operationCustomizers); operationCustomizers = result; @@ -306,7 +310,7 @@ public GroupedOpenApi addAllOperationCustomizer(Collection openApiMethodFilterCollection) { - List result = new ArrayList<>(); + Set result = new LinkedHashSet<>(); result.addAll(openApiMethodFilterCollection); result.addAll(openApiMethodFilters); openApiMethodFilters = result; @@ -315,28 +319,29 @@ public GroupedOpenApi addAllOpenApiMethodFilter(Collection openApiCustomizers = new ArrayList<>(); + private final Set openApiCustomizers = new LinkedHashSet<>(); /** * The Operation customizers. */ - private final List operationCustomizers = new ArrayList<>(); + private final Set operationCustomizers = new LinkedHashSet<>(); /** * The Router Operation customizers. */ - private final List routerOperationCustomizers = new ArrayList<>(); + private final Set routerOperationCustomizers = new LinkedHashSet<>(); /** * The methods filters to apply. */ - private final List methodFilters = new ArrayList<>(); + private final Set methodFilters = new LinkedHashSet<>(); /** * The Group. diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/models/MethodAdviceInfo.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/models/MethodAdviceInfo.java index 55cf79f90..78211b54a 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/models/MethodAdviceInfo.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/models/MethodAdviceInfo.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.models; diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/models/MethodAttributes.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/models/MethodAttributes.java index bb2e4b69a..7fa1e2130 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/models/MethodAttributes.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/models/MethodAttributes.java @@ -3,40 +3,46 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.models; import java.lang.reflect.Method; +import java.util.Arrays; import java.util.LinkedHashMap; +import java.util.LinkedHashSet; import java.util.Locale; import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; import com.fasterxml.jackson.annotation.JsonView; import io.swagger.v3.oas.models.responses.ApiResponse; import io.swagger.v3.oas.models.responses.ApiResponses; import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; +import org.jetbrains.annotations.Nullable; import org.springframework.core.annotation.AnnotatedElementUtils; -import org.springframework.util.CollectionUtils; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -45,6 +51,7 @@ /** * The type Method attributes. + * * @author bnasslahsen */ public class MethodAttributes { @@ -124,13 +131,19 @@ public class MethodAttributes { */ private String javadocReturn; + /** + * The Use return type schema. + */ + private boolean useReturnTypeSchema; + /** * Instantiates a new Method attributes. - * @param methodProducesNew the method produces new + * + * @param methodProducesNew the method produces new * @param defaultConsumesMediaType the default consumes media type * @param defaultProducesMediaType the default produces media type - * @param genericMapResponse the generic map response - * @param locale the locale + * @param genericMapResponse the generic map response + * @param locale the locale */ public MethodAttributes(String[] methodProducesNew, String defaultConsumesMediaType, String defaultProducesMediaType, Map genericMapResponse, Locale locale) { this.methodProduces = methodProducesNew; @@ -142,9 +155,10 @@ public MethodAttributes(String[] methodProducesNew, String defaultConsumesMediaT /** * Instantiates a new Method attributes. + * * @param defaultConsumesMediaType the default consumes media type * @param defaultProducesMediaType the default produces media type - * @param locale the locale + * @param locale the locale */ public MethodAttributes(String defaultConsumesMediaType, String defaultProducesMediaType, Locale locale) { this.defaultConsumesMediaType = defaultConsumesMediaType; @@ -154,12 +168,13 @@ public MethodAttributes(String defaultConsumesMediaType, String defaultProducesM /** * Instantiates a new Method attributes. + * * @param defaultConsumesMediaType the default consumes media type * @param defaultProducesMediaType the default produces media type - * @param methodConsumes the method consumes - * @param methodProduces the method produces - * @param headers the headers - * @param locale the locale + * @param methodConsumes the method consumes + * @param methodProduces the method produces + * @param headers the headers + * @param locale the locale */ public MethodAttributes(String defaultConsumesMediaType, String defaultProducesMediaType, String[] methodConsumes, String[] methodProduces, String[] headers, Locale locale) { this.defaultConsumesMediaType = defaultConsumesMediaType; @@ -272,29 +287,39 @@ else if (reqMappingClass != null) { * * @param produces the produces * @param consumes the consumes - * @param headers the headers + * @param headers the headers */ private void fillMethods(String[] produces, String[] consumes, String[] headers) { - if (ArrayUtils.isEmpty(methodProduces)) { - if (ArrayUtils.isNotEmpty(produces)) - methodProduces = produces; - else if (ArrayUtils.isNotEmpty(classProduces)) - methodProduces = classProduces; - else - methodProduces = new String[] { defaultProducesMediaType }; - } - - if (ArrayUtils.isEmpty(methodConsumes)) { - if (ArrayUtils.isNotEmpty(consumes)) - methodConsumes = consumes; - else if (ArrayUtils.isNotEmpty(classConsumes)) - methodConsumes = classConsumes; - else - methodConsumes = new String[] { defaultConsumesMediaType }; - } + if (ArrayUtils.isNotEmpty(produces)) { + methodProduces = mergeArrays(methodProduces, produces); + } else if (ArrayUtils.isNotEmpty(classProduces)) { + methodProduces = mergeArrays(methodProduces, classProduces); + } else if (ArrayUtils.isEmpty(methodProduces)) { + methodProduces = new String[] {defaultProducesMediaType}; + } + + if (ArrayUtils.isNotEmpty(consumes)) { + methodConsumes = mergeArrays(methodConsumes, consumes); + } else if (ArrayUtils.isNotEmpty(classConsumes)) { + methodConsumes = mergeArrays(methodConsumes, classConsumes); + } else if (ArrayUtils.isEmpty(methodConsumes)) { + methodConsumes = new String[] {defaultConsumesMediaType}; + } + + setHeaders(headers); + } - if (CollectionUtils.isEmpty(this.headers)) - setHeaders(headers); + /** + * Merge string arrays into one array with unique values + * + * @param array1 the array1 + * @param array2 the array2 + * @return the string [ ] + */ + private String[] mergeArrays(@Nullable String[] array1, String[] array2) { + Set uniqueValues = array1 == null ? new LinkedHashSet<>() : Arrays.stream(array1).collect(Collectors.toCollection(LinkedHashSet::new)); + uniqueValues.addAll(Arrays.asList(array2)); + return uniqueValues.toArray(new String[0]); } /** @@ -479,4 +504,22 @@ public void setJavadocReturn(String javadocReturn) { public Locale getLocale() { return locale; } + + /** + * Is use return type schema boolean. + * + * @return the boolean + */ + public boolean isUseReturnTypeSchema() { + return useReturnTypeSchema; + } + + /** + * Sets use return type schema. + * + * @param useReturnTypeSchema the use return type schema + */ + public void setUseReturnTypeSchema(boolean useReturnTypeSchema) { + this.useReturnTypeSchema = useReturnTypeSchema; + } } diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/models/ParameterId.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/models/ParameterId.java index 8daac917e..132b1c158 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/models/ParameterId.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/models/ParameterId.java @@ -2,22 +2,26 @@ * * * * * * - * * * * 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 + * * * * * + * * * * * * 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. + * * * * * * * * * - * * * * 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 org.springdoc.core.models; @@ -29,6 +33,7 @@ /** * The type Parameter Id. + * * @author bnasslahsen */ public class ParameterId { @@ -73,7 +78,7 @@ public ParameterId(io.swagger.v3.oas.annotations.Parameter parameter) { /** * Instantiates a new Parameter id. * - * @param pName the p name + * @param pName the p name * @param paramType the param type */ public ParameterId(String pName, String paramType) { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/models/ParameterInfo.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/models/ParameterInfo.java index 1579e25f2..22191ffb7 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/models/ParameterInfo.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/models/ParameterInfo.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.models; @@ -41,6 +43,7 @@ /** * The type Parameter info. + * * @author bnasslahsen */ public class ParameterInfo { @@ -92,10 +95,11 @@ public class ParameterInfo { /** * Instantiates a new Parameter info. - * @param pName the parameter name - * @param methodParameter the method parameter + * + * @param pName the parameter name + * @param methodParameter the method parameter * @param genericParameterService the parameter builder - * @param parameterAnnotation the parameter annotation + * @param parameterAnnotation the parameter annotation */ public ParameterInfo(String pName, MethodParameter methodParameter, GenericParameterService genericParameterService, Parameter parameterAnnotation) { RequestHeader requestHeader = methodParameter.getParameterAnnotation(RequestHeader.class); @@ -273,7 +277,7 @@ private void calculateParams(PathVariable pathVar) { * Calculate params. * * @param requestParam the request param - * @param isFile the is file + * @param isFile the is file */ private void calculateParams(RequestParam requestParam, boolean isFile) { if (StringUtils.isNotEmpty(requestParam.value())) diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/models/RequestBodyInfo.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/models/RequestBodyInfo.java index cbf0c66cc..ee1b2f763 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/models/RequestBodyInfo.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/models/RequestBodyInfo.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.models; @@ -30,6 +32,7 @@ /** * The type Request body info. + * * @author bnasslahsen */ @SuppressWarnings("rawtypes") @@ -85,7 +88,7 @@ public void setMergedSchema(Schema mergedSchema) { * Add properties. * * @param paramName the param name - * @param schemaN the schema n + * @param schemaN the schema n */ public void addProperties(String paramName, Schema schemaN) { if (mergedSchema == null) diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/parsers/KotlinCoroutinesReturnTypeParser.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/parsers/KotlinCoroutinesReturnTypeParser.java deleted file mode 100644 index e8ab56aad..000000000 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/parsers/KotlinCoroutinesReturnTypeParser.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * - * * - * * * - * * * * - * * * * * 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 org.springdoc.core.parsers; - -import java.lang.reflect.Method; -import java.lang.reflect.Parameter; -import java.lang.reflect.ParameterizedType; -import java.lang.reflect.Type; -import java.lang.reflect.WildcardType; -import java.util.Arrays; -import java.util.Optional; - -import kotlin.coroutines.Continuation; - -import org.springframework.core.MethodParameter; - -/** - * The type Kotlin coroutines return type parser. - * @author bnasslahsen - */ -public class KotlinCoroutinesReturnTypeParser implements ReturnTypeParser { - - @Override - public Type getReturnType(MethodParameter methodParameter) { - Method method = methodParameter.getMethod(); - Type returnType = Object.class; - assert method != null; - Optional continuationParameter = Arrays.stream(method.getParameters()) - .filter(parameter -> parameter.getType().getCanonicalName().equals(Continuation.class.getCanonicalName())) - .findFirst(); - if (continuationParameter.isPresent()) { - Type continuationType = continuationParameter.get().getParameterizedType(); - if (continuationType instanceof ParameterizedType) { - Type actualTypeArguments = ((ParameterizedType) continuationType).getActualTypeArguments()[0]; - if (actualTypeArguments instanceof WildcardType) - returnType = ((WildcardType) actualTypeArguments).getLowerBounds()[0]; - } - } - return returnType; - } -} diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/parsers/ReturnTypeParser.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/parsers/ReturnTypeParser.java deleted file mode 100644 index 808e64961..000000000 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/parsers/ReturnTypeParser.java +++ /dev/null @@ -1,206 +0,0 @@ -/* - * - * * - * * * - * * * * - * * * * * 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 org.springdoc.core.parsers; - -import java.lang.reflect.ParameterizedType; -import java.lang.reflect.Type; -import java.lang.reflect.TypeVariable; -import java.util.Arrays; -import java.util.Objects; - -import org.springframework.core.MethodParameter; -import org.springframework.core.ResolvableType; -import org.springframework.lang.Nullable; - -/** - * The interface Return type parser. - * @author bnasslahsen - */ -public interface ReturnTypeParser { - - /** - * This is a copy of GenericTypeResolver.resolveType which is not available on spring 4. - * This also keeps compatibility with spring-boot 1 applications. - * Resolve the given generic type against the given context class, - * substituting type variables as far as possible. - * @param genericType the (potentially) generic type - * @param contextClass a context class for the target type, for example a class in which the target type appears in a method signature (can be {@code null}) - * @return the resolved type (possibly the given generic type as-is) - * @since 5.0 - */ - static Type resolveType(Type genericType, @Nullable Class contextClass) { - if (contextClass != null) { - if (genericType instanceof TypeVariable) { - ResolvableType resolvedTypeVariable = resolveVariable( - (TypeVariable) genericType, ResolvableType.forClass(contextClass)); - if (resolvedTypeVariable != ResolvableType.NONE) { - Class resolved = resolvedTypeVariable.resolve(); - if (resolved != null) { - return resolved; - } - } - } - else if (genericType instanceof ParameterizedType) { - ResolvableType resolvedType = ResolvableType.forType(genericType); - if (resolvedType.hasUnresolvableGenerics()) { - ResolvableType resolvableType = getResolvedType(resolvedType, contextClass); - if (resolvableType != null) - return resolvableType.getType(); - } - else if (resolvedType.hasGenerics()) { - ResolvableType[] resolvableTypes = resolvedType.getGenerics(); - resolveType(resolvableTypes, contextClass); - return ResolvableType.forClassWithGenerics(Objects.requireNonNull(resolvedType.getRawClass()), resolvableTypes).getType(); - } - } - } - return genericType; - } - - /** - * Resolve type. - * - * @param resolvableTypes the resolvable types - * @param contextClass the context class - */ - static void resolveType(ResolvableType[] resolvableTypes, Class contextClass) { - for (int i = 0; i < resolvableTypes.length; i++) { - if (resolvableTypes[i].hasUnresolvableGenerics() && resolvableTypes[i].getType() instanceof ParameterizedType) { - ResolvableType resolvableType = getResolvedType(resolvableTypes[i], contextClass); - if (resolvableType != null) - resolvableTypes[i] = resolvableType; - } - else if (resolvableTypes[i].hasGenerics()) { - if(!Arrays.equals(resolvableTypes[i].getGenerics(), resolvableTypes)) - resolveType(resolvableTypes[i].getGenerics(), contextClass); - if (resolvableTypes[i].getRawClass() != null) - resolvableTypes[i] = ResolvableType.forClassWithGenerics(Objects.requireNonNull(resolvableTypes[i].getRawClass()), resolvableTypes[i].getGenerics()); - } - } - } - - /** - * Gets resolved type. - * - * @param resolvableType the resolvable type - * @param contextClass the context class - * @return the resolved type - */ - static ResolvableType getResolvedType(ResolvableType resolvableType, Class contextClass) { - ParameterizedType parameterizedType = (ParameterizedType) resolvableType.getType(); - Class[] generics = new Class[parameterizedType.getActualTypeArguments().length]; - Type[] typeArguments = parameterizedType.getActualTypeArguments(); - ResolvableType contextType = ResolvableType.forClass(contextClass); - findTypeForGenerics(generics, typeArguments, contextType); - Class rawClass = resolvableType.getRawClass(); - if (rawClass != null) - return ResolvableType.forClassWithGenerics(rawClass, generics); - return null; - } - - /** - * Find type for generics. - * - * @param generics the generics - * @param typeArguments the type arguments - * @param contextType the context type - */ - static void findTypeForGenerics(Class[] generics, Type[] typeArguments, ResolvableType contextType) { - for (int i = 0; i < typeArguments.length; i++) { - Type typeArgument = typeArguments[i]; - if (typeArgument instanceof TypeVariable) { - ResolvableType resolvedTypeArgument = resolveVariable( - (TypeVariable) typeArgument, contextType); - if (resolvedTypeArgument != ResolvableType.NONE) { - generics[i] = resolvedTypeArgument.resolve(); - } - else { - generics[i] = ResolvableType.forType(typeArgument).resolve(); - } - } - else { - generics[i] = ResolvableType.forType(typeArgument).resolve(); - } - } - } - - /** - * Resolve variable resolvable type. - * - * @param typeVariable the type variable - * @param contextType the context type - * @return the resolvable type - */ - static ResolvableType resolveVariable(TypeVariable typeVariable, ResolvableType contextType) { - ResolvableType resolvedType; - if (contextType.hasGenerics() && Objects.equals(contextType.getRawClass(), typeVariable.getGenericDeclaration())) { - resolvedType = ResolvableType.forType(typeVariable, contextType); - if (resolvedType.resolve() != null) { - return resolvedType; - } - } - - ResolvableType superType = contextType.getSuperType(); - if (superType != ResolvableType.NONE) { - resolvedType = resolveVariable(typeVariable, superType); - if (resolvedType.resolve() != null) { - return resolvedType; - } - } - for (ResolvableType ifc : contextType.getInterfaces()) { - resolvedType = resolveVariable(typeVariable, ifc); - if (resolvedType.resolve() != null) { - return resolvedType; - } - } - return ResolvableType.NONE; - } - - /** - * Gets type. - * - * @param methodParameter the method parameter - * @return the type - */ - static Type getType(MethodParameter methodParameter) { - Type genericParameterType = methodParameter.getGenericParameterType(); - if (genericParameterType instanceof ParameterizedType || genericParameterType instanceof TypeVariable) - return ReturnTypeParser.resolveType(genericParameterType, methodParameter.getContainingClass()); - return methodParameter.getParameterType(); - } - - /** - * Gets return type. - * - * @param methodParameter the method parameter - * @return the return type - */ - default Type getReturnType(MethodParameter methodParameter) { - if (methodParameter.getGenericParameterType() instanceof ParameterizedType) - return ReturnTypeParser.resolveType(methodParameter.getGenericParameterType(), methodParameter.getContainingClass()); - return methodParameter.getParameterType(); - } - -} \ No newline at end of file diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/properties/AbstractSwaggerUiConfigProperties.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/properties/AbstractSwaggerUiConfigProperties.java index b60117ba0..b9b64f549 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/properties/AbstractSwaggerUiConfigProperties.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/properties/AbstractSwaggerUiConfigProperties.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.properties; @@ -31,13 +33,16 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import org.apache.commons.lang3.StringUtils; +import org.springdoc.core.utils.Constants; import static org.springdoc.core.utils.Constants.GROUP_NAME_NOT_NULL_OR_EMPTY; +import static org.springdoc.core.utils.Constants.SWAGGER_UI_OAUTH_REDIRECT_URL; /** * Please refer to the swagger * configuration.md * to get the idea what each parameter does. + * * @author bnasslahsen */ public abstract class AbstractSwaggerUiConfigProperties { @@ -45,7 +50,7 @@ public abstract class AbstractSwaggerUiConfigProperties { /** * The path for the Swagger UI pages to load. Will redirect to the springdoc.webjars.prefix property. */ - protected String path; + protected String path = Constants.DEFAULT_SWAGGER_UI_PATH; /** * The name of a component available via the plugin system to use as the top-level layout for Swagger UI. @@ -81,7 +86,7 @@ public abstract class AbstractSwaggerUiConfigProperties { /** * Enables or disables deep linking for tags and operations. * - * @see deep-linking.md + * @see deep-linking.md */ protected Boolean deepLinking; @@ -138,7 +143,7 @@ public abstract class AbstractSwaggerUiConfigProperties { /** * OAuth redirect URL. */ - protected String oauth2RedirectUrl; + protected String oauth2RedirectUrl = SWAGGER_UI_OAUTH_REDIRECT_URL; /** * The Url. @@ -218,6 +223,7 @@ public void setQueryConfigEnabled(Boolean queryConfigEnabled) { /** * Gets try it out enabled + * * @return try it out enabled */ public Boolean getTryItOutEnabled() { @@ -226,6 +232,7 @@ public Boolean getTryItOutEnabled() { /** * Sets try it out enabled + * * @param tryItOutEnabled try it out enabled */ public void setTryItOutEnabled(Boolean tryItOutEnabled) { @@ -670,11 +677,11 @@ public void setUrlsPrimaryName(String urlsPrimaryName) { */ enum Direction { /** - *Asc direction. + * Asc direction. */ ASC, /** - *Desc direction. + * Desc direction. */ DESC; @@ -719,8 +726,8 @@ public SwaggerUrl() { /** * Instantiates a new Swagger url. * - * @param group the group - * @param url the url + * @param group the group + * @param url the url * @param displayName the display name */ public SwaggerUrl(String group, String url, String displayName) { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/properties/SpringDocConfigProperties.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/properties/SpringDocConfigProperties.java index 9d332271b..8365100af 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/properties/SpringDocConfigProperties.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/properties/SpringDocConfigProperties.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * Copyright 2019-2023 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.properties; @@ -1568,7 +1570,7 @@ public static class GroupConfig { */ private OpenAPI openApi; - + /** * Instantiates a new Group config. */ diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/properties/SwaggerUiConfigParameters.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/properties/SwaggerUiConfigParameters.java index 8fab65098..f25c1ccc1 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/properties/SwaggerUiConfigParameters.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/properties/SwaggerUiConfigParameters.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.properties; @@ -36,27 +38,16 @@ import java.util.stream.Collectors; import org.apache.commons.lang3.StringUtils; -import org.springdoc.core.configuration.SpringDocConfiguration; -import org.springdoc.core.utils.Constants; -import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Lazy; import org.springframework.util.CollectionUtils; -import static org.springdoc.core.utils.Constants.SPRINGDOC_SWAGGER_UI_ENABLED; -import static org.springdoc.core.utils.Constants.SWAGGER_UI_OAUTH_REDIRECT_URL; import static org.springframework.util.AntPathMatcher.DEFAULT_PATH_SEPARATOR; /** * The type Swagger ui config parameters. + * * @author bnasslahsen */ -@Lazy(false) -@Configuration(proxyBeanMethods = false) -@ConditionalOnProperty(name = SPRINGDOC_SWAGGER_UI_ENABLED, matchIfMissing = true) -@ConditionalOnBean(SpringDocConfiguration.class) public class SwaggerUiConfigParameters extends AbstractSwaggerUiConfigProperties { /** @@ -149,6 +140,20 @@ public class SwaggerUiConfigParameters extends AbstractSwaggerUiConfigProperties */ private String uiRootPath; + /** + * The Context path. + */ + private String contextPath; + + /** + * The Context path. + */ + private String apiDocsUrl; + + /** + * The Path prefix. + */ + private String pathPrefix; /** * Instantiates a new Swagger ui config parameters. @@ -157,8 +162,8 @@ public class SwaggerUiConfigParameters extends AbstractSwaggerUiConfigProperties */ public SwaggerUiConfigParameters(SwaggerUiConfigProperties swaggerUiConfig) { this.swaggerUiConfig = swaggerUiConfig; - this.path = StringUtils.defaultIfBlank(swaggerUiConfig.getPath(), Constants.DEFAULT_SWAGGER_UI_PATH); - this.oauth2RedirectUrl = StringUtils.defaultIfBlank(swaggerUiConfig.getOauth2RedirectUrl(), SWAGGER_UI_OAUTH_REDIRECT_URL); + this.path = swaggerUiConfig.getPath(); + this.oauth2RedirectUrl = swaggerUiConfig.getOauth2RedirectUrl(); this.layout = swaggerUiConfig.getLayout(); this.configUrl = swaggerUiConfig.getConfigUrl(); this.validatorUrl = swaggerUiConfig.getValidatorUrl(); @@ -189,7 +194,7 @@ public SwaggerUiConfigParameters(SwaggerUiConfigProperties swaggerUiConfig) { /** * Add group. * - * @param group the group + * @param group the group * @param displayName the display name */ public void addGroup(String group, String displayName) { @@ -282,7 +287,7 @@ public Map getConfigParameters() { org.springdoc.core.utils.SpringDocPropertiesUtils.put("tagsSorter", tagsSorter, params); org.springdoc.core.utils.SpringDocPropertiesUtils.put(SwaggerUiConfigParameters.LAYOUT_PROPERTY, layout, params); if (supportedSubmitMethods != null) - org.springdoc.core.utils.SpringDocPropertiesUtils.put("supportedSubmitMethods", supportedSubmitMethods.toString(), params); + org.springdoc.core.utils.SpringDocPropertiesUtils.put("supportedSubmitMethods", supportedSubmitMethods, params); org.springdoc.core.utils.SpringDocPropertiesUtils.put(OAUTH2_REDIRECT_URL_PROPERTY, oauth2RedirectUrl, params); org.springdoc.core.utils.SpringDocPropertiesUtils.put(URL_PROPERTY, url, params); put(URLS_PROPERTY, urls, params); @@ -297,16 +302,16 @@ public Map getConfigParameters() { /** * Put. * - * @param urls the urls + * @param urls the urls * @param swaggerUrls the swagger urls - * @param params the params + * @param params the params */ private void put(String urls, Set swaggerUrls, Map params) { Comparator swaggerUrlComparator; if (groupsOrder.isAscending()) - swaggerUrlComparator = Comparator.comparing(SwaggerUrl::getName); + swaggerUrlComparator = Comparator.comparing(SwaggerUrl::getDisplayName); else - swaggerUrlComparator = (h1, h2) -> h2.getName().compareTo(h1.getName()); + swaggerUrlComparator = (h1, h2) -> h2.getDisplayName().compareTo(h1.getDisplayName()); swaggerUrls = swaggerUrls.stream().sorted(swaggerUrlComparator).filter(elt -> StringUtils.isNotEmpty(elt.getUrl())).collect(Collectors.toCollection(LinkedHashSet::new)); if (!CollectionUtils.isEmpty(swaggerUrls)) { @@ -325,4 +330,58 @@ private boolean isSwaggerUrlDefined(String name) { return swaggerUiConfig.getUrls().stream().anyMatch(swaggerUrl -> name.equals(swaggerUrl.getName()) && StringUtils.isNotBlank(swaggerUrl.getUrl())); return false; } + + /** + * Gets context path. + * + * @return the context path + */ + public String getContextPath() { + return contextPath; + } + + /** + * Sets context path. + * + * @param contextPath the context path + */ + public void setContextPath(String contextPath) { + this.contextPath = contextPath; + } + + /** + * Gets api docs url. + * + * @return the api docs url + */ + public String getApiDocsUrl() { + return apiDocsUrl; + } + + /** + * Sets api docs url. + * + * @param apiDocsUrl the api docs url + */ + public void setApiDocsUrl(String apiDocsUrl) { + this.apiDocsUrl = apiDocsUrl; + } + + /** + * Gets path prefix. + * + * @return the path prefix + */ + public String getPathPrefix() { + return pathPrefix; + } + + /** + * Sets path prefix. + * + * @param pathPrefix the path prefix + */ + public void setPathPrefix(String pathPrefix) { + this.pathPrefix = pathPrefix; + } } \ No newline at end of file diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/properties/SwaggerUiConfigProperties.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/properties/SwaggerUiConfigProperties.java index 6e96e8da3..6d93fdd9b 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/properties/SwaggerUiConfigProperties.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/properties/SwaggerUiConfigProperties.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.properties; @@ -42,6 +44,7 @@ /** * The type Swagger ui config properties. + * * @author bnasslahsen */ @Lazy(false) @@ -210,6 +213,7 @@ public Set cloneUrls() { /** * The type Csrf. + * * @author bnasslashen */ public static class Csrf { @@ -378,6 +382,7 @@ public void setHeaderName(String headerName) { /** * The type Syntax highlight. + * * @author bnasslashen */ public static class SyntaxHighlight { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/properties/SwaggerUiOAuthProperties.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/properties/SwaggerUiOAuthProperties.java index e77fe537a..a4aae30de 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/properties/SwaggerUiOAuthProperties.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/properties/SwaggerUiOAuthProperties.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.properties; @@ -45,6 +47,7 @@ * Please refer to the swagger * configuration.md * to get the idea what each parameter does. + * * @author bnasslahsen */ @Lazy(false) diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/ActuatorProvider.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/ActuatorProvider.java index 602c4be14..1a006aaab 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/ActuatorProvider.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/ActuatorProvider.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.providers; @@ -49,6 +51,7 @@ /** * The type Actuator provider. + * * @author bnasslahsen */ public abstract class ActuatorProvider implements ApplicationListener { @@ -92,11 +95,11 @@ public abstract class ActuatorProvider implements ApplicationListener managementServerProperties, + protected ActuatorProvider(Optional managementServerProperties, Optional webEndpointProperties, ServerProperties serverProperties, SpringDocConfigProperties springDocConfigProperties) { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/CloudFunctionProvider.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/CloudFunctionProvider.java index 7ff910eec..2ca549581 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/CloudFunctionProvider.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/CloudFunctionProvider.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.providers; @@ -30,6 +32,7 @@ /** * The interface Spring cloud function provider. + * * @author bnasslahsen */ public interface CloudFunctionProvider { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/DataRestHalProvider.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/DataRestHalProvider.java index 6dc0dac90..42d8f837d 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/DataRestHalProvider.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/DataRestHalProvider.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.providers; @@ -34,6 +36,7 @@ /** * The type Data rest hal provider. + * * @author bnasslahsen */ public class DataRestHalProvider extends HateoasHalProvider { @@ -45,9 +48,10 @@ public class DataRestHalProvider extends HateoasHalProvider { /** * Instantiates a new Data rest hal provider. + * * @param repositoryRestConfigurationOptional the repository rest configuration optional - * @param hateoasPropertiesOptional the hateoas properties optional - * @param objectMapperProvider the object mapper provider + * @param hateoasPropertiesOptional the hateoas properties optional + * @param objectMapperProvider the object mapper provider */ public DataRestHalProvider(Optional repositoryRestConfigurationOptional, Optional hateoasPropertiesOptional, ObjectMapperProvider objectMapperProvider) { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/HateoasHalProvider.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/HateoasHalProvider.java index 7f6cfb964..19c499e74 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/HateoasHalProvider.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/HateoasHalProvider.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.providers; @@ -33,6 +35,7 @@ /** * The type Hateoas hal provider. + * * @author bnasslahsen */ public class HateoasHalProvider { @@ -51,7 +54,7 @@ public class HateoasHalProvider { * Instantiates a new Hateoas hal provider. * * @param hateoasPropertiesOptional the hateoas properties optional - * @param objectMapperProvider the object mapper provider + * @param objectMapperProvider the object mapper provider */ public HateoasHalProvider(Optional hateoasPropertiesOptional, ObjectMapperProvider objectMapperProvider) { this.hateoasPropertiesOptional = hateoasPropertiesOptional; diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/JavadocProvider.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/JavadocProvider.java index a53d58728..f878d4ed7 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/JavadocProvider.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/JavadocProvider.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * Copyright 2019-2023 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.providers; @@ -30,6 +32,7 @@ /** * The interface Javadoc provider. + * * @author bnasslashen */ public interface JavadocProvider { @@ -78,7 +81,7 @@ public interface JavadocProvider { * Gets param javadoc. * * @param method the method - * @param name the name + * @param name the name * @return the param javadoc */ String getParamJavadoc(Method method, String name); @@ -94,6 +97,7 @@ public interface JavadocProvider { /** * Returns the first sentence of a javadoc comment. + * * @param text the javadoc comment's text * @return the first sentence based on javadoc guidelines */ diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/ObjectMapperProvider.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/ObjectMapperProvider.java index 76d4744d1..a1284006f 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/ObjectMapperProvider.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/ObjectMapperProvider.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.providers; @@ -83,9 +85,9 @@ public static ObjectMapper createJson(SpringDocConfigProperties springDocConfigP OpenApiVersion openApiVersion = springDocConfigProperties.getApiDocs().getVersion(); ObjectMapper objectMapper; if (openApiVersion == OpenApiVersion.OPENAPI_3_1) - objectMapper = ObjectMapperProvider.createJson31(); + objectMapper = ObjectMapperFactory.createJson31(); else - objectMapper = ObjectMapperProvider.createJson(); + objectMapper = ObjectMapperFactory.createJson(); if (springDocConfigProperties.isWriterWithOrderByKeys()) sortOutput(objectMapper, springDocConfigProperties); @@ -96,7 +98,8 @@ public static ObjectMapper createJson(SpringDocConfigProperties springDocConfigP /** * Sort output. * - * @param objectMapper the object mapper + * @param objectMapper the object mapper + * @param springDocConfigProperties the spring doc config properties */ public static void sortOutput(ObjectMapper objectMapper, SpringDocConfigProperties springDocConfigProperties) { objectMapper.configure(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS, true); diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/RepositoryRestConfigurationProvider.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/RepositoryRestConfigurationProvider.java index c3faf9ee7..033ff14f4 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/RepositoryRestConfigurationProvider.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/RepositoryRestConfigurationProvider.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.providers; @@ -29,6 +31,7 @@ /** * The type Repository rest configuration provider. + * * @author bnasslahsen */ public class RepositoryRestConfigurationProvider { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/RepositoryRestResourceProvider.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/RepositoryRestResourceProvider.java index 548be3bda..edd93cc95 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/RepositoryRestResourceProvider.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/RepositoryRestResourceProvider.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.providers; @@ -33,6 +35,7 @@ /** * The interface Repository rest resource provider. + * * @author bnasslahsen */ public interface RepositoryRestResourceProvider { @@ -41,7 +44,7 @@ public interface RepositoryRestResourceProvider { * Gets router operations. * * @param openAPI the open api - * @param locale the locale + * @param locale the locale * @return the router operations */ List getRouterOperations(OpenAPI openAPI, Locale locale); diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/RouterFunctionProvider.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/RouterFunctionProvider.java index 4a6d9277a..89597e8c3 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/RouterFunctionProvider.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/RouterFunctionProvider.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.providers; @@ -30,6 +32,7 @@ /** * The interface Router function provider. + * * @author bnasslahsen */ public interface RouterFunctionProvider { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/SecurityOAuth2Provider.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/SecurityOAuth2Provider.java index c6e52eb1d..1598d7124 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/SecurityOAuth2Provider.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/SecurityOAuth2Provider.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.providers; @@ -28,6 +30,7 @@ /** * The interface Security o auth 2 provider. + * * @author bnasslahsen */ public interface SecurityOAuth2Provider { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/SpringCloudFunctionProvider.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/SpringCloudFunctionProvider.java index 31d289ca4..e9d56c9a0 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/SpringCloudFunctionProvider.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/SpringCloudFunctionProvider.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.providers; @@ -66,6 +68,7 @@ /** * The type Spring cloud function provider. + * * @author bnasslahsen */ public class SpringCloudFunctionProvider implements CloudFunctionProvider, ApplicationContextAware { @@ -113,7 +116,8 @@ public class SpringCloudFunctionProvider implements CloudFunctionProvider, Appli /** * Instantiates a new Spring cloud function provider. - * @param functionCatalogOptional the function catalog + * + * @param functionCatalogOptional the function catalog * @param springDocConfigProperties the spring doc config properties */ public SpringCloudFunctionProvider(Optional functionCatalogOptional, SpringDocConfigProperties springDocConfigProperties) { @@ -183,10 +187,10 @@ else if (function.isSupplier()) { /** * Gets router operation common. * - * @param name the name - * @param requestMethod the request method + * @param name the name + * @param requestMethod the request method * @param routerOperation the router operation - * @param apiResponses the api responses + * @param apiResponses the api responses */ private void getRouterOperationsCommon(String name, RequestMethod requestMethod, RouterOperation routerOperation, ApiResponses apiResponses) { routerOperation.getOperationModel().responses(apiResponses); @@ -202,10 +206,10 @@ private void getRouterOperationsCommon(String name, RequestMethod requestMethod, /** * Build request. * - * @param openAPI the open api - * @param name the name - * @param function the function - * @param requestMethod the request method + * @param openAPI the open api + * @param name the name + * @param function the function + * @param requestMethod the request method * @param routerOperation the router operation */ private void buildRequest(OpenAPI openAPI, String name, FunctionInvocationWrapper function, RequestMethod requestMethod, RouterOperation routerOperation) { @@ -229,9 +233,9 @@ private void buildRequest(OpenAPI openAPI, String name, FunctionInvocationWrappe /** * Build router operation. * - * @param name the name - * @param type the type - * @param requestMethod the request method + * @param name the name + * @param type the type + * @param requestMethod the request method * @param routerOperationList the router operation list * @return the router operation */ @@ -250,9 +254,9 @@ private RouterOperation buildRouterOperation(String name, String type, RequestMe /** * Build responses api responses. * - * @param openAPI the open api - * @param function the function - * @param mediaTypes the media types + * @param openAPI the open api + * @param function the function + * @param mediaTypes the media types * @param genericResponseService the generic response service * @return the api responses */ @@ -270,7 +274,7 @@ private ApiResponses buildResponses(OpenAPI openAPI, FunctionInvocationWrapper f /** * Gets router function paths. * - * @param beanName the bean name + * @param beanName the bean name * @param requestMethod the request method * @return the router function paths */ @@ -302,7 +306,7 @@ protected RouterOperation getRouterFunctionPaths(String beanName, RequestMethod /** * Fill router operation. * - * @param routerOperation the router operation + * @param routerOperation the router operation * @param userRouterOperation the user router operation */ private void mergeRouterOperation(RouterOperation routerOperation, RouterOperation userRouterOperation) { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/SpringDataWebPropertiesProvider.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/SpringDataWebPropertiesProvider.java index bf60f2368..6ac657382 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/SpringDataWebPropertiesProvider.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/SpringDataWebPropertiesProvider.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.providers; @@ -29,6 +31,7 @@ /** * The type Spring data web properties provider. + * * @author bnasslahsen */ public class SpringDataWebPropertiesProvider { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/SpringDocJavadocProvider.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/SpringDocJavadocProvider.java index 8ebfc1905..a781b5b0e 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/SpringDocJavadocProvider.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/SpringDocJavadocProvider.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * Copyright 2019-2023 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.providers; @@ -44,6 +46,7 @@ /** * The type Spring doc javadoc provider. + * * @author bnasslahsen */ public class SpringDocJavadocProvider implements JavadocProvider { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/SpringDocProviders.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/SpringDocProviders.java index f435c503a..e9a05117f 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/SpringDocProviders.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/SpringDocProviders.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.providers; @@ -29,6 +31,7 @@ /** * The type Spring doc providers. + * * @author bnasslahsen */ public class SpringDocProviders { @@ -63,11 +66,6 @@ public class SpringDocProviders { */ private final Optional springWebProvider; - /** - * The Web conversion service. - */ - private final Optional optionalWebConversionServiceProvider; - /** * The Object mapper provider. */ @@ -75,19 +73,18 @@ public class SpringDocProviders { /** * Instantiates a new Spring doc providers. - * @param actuatorProvider the actuator provider - * @param springCloudFunctionProvider the spring cloud function provider - * @param springSecurityOAuth2Provider the spring security o auth 2 provider + * + * @param actuatorProvider the actuator provider + * @param springCloudFunctionProvider the spring cloud function provider + * @param springSecurityOAuth2Provider the spring security o auth 2 provider * @param repositoryRestResourceProvider the repository rest resource provider - * @param routerFunctionProvider the router function provider - * @param springWebProvider the spring web provider - * @param optionalWebConversionServiceProvider the optional web conversion service provider - * @param objectMapperProvider the object mapper provider + * @param routerFunctionProvider the router function provider + * @param springWebProvider the spring web provider + * @param objectMapperProvider the object mapper provider */ public SpringDocProviders(Optional actuatorProvider, Optional springCloudFunctionProvider, Optional springSecurityOAuth2Provider, Optional repositoryRestResourceProvider, Optional routerFunctionProvider, Optional springWebProvider, - Optional optionalWebConversionServiceProvider, ObjectMapperProvider objectMapperProvider) { this.actuatorProvider = actuatorProvider; this.springCloudFunctionProvider = springCloudFunctionProvider; @@ -95,7 +92,6 @@ public SpringDocProviders(Optional actuatorProvider, Optional< this.repositoryRestResourceProvider = repositoryRestResourceProvider; this.routerFunctionProvider = routerFunctionProvider; this.springWebProvider = springWebProvider; - this.optionalWebConversionServiceProvider = optionalWebConversionServiceProvider; this.objectMapperProvider = objectMapperProvider; } diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/SpringRepositoryRestResourceProvider.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/SpringRepositoryRestResourceProvider.java index 66e4586aa..e199dc7e1 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/SpringRepositoryRestResourceProvider.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/SpringRepositoryRestResourceProvider.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.providers; @@ -70,6 +72,7 @@ /** * The type Spring repository rest resource provider. + * * @author bnasslahsen */ public class SpringRepositoryRestResourceProvider implements RepositoryRestResourceProvider { @@ -181,14 +184,14 @@ public class SpringRepositoryRestResourceProvider implements RepositoryRestResou /** * Instantiates a new Spring repository rest resource provider. * - * @param mappings the mappings - * @param repositories the repositories - * @param associations the associations - * @param applicationContext the application context + * @param mappings the mappings + * @param repositories the repositories + * @param associations the associations + * @param applicationContext the application context * @param dataRestRouterOperationService the data rest router operation builder - * @param persistentEntities the persistent entities - * @param mapper the mapper - * @param springDocDataRestUtils the spring doc data rest utils + * @param persistentEntities the persistent entities + * @param mapper the mapper + * @param springDocDataRestUtils the spring doc data rest utils */ public SpringRepositoryRestResourceProvider(ResourceMappings mappings, Repositories repositories, Associations associations, ApplicationContext applicationContext, DataRestRouterOperationService dataRestRouterOperationService, @@ -225,8 +228,7 @@ public List getRouterOperations(OpenAPI openAPI, Locale locale) if (!hiddenRepository) { if (resourceMetadata!=null && resourceMetadata.isExported()) { for (HandlerMapping handlerMapping : handlerMappingList) { - if (handlerMapping instanceof RepositoryRestHandlerMapping) { - RepositoryRestHandlerMapping repositoryRestHandlerMapping = (RepositoryRestHandlerMapping) handlerMapping; + if (handlerMapping instanceof RepositoryRestHandlerMapping repositoryRestHandlerMapping) { Map handlerMethodMap = repositoryRestHandlerMapping.getHandlerMethods(); // Entity controllers lookup first Map handlerMethodMapFiltered = handlerMethodMap.entrySet().stream() @@ -253,8 +255,7 @@ public List getRouterOperations(OpenAPI openAPI, Locale locale) } }); } - else if (handlerMapping instanceof BasePathAwareHandlerMapping) { - BasePathAwareHandlerMapping beanBasePathAwareHandlerMapping = (BasePathAwareHandlerMapping) handlerMapping; + else if (handlerMapping instanceof BasePathAwareHandlerMapping beanBasePathAwareHandlerMapping) { Map handlerMethodMap = beanBasePathAwareHandlerMapping.getHandlerMethods(); Map handlerMethodMapFiltered = handlerMethodMap.entrySet().stream() .filter(requestMappingInfoHandlerMethodEntry -> REPOSITORY_SCHEMA_CONTROLLER.equals(requestMappingInfoHandlerMethodEntry @@ -340,11 +341,11 @@ private List getHandlerMappingList() { /** * Find search resource mappings. * - * @param openAPI the open api + * @param openAPI the open api * @param routerOperationList the router operation list - * @param handlerMappingList the handler mapping list - * @param dataRestRepository the repository data rest - * @param resourceMetadata the resource metadata + * @param handlerMappingList the handler mapping list + * @param dataRestRepository the repository data rest + * @param resourceMetadata the resource metadata */ private void findSearchResourceMappings(OpenAPI openAPI, List routerOperationList, List handlerMappingList, DataRestRepository dataRestRepository, ResourceMetadata resourceMetadata) { @@ -369,11 +370,11 @@ private void findSearchResourceMappings(OpenAPI openAPI, List r /** * Find search controllers list. * - * @param routerOperationList the router operation list - * @param handlerMethodMap the handler method map - * @param resourceMetadata the resource metadata - * @param dataRestRepository the repository data rest - * @param openAPI the open api + * @param routerOperationList the router operation list + * @param handlerMethodMap the handler method map + * @param resourceMetadata the resource metadata + * @param dataRestRepository the repository data rest + * @param openAPI the open api * @param searchResourceMappings the search resource mappings * @return the list */ @@ -391,10 +392,10 @@ private List findSearchControllers(List router * Find controllers list. * * @param routerOperationList the router operation list - * @param handlerMethodMap the handler method map - * @param resourceMetadata the resource metadata - * @param dataRestRepository the repository data rest - * @param openAPI the open api + * @param handlerMethodMap the handler method map + * @param resourceMetadata the resource metadata + * @param dataRestRepository the repository data rest + * @param openAPI the open api * @return the list */ private List findControllers(List routerOperationList, diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/SpringWebProvider.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/SpringWebProvider.java index b9f2718c6..8def461bb 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/SpringWebProvider.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/SpringWebProvider.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.providers; @@ -34,6 +36,7 @@ /** * The type Spring web provider. + * * @author bnasslahsen */ public abstract class SpringWebProvider implements ApplicationContextAware { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/WebConversionServiceProvider.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/WebConversionServiceProvider.java index 9f27a3172..81de30b7f 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/WebConversionServiceProvider.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/WebConversionServiceProvider.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.providers; @@ -48,6 +50,7 @@ /** * The type Web conversion service provider. + * * @author bnasslashen */ public class WebConversionServiceProvider implements InitializingBean, ApplicationContextAware { @@ -97,7 +100,7 @@ else if (isAssignable(REACTIVE_APPLICATION_CONTEXT_CLASS, this.applicationContex /** * Attempts to convert {@code source} into the target type as described by {@code targetTypeDescriptor}. * - * @param source the source + * @param source the source * @param targetTypeDescriptor the target type descriptor * @return the converted source */ @@ -120,8 +123,7 @@ public Class getSpringConvertedType(Class clazz) { if (!AopUtils.isAopProxy(formattingConversionService)){ try { converters = convertersField.get(formattingConversionService); - convertersField = FieldUtils.getDeclaredField(converters.getClass(), CONVERTERS, true); - Map springConverters = (Map) convertersField.get(converters); + Map springConverters = (Map) FieldUtils.readDeclaredField(converters, CONVERTERS, true); Optional convertiblePairOptional = springConverters.keySet().stream().filter(convertiblePair -> convertiblePair.getTargetType().equals(clazz)).findAny(); if (convertiblePairOptional.isPresent()) { ConvertiblePair convertiblePair = convertiblePairOptional.get(); @@ -140,14 +142,14 @@ public Class getSpringConvertedType(Class clazz) { * Is assignable boolean. * * @param target the target - * @param type the type + * @param type the type * @return the boolean */ private boolean isAssignable(String target, Class type) { try { return ClassUtils.resolveClassName(target, null).isAssignableFrom(type); } - catch (Throwable ex) { + catch (Exception ex) { return false; } } diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/AbstractRequestService.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/AbstractRequestService.java index 7fe94dad5..a2a7d9b45 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/AbstractRequestService.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/AbstractRequestService.java @@ -3,19 +3,21 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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. * * * * * * * * * @@ -94,6 +96,8 @@ import static org.springdoc.core.service.GenericParameterService.isFile; import static org.springdoc.core.utils.Constants.OPENAPI_ARRAY_TYPE; import static org.springdoc.core.utils.Constants.OPENAPI_STRING_TYPE; +import static org.springdoc.core.utils.SpringDocUtils.getParameterAnnotations; +import static org.springframework.http.MediaType.MULTIPART_FORM_DATA_VALUE; /** * The type Abstract request builder. @@ -155,11 +159,6 @@ public abstract class AbstractRequestService { */ private final RequestBodyService requestBodyService; - /** - * The Operation builder. - */ - private final OperationService operationService; - /** * The Local spring doc parameter name discoverer. */ @@ -180,22 +179,21 @@ public abstract class AbstractRequestService { */ private boolean defaultSupportFormData; + /** * Instantiates a new Abstract request builder. * * @param parameterBuilder the parameter builder * @param requestBodyService the request body builder - * @param operationService the operation builder * @param parameterCustomizers the parameter customizers * @param localSpringDocParameterNameDiscoverer the local spring doc parameter name discoverer */ protected AbstractRequestService(GenericParameterService parameterBuilder, RequestBodyService requestBodyService, - OperationService operationService, Optional> parameterCustomizers, + Optional> parameterCustomizers, SpringDocParameterNameDiscoverer localSpringDocParameterNameDiscoverer) { super(); this.parameterBuilder = parameterBuilder; this.requestBodyService = requestBodyService; - this.operationService = operationService; parameterCustomizers.ifPresent(customizers -> customizers.removeIf(Objects::isNull)); this.parameterCustomizers = parameterCustomizers; this.localSpringDocParameterNameDiscoverer = localSpringDocParameterNameDiscoverer; @@ -275,8 +273,7 @@ public static Collection getHeaders(MethodAttributes methodAttributes public Operation build(HandlerMethod handlerMethod, RequestMethod requestMethod, Operation operation, MethodAttributes methodAttributes, OpenAPI openAPI) { // Documentation - String operationId = operationService.getOperationId(handlerMethod.getMethod().getName(), - operation.getOperationId(), openAPI); + String operationId = operation.getOperationId() != null ? operation.getOperationId() : handlerMethod.getMethod().getName(); operation.setOperationId(operationId); // requests String[] pNames = this.localSpringDocParameterNameDiscoverer.getParameterNames(handlerMethod.getMethod()); @@ -284,7 +281,7 @@ public Operation build(HandlerMethod handlerMethod, RequestMethod requestMethod, String[] reflectionParametersNames = Arrays.stream(handlerMethod.getMethod().getParameters()).map(java.lang.reflect.Parameter::getName).toArray(String[]::new); if (pNames == null || Arrays.stream(pNames).anyMatch(Objects::isNull)) pNames = reflectionParametersNames; - parameters = DelegatingMethodParameter.customize(pNames, parameters, parameterBuilder.getDelegatingMethodParameterCustomizer(), this.defaultFlatParamObject); + parameters = DelegatingMethodParameter.customize(pNames, parameters, parameterBuilder.getOptionalDelegatingMethodParameterCustomizers(), this.defaultFlatParamObject); RequestBodyInfo requestBodyInfo = new RequestBodyInfo(); List operationParameters = (operation.getParameters() != null) ? operation.getParameters() : new ArrayList<>(); Map parametersDocMap = getApiParameters(handlerMethod.getMethod()); @@ -323,10 +320,12 @@ public Operation build(HandlerMethod handlerMethod, RequestMethod requestMethod, } if (!isParamToIgnore(methodParameter)) { - parameter = buildParams(parameterInfo, components, requestMethod, methodAttributes.getJsonViewAnnotation(), openAPI.getOpenapi()); + parameter = buildParams(parameterInfo, components, requestMethod, methodAttributes, openAPI.getOpenapi()); // Merge with the operation parameters parameter = GenericParameterService.mergeParameter(operationParameters, parameter); - List parameterAnnotations = Arrays.asList(methodParameter.getParameterAnnotations()); + + List parameterAnnotations = List.of(getParameterAnnotations(methodParameter)); + if (isValidParameter(parameter)) { // Add param javadoc if (StringUtils.isBlank(parameter.getDescription()) && javadocProvider != null) { @@ -353,7 +352,7 @@ else if (!RequestMethod.GET.equals(requestMethod) || OpenApiVersion.OPENAPI_3_1. // support form-data if (defaultSupportFormData && requestBody != null && requestBody.getContent() != null - && requestBody.getContent().containsKey(org.springframework.http.MediaType.MULTIPART_FORM_DATA_VALUE)) { + && requestBody.getContent().containsKey(MULTIPART_FORM_DATA_VALUE)) { Iterator> it = map.entrySet().iterator(); while (it.hasNext()) { Entry entry = it.next(); @@ -451,6 +450,8 @@ public boolean isParamToIgnore(MethodParameter parameter) { return true; if (isRequiredAnnotation(parameter)) return false; + if (isRequestBodyWithMapType(parameter)) + return false; return isRequestTypeToIgnore(parameter.getParameterType()); } @@ -469,6 +470,27 @@ private boolean isRequiredAnnotation(MethodParameter parameter) { || (requestBody != null && requestBody.required()); } + /** + * Is request body with map type + * + * @param parameter the parameter + * @return the boolean + */ + private boolean isRequestBodyWithMapType(MethodParameter parameter) { + // Exclude parameters from the Actuator package + if (parameter.getContainingClass().getPackageName().startsWith("org.springframework.boot.actuate")) { + return false; + } + // Check for @RequestBody annotation + org.springframework.web.bind.annotation.RequestBody requestBody = parameter.getParameterAnnotation(org.springframework.web.bind.annotation.RequestBody.class); + if (requestBody == null) { + return false; + } + // Check if the parameter type is assignable to Map + Class parameterType = parameter.getParameterType(); + return Map.class.isAssignableFrom(parameterType); + } + /** * Sets params. * @@ -496,28 +518,28 @@ public boolean isValidParameter(Parameter parameter) { /** * Build params parameter. * - * @param parameterInfo the parameter info - * @param components the components - * @param requestMethod the request method - * @param jsonView the json view - * @param openApiVersion the open api version + * @param parameterInfo the parameter info + * @param components the components + * @param requestMethod the request method + * @param methodAttributes the method attributes + * @param openApiVersion the open api version * @return the parameter */ public Parameter buildParams(ParameterInfo parameterInfo, Components components, - RequestMethod requestMethod, JsonView jsonView, String openApiVersion) { + RequestMethod requestMethod, MethodAttributes methodAttributes, String openApiVersion) { MethodParameter methodParameter = parameterInfo.getMethodParameter(); if (parameterInfo.getParamType() != null) { if (!ValueConstants.DEFAULT_NONE.equals(parameterInfo.getDefaultValue())) parameterInfo.setRequired(false); else parameterInfo.setDefaultValue(null); - return this.buildParam(parameterInfo, components, jsonView); + return this.buildParam(parameterInfo, components, methodAttributes.getJsonViewAnnotation()); } // By default - if (!isRequestBodyParam(requestMethod, parameterInfo, openApiVersion)) { + if (!isRequestBodyParam(requestMethod, parameterInfo, openApiVersion, methodAttributes)) { parameterInfo.setRequired(!((DelegatingMethodParameter) methodParameter).isNotRequired() && !methodParameter.isOptional()); parameterInfo.setDefaultValue(null); - return this.buildParam(parameterInfo, components, jsonView); + return this.buildParam(parameterInfo, components, methodAttributes.getJsonViewAnnotation()); } return null; } @@ -596,16 +618,20 @@ public void applyBeanValidatorAnnotations(final Parameter parameter, final List< */ public void applyBeanValidatorAnnotations(final RequestBody requestBody, final List annotations, boolean isOptional) { Map annos = new HashMap<>(); - boolean requestBodyRequired = false; + boolean springRequestBodyRequired = false; + boolean swaggerRequestBodyRequired = false; if (!CollectionUtils.isEmpty(annotations)) { annotations.forEach(annotation -> annos.put(annotation.annotationType().getSimpleName(), annotation)); - requestBodyRequired = annotations.stream() + springRequestBodyRequired = annotations.stream() .filter(annotation -> org.springframework.web.bind.annotation.RequestBody.class.equals(annotation.annotationType())) .anyMatch(annotation -> ((org.springframework.web.bind.annotation.RequestBody) annotation).required()); + swaggerRequestBodyRequired = annotations.stream() + .filter(annotation -> io.swagger.v3.oas.annotations.parameters.RequestBody.class.equals(annotation.annotationType())) + .anyMatch(annotation -> ((io.swagger.v3.oas.annotations.parameters.RequestBody) annotation).required()); } boolean validationExists = Arrays.stream(ANNOTATIONS_FOR_REQUIRED).anyMatch(annos::containsKey); - if (validationExists || (!isOptional && requestBodyRequired)) + if (validationExists || (!isOptional && (springRequestBodyRequired || swaggerRequestBodyRequired))) requestBody.setRequired(true); Content content = requestBody.getContent(); for (MediaType mediaType : content.values()) { @@ -631,7 +657,16 @@ public RequestBodyService getRequestBodyBuilder() { public boolean isDefaultFlatParamObject() { return defaultFlatParamObject; } - + + /** + * Gets parameter builder. + * + * @return the parameter builder + */ + public GenericParameterService getParameterBuilder() { + return parameterBuilder; + } + /** * Calculate size. * @@ -722,27 +757,38 @@ private void applyValidationsToSchema(Map annos, Schema s /** * Is RequestBody param boolean. * - * @param requestMethod the request method - * @param parameterInfo the parameter info - * @param openApiVersion the open api version + * @param requestMethod the request method + * @param parameterInfo the parameter info + * @param openApiVersion the open api version + * @param methodAttributes the method attributes * @return the boolean */ - private boolean isRequestBodyParam(RequestMethod requestMethod, ParameterInfo parameterInfo, String openApiVersion) { + private boolean isRequestBodyParam(RequestMethod requestMethod, ParameterInfo parameterInfo, String openApiVersion, MethodAttributes methodAttributes) { MethodParameter methodParameter = parameterInfo.getMethodParameter(); DelegatingMethodParameter delegatingMethodParameter = (DelegatingMethodParameter) methodParameter; boolean isBodyAllowed = !RequestMethod.GET.equals(requestMethod) || OpenApiVersion.OPENAPI_3_1.getVersion().equals(openApiVersion); return (isBodyAllowed && (parameterInfo.getParameterModel() == null || parameterInfo.getParameterModel().getIn() == null) && !delegatingMethodParameter.isParameterObject()) && - ((methodParameter.getParameterAnnotation(io.swagger.v3.oas.annotations.parameters.RequestBody.class) != null - || methodParameter.getParameterAnnotation(org.springframework.web.bind.annotation.RequestBody.class) != null - || AnnotatedElementUtils.findMergedAnnotation(Objects.requireNonNull(methodParameter.getMethod()), io.swagger.v3.oas.annotations.parameters.RequestBody.class) != null) + (checkRequestBodyAnnotation(methodParameter) || checkOperationRequestBody(methodParameter) || checkFile(methodParameter) - - ); + || Arrays.asList(methodAttributes.getMethodConsumes()).contains(MULTIPART_FORM_DATA_VALUE)); } + /** + * Checks whether Swagger's or Spring's RequestBody annotation is present on a parameter or method + * + * @param methodParameter the method parameter + * @return the boolean + */ + private boolean checkRequestBodyAnnotation(MethodParameter methodParameter) { + return methodParameter.hasParameterAnnotation(org.springframework.web.bind.annotation.RequestBody.class) + || methodParameter.hasParameterAnnotation(io.swagger.v3.oas.annotations.parameters.RequestBody.class) + || AnnotatedElementUtils.isAnnotated(Objects.requireNonNull(methodParameter.getParameter()), io.swagger.v3.oas.annotations.parameters.RequestBody.class) + || AnnotatedElementUtils.isAnnotated(Objects.requireNonNull(methodParameter.getMethod()), io.swagger.v3.oas.annotations.parameters.RequestBody.class); + } + /** * Check file boolean. * @@ -767,7 +813,7 @@ else if (methodParameter.getParameterAnnotation(org.springframework.web.bind.ann private boolean checkOperationRequestBody(MethodParameter methodParameter) { if (AnnotatedElementUtils.findMergedAnnotation(Objects.requireNonNull(methodParameter.getMethod()), io.swagger.v3.oas.annotations.Operation.class) != null) { io.swagger.v3.oas.annotations.Operation operation = AnnotatedElementUtils.findMergedAnnotation(Objects.requireNonNull(methodParameter.getMethod()), io.swagger.v3.oas.annotations.Operation.class); - if(operation!=null){ + if (operation != null) { io.swagger.v3.oas.annotations.parameters.RequestBody requestBody = operation.requestBody(); if (StringUtils.isNotBlank(requestBody.description())) return true; diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/GenericParameterService.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/GenericParameterService.java index f9bfad87a..40ddbe55a 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/GenericParameterService.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/GenericParameterService.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.service; @@ -66,7 +68,6 @@ import org.springdoc.core.extractor.MethodParameterPojoExtractor; import org.springdoc.core.models.ParameterInfo; import org.springdoc.core.models.RequestBodyInfo; -import org.springdoc.core.parsers.ReturnTypeParser; import org.springdoc.core.providers.JavadocProvider; import org.springdoc.core.providers.ObjectMapperProvider; import org.springdoc.core.providers.WebConversionServiceProvider; @@ -77,6 +78,7 @@ import org.springframework.beans.factory.config.BeanExpressionContext; import org.springframework.beans.factory.config.BeanExpressionResolver; import org.springframework.beans.factory.config.ConfigurableBeanFactory; +import org.springframework.core.GenericTypeResolver; import org.springframework.core.MethodParameter; import org.springframework.core.ResolvableType; import org.springframework.core.annotation.AnnotatedElementUtils; @@ -86,9 +88,11 @@ import org.springframework.web.multipart.MultipartRequest; import static org.springdoc.core.utils.Constants.DOT; +import static org.springdoc.core.utils.SpringDocUtils.getParameterAnnotations; /** * The type Generic parameter builder. + * * @author bnasslahsen, coutin */ @SuppressWarnings("rawtypes") @@ -113,7 +117,7 @@ public class GenericParameterService { /** * The Optional delegating method parameter customizer. */ - private final Optional optionalDelegatingMethodParameterCustomizer; + private final Optional> optionalDelegatingMethodParameterCustomizers; /** * The Web conversion service. @@ -147,16 +151,17 @@ public class GenericParameterService { /** * Instantiates a new Generic parameter builder. - * @param propertyResolverUtils the property resolver utils - * @param optionalDelegatingMethodParameterCustomizer the optional delegating method parameter customizer - * @param optionalWebConversionServiceProvider the optional web conversion service provider - * @param objectMapperProvider the object mapper provider - * @param javadocProviderOptional the javadoc provider + * + * @param propertyResolverUtils the property resolver utils + * @param optionalDelegatingMethodParameterCustomizers the optional list delegating method parameter customizer + * @param optionalWebConversionServiceProvider the optional web conversion service provider + * @param objectMapperProvider the object mapper provider + * @param javadocProviderOptional the javadoc provider */ - public GenericParameterService(PropertyResolverUtils propertyResolverUtils, Optional optionalDelegatingMethodParameterCustomizer, + public GenericParameterService(PropertyResolverUtils propertyResolverUtils, Optional> optionalDelegatingMethodParameterCustomizers, Optional optionalWebConversionServiceProvider, ObjectMapperProvider objectMapperProvider, Optional javadocProviderOptional) { this.propertyResolverUtils = propertyResolverUtils; - this.optionalDelegatingMethodParameterCustomizer = optionalDelegatingMethodParameterCustomizer; + this.optionalDelegatingMethodParameterCustomizers = optionalDelegatingMethodParameterCustomizers; this.optionalWebConversionServiceProvider = optionalWebConversionServiceProvider; this.configurableBeanFactory = propertyResolverUtils.getFactory(); this.expressionContext = (configurableBeanFactory != null ? new BeanExpressionContext(configurableBeanFactory, new RequestScope()) : null); @@ -187,7 +192,7 @@ public static boolean isFile(Class type) { * Merge parameter parameter. * * @param existingParamDoc the existing param doc - * @param paramCalcul the param calcul + * @param paramCalcul the param calcul * @return the parameter */ public static Parameter mergeParameter(List existingParamDoc, Parameter paramCalcul) { @@ -214,7 +219,7 @@ public static Parameter mergeParameter(List existingParamDoc, Paramet * Merge parameter. * * @param paramCalcul the param calcul - * @param paramDoc the param doc + * @param paramDoc the param doc */ public static void mergeParameter(Parameter paramCalcul, Parameter paramDoc) { if (StringUtils.isBlank(paramDoc.getDescription())) @@ -261,9 +266,9 @@ public static void mergeParameter(Parameter paramCalcul, Parameter paramDoc) { * Build parameter from doc parameter. * * @param parameterDoc the parameter doc - * @param components the components - * @param jsonView the json view - * @param locale the locale + * @param components the components + * @param jsonView the json view + * @param locale the locale * @return the parameter */ public Parameter buildParameterFromDoc(io.swagger.v3.oas.annotations.Parameter parameterDoc, @@ -311,9 +316,9 @@ public Parameter buildParameterFromDoc(io.swagger.v3.oas.annotations.Parameter p * Sets schema. * * @param parameterDoc the parameter doc - * @param components the components - * @param jsonView the json view - * @param parameter the parameter + * @param components the components + * @param jsonView the json view + * @param parameter the parameter */ private void setSchema(io.swagger.v3.oas.annotations.Parameter parameterDoc, Components components, JsonView jsonView, Parameter parameter) { if (StringUtils.isNotBlank(parameterDoc.ref())) @@ -321,7 +326,9 @@ private void setSchema(io.swagger.v3.oas.annotations.Parameter parameterDoc, Com else { Schema schema = null; try { - schema = AnnotationsUtils.getSchema(parameterDoc.schema(), null, false, parameterDoc.schema().implementation(), components, jsonView, propertyResolverUtils.isOpenapi31()).orElse(null); + if(StringUtils.isNotEmpty(parameterDoc.schema().type()) || !Void.class.equals(parameterDoc.schema().implementation())){ + schema = AnnotationsUtils.getSchema(parameterDoc.schema(), null, false, parameterDoc.schema().implementation(), components, jsonView, propertyResolverUtils.isOpenapi31()).orElse(null); + } // Cast default value if (schema != null && schema.getDefault() != null) { PrimitiveType primitiveType = PrimitiveType.fromTypeAndFormat(schema.getType(), schema.getFormat()); @@ -350,10 +357,10 @@ private void setSchema(io.swagger.v3.oas.annotations.Parameter parameterDoc, Com /** * Calculate schema schema. * - * @param components the components - * @param parameterInfo the parameter info + * @param components the components + * @param parameterInfo the parameter info * @param requestBodyInfo the request body info - * @param jsonView the json view + * @param jsonView the json view * @return the schema */ Schema calculateSchema(Components components, ParameterInfo parameterInfo, RequestBodyInfo requestBodyInfo, JsonView jsonView) { @@ -362,7 +369,7 @@ Schema calculateSchema(Components components, ParameterInfo parameterInfo, Reque MethodParameter methodParameter = parameterInfo.getMethodParameter(); if (parameterInfo.getParameterModel() == null || parameterInfo.getParameterModel().getSchema() == null) { - Type type = ReturnTypeParser.getType(methodParameter); + Type type = GenericTypeResolver.resolveType( methodParameter.getGenericParameterType(), methodParameter.getContainingClass()); if (type instanceof Class && !((Class) type).isEnum() && optionalWebConversionServiceProvider.isPresent()) { WebConversionServiceProvider webConversionServiceProvider = optionalWebConversionServiceProvider.get(); if (!MethodParameterPojoExtractor.isSwaggerPrimitiveType((Class) type) && methodParameter.getParameterType().getAnnotation(io.swagger.v3.oas.annotations.media.Schema.class) == null) { @@ -371,7 +378,7 @@ Schema calculateSchema(Components components, ParameterInfo parameterInfo, Reque type = springConvertedType; } } - schemaN = SpringDocAnnotationsUtils.extractSchema(components, type, jsonView, methodParameter.getParameterAnnotations(), propertyResolverUtils.getSpecVersion()); + schemaN = SpringDocAnnotationsUtils.extractSchema(components, type, jsonView, getParameterAnnotations(methodParameter), propertyResolverUtils.getSpecVersion()); } else schemaN = parameterInfo.getParameterModel().getSchema(); @@ -396,18 +403,18 @@ Schema calculateSchema(Components components, ParameterInfo parameterInfo, Reque /** * Calculate request body schema schema. * - * @param components the components - * @param parameterInfo the parameter info + * @param components the components + * @param parameterInfo the parameter info * @param requestBodyInfo the request body info - * @param schemaN the schema n - * @param paramName the param name + * @param schemaN the schema n + * @param paramName the param name * @return the schema */ private Schema calculateRequestBodySchema(Components components, ParameterInfo parameterInfo, RequestBodyInfo requestBodyInfo, Schema schemaN, String paramName) { if (schemaN != null && StringUtils.isEmpty(schemaN.getDescription()) && parameterInfo.getParameterModel() != null) { String description = parameterInfo.getParameterModel().getDescription(); if (schemaN.get$ref() != null && schemaN.get$ref().contains(AnnotationsUtils.COMPONENTS_REF)) { - String key = schemaN.get$ref().substring(21); + String key = schemaN.get$ref().substring(Components.COMPONENTS_SCHEMAS_REF.length()); Schema existingSchema = components.getSchemas().get(key); if (!StringUtils.isEmpty(description)) existingSchema.setDescription(description); @@ -437,7 +444,7 @@ else if (parameterInfo.isRequestPart() || schemaN instanceof FileSchema || schem * Sets examples. * * @param parameterDoc the parameter doc - * @param parameter the parameter + * @param parameter the parameter */ private void setExamples(io.swagger.v3.oas.annotations.Parameter parameterDoc, Parameter parameter) { Map exampleMap = new HashMap<>(); @@ -480,7 +487,7 @@ private void setExtensions(io.swagger.v3.oas.annotations.Parameter parameterDoc, * Sets parameter explode. * * @param parameter the parameter - * @param p the p + * @param p the p */ private void setParameterExplode(Parameter parameter, io.swagger.v3.oas.annotations.Parameter p) { if (isExplodable(p)) { @@ -497,7 +504,7 @@ else if (Explode.FALSE.equals(p.explode())) { * Sets parameter style. * * @param parameter the parameter - * @param p the p + * @param p the p */ private void setParameterStyle(Parameter parameter, io.swagger.v3.oas.annotations.Parameter p) { if (StringUtils.isNotBlank(p.style().toString())) { @@ -530,7 +537,7 @@ private boolean isExplodable(io.swagger.v3.oas.annotations.Parameter p) { * @return the boolean */ public boolean isFile(MethodParameter methodParameter) { - if (methodParameter.getGenericParameterType() instanceof ParameterizedType) { + if (methodParameter.getGenericParameterType() instanceof ParameterizedType ) { ParameterizedType parameterizedType = (ParameterizedType) methodParameter.getGenericParameterType(); return isFile(parameterizedType); } @@ -541,12 +548,12 @@ public boolean isFile(MethodParameter methodParameter) { } /** - * Gets delegating method parameter customizer. + * Gets optional delegating method parameter customizers. * - * @return the delegating method parameter customizer + * @return the optional delegating method parameter customizers */ - public Optional getDelegatingMethodParameterCustomizer() { - return optionalDelegatingMethodParameterCustomizer; + public Optional> getOptionalDelegatingMethodParameterCustomizers() { + return optionalDelegatingMethodParameterCustomizers; } /** @@ -560,8 +567,7 @@ private boolean isFile(ParameterizedType parameterizedType) { Class fileClass = ResolvableType.forType(type).getRawClass(); if (fileClass != null && isFile(fileClass)) return true; - else if (type instanceof WildcardType) { - WildcardType wildcardType = (WildcardType) type; + else if (type instanceof WildcardType wildcardType) { Type[] upperBounds = wildcardType.getUpperBounds(); return MultipartFile.class.getName().equals(upperBounds[0].getTypeName()); } @@ -589,6 +595,7 @@ public Optional getOptionalWebConversionServicePro /** * Resolve the given annotation-specified value, * potentially containing placeholders and expressions. + * * @param value the value * @return the object */ diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/GenericResponseService.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/GenericResponseService.java index c54898caf..7d8994c3c 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/GenericResponseService.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/GenericResponseService.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * Copyright 2019-2023 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.service; @@ -63,12 +65,16 @@ import org.springdoc.core.models.ControllerAdviceInfo; import org.springdoc.core.models.MethodAdviceInfo; import org.springdoc.core.models.MethodAttributes; -import org.springdoc.core.parsers.ReturnTypeParser; import org.springdoc.core.properties.SpringDocConfigProperties; import org.springdoc.core.providers.JavadocProvider; +import org.springdoc.core.providers.ObjectMapperProvider; import org.springdoc.core.utils.PropertyResolverUtils; import org.springdoc.core.utils.SpringDocAnnotationsUtils; +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; +import org.springframework.core.GenericTypeResolver; import org.springframework.core.MethodParameter; import org.springframework.core.ResolvableType; import org.springframework.core.annotation.AnnotatedElementUtils; @@ -88,13 +94,14 @@ import static org.springdoc.core.utils.SpringDocAnnotationsUtils.extractSchema; import static org.springdoc.core.utils.SpringDocAnnotationsUtils.getContent; import static org.springdoc.core.utils.SpringDocAnnotationsUtils.mergeSchema; +import static org.springdoc.core.utils.SpringDocUtils.getParameterAnnotations; /** * The type Generic response builder. * * @author bnasslahsen */ -public class GenericResponseService { +public class GenericResponseService implements ApplicationContextAware { /** * This extension name is used to temporary store @@ -112,11 +119,6 @@ public class GenericResponseService { */ private final OperationService operationService; - /** - * The Return type parsers. - */ - private final List returnTypeParsers; - /** * The Spring doc config properties. */ @@ -142,6 +144,11 @@ public class GenericResponseService { */ private final Lock reentrantLock = new ReentrantLock(); + /** + * The Context. + */ + private ApplicationContext applicationContext; + /** * The constant LOGGER. */ @@ -151,16 +158,14 @@ public class GenericResponseService { * Instantiates a new Generic response builder. * * @param operationService the operation builder - * @param returnTypeParsers the return type parsers * @param springDocConfigProperties the spring doc config properties * @param propertyResolverUtils the property resolver utils */ - public GenericResponseService(OperationService operationService, List returnTypeParsers, + public GenericResponseService(OperationService operationService, SpringDocConfigProperties springDocConfigProperties, PropertyResolverUtils propertyResolverUtils) { super(); this.operationService = operationService; - this.returnTypeParsers = returnTypeParsers; this.springDocConfigProperties = springDocConfigProperties; this.propertyResolverUtils = propertyResolverUtils; } @@ -180,6 +185,7 @@ public static void buildContentFromDoc(Components components, ApiResponses apiRe io.swagger.v3.oas.annotations.responses.ApiResponse apiResponseAnnotations, ApiResponse apiResponse, boolean openapi31) { + methodAttributes.setUseReturnTypeSchema(apiResponseAnnotations.useReturnTypeSchema()); io.swagger.v3.oas.annotations.media.Content[] contentdoc = apiResponseAnnotations.content(); Optional optionalContent = getContent(contentdoc, new String[0], methodAttributes.getMethodProduces(), null, components, methodAttributes.getJsonViewAnnotation(), openapi31); @@ -397,7 +403,7 @@ private Map computeResponseFromDoc(Components components, M apiResponse.extensions(extensions); } } - AnnotationsUtils.getHeaders(apiResponseAnnotations.headers(), methodAttributes.getJsonViewAnnotation(), openapi31) + AnnotationsUtils.getHeaders(apiResponseAnnotations.headers(), components, methodAttributes.getJsonViewAnnotation(), openapi31) .ifPresent(apiResponse::headers); apiResponsesOp.addApiResponse(httpCode, apiResponse); } @@ -512,8 +518,8 @@ public Set getApiResponses( * @return the content */ private Content buildContent(Components components, MethodParameter methodParameter, String[] methodProduces, JsonView jsonView) { - Type returnType = getReturnType(methodParameter); - return buildContent(components, methodParameter.getParameterAnnotations(), methodProduces, jsonView, returnType); + Type returnType = GenericTypeResolver.resolveType(methodParameter.getGenericParameterType(), methodParameter.getContainingClass()); + return buildContent(components, getParameterAnnotations(methodParameter), methodProduces, jsonView, returnType); } /** @@ -543,25 +549,6 @@ public Content buildContent(Components components, Annotation[] annotations, Str return content; } - /** - * Gets return type. - * - * @param methodParameter the method parameter - * @return the return type - */ - private Type getReturnType(MethodParameter methodParameter) { - Type returnType = Object.class; - for (ReturnTypeParser returnTypeParser : returnTypeParsers) { - if (returnType.getTypeName().equals(Object.class.getTypeName())) { - returnType = returnTypeParser.getReturnType(methodParameter); - } - else - break; - } - - return returnType; - } - /** * Calculate schema schema. * @@ -619,13 +606,13 @@ else if (CollectionUtils.isEmpty(apiResponse.getContent())) setDescription(httpCode, apiResponse); } } - if (apiResponse.getContent() != null - && ((isGeneric || methodAttributes.isMethodOverloaded()) && methodAttributes.isNoApiResponseDoc())) { + if (apiResponse.getContent() != null && (methodAttributes.isUseReturnTypeSchema() || + ((isGeneric || methodAttributes.isMethodOverloaded()) && methodAttributes.isNoApiResponseDoc()))) { // Merge with existing schema Content existingContent = apiResponse.getContent(); - Type type = ReturnTypeParser.getType(methodParameter); + Type type = GenericTypeResolver.resolveType( methodParameter.getGenericParameterType(), methodParameter.getContainingClass()); Schema schemaN = calculateSchema(components, type, - methodAttributes.getJsonViewAnnotation(), methodParameter.getParameterAnnotations()); + methodAttributes.getJsonViewAnnotation(), getParameterAnnotations(methodParameter)); if (schemaN != null && ArrayUtils.isNotEmpty(methodAttributes.getMethodProduces())) Arrays.stream(methodAttributes.getMethodProduces()).forEach(mediaTypeStr -> mergeSchema(existingContent, schemaN, mediaTypeStr)); } @@ -669,14 +656,29 @@ private boolean isVoid(Type returnType) { boolean result = false; if (Void.TYPE.equals(returnType) || Void.class.equals(returnType)) result = true; - else if (returnType instanceof ParameterizedType) { - Type[] types = ((ParameterizedType) returnType).getActualTypeArguments(); + else if (returnType instanceof ParameterizedType parameterizedType) { + Type[] types = parameterizedType.getActualTypeArguments(); if (types != null && isResponseTypeWrapper(ResolvableType.forType(returnType).getRawClass())) result = isVoid(types[0]); } return result; } + + /** + * Gets controller advice bean. + * + * @param controllerAdviceBeans the controller advice beans + * @param controllerAdvice the controller advice + * @return the controller advice bean + */ + private ControllerAdviceBean getControllerAdviceBean(List controllerAdviceBeans, Object controllerAdvice) { + return controllerAdviceBeans.stream() + .filter(controllerAdviceBean -> (controllerAdviceBean.getBeanType()!=null && controllerAdviceBean.getBeanType().isAssignableFrom(controllerAdvice.getClass()))) + .findFirst() + .orElse(null); + } + /** * Gets generic map response. * @@ -700,9 +702,12 @@ private Map getGenericMapResponse(HandlerMethod handlerMeth .map(ControllerAdviceInfo::getApiResponseMap) .collect(LinkedHashMap::new, Map::putAll, Map::putAll); + List controllerAdviceBeans = ControllerAdviceBean.findAnnotatedBeans(applicationContext); + List controllerAdviceInfosNotInThisBean = controllerAdviceInfos.stream() - .filter(controllerAdviceInfo -> - new ControllerAdviceBean(controllerAdviceInfo.getControllerAdvice()).isApplicableToBeanType(beanType)) + .filter(controllerAdviceInfo -> + getControllerAdviceBean(controllerAdviceBeans, controllerAdviceInfo.getControllerAdvice()) + .isApplicableToBeanType(beanType)) .filter(controllerAdviceInfo -> !beanType.equals(controllerAdviceInfo.getControllerAdvice().getClass())) .toList(); @@ -736,7 +741,7 @@ private Map getGenericMapResponse(HandlerMethod handlerMeth LinkedHashMap genericApiResponsesClone; try { - ObjectMapper objectMapper = new ObjectMapper(); + ObjectMapper objectMapper = ObjectMapperProvider.createJson(springDocConfigProperties); genericApiResponsesClone = objectMapper.readValue(objectMapper.writeValueAsString(genericApiResponseMap), ApiResponses.class); return genericApiResponsesClone; } @@ -749,7 +754,7 @@ private Map getGenericMapResponse(HandlerMethod handlerMeth reentrantLock.unlock(); } } - + /** * Is valid http code boolean. * @@ -826,4 +831,9 @@ private boolean isGlobalException(Class exceptionClass) { || exceptionClass.isAssignableFrom(Exception.class) || Error.class.isAssignableFrom(exceptionClass); } + + @Override + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + this.applicationContext = applicationContext; + } } diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/OpenAPIService.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/OpenAPIService.java index 4a3fe8ad8..fef081a29 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/OpenAPIService.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/OpenAPIService.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.service; @@ -48,6 +50,7 @@ import io.swagger.v3.core.util.AnnotationsUtils; import io.swagger.v3.oas.annotations.Hidden; import io.swagger.v3.oas.annotations.OpenAPIDefinition; +import io.swagger.v3.oas.annotations.Webhooks; import io.swagger.v3.oas.annotations.security.SecuritySchemes; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tags; @@ -81,6 +84,7 @@ import org.springframework.core.annotation.AnnotatedElementUtils; import org.springframework.core.annotation.AnnotationUtils; import org.springframework.core.type.filter.AnnotationTypeFilter; +import org.springframework.http.HttpRequest; import org.springframework.stereotype.Controller; import org.springframework.util.CollectionUtils; import org.springframework.web.bind.annotation.ControllerAdvice; @@ -489,13 +493,14 @@ public Schema resolveProperties(Schema schema, Locale locale) { * Sets server base url. * * @param serverBaseUrl the server base url + * @param httpRequest the http request */ - public void setServerBaseUrl(String serverBaseUrl) { + public void setServerBaseUrl(String serverBaseUrl, HttpRequest httpRequest) { String customServerBaseUrl = serverBaseUrl; if (serverBaseUrlCustomizers.isPresent()) { for (ServerBaseUrlCustomizer customizer : serverBaseUrlCustomizers.get()) { - customServerBaseUrl = customizer.customize(customServerBaseUrl); + customServerBaseUrl = customizer.customize(customServerBaseUrl, httpRequest); } } @@ -535,6 +540,64 @@ private Optional getOpenAPIDefinition() { return Optional.ofNullable(apiDef); } + /** + * Get webhooks webhooks [ ]. + * + * @return the webhooks [ ] + */ + public Webhooks[] getWebhooks() { + // List to collect all Webhooks annotations + List allWebhooks = new ArrayList<>(); + + // Get beans with @Webhooks annotation managed by Spring + Map beansWithWebhooksAnnotation = context.getBeansWithAnnotation(Webhooks.class); + + // Process Spring-managed beans + if (!beansWithWebhooksAnnotation.isEmpty()) { + beansWithWebhooksAnnotation.values().forEach(controller -> { + // Get the @Webhooks annotation(s) from each bean + Webhooks[] webhooksAnnotations = controller.getClass().getAnnotationsByType(Webhooks.class); + allWebhooks.addAll(Arrays.asList(webhooksAnnotations)); + }); + } + + // If no beans with @Webhooks annotation found, perform classpath scanning + if (allWebhooks.isEmpty()) { + ClassPathScanningCandidateComponentProvider scanner = new ClassPathScanningCandidateComponentProvider(false); + scanner.addIncludeFilter(new AnnotationTypeFilter(Webhooks.class)); + + // Scan base packages if available + if (AutoConfigurationPackages.has(context)) { + List packagesToScan = AutoConfigurationPackages.get(context); + + for (String basePackage : packagesToScan) { + // Perform the scan and get candidate components + Set components = scanner.findCandidateComponents(basePackage); + + // Loop through the components + for (BeanDefinition beanDefinition : components) { + try { + // Get the class name and load the class + String className = beanDefinition.getBeanClassName(); + Class clazz = Class.forName(className); + + // Get @Webhooks annotation from the class + Webhooks[] webhooksAnnotations = clazz.getAnnotationsByType(Webhooks.class); + allWebhooks.addAll(Arrays.asList(webhooksAnnotations)); + + } catch (ClassNotFoundException e) { + // Log the error if the class is not found + LOGGER.error("Class not found in classpath: {}", e.getMessage()); + } + } + } + } + } + + // Convert the list of Webhooks annotations to an array and return + return allWebhooks.toArray(new Webhooks[0]); + } + /** * Build open api with open api definition. * @@ -607,7 +670,7 @@ private Info resolveProperties(Info info, Locale locale) { resolveProperty(contact::getUrl, contact::url, propertyResolverUtils, locale); } - if(propertyResolverUtils.isResolveExtensionsProperties()){ + if (propertyResolverUtils.isResolveExtensionsProperties()) { Map extensionsResolved = propertyResolverUtils.resolveExtensions(locale, info.getExtensions()); info.setExtensions(extensionsResolved); } @@ -616,7 +679,6 @@ private Info resolveProperties(Info info, Locale locale) { } - /** * Resolve property. * diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/OperationService.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/OperationService.java index e673e6b1c..625fbe490 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/OperationService.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/OperationService.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.service; @@ -27,7 +29,6 @@ import java.lang.reflect.Method; import java.util.ArrayList; import java.util.HashMap; -import java.util.HashSet; import java.util.LinkedHashMap; import java.util.List; import java.util.Locale; @@ -132,7 +133,7 @@ public OpenAPI parse(io.swagger.v3.oas.annotations.Operation apiOperation, operation.setDescription(propertyResolverUtils.resolve(apiOperation.description(), locale)); if (StringUtils.isNotBlank(apiOperation.operationId())) - operation.setOperationId(getOperationId(apiOperation.operationId(), openAPI)); + operation.setOperationId(apiOperation.operationId()); if (apiOperation.deprecated()) operation.setDeprecated(apiOperation.deprecated()); @@ -306,82 +307,6 @@ private void buildTags(io.swagger.v3.oas.annotations.Operation apiOperation, Ope } } - /** - * Gets operation id. - * - * @param operationId the operation id - * @param openAPI the open api - * @return the operation id - */ - public String getOperationId(String operationId, OpenAPI openAPI) { - boolean operationIdUsed = existOperationId(operationId, openAPI); - String operationIdToFind = null; - int counter = 0; - while (operationIdUsed) { - operationIdToFind = String.format("%s_%d", operationId, ++counter); - operationIdUsed = existOperationId(operationIdToFind, openAPI); - } - if (operationIdToFind != null) { - operationId = operationIdToFind; - } - return operationId; - } - - /** - * Exist operation id boolean. - * - * @param operationId the operation id - * @param openAPI the open api - * @return the boolean - */ - private boolean existOperationId(String operationId, OpenAPI openAPI) { - if (openAPI == null) { - return false; - } - if (openAPI.getPaths() == null || openAPI.getPaths().isEmpty()) { - return false; - } - for (PathItem path : openAPI.getPaths().values()) { - Set pathOperationIds = extractOperationIdFromPathItem(path); - if (pathOperationIds.contains(operationId)) { - return true; - } - } - return false; - } - - /** - * Extract operation id from path item set. - * - * @param path the path - * @return the set - */ - private Set extractOperationIdFromPathItem(PathItem path) { - Set ids = new HashSet<>(); - if (path.getGet() != null && StringUtils.isNotBlank(path.getGet().getOperationId())) { - ids.add(path.getGet().getOperationId()); - } - if (path.getPost() != null && StringUtils.isNotBlank(path.getPost().getOperationId())) { - ids.add(path.getPost().getOperationId()); - } - if (path.getPut() != null && StringUtils.isNotBlank(path.getPut().getOperationId())) { - ids.add(path.getPut().getOperationId()); - } - if (path.getDelete() != null && StringUtils.isNotBlank(path.getDelete().getOperationId())) { - ids.add(path.getDelete().getOperationId()); - } - if (path.getOptions() != null && StringUtils.isNotBlank(path.getOptions().getOperationId())) { - ids.add(path.getOptions().getOperationId()); - } - if (path.getHead() != null && StringUtils.isNotBlank(path.getHead().getOperationId())) { - ids.add(path.getHead().getOperationId()); - } - if (path.getPatch() != null && StringUtils.isNotBlank(path.getPatch().getOperationId())) { - ids.add(path.getPatch().getOperationId()); - } - return ids; - } - /** * Gets api responses. * @@ -412,7 +337,7 @@ private Optional getApiResponses( buildResponseContent(methodAttributes, components, classProduces, methodProduces, apiResponsesOp, response, apiResponseObject); - AnnotationsUtils.getHeaders(response.headers(), null, propertyResolverUtils.isOpenapi31()).ifPresent(apiResponseObject::headers); + AnnotationsUtils.getHeaders(response.headers(), components, null, propertyResolverUtils.isOpenapi31()).ifPresent(apiResponseObject::headers); // Make schema as string if empty calculateHeader(apiResponseObject); if (isResponseObject(apiResponseObject)) { @@ -478,8 +403,8 @@ private void setLinks(io.swagger.v3.oas.annotations.responses.ApiResponse respon * Sets description. * * @param response the response - * @param response the javadocReturn * @param apiResponseObject the api response object + * @param javadocReturn the javadoc return */ private void setDescription(io.swagger.v3.oas.annotations.responses.ApiResponse response, ApiResponse apiResponseObject, String javadocReturn) { @@ -597,21 +522,6 @@ private Optional> getStringListFromStringArray(String[] array) { return Optional.of(list); } - /** - * Gets operation id. - * - * @param operationId the operation id - * @param oldOperationId the old operation id - * @param openAPI the open api - * @return the operation id - */ - public String getOperationId(String operationId, String oldOperationId, OpenAPI openAPI) { - if (StringUtils.isNotBlank(oldOperationId)) - return this.getOperationId(oldOperationId, openAPI); - else - return this.getOperationId(operationId, openAPI); - } - /** * Merge operation. * @@ -646,4 +556,13 @@ public Operation mergeOperation(Operation operation, Operation operationModel) { public JavadocProvider getJavadocProvider() { return parameterBuilder.getJavadocProvider(); } + + /** + * Gets propertyResolverUtils + * + * @return propertyResolverUtils property resolver utils + */ + public PropertyResolverUtils getPropertyResolverUtils(){ + return parameterBuilder.getPropertyResolverUtils(); + } } diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/RequestBodyService.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/RequestBodyService.java index 9f289f57e..4f4b4fea6 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/RequestBodyService.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/RequestBodyService.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.service; @@ -51,6 +53,7 @@ /** * The type Request body builder. + * * @author bnasslahsen */ public class RequestBodyService { @@ -68,7 +71,7 @@ public class RequestBodyService { /** * Instantiates a new Request body builder. * - * @param parameterBuilder the parameter builder + * @param parameterBuilder the parameter builder * @param propertyResolverUtils the property resolver utils */ public RequestBodyService(GenericParameterService parameterBuilder, PropertyResolverUtils propertyResolverUtils) { @@ -80,12 +83,12 @@ public RequestBodyService(GenericParameterService parameterBuilder, PropertyReso /** * Build request body from doc optional. * - * @param requestBody the request body - * @param requestBodyOp the request body op - * @param methodAttributes the method attributes - * @param components the components + * @param requestBody the request body + * @param requestBodyOp the request body op + * @param methodAttributes the method attributes + * @param components the components * @param jsonViewAnnotation the json view annotation - * @param locale the locale + * @param locale the locale * @return the optional */ public Optional buildRequestBodyFromDoc( @@ -133,14 +136,14 @@ public Optional buildRequestBodyFromDoc( /** * Build resquest body content. * - * @param requestBody the request body - * @param requestBodyOp the request body op - * @param methodAttributes the method attributes - * @param components the components + * @param requestBody the request body + * @param requestBodyOp the request body op + * @param methodAttributes the method attributes + * @param components the components * @param jsonViewAnnotation the json view annotation - * @param classConsumes the class consumes - * @param methodConsumes the method consumes - * @param requestBodyObject the request body object + * @param classConsumes the class consumes + * @param methodConsumes the method consumes + * @param requestBodyObject the request body object */ private void buildResquestBodyContent(io.swagger.v3.oas.annotations.parameters.RequestBody requestBody, RequestBody requestBodyOp, MethodAttributes methodAttributes, Components components, JsonView jsonViewAnnotation, String[] classConsumes, String[] methodConsumes, RequestBody requestBodyObject) { Optional optionalContent = SpringDocAnnotationsUtils @@ -194,9 +197,9 @@ private String[] getConsumes(String[] classConsumes) { /** * Build request body from doc optional. * - * @param requestBody the request body + * @param requestBody the request body * @param methodAttributes the method attributes - * @param components the components + * @param components the components * @return the optional */ public Optional buildRequestBodyFromDoc(io.swagger.v3.oas.annotations.parameters.RequestBody requestBody, @@ -207,11 +210,11 @@ public Optional buildRequestBodyFromDoc(io.swagger.v3.oas.annotatio /** * Build request body from doc optional. * - * @param requestBody the request body - * @param methodAttributes the method attributes - * @param components the components + * @param requestBody the request body + * @param methodAttributes the method attributes + * @param components the components * @param jsonViewAnnotation the json view annotation - * @param locale the locale + * @param locale the locale * @return the optional */ public Optional buildRequestBodyFromDoc(io.swagger.v3.oas.annotations.parameters.RequestBody requestBody, @@ -223,10 +226,11 @@ public Optional buildRequestBodyFromDoc(io.swagger.v3.oas.annotatio /** * Build request body from doc optional. * - * @param requestBody the request body - * @param requestBodyOp the request body op + * @param requestBody the request body + * @param requestBodyOp the request body op * @param methodAttributes the method attributes - * @param components the components + * @param components the components + * @param locale the locale * @return the optional */ public Optional buildRequestBodyFromDoc( @@ -238,10 +242,10 @@ public Optional buildRequestBodyFromDoc( /** * Calculate request body info. * - * @param components the components + * @param components the components * @param methodAttributes the method attributes - * @param parameterInfo the parameter info - * @param requestBodyInfo the request body info + * @param parameterInfo the parameter info + * @param requestBodyInfo the request body info */ public void calculateRequestBodyInfo(Components components, MethodAttributes methodAttributes, ParameterInfo parameterInfo, RequestBodyInfo requestBodyInfo) { @@ -271,11 +275,11 @@ public void calculateRequestBodyInfo(Components components, MethodAttributes met /** * Build request body. * - * @param requestBody the request body - * @param components the components + * @param requestBody the request body + * @param components the components * @param methodAttributes the method attributes - * @param parameterInfo the parameter info - * @param requestBodyInfo the request body info + * @param parameterInfo the parameter info + * @param requestBodyInfo the request body info * @return the request body */ private RequestBody buildRequestBody(RequestBody requestBody, Components components, @@ -311,9 +315,9 @@ else if (!methodAttributes.isWithResponseBodySchemaDoc()) { /** * Merge content. * - * @param requestBody the request body + * @param requestBody the request body * @param methodAttributes the method attributes - * @param schema the schema + * @param schema the schema */ private void mergeContent(RequestBody requestBody, MethodAttributes methodAttributes, Schema schema) { Content content = requestBody.getContent(); @@ -323,9 +327,9 @@ private void mergeContent(RequestBody requestBody, MethodAttributes methodAttrib /** * Build content. * - * @param requestBody the request body + * @param requestBody the request body * @param methodAttributes the method attributes - * @param schema the schema + * @param schema the schema */ private void buildContent(RequestBody requestBody, MethodAttributes methodAttributes, Schema schema) { Content content = new Content(); @@ -335,10 +339,10 @@ private void buildContent(RequestBody requestBody, MethodAttributes methodAttrib /** * Build content. * - * @param requestBody the request body + * @param requestBody the request body * @param methodAttributes the method attributes - * @param schema the schema - * @param content the content + * @param schema the schema + * @param content the content */ private void buildContent(RequestBody requestBody, MethodAttributes methodAttributes, Schema schema, Content content) { for (String value : methodAttributes.getMethodConsumes()) { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/SecuritySchemePair.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/SecuritySchemePair.java index 7db605bf5..a4be06409 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/SecuritySchemePair.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/SecuritySchemePair.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.service; @@ -28,6 +30,7 @@ /** * The type Security scheme pair. + * * @author bnasslahsen */ record SecuritySchemePair(String key, SecurityScheme securityScheme) {} diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/SecurityService.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/SecurityService.java index 9af4243d8..b80c7b555 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/SecurityService.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/SecurityService.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.service; @@ -52,6 +54,7 @@ /** * The type Security parser. + * * @author bnasslahsen */ public class SecurityService { @@ -134,7 +137,7 @@ public io.swagger.v3.oas.annotations.security.SecurityRequirement[] getSecurityR /** * Gets security requirements for method. * - * @param method the method + * @param method the method * @param allSecurityTags the all security tags * @return the security requirements for method */ @@ -177,7 +180,7 @@ public Set getSecuri /** * Add security requirements set. * - * @param allSecurityTags the all security tags + * @param allSecurityTags the all security tags * @param securityRequirementsClassList the security requirements class list * @return the set */ @@ -218,10 +221,10 @@ public Optional> getSecurityRequirements( * Gets security scheme. * * @param securityScheme the security scheme - * @param locale the locale + * @param locale the locale * @return the security scheme */ - Optional getSecurityScheme( + Optional getSecurityScheme( io.swagger.v3.oas.annotations.security.SecurityScheme securityScheme, Locale locale) { if (securityScheme == null) return Optional.empty(); @@ -278,7 +281,7 @@ Optional getSecurityScheme( * Build security requirement. * * @param securityRequirements the security requirements - * @param operation the operation + * @param operation the operation */ public void buildSecurityRequirement( io.swagger.v3.oas.annotations.security.SecurityRequirement[] securityRequirements, Operation operation) { @@ -292,7 +295,7 @@ public void buildSecurityRequirement( * Gets o auth flows. * * @param oAuthFlows the o auth flows - * @param locale the locale + * @param locale the locale * @return the o auth flows */ private Optional getOAuthFlows(io.swagger.v3.oas.annotations.security.OAuthFlows oAuthFlows, Locale locale) { @@ -321,7 +324,7 @@ private Optional getOAuthFlows(io.swagger.v3.oas.annotations.securit * Gets o auth flow. * * @param oAuthFlow the o auth flow - * @param locale the locale + * @param locale the locale * @return the o auth flow */ private Optional getOAuthFlow(io.swagger.v3.oas.annotations.security.OAuthFlow oAuthFlow, Locale locale) { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/Constants.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/Constants.java index a3ff8bb9e..117f61227 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/Constants.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/Constants.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.utils; @@ -30,6 +32,7 @@ /** * The type Constants. + * * @author bnasslahsen */ public final class Constants { @@ -410,6 +413,7 @@ public final class Constants { * The constant SPRINGDOC_NULLABLE_REQUEST_PARAMETER_ENABLED. */ public static final String SPRINGDOC_NULLABLE_REQUEST_PARAMETER_ENABLED = "springdoc.nullable-request-parameter-enabled"; + /** * Instantiates a new Constants. */ diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/EntityInfo.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/EntityInfo.java index b4356f0d1..2eb485792 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/EntityInfo.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/EntityInfo.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.utils; @@ -29,6 +31,7 @@ /** * The type Entity info. + * * @author bnasslashen */ public class EntityInfo { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/PropertyResolverUtils.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/PropertyResolverUtils.java index e70e9666e..fc0a580a8 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/PropertyResolverUtils.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/PropertyResolverUtils.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.utils; @@ -99,9 +101,6 @@ public String resolve(String parameterProperty, Locale locale) { } if (parameterProperty.equals(result)) try { - if (springDocConfigProperties.isTrimKotlinIndent()) { - parameterProperty = trimIndent(parameterProperty); - } result = factory.resolveEmbeddedValue(parameterProperty); } catch (IllegalArgumentException ex) { @@ -119,19 +118,30 @@ public String resolve(String parameterProperty, Locale locale) { * @param text The original string with possible leading indentation. * @return The string with leading indentation removed from each line. */ - private String trimIndent(String text) { - if (text == null) { - return null; + public String trimIndent(String text) { + try { + if (text == null) { + return null; + } + final String newLine = "\n"; + String[] lines = text.split(newLine); + int minIndent = resolveMinIndent(lines); + return Arrays.stream(lines) + .map(line -> line.substring(Math.min(line.length(), minIndent))) + .reduce((a, b) -> a + newLine + b) + .orElse(StringUtils.EMPTY); + } catch (Exception ex){ + LOGGER.warn(ex.getMessage()); + return text; } - final String newLine = "\n"; - String[] lines = text.split(newLine); - int minIndent = resolveMinIndent(lines); - return Arrays.stream(lines) - .map(line -> line.substring(Math.min(line.length(), minIndent))) - .reduce((a, b) -> a + newLine + b) - .orElse(StringUtils.EMPTY); - } + } + /** + * Resolve min indent int. + * + * @param lines the lines + * @return the int + */ private int resolveMinIndent(String[] lines) { return Arrays.stream(lines) .filter(line -> !line.trim().isEmpty()) @@ -140,10 +150,16 @@ private int resolveMinIndent(String[] lines) { .orElse(0); } + /** + * Count leading spaces int. + * + * @param line the line + * @return the int + */ private int countLeadingSpaces(String line) { int count = 0; for (char ch : line.toCharArray()) { - if (ch != ' ') break; + if (ch != ' ' && ch != '\t') break; count++; } return count; @@ -193,6 +209,7 @@ public boolean isOpenapi31() { public boolean isResolveExtensionsProperties() { return springDocConfigProperties.getApiDocs().isResolveExtensionsProperties(); } + /** * Resolve extensions map. * diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/SpringDocAnnotationsUtils.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/SpringDocAnnotationsUtils.java index c532a679a..a22cabc44 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/SpringDocAnnotationsUtils.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/SpringDocAnnotationsUtils.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.utils; @@ -31,9 +33,12 @@ import java.util.Arrays; import java.util.Collections; import java.util.LinkedHashMap; +import java.util.LinkedHashSet; import java.util.List; import java.util.Map; +import java.util.Map.Entry; import java.util.Optional; +import java.util.Set; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonView; @@ -43,6 +48,7 @@ import io.swagger.v3.core.converter.ResolvedSchema; import io.swagger.v3.core.util.AnnotationsUtils; import io.swagger.v3.oas.annotations.Hidden; +import io.swagger.v3.oas.annotations.media.Encoding; import io.swagger.v3.oas.annotations.media.ExampleObject; import io.swagger.v3.oas.annotations.media.SchemaProperty; import io.swagger.v3.oas.models.Components; @@ -65,6 +71,7 @@ /** * The type Spring doc annotations utils. + * * @author bnasslahsen */ @SuppressWarnings({ "rawtypes" }) @@ -139,13 +146,24 @@ public static Schema extractSchema(Components components, Type returnType, JsonV componentSchemas.putAll(schemaMap); } else - for (Map.Entry entry : schemaMap.entrySet()) { + for (Entry entry : schemaMap.entrySet()) { // If we've seen this schema before but find later it should be polymorphic, // replace the existing schema with this richer version. + Schema existingSchema = componentSchemas.get(entry.getKey()); if (!componentSchemas.containsKey(entry.getKey()) || - (!entry.getValue().getClass().equals(componentSchemas.get(entry.getKey()).getClass()) && entry.getValue().getAllOf() != null)) { + (!entry.getValue().getClass().equals(existingSchema.getClass()) && entry.getValue().getAllOf() != null)) { componentSchemas.put(entry.getKey(), entry.getValue()); } + else if (componentSchemas.containsKey(entry.getKey()) && schemaMap.containsKey(entry.getKey())) { + // Check to merge polymorphic types + Set existingAllOf = new LinkedHashSet<>(); + if(existingSchema.getAllOf() != null) + existingAllOf.addAll(existingSchema.getAllOf()); + if (schemaMap.get(entry.getKey()).getAllOf() != null){ + existingAllOf.addAll(schemaMap.get(entry.getKey()).getAllOf()); + existingSchema.setAllOf(new ArrayList<>(existingAllOf)); + } + } } components.setSchemas(componentSchemas); } @@ -186,7 +204,7 @@ public static Optional getContent(io.swagger.v3.oas.annotations.media.C ExampleObject[] examples = annotationContent.examples(); setExamples(mediaType, examples); addExtension(annotationContent, mediaType, openapi31); - io.swagger.v3.oas.annotations.media.Encoding[] encodings = annotationContent.encoding(); + Encoding[] encodings = annotationContent.encoding(); addEncodingToMediaType(jsonViewAnnotation, mediaType, encodings, openapi31); if (StringUtils.isNotBlank(annotationContent.mediaType())) { content.addMediaType(annotationContent.mediaType(), mediaType); @@ -207,8 +225,8 @@ public static Optional getContent(io.swagger.v3.oas.annotations.media.C * Merge schema. * * @param existingContent the existing content - * @param schemaN the schema n - * @param mediaTypeStr the media type str + * @param schemaN the schema n + * @param mediaTypeStr the media type str */ public static void mergeSchema(Content existingContent, Schema schemaN, String mediaTypeStr) { if (existingContent.containsKey(mediaTypeStr)) { @@ -216,9 +234,12 @@ public static void mergeSchema(Content existingContent, Schema schemaN, Strin if (!schemaN.equals(mediaType.getSchema())) { // Merge the two schemas for the same mediaType Schema firstSchema = mediaType.getSchema(); - ComposedSchema schemaObject; - if (firstSchema instanceof ComposedSchema) { - schemaObject = (ComposedSchema) firstSchema; + Schema schemaObject = null; + if (firstSchema == null) { + schemaObject = schemaN; + } + else if (firstSchema instanceof ComposedSchema) { + schemaObject = firstSchema; List listOneOf = schemaObject.getOneOf(); if (!CollectionUtils.isEmpty(listOneOf) && !listOneOf.contains(schemaN)) schemaObject.addOneOfItem(schemaN); @@ -297,8 +318,8 @@ public static void removeAnnotationsToIgnore(Class... classes) { * @param openapi31 the openapi 31 */ private static void addEncodingToMediaType(JsonView jsonViewAnnotation, MediaType mediaType, - io.swagger.v3.oas.annotations.media.Encoding[] encodings, boolean openapi31) { - for (io.swagger.v3.oas.annotations.media.Encoding encoding : encodings) { + Encoding[] encodings, boolean openapi31) { + for (Encoding encoding : encodings) { addEncodingToMediaType(mediaType, encoding, jsonViewAnnotation, openapi31); } } @@ -322,7 +343,7 @@ private static void addExtension(io.swagger.v3.oas.annotations.media.Content ann * Sets examples. * * @param mediaType the media type - * @param examples the examples + * @param examples the examples */ private static void setExamples(MediaType mediaType, ExampleObject[] examples) { if (examples.length == 1 && StringUtils.isBlank(examples[0].name())) { @@ -436,7 +457,7 @@ private static boolean isArray(io.swagger.v3.oas.annotations.media.Content annot * Resolve default value object. * * @param defaultValueStr the default value str - * @param objectMapper the object mapper + * @param objectMapper the object mapper * @return the object */ public static Object resolveDefaultValue(String defaultValueStr, ObjectMapper objectMapper) { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/SpringDocDataRestUtils.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/SpringDocDataRestUtils.java index 79ce8f660..193ef097a 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/SpringDocDataRestUtils.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/SpringDocDataRestUtils.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.utils; @@ -65,6 +67,7 @@ /** * The class Spring doc data rest utils. + * * @author bnasslashen */ public class SpringDocDataRestUtils { @@ -102,7 +105,7 @@ public class SpringDocDataRestUtils { /** * Instantiates a new Spring doc data rest utils. * - * @param linkRelationProvider the link relation provider + * @param linkRelationProvider the link relation provider * @param repositoryRestConfiguration the repository rest configuration */ public SpringDocDataRestUtils(LinkRelationProvider linkRelationProvider, RepositoryRestConfiguration repositoryRestConfiguration) { @@ -113,8 +116,8 @@ public SpringDocDataRestUtils(LinkRelationProvider linkRelationProvider, Reposit /** * Customise. * - * @param openAPI the open api - * @param mappings the mappings + * @param openAPI the open api + * @param mappings the mappings * @param persistentEntities the persistent entities */ public void customise(OpenAPI openAPI, ResourceMappings mappings, PersistentEntities persistentEntities) { @@ -161,7 +164,7 @@ private void updateApiResponse(OpenAPI openAPI, Components components, ApiRespon apiResponse.getContent().values().forEach(mediaType -> { Schema schema = mediaType.getSchema(); if (schema.get$ref() != null && !schema.get$ref().endsWith(RESPONSE)) { - String key = schema.get$ref().substring(21); + String key = schema.get$ref().substring(Components.COMPONENTS_SCHEMAS_REF.length()); Set entitiesNames = entityInoMap.keySet(); entitiesNames.forEach(entityName -> { if (key.endsWith(entityName)) @@ -184,7 +187,7 @@ private void updateRequestBody(OpenAPI openAPI, RequestBody requestBody, boolean requestBody.getContent().values().forEach(mediaType -> { Schema schema = mediaType.getSchema(); if (schema.get$ref() != null && !schema.get$ref().endsWith(REQUEST_BODY)) { - String key = schema.get$ref().substring(21); + String key = schema.get$ref().substring(Components.COMPONENTS_SCHEMAS_REF.length()); if (entityInoMap.containsKey(key)) updateRequestBodySchema(key, schema, openAPI.getComponents(), openapi31); } @@ -227,6 +230,13 @@ private void updateRequestBodySchema(String className, Schema schema, Components } } + /** + * Update request body schema properties. + * + * @param key the key + * @param referencedSchema the referenced schema + * @param properties the properties + */ private void updateRequestBodySchemaProperties(String key, Schema referencedSchema, Map properties) { if (!CollectionUtils.isEmpty(referencedSchema.getProperties())) { Iterator> it = properties.entrySet().iterator(); @@ -285,7 +295,7 @@ private void updateResponseSchemaEmbedded(Components components, EntityInfo enti Schema itemsSchema = arraySchema.getItems(); Set entitiesNames = entityInoMap.keySet(); if (itemsSchema.get$ref() != null && !itemsSchema.get$ref().endsWith(RESPONSE)) { - String key = itemsSchema.get$ref().substring(21); + String key = itemsSchema.get$ref().substring(Components.COMPONENTS_SCHEMAS_REF.length()); if (entitiesNames.contains(key)) { String newKey = itemsSchema.get$ref() + RESPONSE; createNewResponseSchema(key, components, openapi31); @@ -380,7 +390,7 @@ private void updateKey(List allSchemas, String suffix, Components compon if (!CollectionUtils.isEmpty(allSchemas)) for (Schema allSchema : allSchemas) { if (allSchema.get$ref() != null) { - String allKey = allSchema.get$ref().substring(21); + String allKey = allSchema.get$ref().substring(Components.COMPONENTS_SCHEMAS_REF.length()); updateSingleKey(suffix, components, allSchema, allKey, openapi31); } } @@ -409,7 +419,7 @@ private void updateSingleKey(String suffix, Components components, Schema allSch * Gets associations fields. * * @param resourceMetadata the resource metadata - * @param entity the entity + * @param entity the entity * @return the associations fields */ private List getAssociationsFields(ResourceMetadata @@ -430,7 +440,7 @@ private List getAssociationsFields(ResourceMetadata * Gets ignored fields. * * @param resourceMetadata the resource metadata - * @param entity the entity + * @param entity the entity * @return the ignored fields */ private List getIgnoredFields(ResourceMetadata diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/SpringDocPropertiesUtils.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/SpringDocPropertiesUtils.java index 9e53c7200..ac40d0f56 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/SpringDocPropertiesUtils.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/SpringDocPropertiesUtils.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.utils; @@ -33,6 +35,7 @@ /** * The interface Spring doc properties utils. + * * @author bnasslahsen */ public interface SpringDocPropertiesUtils { @@ -40,21 +43,19 @@ public interface SpringDocPropertiesUtils { /** * Put. * - * @param name the name - * @param value the value + * @param name the name + * @param value the value * @param params the params */ static void put(String name, List value, Map params) { - if (!CollectionUtils.isEmpty(value)) { params.put(name, value); - } } /** * Put. * - * @param name the name - * @param value the value + * @param name the name + * @param value the value * @param params the params */ static void put(final String name, final Integer value, final Map params) { @@ -66,8 +67,8 @@ static void put(final String name, final Integer value, final Map params) { @@ -79,8 +80,8 @@ static void put(final String name, final Boolean value, final Map params) { @@ -92,8 +93,8 @@ static void put(final String name, final String value, final Map /** * Put. * - * @param name the name - * @param value the value + * @param name the name + * @param value the value * @param params the params */ static void put(String name, Map value, Map params) { diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/SpringDocUtils.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/SpringDocUtils.java index 09175e6e4..d5a793f77 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/SpringDocUtils.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/SpringDocUtils.java @@ -3,41 +3,50 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.core.utils; import java.lang.annotation.Annotation; +import java.util.ArrayList; +import java.util.List; import java.util.function.Predicate; import io.swagger.v3.oas.models.media.Schema; +import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; +import org.jetbrains.annotations.NotNull; import org.springdoc.api.AbstractOpenApiResource; import org.springdoc.core.converters.AdditionalModelsConverter; import org.springdoc.core.converters.ConverterUtils; +import org.springdoc.core.converters.PolymorphicModelConverter; import org.springdoc.core.converters.SchemaPropertyDeprecatingConverter; import org.springdoc.core.extractor.MethodParameterPojoExtractor; import org.springdoc.core.service.AbstractRequestService; import org.springdoc.core.service.GenericParameterService; import org.springdoc.core.service.GenericResponseService; +import org.springframework.core.MethodParameter; + /** * The type Spring doc utils. * @@ -388,5 +397,50 @@ public static boolean isValidPath(String path) { return true; return false; } + + /** + * Add parent type spring doc utils. + * + * @param parentTypes the parent types + * @return the spring doc utils + */ + public SpringDocUtils addParentType(String ...parentTypes) { + PolymorphicModelConverter.addParentType(parentTypes); + return this; + } + + /** + * Gets parameter annotations. + * + * @param methodParameter the method parameter + * @return the parameter annotations + */ + @NotNull + public static Annotation[] getParameterAnnotations(MethodParameter methodParameter) { + // Get the parameter annotations directly as an array + Annotation[] annotations = methodParameter.getParameterAnnotations(); + // Return early if no annotations are found, avoiding unnecessary processing + if (ArrayUtils.isEmpty(annotations)) { + return new Annotation[0]; + } + // Create a list that can contain both parameter and meta-annotations + List resultAnnotations = new ArrayList<>(annotations.length); + + // Add all direct annotations + resultAnnotations.addAll(List.of(annotations)); + + // Process each direct annotation to collect its meta-annotations + for (Annotation annotation : annotations) { + // Fetch meta-annotations + Annotation[] metaAnnotations = annotation.annotationType().getAnnotations(); + + // Only add meta-annotations if they exist + if (ArrayUtils.isNotEmpty(metaAnnotations)) { + resultAnnotations.addAll(List.of(metaAnnotations)); + } + } + // Convert the list to an array and return + return resultAnnotations.toArray(new Annotation[0]); + } } diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/ui/AbstractSwaggerIndexTransformer.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/ui/AbstractSwaggerIndexTransformer.java index 9877b1ae0..4f7e3cf32 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/ui/AbstractSwaggerIndexTransformer.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/ui/AbstractSwaggerIndexTransformer.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.ui; @@ -47,6 +49,7 @@ /** * The type Abstract swagger index transformer. + * * @author bnasslahsen */ public class AbstractSwaggerIndexTransformer { @@ -61,11 +64,6 @@ public class AbstractSwaggerIndexTransformer { */ protected SwaggerUiOAuthProperties swaggerUiOAuthProperties; - /** - * The Swagger ui config parameters. - */ - protected SwaggerUiConfigParameters swaggerUiConfigParameters; - /** * The Object mapper. */ @@ -79,15 +77,13 @@ public class AbstractSwaggerIndexTransformer { /** * Instantiates a new Abstract swagger index transformer. * - * @param swaggerUiConfig the swagger ui config + * @param swaggerUiConfig the swagger ui config * @param swaggerUiOAuthProperties the swagger ui o auth properties - * @param swaggerUiConfigParameters the swagger ui config parameters - * @param objectMapperProvider the object mapper provider + * @param objectMapperProvider the object mapper provider */ - public AbstractSwaggerIndexTransformer(SwaggerUiConfigProperties swaggerUiConfig, SwaggerUiOAuthProperties swaggerUiOAuthProperties, SwaggerUiConfigParameters swaggerUiConfigParameters, ObjectMapperProvider objectMapperProvider) { + public AbstractSwaggerIndexTransformer(SwaggerUiConfigProperties swaggerUiConfig, SwaggerUiOAuthProperties swaggerUiOAuthProperties, ObjectMapperProvider objectMapperProvider) { this.swaggerUiConfig = swaggerUiConfig; this.swaggerUiOAuthProperties = swaggerUiOAuthProperties; - this.swaggerUiConfigParameters = swaggerUiConfigParameters; this.objectMapper = objectMapperProvider.jsonMapper(); } @@ -138,7 +134,7 @@ protected String overwriteSwaggerDefaultUrl(String html) { /** * Setting the url configured with swagger ui properties * - * @param html + * @param html the html * @return modifed html */ protected String setConfiguredApiDocsUrl(String html){ @@ -148,11 +144,12 @@ protected String setConfiguredApiDocsUrl(String html){ /** * Default transformations string. * - * @param inputStream the input stream + * @param swaggerUiConfigParameters the swagger ui config parameters + * @param inputStream the input stream * @return the string * @throws IOException the io exception */ - protected String defaultTransformations(InputStream inputStream) throws IOException { + protected String defaultTransformations(SwaggerUiConfigParameters swaggerUiConfigParameters, InputStream inputStream) throws IOException { String html = readFullyAsString(inputStream); if (!CollectionUtils.isEmpty(swaggerUiOAuthProperties.getConfigParameters())) html = addInitOauth(html); @@ -170,7 +167,7 @@ else if (swaggerUiConfig.getCsrf().isUseSessionStorage()) html = addSyntaxHighlight(html); if (swaggerUiConfig.getQueryConfigEnabled() == null || !swaggerUiConfig.getQueryConfigEnabled()) - html = addParameters(html); + html = addParameters(html, swaggerUiConfigParameters); else html = addParameter(html, QUERY_CONFIG_ENABLED_PROPERTY, swaggerUiConfig.getQueryConfigEnabled().toString()); @@ -187,11 +184,12 @@ else if (swaggerUiConfig.getCsrf().isUseSessionStorage()) /** * Add parameters string. * - * @param html the html + * @param html the html + * @param swaggerUiConfigParameters the swagger ui config parameters * @return the string * @throws JsonProcessingException the json processing exception */ - protected String addParameters(String html) throws JsonProcessingException { + protected String addParameters(String html, SwaggerUiConfigParameters swaggerUiConfigParameters) throws JsonProcessingException { String layout = swaggerUiConfigParameters.getLayout() != null ? swaggerUiConfigParameters.getLayout() : "StandaloneLayout"; StringBuilder stringBuilder = new StringBuilder("layout: \"" + layout + "\" ,\n"); @@ -214,6 +212,14 @@ protected String addParameters(String html) throws JsonProcessingException { return html; } + /** + * Add parameter string. + * + * @param html the html + * @param key the key + * @param value the value + * @return the string + */ private String addParameter(String html, String key, String value) { StringBuilder stringBuilder = new StringBuilder("window.ui = SwaggerUIBundle({\n"); stringBuilder.append(key + ": \"" + value + "\","); diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/ui/AbstractSwaggerResourceResolver.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/ui/AbstractSwaggerResourceResolver.java deleted file mode 100644 index 1ead80c67..000000000 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/ui/AbstractSwaggerResourceResolver.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.springdoc.ui; - -import java.nio.file.Path; -import java.nio.file.Paths; - -import org.springdoc.core.properties.SwaggerUiConfigProperties; - -import org.springframework.lang.Nullable; - -/** - * The type Web jars version resource resolver. - * - * @author bnasslahsen - */ -public class AbstractSwaggerResourceResolver { - - /** - * The Swagger ui config properties. - */ - private final SwaggerUiConfigProperties swaggerUiConfigProperties; - - /** - * Instantiates a new Web jars version resource resolver. - * - * @param swaggerUiConfigProperties the swagger ui config properties - */ - public AbstractSwaggerResourceResolver(SwaggerUiConfigProperties swaggerUiConfigProperties) { - this.swaggerUiConfigProperties = swaggerUiConfigProperties; - } - - /** - * Find web jar resource path string. - * - * @param pathStr the path - * @return the string - */ - @Nullable - protected String findWebJarResourcePath(String pathStr) { - Path path = Paths.get(pathStr); - if (path.getNameCount() < 2) return null; - String version = swaggerUiConfigProperties.getVersion(); - if (version == null) return null; - Path first = path.getName(0); - Path rest = path.subpath(1, path.getNameCount()); - return first.resolve(version).resolve(rest).toString(); - } - -} diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/ui/AbstractSwaggerWelcome.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/ui/AbstractSwaggerWelcome.java index 888e80a62..da2f279d3 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/ui/AbstractSwaggerWelcome.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/ui/AbstractSwaggerWelcome.java @@ -3,27 +3,31 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.ui; +import java.util.Objects; + import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; import org.springdoc.core.properties.SpringDocConfigProperties; @@ -55,52 +59,32 @@ public abstract class AbstractSwaggerWelcome { */ protected final SpringDocConfigProperties springDocConfigProperties; - /** - * The Swagger ui calculated config. - */ - protected final SwaggerUiConfigParameters swaggerUiConfigParameters; - - /** - * The Swagger config url. - */ - protected String swaggerConfigUrl; - - /** - * The Api docs url. - */ - protected String apiDocsUrl; - - /** - * The Context path. - */ - protected String contextPath; - /** * Instantiates a new Abstract swagger welcome. * - * @param swaggerUiConfig the swagger ui config + * @param swaggerUiConfig the swagger ui config * @param springDocConfigProperties the spring doc config properties - * @param swaggerUiConfigParameters the swagger ui config parameters */ - public AbstractSwaggerWelcome(SwaggerUiConfigProperties swaggerUiConfig, SpringDocConfigProperties springDocConfigProperties, SwaggerUiConfigParameters swaggerUiConfigParameters) { + protected AbstractSwaggerWelcome(SwaggerUiConfigProperties swaggerUiConfig, SpringDocConfigProperties springDocConfigProperties) { this.swaggerUiConfig = swaggerUiConfig; this.springDocConfigProperties = springDocConfigProperties; - this.swaggerUiConfigParameters = swaggerUiConfigParameters; } /** * Init. + * + * @param swaggerUiConfigParameters the swagger ui config parameters */ - protected void init() { + protected void init(SwaggerUiConfigParameters swaggerUiConfigParameters) { springDocConfigProperties.getGroupConfigs().forEach(groupConfig -> swaggerUiConfigParameters.addGroup(groupConfig.getGroup(), groupConfig.getDisplayName())); - calculateUiRootPath(); + calculateUiRootPath(swaggerUiConfigParameters); } /** * Build url string. * * @param contextPath the context path - * @param docsUrl the docs url + * @param docsUrl the docs url * @return the string */ protected String buildUrl(String contextPath, String docsUrl) { @@ -115,51 +99,59 @@ protected String buildUrl(String contextPath, String docsUrl) { /** * Build config url. * - * @param uriComponentsBuilder the uri components builder + * @param swaggerUiConfigParameters the swagger ui config parameters + * @param uriComponentsBuilder the uri components builder */ - protected void buildConfigUrl(UriComponentsBuilder uriComponentsBuilder) { + protected void buildConfigUrl(SwaggerUiConfigParameters swaggerUiConfigParameters, UriComponentsBuilder uriComponentsBuilder) { if (StringUtils.isEmpty(swaggerUiConfig.getConfigUrl())) { - apiDocsUrl = buildApiDocUrl(); - swaggerConfigUrl = buildSwaggerConfigUrl(); - swaggerUiConfigParameters.setConfigUrl(swaggerConfigUrl); + buildApiDocUrl(swaggerUiConfigParameters); + buildSwaggerConfigUrl(swaggerUiConfigParameters); if (CollectionUtils.isEmpty(swaggerUiConfigParameters.getUrls())) { String swaggerUiUrl = swaggerUiConfig.getUrl(); if (StringUtils.isEmpty(swaggerUiUrl)) - swaggerUiConfigParameters.setUrl(apiDocsUrl); + swaggerUiConfigParameters.setUrl(swaggerUiConfigParameters.getApiDocsUrl()); else if (swaggerUiConfigParameters.isValidUrl(swaggerUiUrl)) swaggerUiConfigParameters.setUrl(swaggerUiUrl); else - swaggerUiConfigParameters.setUrl(buildUrlWithContextPath(swaggerUiUrl)); + swaggerUiConfigParameters.setUrl(buildUrlWithContextPath(swaggerUiConfigParameters, swaggerUiUrl)); } else - swaggerUiConfigParameters.addUrl(apiDocsUrl); + swaggerUiConfigParameters.addUrl(swaggerUiConfigParameters.getApiDocsUrl()); if (!CollectionUtils.isEmpty(swaggerUiConfig.getUrls())) { - swaggerUiConfig.cloneUrls().forEach(swaggerUrl -> { - swaggerUiConfigParameters.getUrls().remove(swaggerUrl); - if (!swaggerUiConfigParameters.isValidUrl(swaggerUrl.getUrl())) - swaggerUrl.setUrl(buildUrlWithContextPath(swaggerUrl.getUrl())); - swaggerUiConfigParameters.getUrls().add(swaggerUrl); - }); + swaggerUiConfig.cloneUrls() + .stream() + .filter(swaggerUrl -> !swaggerUiConfigParameters.isValidUrl(swaggerUrl.getUrl())) + .forEach(swaggerUrl -> { + final var url = buildUrlWithContextPath(swaggerUiConfigParameters, swaggerUrl.getUrl()); + if (!Objects.equals(url, swaggerUrl.getUrl())) { + swaggerUiConfigParameters.getUrls() + .stream() + .filter(swaggerUrl::equals) + .forEach(subUrl -> subUrl.setUrl(url)); + } + }); } } - calculateOauth2RedirectUrl(uriComponentsBuilder); + calculateOauth2RedirectUrl(swaggerUiConfigParameters, uriComponentsBuilder); } /** * Build swagger ui url string. * - * @param swaggerUiUrl the swagger ui url + * @param swaggerUiConfigParameters the swagger ui config parameters + * @param swaggerUiUrl the swagger ui url * @return the string */ - protected abstract String buildUrlWithContextPath(String swaggerUiUrl); + protected abstract String buildUrlWithContextPath(SwaggerUiConfigParameters swaggerUiConfigParameters, String swaggerUiUrl); /** * Gets uri components builder. * - * @param sbUrl the sb url + * @param swaggerUiConfigParameters the swagger ui config parameters + * @param sbUrl the sb url * @return the uri components builder */ - protected UriComponentsBuilder getUriComponentsBuilder(String sbUrl) { + protected UriComponentsBuilder getUriComponentsBuilder(SwaggerUiConfigParameters swaggerUiConfigParameters, String sbUrl) { UriComponentsBuilder uriBuilder = UriComponentsBuilder.fromUriString(sbUrl); if ((swaggerUiConfig.getQueryConfigEnabled() != null && swaggerUiConfig.getQueryConfigEnabled())) { swaggerUiConfigParameters.getConfigParameters().entrySet().stream() @@ -177,24 +169,27 @@ protected UriComponentsBuilder getUriComponentsBuilder(String sbUrl) { /** * Calculate oauth 2 redirect url. * - * @param uriComponentsBuilder the uri components builder + * @param swaggerUiConfigParameters the swagger ui config parameters + * @param uriComponentsBuilder the uri components builder */ - protected abstract void calculateOauth2RedirectUrl(UriComponentsBuilder uriComponentsBuilder); + protected abstract void calculateOauth2RedirectUrl(SwaggerUiConfigParameters swaggerUiConfigParameters, UriComponentsBuilder uriComponentsBuilder); /** * Calculate ui root path. * - * @param sbUrls the sb urls + * @param swaggerUiConfigParameters the swagger ui config parameters + * @param sbUrls the sb urls */ - protected abstract void calculateUiRootPath(StringBuilder... sbUrls); + protected abstract void calculateUiRootPath(SwaggerUiConfigParameters swaggerUiConfigParameters,StringBuilder... sbUrls); /** * Calculate ui root common. * - * @param sbUrl the sb url - * @param sbUrls the sb urls + * @param swaggerUiConfigParameters the swagger ui config parameters + * @param sbUrl the sb url + * @param sbUrls the sb urls */ - protected void calculateUiRootCommon(StringBuilder sbUrl, StringBuilder[] sbUrls) { + protected void calculateUiRootCommon(SwaggerUiConfigParameters swaggerUiConfigParameters, StringBuilder sbUrl, StringBuilder[] sbUrls) { if (ArrayUtils.isNotEmpty(sbUrls)) sbUrl = sbUrls[0]; String swaggerPath = swaggerUiConfigParameters.getPath(); @@ -206,16 +201,16 @@ protected void calculateUiRootCommon(StringBuilder sbUrl, StringBuilder[] sbUrls /** * Build api doc url string. * - * @return the string + * @param swaggerUiConfigParameters the swagger ui config parameters */ - protected abstract String buildApiDocUrl(); + protected abstract void buildApiDocUrl(SwaggerUiConfigParameters swaggerUiConfigParameters); /** * Build swagger config url string. * - * @return the string + * @param swaggerUiConfigParameters the swagger ui config parameters */ - protected abstract String buildSwaggerConfigUrl(); + protected abstract void buildSwaggerConfigUrl(SwaggerUiConfigParameters swaggerUiConfigParameters); /** * Gets oauth2 redirect url. diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/ui/SpringDocUIException.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/ui/SpringDocUIException.java index e4e906af4..9472d387d 100644 --- a/springdoc-openapi-starter-common/src/main/java/org/springdoc/ui/SpringDocUIException.java +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/ui/SpringDocUIException.java @@ -3,29 +3,32 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.ui; /** * The type Spring doc ui exception. + * * @author bnasslahsen */ public class SpringDocUIException extends RuntimeException { @@ -34,7 +37,7 @@ public class SpringDocUIException extends RuntimeException { * Instantiates a new Spring doc ui exception. * * @param message the message - * @param cause the cause + * @param cause the cause */ public SpringDocUIException(String message, Throwable cause) { super(message, cause); diff --git a/springdoc-openapi-starter-common/src/main/java/org/springdoc/ui/SwaggerResourceResolverUtils.java b/springdoc-openapi-starter-common/src/main/java/org/springdoc/ui/SwaggerResourceResolverUtils.java new file mode 100644 index 000000000..41e85934c --- /dev/null +++ b/springdoc-openapi-starter-common/src/main/java/org/springdoc/ui/SwaggerResourceResolverUtils.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 org.springdoc.ui; + +import java.nio.file.Path; +import java.nio.file.Paths; + +/** + * The interface Swagger resource resolver utils. + * + * @author bnasslahsen + */ +public interface SwaggerResourceResolverUtils { + + /** + * Find swagger resource path string. + * + * @param pathStr the path + * @param version the version + * @return the string + */ + static String findSwaggerResourcePath(String pathStr, String version) { + Path path = Paths.get(pathStr); + if (path.getNameCount() < 2) return null; + if (version == null) return null; + Path first = path.getName(0); + Path rest = path.subpath(1, path.getNameCount()); + return first.resolve(version).resolve(rest).toString(); + } + +} diff --git a/springdoc-openapi-starter-common/src/test/java/org/springdoc/api/AbstractOpenApiResourceTest.java b/springdoc-openapi-starter-common/src/test/java/org/springdoc/api/AbstractOpenApiResourceTest.java index fdf75d7b0..202711f48 100644 --- a/springdoc-openapi-starter-common/src/test/java/org/springdoc/api/AbstractOpenApiResourceTest.java +++ b/springdoc-openapi-starter-common/src/test/java/org/springdoc/api/AbstractOpenApiResourceTest.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -60,10 +60,12 @@ import org.springframework.beans.factory.ObjectFactory; import org.springframework.context.ApplicationContext; +import org.springframework.mock.http.client.MockClientHttpRequest; import org.springframework.test.util.ReflectionTestUtils; import org.springframework.web.bind.annotation.RequestMethod; import static java.util.Arrays.asList; +import static java.util.Collections.singleton; import static java.util.Collections.singletonList; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.containsInAnyOrder; @@ -190,7 +192,7 @@ void preLoadingModeShouldNotOverwriteServers() throws InterruptedException { doCallRealMethod().when(openAPIService).updateServers(any()); when(openAPIService.getCachedOpenAPI(any())).thenCallRealMethod(); doAnswer(new CallsRealMethods()).when(openAPIService).setServersPresent(true); - doAnswer(new CallsRealMethods()).when(openAPIService).setServerBaseUrl(any()); + doAnswer(new CallsRealMethods()).when(openAPIService).setServerBaseUrl(any(), any()); doAnswer(new CallsRealMethods()).when(openAPIService).setCachedOpenAPI(any(), any()); String customUrl = "https://custom.com"; @@ -205,14 +207,14 @@ void preLoadingModeShouldNotOverwriteServers() throws InterruptedException { requestBuilder, responseBuilder, operationParser, - properties, springDocProviders, new SpringDocCustomizers(Optional.of(singletonList(openApiCustomizer)),Optional.empty(),Optional.empty(),Optional.empty()) + properties, springDocProviders, new SpringDocCustomizers(Optional.of(singleton(openApiCustomizer)),Optional.empty(),Optional.empty(),Optional.empty()) ); // wait for executor to be done Thread.sleep(1_000); // emulate generating base url - openAPIService.setServerBaseUrl(generatedUrl); + openAPIService.setServerBaseUrl(generatedUrl, new MockClientHttpRequest()); openAPIService.updateServers(openAPI); Locale locale = Locale.US; OpenAPI after = resource.getOpenApi(locale); @@ -224,7 +226,7 @@ properties, springDocProviders, new SpringDocCustomizers(Optional.of(singletonLi void serverBaseUrlCustomisersTest() throws InterruptedException { doCallRealMethod().when(openAPIService).updateServers(any()); when(openAPIService.getCachedOpenAPI(any())).thenCallRealMethod(); - doAnswer(new CallsRealMethods()).when(openAPIService).setServerBaseUrl(any()); + doAnswer(new CallsRealMethods()).when(openAPIService).setServerBaseUrl(any(), any()); doAnswer(new CallsRealMethods()).when(openAPIService).setCachedOpenAPI(any(), any()); SpringDocConfigProperties properties = new SpringDocConfigProperties(); @@ -247,37 +249,37 @@ springDocProviders, new SpringDocCustomizers(Optional.empty(),Optional.empty(),O // Test that setting generated URL works fine with no customizers present String generatedUrl = "https://generated-url.com/context-path"; - openAPIService.setServerBaseUrl(generatedUrl); + openAPIService.setServerBaseUrl(generatedUrl, new MockClientHttpRequest()); openAPIService.updateServers(openAPI); OpenAPI after = resource.getOpenApi(locale); assertThat(after.getServers().get(0).getUrl(), is(generatedUrl)); // Test that adding a serverBaseUrlCustomizer has the desired effect - ServerBaseUrlCustomizer serverBaseUrlCustomizer = serverBaseUrl -> serverBaseUrl.replace("/context-path", ""); + ServerBaseUrlCustomizer serverBaseUrlCustomizer = (serverBaseUrl, request) -> serverBaseUrl.replace("/context-path", ""); List serverBaseUrlCustomizerList = new ArrayList<>(); serverBaseUrlCustomizerList.add(serverBaseUrlCustomizer); ReflectionTestUtils.setField(openAPIService, "serverBaseUrlCustomizers", Optional.of(serverBaseUrlCustomizerList)); - openAPIService.setServerBaseUrl(generatedUrl); + openAPIService.setServerBaseUrl(generatedUrl, new MockClientHttpRequest()); openAPIService.updateServers(openAPI); after = resource.getOpenApi(locale); assertThat(after.getServers().get(0).getUrl(), is("https://generated-url.com")); // Test that serverBaseUrlCustomisers are performed in order generatedUrl = "https://generated-url.com/context-path/second-path"; - ServerBaseUrlCustomizer serverBaseUrlCustomiser2 = serverBaseUrl -> serverBaseUrl.replace("/context-path/second-path", ""); + ServerBaseUrlCustomizer serverBaseUrlCustomiser2 = (serverBaseUrl, request) -> serverBaseUrl.replace("/context-path/second-path", ""); serverBaseUrlCustomizerList.add(serverBaseUrlCustomiser2); - openAPIService.setServerBaseUrl(generatedUrl); + openAPIService.setServerBaseUrl(generatedUrl, new MockClientHttpRequest()); openAPIService.updateServers(openAPI); after = resource.getOpenApi(locale); assertThat(after.getServers().get(0).getUrl(), is("https://generated-url.com/second-path")); // Test that all serverBaseUrlCustomisers in the List are performed - ServerBaseUrlCustomizer serverBaseUrlCustomiser3 = serverBaseUrl -> serverBaseUrl.replace("/second-path", ""); + ServerBaseUrlCustomizer serverBaseUrlCustomiser3 = (serverBaseUrl, request) -> serverBaseUrl.replace("/second-path", ""); serverBaseUrlCustomizerList.add(serverBaseUrlCustomiser3); - openAPIService.setServerBaseUrl(generatedUrl); + openAPIService.setServerBaseUrl(generatedUrl, new MockClientHttpRequest()); openAPIService.updateServers(openAPI); after = resource.getOpenApi(locale); assertThat(after.getServers().get(0).getUrl(), is("https://generated-url.com")); @@ -290,7 +292,6 @@ private static class EmptyPathsOpenApiResource extends AbstractOpenApiResource { } @Override - public void getPaths(Map findRestControllers, Locale locale, OpenAPI openAPI) { - } + public void getPaths(Map findRestControllers, Locale locale, OpenAPI openAPI) {} } } \ No newline at end of file diff --git a/springdoc-openapi-starter-common/src/test/java/org/springdoc/core/configuration/SpringDocHateoasConfigurationTest.java b/springdoc-openapi-starter-common/src/test/java/org/springdoc/core/configuration/SpringDocHateoasConfigurationTest.java index c99de580c..91e3029bb 100644 --- a/springdoc-openapi-starter-common/src/test/java/org/springdoc/core/configuration/SpringDocHateoasConfigurationTest.java +++ b/springdoc-openapi-starter-common/src/test/java/org/springdoc/core/configuration/SpringDocHateoasConfigurationTest.java @@ -32,8 +32,8 @@ void linksSchemaCustomizerShouldBeRegistered() { )) .run(context -> { assertThat(context).getBeanNames(GlobalOpenApiCustomizer.class) - .hasSize(1) - .containsExactly(LINKS_SCHEMA_CUSTOMISER); + .hasSize(2) + .contains(LINKS_SCHEMA_CUSTOMISER); assertThat(context.getBean(LINKS_SCHEMA_CUSTOMISER)).isExactlyInstanceOf(OpenApiHateoasLinksCustomizer.class); }); } diff --git a/springdoc-openapi-starter-common/src/test/java/org/springdoc/core/extractor/MethodParameterPojoExtractorTest.java b/springdoc-openapi-starter-common/src/test/java/org/springdoc/core/extractor/MethodParameterPojoExtractorTest.java index 088192515..220b2f821 100644 --- a/springdoc-openapi-starter-common/src/test/java/org/springdoc/core/extractor/MethodParameterPojoExtractorTest.java +++ b/springdoc-openapi-starter-common/src/test/java/org/springdoc/core/extractor/MethodParameterPojoExtractorTest.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -42,6 +42,9 @@ class MethodParameterPojoExtractorTest { */ @Nested class extractFrom { + /** + * If record object should get field. + */ @Test void ifRecordObjectShouldGetField() { Stream actual = MethodParameterPojoExtractor.extractFrom(RecordObject.class); @@ -51,6 +54,9 @@ void ifRecordObjectShouldGetField() { .containsOnlyOnce("email", "firstName", "lastName"); } + /** + * If class object should get method. + */ @Test void ifClassObjectShouldGetMethod() { Stream actual = MethodParameterPojoExtractor.extractFrom(ClassObject.class); @@ -60,29 +66,66 @@ void ifClassObjectShouldGetMethod() { .containsOnlyOnce("getEmail", "getFirstName", "getLastName"); } + /** + * The type Record object. + */ public record RecordObject(String email, String firstName, String lastName) {} + /** + * The type Class object. + */ public class ClassObject { + /** + * The Email. + */ private String email; + /** + * The First name. + */ private String firstName; + /** + * The Last name. + */ private String lastName; + /** + * Instantiates a new Class object. + * + * @param email the email + * @param firstName the first name + * @param lastName the last name + */ public ClassObject(String email, String firstName, String lastName) { this.email = email; this.firstName = firstName; this.lastName = lastName; } + /** + * Gets email. + * + * @return the email + */ public String getEmail() { return email; } + /** + * Gets first name. + * + * @return the first name + */ public String getFirstName() { return firstName; } + /** + * Gets last name. + * + * @return the last name + */ public String getLastName() { return lastName; } diff --git a/springdoc-openapi-starter-common/src/test/java/org/springdoc/core/model/MethodAttributesTest.java b/springdoc-openapi-starter-common/src/test/java/org/springdoc/core/model/MethodAttributesTest.java new file mode 100644 index 000000000..e65bd7602 --- /dev/null +++ b/springdoc-openapi-starter-common/src/test/java/org/springdoc/core/model/MethodAttributesTest.java @@ -0,0 +1,70 @@ +package org.springdoc.core.model; + +import java.lang.reflect.Method; +import java.util.Locale; + +import org.junit.jupiter.api.Test; +import org.springdoc.core.models.MethodAttributes; + +import static org.junit.jupiter.api.Assertions.assertArrayEquals; + +public class MethodAttributesTest { + + @Test + public void testMergeArrays() throws Exception { + MethodAttributes methodAttributes = new MethodAttributes("application/json", "application/xml", Locale.ENGLISH); + + String[] array1 = {"application/json", "application/xml"}; + String[] array2 = {"application/xml", "application/yaml"}; + + String[] expected = {"application/json", "application/xml", "application/yaml"}; + + Method mergeArraysMethod = MethodAttributes.class.getDeclaredMethod("mergeArrays", String[].class, String[].class); + mergeArraysMethod.setAccessible(true); + String[] result = (String[]) mergeArraysMethod.invoke(methodAttributes, (Object) array1, (Object) array2); + + assertArrayEquals(expected, result); + } + + @Test + public void testMergeArraysWithNullArray1() throws Exception { + MethodAttributes methodAttributes = new MethodAttributes("application/json", "application/xml", Locale.ENGLISH); + + String[] array1 = null; + String[] array2 = {"application/xml", "application/yaml"}; + + String[] expected = {"application/xml", "application/yaml"}; + + Method mergeArraysMethod = MethodAttributes.class.getDeclaredMethod("mergeArrays", String[].class, String[].class); + mergeArraysMethod.setAccessible(true); + String[] result = (String[]) mergeArraysMethod.invoke(methodAttributes, (Object) array1, (Object) array2); + + assertArrayEquals(expected, result); + } + + @Test + public void testDefaultProducesMediaType() { + MethodAttributes methodAttributes = new MethodAttributes("application/json", "application/xml", Locale.ENGLISH); + + Method method = this.getClass().getDeclaredMethods()[0]; + methodAttributes.calculateConsumesProduces(method); + + String[] expectedProduces = {"application/xml"}; + String[] resultProduces = methodAttributes.getMethodProduces(); + + assertArrayEquals(expectedProduces, resultProduces); + } + + @Test + public void testDefaultConsumesMediaType() { + MethodAttributes methodAttributes = new MethodAttributes("application/json", "application/xml", Locale.ENGLISH); + + Method method = this.getClass().getDeclaredMethods()[0]; + methodAttributes.calculateConsumesProduces(method); + + String[] expectedConsumes = {"application/json"}; + String[] resultConsumes = methodAttributes.getMethodConsumes(); + + assertArrayEquals(expectedConsumes, resultConsumes); + } +} \ No newline at end of file diff --git a/springdoc-openapi-starter-common/src/test/java/org/springdoc/ui/AbstractSwaggerIndexTransformerTest.java b/springdoc-openapi-starter-common/src/test/java/org/springdoc/ui/AbstractSwaggerIndexTransformerTest.java index 84e3f156d..d44d6d887 100644 --- a/springdoc-openapi-starter-common/src/test/java/org/springdoc/ui/AbstractSwaggerIndexTransformerTest.java +++ b/springdoc-openapi-starter-common/src/test/java/org/springdoc/ui/AbstractSwaggerIndexTransformerTest.java @@ -10,6 +10,7 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.springdoc.core.properties.SpringDocConfigProperties; import org.springdoc.core.properties.SwaggerUiConfigParameters; import org.springdoc.core.properties.SwaggerUiConfigProperties; import org.springdoc.core.properties.SwaggerUiOAuthProperties; @@ -19,14 +20,12 @@ import static org.hamcrest.Matchers.containsString; @ExtendWith(MockitoExtension.class) -public class AbstractSwaggerIndexTransformerTest { +class AbstractSwaggerIndexTransformerTest { private SwaggerUiConfigProperties swaggerUiConfig; @Mock private SwaggerUiOAuthProperties swaggerUiOAuthProperties; - @Mock - private SwaggerUiConfigParameters swaggerUiConfigParameters; - @Mock + private ObjectMapperProvider objectMapperProvider; private AbstractSwaggerIndexTransformer underTest; @@ -57,13 +56,13 @@ public class AbstractSwaggerIndexTransformerTest { public void setup(){ swaggerUiConfig = new SwaggerUiConfigProperties(); swaggerUiConfig.setUrl(apiDocUrl); - underTest = new AbstractSwaggerIndexTransformer(swaggerUiConfig, swaggerUiOAuthProperties, swaggerUiConfigParameters, objectMapperProvider); - + objectMapperProvider = new ObjectMapperProvider(new SpringDocConfigProperties()); + underTest = new AbstractSwaggerIndexTransformer(swaggerUiConfig, swaggerUiOAuthProperties, objectMapperProvider); } @Test void setApiDocUrlCorrectly() throws IOException { - var html = underTest.defaultTransformations(is); + var html = underTest.defaultTransformations(new SwaggerUiConfigParameters(swaggerUiConfig), is); assertThat(html, containsString(apiDocUrl)); } } diff --git a/springdoc-openapi-starter-common/src/test/java/org/springdoc/ui/AbstractSwaggerResourceResolverTest.java b/springdoc-openapi-starter-common/src/test/java/org/springdoc/ui/AbstractSwaggerResourceResolverTest.java deleted file mode 100644 index 0e558fef9..000000000 --- a/springdoc-openapi-starter-common/src/test/java/org/springdoc/ui/AbstractSwaggerResourceResolverTest.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.springdoc.ui; - -import java.io.File; -import java.util.Objects; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.springdoc.core.properties.SwaggerUiConfigProperties; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertTrue; - -class AbstractSwaggerResourceResolverTest { - private SwaggerUiConfigProperties swaggerUiConfigProperties; - - private AbstractSwaggerResourceResolver abstractSwaggerResourceResolver; - - private final String VERSION = "4.18.2"; - - @BeforeEach - public void setup(){ - swaggerUiConfigProperties = new SwaggerUiConfigProperties(); - swaggerUiConfigProperties.setVersion(VERSION); - abstractSwaggerResourceResolver = new AbstractSwaggerResourceResolver(swaggerUiConfigProperties); - } - - @Test - void findWebJarResourcePath() { - String path = "swagger-ui/swagger-initializer.js"; - - String actual = abstractSwaggerResourceResolver.findWebJarResourcePath(path); - assertEquals("swagger-ui" + File.separator + "4.18.2" + File.separator + "swagger-initializer.js", actual); - } - - @Test - void returNullWhenPathIsSameAsWebjar() { - String path = "swagger-ui"; - - String actual = abstractSwaggerResourceResolver.findWebJarResourcePath(path); - assertTrue(Objects.isNull(actual)); - } - - @Test - void returNullWhenVersionIsNull() { - String path = "swagger-ui/swagger-initializer.js"; - swaggerUiConfigProperties.setVersion(null); - - String actual = abstractSwaggerResourceResolver.findWebJarResourcePath(path); - assertTrue(Objects.isNull(actual)); - } -} diff --git a/springdoc-openapi-starter-common/src/test/java/org/springdoc/ui/SwaggerResourceResolverUtilsTest.java b/springdoc-openapi-starter-common/src/test/java/org/springdoc/ui/SwaggerResourceResolverUtilsTest.java new file mode 100644 index 000000000..04fd1a1f7 --- /dev/null +++ b/springdoc-openapi-starter-common/src/test/java/org/springdoc/ui/SwaggerResourceResolverUtilsTest.java @@ -0,0 +1,36 @@ +package org.springdoc.ui; + +import java.io.File; +import java.util.Objects; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.springdoc.ui.SwaggerResourceResolverUtils.findSwaggerResourcePath; + +class SwaggerResourceResolverUtilsTest { + + private final String VERSION = "4.18.2"; + + @Test + void findWebJarResourcePath() { + String path = "swagger-ui/swagger-initializer.js"; + String actual = findSwaggerResourcePath(path,VERSION); + assertEquals("swagger-ui" + File.separator + "4.18.2" + File.separator + "swagger-initializer.js", actual); + } + + @Test + void returnNullWhenPathIsSameAsWebjar() { + String path = "swagger-ui"; + String actual = findSwaggerResourcePath(path,VERSION); + assertTrue(Objects.isNull(actual)); + } + + @Test + void returnNullWhenVersionIsNull() { + String path = "swagger-ui/swagger-initializer.js"; + String actual = findSwaggerResourcePath(path,null); + assertTrue(Objects.isNull(actual)); + } +} diff --git a/springdoc-openapi-starter-webflux-api/pom.xml b/springdoc-openapi-starter-webflux-api/pom.xml index b802dee83..5e0bd2b85 100644 --- a/springdoc-openapi-starter-webflux-api/pom.xml +++ b/springdoc-openapi-starter-webflux-api/pom.xml @@ -3,7 +3,7 @@ org.springdoc springdoc-openapi - 2.5.0 + 2.7.0 springdoc-openapi-starter-webflux-api diff --git a/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/api/MultipleOpenApiActuatorResource.java b/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/api/MultipleOpenApiActuatorResource.java index bf461957a..73592319c 100644 --- a/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/api/MultipleOpenApiActuatorResource.java +++ b/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/api/MultipleOpenApiActuatorResource.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webflux.api; @@ -55,6 +57,7 @@ /** * The type Multiple open api actuator resource. + * * @author bnasslashen */ @RestControllerEndpoint(id = DEFAULT_API_DOCS_ACTUATOR_URL) @@ -63,14 +66,14 @@ public class MultipleOpenApiActuatorResource extends MultipleOpenApiResource { /** * Instantiates a new Multiple open api resource. * - * @param groupedOpenApis the grouped open apis - * @param defaultOpenAPIBuilder the default open api builder - * @param requestBuilder the request builder - * @param responseBuilder the response builder - * @param operationParser the operation parser + * @param groupedOpenApis the grouped open apis + * @param defaultOpenAPIBuilder the default open api builder + * @param requestBuilder the request builder + * @param responseBuilder the response builder + * @param operationParser the operation parser * @param springDocConfigProperties the spring doc config properties - * @param springDocProviders the spring doc providers - * @param springDocCustomizers the spring doc customizers + * @param springDocProviders the spring doc providers + * @param springDocCustomizers the spring doc customizers */ public MultipleOpenApiActuatorResource(List groupedOpenApis, ObjectFactory defaultOpenAPIBuilder, AbstractRequestService requestBuilder, GenericResponseService responseBuilder, OperationService operationParser, @@ -82,9 +85,9 @@ public MultipleOpenApiActuatorResource(List groupedOpenApis, Obj * Openapi json mono. * * @param serverHttpRequest the server http request - * @param apiDocsUrl the api docs url - * @param group the group - * @param locale the locale + * @param apiDocsUrl the api docs url + * @param group the group + * @param locale the locale * @return the mono * @throws JsonProcessingException the json processing exception */ @@ -101,9 +104,9 @@ public Mono openapiJson(ServerHttpRequest * Openapi yaml mono. * * @param serverHttpRequest the server http request - * @param apiDocsUrl the api docs url - * @param group the group - * @param locale the locale + * @param apiDocsUrl the api docs url + * @param group the group + * @param locale the locale * @return the mono * @throws JsonProcessingException the json processing exception */ diff --git a/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/api/MultipleOpenApiResource.java b/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/api/MultipleOpenApiResource.java index 70e54a864..fb9edd391 100644 --- a/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/api/MultipleOpenApiResource.java +++ b/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/api/MultipleOpenApiResource.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webflux.api; @@ -101,14 +103,14 @@ public abstract class MultipleOpenApiResource implements InitializingBean { /** * Instantiates a new Multiple open api resource. * - * @param groupedOpenApis the grouped open apis - * @param defaultOpenAPIBuilder the default open api builder - * @param requestBuilder the request builder - * @param responseBuilder the response builder - * @param operationParser the operation parser + * @param groupedOpenApis the grouped open apis + * @param defaultOpenAPIBuilder the default open api builder + * @param requestBuilder the request builder + * @param responseBuilder the response builder + * @param operationParser the operation parser * @param springDocConfigProperties the spring doc config properties - * @param springDocProviders the spring doc providers - * @param springDocCustomizers the spring doc customizers + * @param springDocProviders the spring doc providers + * @param springDocCustomizers the spring doc customizers */ protected MultipleOpenApiResource(List groupedOpenApis, ObjectFactory defaultOpenAPIBuilder, AbstractRequestService requestBuilder, @@ -141,9 +143,7 @@ public void afterPropertiesSet() { springDocConfigProperties.addGroupConfig(groupConfig); return buildWebFluxOpenApiResource(item); }, - (existingValue, newValue) -> { - return existingValue; // choice to keep the existing value - } + (existingValue, newValue) -> existingValue // choice to keep the existing value )); } diff --git a/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/api/MultipleOpenApiWebFluxResource.java b/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/api/MultipleOpenApiWebFluxResource.java index 61e178951..b73ace89a 100644 --- a/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/api/MultipleOpenApiWebFluxResource.java +++ b/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/api/MultipleOpenApiWebFluxResource.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webflux.api; @@ -54,6 +56,7 @@ /** * The type Multiple open api resource. + * * @author bnasslahsen */ @RestController @@ -62,14 +65,14 @@ public class MultipleOpenApiWebFluxResource extends MultipleOpenApiResource { /** * Instantiates a new Multiple open api resource. * - * @param groupedOpenApis the grouped open apis - * @param defaultOpenAPIBuilder the default open api builder - * @param requestBuilder the request builder - * @param responseBuilder the response builder - * @param operationParser the operation parser + * @param groupedOpenApis the grouped open apis + * @param defaultOpenAPIBuilder the default open api builder + * @param requestBuilder the request builder + * @param responseBuilder the response builder + * @param operationParser the operation parser * @param springDocConfigProperties the spring doc config properties - * @param springDocProviders the spring doc providers - * @param springDocCustomizers the spring doc customizers + * @param springDocProviders the spring doc providers + * @param springDocCustomizers the spring doc customizers */ public MultipleOpenApiWebFluxResource(List groupedOpenApis, ObjectFactory defaultOpenAPIBuilder, AbstractRequestService requestBuilder, GenericResponseService responseBuilder, OperationService operationParser, @@ -81,9 +84,9 @@ public MultipleOpenApiWebFluxResource(List groupedOpenApis, Obje * Openapi json mono. * * @param serverHttpRequest the server http request - * @param apiDocsUrl the api docs url - * @param group the group - * @param locale the locale + * @param apiDocsUrl the api docs url + * @param group the group + * @param locale the locale * @return the mono * @throws JsonProcessingException the json processing exception */ @@ -99,9 +102,9 @@ public Mono openapiJson(ServerHttpRequest * Openapi yaml mono. * * @param serverHttpRequest the server http request - * @param apiDocsUrl the api docs url - * @param group the group - * @param locale the locale + * @param apiDocsUrl the api docs url + * @param group the group + * @param locale the locale * @return the mono * @throws JsonProcessingException the json processing exception */ diff --git a/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/api/OpenApiActuatorResource.java b/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/api/OpenApiActuatorResource.java index 75ad34354..7bb6230ab 100644 --- a/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/api/OpenApiActuatorResource.java +++ b/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/api/OpenApiActuatorResource.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webflux.api; @@ -55,6 +57,7 @@ /** * The type Open api actuator resource. + * * @author bnasslashen */ @RestControllerEndpoint(id = DEFAULT_API_DOCS_ACTUATOR_URL) @@ -64,14 +67,14 @@ public class OpenApiActuatorResource extends OpenApiResource { /** * Instantiates a new Open api actuator resource. * - * @param groupName the group name + * @param groupName the group name * @param openAPIBuilderObjectFactory the open api builder object factory - * @param requestBuilder the request builder - * @param responseBuilder the response builder - * @param operationParser the operation parser - * @param springDocConfigProperties the spring doc config properties - * @param springDocProviders the spring doc providers - * @param springDocCustomizers the spring doc customizers + * @param requestBuilder the request builder + * @param responseBuilder the response builder + * @param operationParser the operation parser + * @param springDocConfigProperties the spring doc config properties + * @param springDocProviders the spring doc providers + * @param springDocCustomizers the spring doc customizers */ public OpenApiActuatorResource(String groupName, ObjectFactory openAPIBuilderObjectFactory, AbstractRequestService requestBuilder, GenericResponseService responseBuilder, OperationService operationParser, SpringDocConfigProperties springDocConfigProperties, @@ -83,12 +86,12 @@ public OpenApiActuatorResource(String groupName, ObjectFactory o * Instantiates a new Open api actuator resource. * * @param openAPIBuilderObjectFactory the open api builder object factory - * @param requestBuilder the request builder - * @param responseBuilder the response builder - * @param operationParser the operation parser - * @param springDocConfigProperties the spring doc config properties - * @param springDocProviders the spring doc providers - * @param springDocCustomizers the spring doc customizers + * @param requestBuilder the request builder + * @param responseBuilder the response builder + * @param operationParser the operation parser + * @param springDocConfigProperties the spring doc config properties + * @param springDocProviders the spring doc providers + * @param springDocCustomizers the spring doc customizers */ public OpenApiActuatorResource(ObjectFactory openAPIBuilderObjectFactory, AbstractRequestService requestBuilder, GenericResponseService responseBuilder, OperationService operationParser, SpringDocConfigProperties springDocConfigProperties, @@ -100,7 +103,7 @@ public OpenApiActuatorResource(ObjectFactory openAPIBuilderObjec * Openapi json mono. * * @param serverHttpRequest the server http request - * @param locale the locale + * @param locale the locale * @return the mono * @throws JsonProcessingException the json processing exception */ @@ -116,7 +119,7 @@ public Mono openapiJson(ServerHttpRequest serverHttpRequest, Locale loca * Openapi yaml mono. * * @param serverHttpRequest the server http request - * @param locale the locale + * @param locale the locale * @return the mono * @throws JsonProcessingException the json processing exception */ @@ -131,7 +134,7 @@ public Mono openapiYaml(ServerHttpRequest serverHttpRequest, Locale loca protected void calculateServerUrl(ServerHttpRequest serverHttpRequest, String apiDocsUrl, Locale locale) { super.initOpenAPIBuilder(locale); URI uri = getActuatorURI(serverHttpRequest.getURI().getScheme(), serverHttpRequest.getURI().getHost()); - openAPIService.setServerBaseUrl(uri.toString()); + openAPIService.setServerBaseUrl(uri.toString(), serverHttpRequest); } @Override diff --git a/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/api/OpenApiResource.java b/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/api/OpenApiResource.java index acbefce90..8a2ab23f7 100644 --- a/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/api/OpenApiResource.java +++ b/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/api/OpenApiResource.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webflux.api; @@ -63,6 +65,7 @@ /** * The type Open api resource. + * * @author bnasslahsen, Azige */ public abstract class OpenApiResource extends AbstractOpenApiResource { @@ -70,16 +73,16 @@ public abstract class OpenApiResource extends AbstractOpenApiResource { /** * Instantiates a new Open api resource. * - * @param groupName the group name + * @param groupName the group name * @param openAPIBuilderObjectFactory the open api builder object factory - * @param requestBuilder the request builder - * @param responseBuilder the response builder - * @param operationParser the operation parser - * @param springDocConfigProperties the spring doc config properties - * @param springDocProviders the spring doc providers - * @param springDocCustomizers the spring doc customizers + * @param requestBuilder the request builder + * @param responseBuilder the response builder + * @param operationParser the operation parser + * @param springDocConfigProperties the spring doc config properties + * @param springDocProviders the spring doc providers + * @param springDocCustomizers the spring doc customizers */ - public OpenApiResource(String groupName, ObjectFactory openAPIBuilderObjectFactory, AbstractRequestService requestBuilder, + protected OpenApiResource(String groupName, ObjectFactory openAPIBuilderObjectFactory, AbstractRequestService requestBuilder, GenericResponseService responseBuilder, OperationService operationParser, SpringDocConfigProperties springDocConfigProperties, SpringDocProviders springDocProviders, SpringDocCustomizers springDocCustomizers) { @@ -90,13 +93,14 @@ public OpenApiResource(String groupName, ObjectFactory openAPIBu * Instantiates a new Open api resource. * * @param openAPIBuilderObjectFactory the open api builder object factory - * @param requestBuilder the request builder - * @param responseBuilder the response builder - * @param operationParser the operation parser - * @param springDocConfigProperties the spring doc config properties - * @param springDocProviders the spring doc providers + * @param requestBuilder the request builder + * @param responseBuilder the response builder + * @param operationParser the operation parser + * @param springDocConfigProperties the spring doc config properties + * @param springDocProviders the spring doc providers + * @param springDocCustomizers the spring doc customizers */ - public OpenApiResource(ObjectFactory openAPIBuilderObjectFactory, AbstractRequestService requestBuilder, + protected OpenApiResource(ObjectFactory openAPIBuilderObjectFactory, AbstractRequestService requestBuilder, GenericResponseService responseBuilder, OperationService operationParser, SpringDocConfigProperties springDocConfigProperties, SpringDocProviders springDocProviders, SpringDocCustomizers springDocCustomizers ) { @@ -108,8 +112,8 @@ public OpenApiResource(ObjectFactory openAPIBuilderObjectFactory * Openapi json mono. * * @param serverHttpRequest the server http request - * @param apiDocsUrl the api docs url - * @param locale the locale + * @param apiDocsUrl the api docs url + * @param locale the locale * @return the mono * @throws JsonProcessingException the json processing exception */ @@ -124,8 +128,8 @@ protected Mono openapiJson(ServerHttpRequest serverHttpRequest, String a * Openapi yaml mono. * * @param serverHttpRequest the server http request - * @param apiDocsUrl the api docs url - * @param locale the locale + * @param apiDocsUrl the api docs url + * @param locale the locale * @return the mono * @throws JsonProcessingException the json processing exception */ @@ -163,8 +167,9 @@ protected void getPaths(Map restControllers, Locale locale, Open * Calculate path. * * @param restControllers the rest controllers - * @param map the map - * @param locale the locale + * @param map the map + * @param locale the locale + * @param openAPI the open api */ protected void calculatePath(Map restControllers, Map map, Locale locale, OpenAPI openAPI) { TreeMap methodTreeMap = new TreeMap<>(byReversedRequestMappingInfos()); @@ -206,7 +211,9 @@ private Comparator byReversedRequestMappingInfos() { /** * Gets web flux router function paths. - * @param locale the locale + * + * @param locale the locale + * @param openAPI the open api */ protected void getWebFluxRouterFunctionPaths(Locale locale, OpenAPI openAPI) { Map routerBeans = Objects.requireNonNull(openAPIService.getContext()).getBeansOfType(RouterFunction.class); @@ -223,20 +230,20 @@ protected void getWebFluxRouterFunctionPaths(Locale locale, OpenAPI openAPI) { * Calculate server url. * * @param serverHttpRequest the server http request - * @param apiDocsUrl the api docs url - * @param locale the locale + * @param apiDocsUrl the api docs url + * @param locale the locale */ protected void calculateServerUrl(ServerHttpRequest serverHttpRequest, String apiDocsUrl, Locale locale) { initOpenAPIBuilder(locale); String serverUrl = getServerUrl(serverHttpRequest, apiDocsUrl); - openAPIService.setServerBaseUrl(serverUrl); + openAPIService.setServerBaseUrl(serverUrl, serverHttpRequest); } /** * Gets server url. * * @param serverHttpRequest the server http request - * @param apiDocsUrl the api docs url + * @param apiDocsUrl the api docs url * @return the server url */ protected abstract String getServerUrl(ServerHttpRequest serverHttpRequest, String apiDocsUrl); diff --git a/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/api/OpenApiWebfluxResource.java b/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/api/OpenApiWebfluxResource.java index e74632781..6a5410f39 100644 --- a/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/api/OpenApiWebfluxResource.java +++ b/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/api/OpenApiWebfluxResource.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webflux.api; @@ -67,14 +69,14 @@ public class OpenApiWebfluxResource extends OpenApiResource { /** * Instantiates a new Open api webflux resource. * - * @param groupName the group name + * @param groupName the group name * @param openAPIBuilderObjectFactory the open api builder object factory - * @param requestBuilder the request builder - * @param responseBuilder the response builder - * @param operationParser the operation parser - * @param springDocConfigProperties the spring doc config properties - * @param springDocProviders the spring doc providers - * @param springDocCustomizers the spring doc customizers + * @param requestBuilder the request builder + * @param responseBuilder the response builder + * @param operationParser the operation parser + * @param springDocConfigProperties the spring doc config properties + * @param springDocProviders the spring doc providers + * @param springDocCustomizers the spring doc customizers */ public OpenApiWebfluxResource(String groupName, ObjectFactory openAPIBuilderObjectFactory, AbstractRequestService requestBuilder, GenericResponseService responseBuilder, OperationService operationParser, @@ -86,12 +88,12 @@ public OpenApiWebfluxResource(String groupName, ObjectFactory op * Instantiates a new Open api webflux resource. * * @param openAPIBuilderObjectFactory the open api builder object factory - * @param requestBuilder the request builder - * @param responseBuilder the response builder - * @param operationParser the operation parser - * @param springDocConfigProperties the spring doc config properties - * @param springDocProviders the spring doc providers - * @param springDocCustomizers the spring doc customizers + * @param requestBuilder the request builder + * @param responseBuilder the response builder + * @param operationParser the operation parser + * @param springDocConfigProperties the spring doc config properties + * @param springDocProviders the spring doc providers + * @param springDocCustomizers the spring doc customizers */ @Autowired public OpenApiWebfluxResource(ObjectFactory openAPIBuilderObjectFactory, AbstractRequestService requestBuilder, GenericResponseService responseBuilder, diff --git a/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/core/configuration/MultipleOpenApiSupportConfiguration.java b/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/core/configuration/MultipleOpenApiSupportConfiguration.java index 392b1074d..b5133bb62 100644 --- a/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/core/configuration/MultipleOpenApiSupportConfiguration.java +++ b/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/core/configuration/MultipleOpenApiSupportConfiguration.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webflux.core.configuration; @@ -59,6 +61,7 @@ /** * The type Multiple open api web flux configuration. + * * @author bnasslahsen */ @Lazy(false) @@ -72,14 +75,14 @@ public class MultipleOpenApiSupportConfiguration { /** * Multiple open api resource multiple open api resource. * - * @param groupedOpenApis the grouped open apis - * @param defaultOpenAPIBuilder the default open api builder - * @param requestBuilder the request builder - * @param responseBuilder the response builder - * @param operationParser the operation parser + * @param groupedOpenApis the grouped open apis + * @param defaultOpenAPIBuilder the default open api builder + * @param requestBuilder the request builder + * @param responseBuilder the response builder + * @param operationParser the operation parser * @param springDocConfigProperties the spring doc config properties - * @param springDocProviders the spring doc providers - * @param springDocCustomizers the spring doc customizers + * @param springDocProviders the spring doc providers + * @param springDocCustomizers the spring doc customizers * @return the multiple open api resource */ @Bean @@ -100,6 +103,7 @@ MultipleOpenApiWebFluxResource multipleOpenApiResource(List grou /** * The type Spring doc web mvc actuator different configuration. + * * @author bnasslashen */ @ConditionalOnClass(WebFluxEndpointHandlerMapping.class) @@ -109,14 +113,14 @@ static class SpringDocWebMvcActuatorDifferentConfiguration { /** * Multiple open api actuator resource multiple open api actuator resource. * - * @param groupedOpenApis the grouped open apis - * @param defaultOpenAPIBuilder the default open api builder - * @param requestBuilder the request builder - * @param responseBuilder the response builder - * @param operationParser the operation parser + * @param groupedOpenApis the grouped open apis + * @param defaultOpenAPIBuilder the default open api builder + * @param requestBuilder the request builder + * @param responseBuilder the response builder + * @param operationParser the operation parser * @param springDocConfigProperties the spring doc config properties - * @param springDocProviders the spring doc providers - * @param springDocCustomizers the spring doc customizers + * @param springDocProviders the spring doc providers + * @param springDocCustomizers the spring doc customizers * @return the multiple open api actuator resource */ @Bean diff --git a/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/core/configuration/SpringDocWebFluxConfiguration.java b/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/core/configuration/SpringDocWebFluxConfiguration.java index 753dc0ae1..0b46d7a31 100644 --- a/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/core/configuration/SpringDocWebFluxConfiguration.java +++ b/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/core/configuration/SpringDocWebFluxConfiguration.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webflux.core.configuration; @@ -31,7 +33,6 @@ import org.springdoc.core.customizers.ParameterCustomizer; import org.springdoc.core.customizers.SpringDocCustomizers; import org.springdoc.core.discoverer.SpringDocParameterNameDiscoverer; -import org.springdoc.core.parsers.ReturnTypeParser; import org.springdoc.core.properties.SpringDocConfigProperties; import org.springdoc.core.providers.ActuatorProvider; import org.springdoc.core.providers.SpringDocProviders; @@ -85,12 +86,12 @@ public class SpringDocWebFluxConfiguration { * Open api resource open api resource. * * @param openAPIBuilderObjectFactory the open api builder object factory - * @param requestBuilder the request builder - * @param responseBuilder the response builder - * @param operationParser the operation parser - * @param springDocConfigProperties the spring doc config properties - * @param springDocProviders the spring doc providers - * @param springDocCustomizers the spring doc customizers + * @param requestBuilder the request builder + * @param responseBuilder the response builder + * @param operationParser the operation parser + * @param springDocConfigProperties the spring doc config properties + * @param springDocProviders the spring doc providers + * @param springDocCustomizers the spring doc customizers * @return the open api resource */ @Bean @@ -108,10 +109,9 @@ OpenApiWebfluxResource openApiResource(ObjectFactory openAPIBuil /** * Request builder request builder. * - * @param parameterBuilder the parameter builder - * @param requestBodyService the request body builder - * @param operationService the operation builder - * @param parameterCustomizers the parameter customizers + * @param parameterBuilder the parameter builder + * @param requestBodyService the request body builder + * @param parameterCustomizers the parameter customizers * @param localSpringDocParameterNameDiscoverer the local spring doc parameter name discoverer * @return the request builder */ @@ -119,27 +119,25 @@ OpenApiWebfluxResource openApiResource(ObjectFactory openAPIBuil @ConditionalOnMissingBean @Lazy(false) RequestService requestBuilder(GenericParameterService parameterBuilder, RequestBodyService requestBodyService, - OperationService operationService, Optional> parameterCustomizers, SpringDocParameterNameDiscoverer localSpringDocParameterNameDiscoverer) { - return new RequestService(parameterBuilder, requestBodyService, - operationService, parameterCustomizers, localSpringDocParameterNameDiscoverer); + return new RequestService(parameterBuilder, requestBodyService, + parameterCustomizers, localSpringDocParameterNameDiscoverer); } /** * Response builder generic response builder. * - * @param operationService the operation builder - * @param returnTypeParsers the return type parsers + * @param operationService the operation builder * @param springDocConfigProperties the spring doc config properties - * @param propertyResolverUtils the property resolver utils + * @param propertyResolverUtils the property resolver utils * @return the generic response builder */ @Bean @ConditionalOnMissingBean @Lazy(false) - GenericResponseService responseBuilder(OperationService operationService, List returnTypeParsers, SpringDocConfigProperties springDocConfigProperties, PropertyResolverUtils propertyResolverUtils) { - return new GenericResponseService(operationService, returnTypeParsers, springDocConfigProperties, propertyResolverUtils); + GenericResponseService responseBuilder(OperationService operationService, SpringDocConfigProperties springDocConfigProperties, PropertyResolverUtils propertyResolverUtils) { + return new GenericResponseService(operationService, springDocConfigProperties, propertyResolverUtils); } /** @@ -165,11 +163,11 @@ static class SpringDocWebFluxActuatorConfiguration { /** * Actuator provider actuator provider. * - * @param serverProperties the server properties - * @param springDocConfigProperties the spring doc config properties - * @param managementServerProperties the management server properties - * @param webEndpointProperties the web endpoint properties - * @param webFluxEndpointHandlerMapping the web flux endpoint handler mapping + * @param serverProperties the server properties + * @param springDocConfigProperties the spring doc config properties + * @param managementServerProperties the management server properties + * @param webEndpointProperties the web endpoint properties + * @param webFluxEndpointHandlerMapping the web flux endpoint handler mapping * @param controllerEndpointHandlerMapping the controller endpoint handler mapping * @return the actuator provider */ @@ -195,11 +193,12 @@ ActuatorProvider actuatorProvider(ServerProperties serverProperties, * Actuator open api resource open api actuator resource. * * @param openAPIBuilderObjectFactory the open api builder object factory - * @param requestBuilder the request builder - * @param responseBuilder the response builder - * @param operationParser the operation parser - * @param springDocConfigProperties the spring doc config properties - * @param springDocProviders the spring doc providers + * @param requestBuilder the request builder + * @param responseBuilder the response builder + * @param operationParser the operation parser + * @param springDocConfigProperties the spring doc config properties + * @param springDocProviders the spring doc providers + * @param springDocCustomizers the spring doc customizers * @return the open api actuator resource */ @Bean diff --git a/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/core/fn/SpringdocRouteBuilder.java b/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/core/fn/SpringdocRouteBuilder.java index 21ba89ac7..118a443d3 100644 --- a/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/core/fn/SpringdocRouteBuilder.java +++ b/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/core/fn/SpringdocRouteBuilder.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webflux.core.fn; @@ -49,6 +51,7 @@ /** * The type Springdoc route builder. + * * @author bnasslahsen */ public class SpringdocRouteBuilder extends AbstractSpringdocRouteBuilder { @@ -85,8 +88,8 @@ public RouterFunction build() { /** * Get springdoc route builder. * - * @param pattern the pattern - * @param handlerFunction the handler function + * @param pattern the pattern + * @param handlerFunction the handler function * @param operationsConsumer the operations consumer * @return the springdoc route builder */ @@ -100,7 +103,7 @@ public SpringdocRouteBuilder GET(String pattern, HandlerFunction /** * Get springdoc route builder. * - * @param handlerFunction the handler function + * @param handlerFunction the handler function * @param operationsConsumer the operations consumer * @return the springdoc route builder */ @@ -114,8 +117,8 @@ public SpringdocRouteBuilder GET(HandlerFunction handlerFunction /** * Get springdoc route builder. * - * @param predicate the predicate - * @param handlerFunction the handler function + * @param predicate the predicate + * @param handlerFunction the handler function * @param operationsConsumer the operations consumer * @return the springdoc route builder */ @@ -129,9 +132,9 @@ public SpringdocRouteBuilder GET(RequestPredicate predicate, HandlerFunction handlerFunctio /** * Head springdoc route builder. * - * @param pattern the pattern - * @param handlerFunction the handler function + * @param pattern the pattern + * @param handlerFunction the handler function * @param operationsConsumer the operations consumer * @return the springdoc route builder */ @@ -174,8 +177,8 @@ public SpringdocRouteBuilder HEAD(String pattern, HandlerFunction handlerFunctio /** * Post springdoc route builder. * - * @param pattern the pattern - * @param handlerFunction the handler function + * @param pattern the pattern + * @param handlerFunction the handler function * @param operationsConsumer the operations consumer * @return the springdoc route builder */ @@ -234,8 +237,8 @@ public SpringdocRouteBuilder POST(String pattern, HandlerFunction handlerFunction /** * Put springdoc route builder. * - * @param pattern the pattern - * @param handlerFunction the handler function + * @param pattern the pattern + * @param handlerFunction the handler function * @param operationsConsumer the operations consumer * @return the springdoc route builder */ @@ -294,8 +297,8 @@ public SpringdocRouteBuilder PUT(String pattern, HandlerFunction /** * Put springdoc route builder. * - * @param predicate the predicate - * @param handlerFunction the handler function + * @param predicate the predicate + * @param handlerFunction the handler function * @param operationsConsumer the operations consumer * @return the springdoc route builder */ @@ -309,9 +312,9 @@ public SpringdocRouteBuilder PUT(RequestPredicate predicate, HandlerFunction handlerFuncti /** * Patch springdoc route builder. * - * @param pattern the pattern - * @param handlerFunction the handler function + * @param pattern the pattern + * @param handlerFunction the handler function * @param operationsConsumer the operations consumer * @return the springdoc route builder */ @@ -354,8 +357,8 @@ public SpringdocRouteBuilder PATCH(String pattern, HandlerFunction handlerFunct /** * Delete springdoc route builder. * - * @param pattern the pattern - * @param handlerFunction the handler function + * @param pattern the pattern + * @param handlerFunction the handler function * @param operationsConsumer the operations consumer * @return the springdoc route builder */ @@ -414,8 +417,8 @@ public SpringdocRouteBuilder DELETE(String pattern, HandlerFunction handlerFunc /** * Options springdoc route builder. * - * @param pattern the pattern - * @param handlerFunction the handler function + * @param pattern the pattern + * @param handlerFunction the handler function * @param operationsConsumer the operations consumer * @return the springdoc route builder */ @@ -474,8 +477,8 @@ public SpringdocRouteBuilder OPTIONS(String pattern, HandlerFunction routerFunction, /** * Resources springdoc route builder. * - * @param pattern the pattern - * @param location the location + * @param pattern the pattern + * @param location the location * @param operationsConsumer the operations consumer * @return the springdoc route builder */ @@ -533,7 +536,7 @@ public SpringdocRouteBuilder resources(String pattern, Resource location, Consum /** * Resources springdoc route builder. * - * @param lookupFunction the lookup function + * @param lookupFunction the lookup function * @param operationsConsumer the operations consumer * @return the springdoc route builder */ @@ -547,9 +550,9 @@ public SpringdocRouteBuilder resources(Function> l /** * Nest springdoc route builder. * - * @param predicate the predicate + * @param predicate the predicate * @param routerFunctionSupplier the router function supplier - * @param operationsConsumer the operations consumer + * @param operationsConsumer the operations consumer * @return the springdoc route builder */ public SpringdocRouteBuilder nest(RequestPredicate predicate, Supplier> routerFunctionSupplier, Consumer operationsConsumer) { @@ -562,8 +565,8 @@ public SpringdocRouteBuilder nest(RequestPredicate predicate, Supplier> routerFunctionSupplier, Consumer operationsConsumer) { @@ -592,8 +595,8 @@ public SpringdocRouteBuilder path(String pattern, Supplier requestProcesso /** * After springdoc route builder. * - * @param responseProcessor the response processor + * @param responseProcessor the response processor * @param operationsConsumer the operations consumer * @return the springdoc route builder */ @@ -649,7 +652,7 @@ public SpringdocRouteBuilder after(BiFunction predicate, BiF /** * On error springdoc route builder. * - * @param the type parameter - * @param exceptionType the exception type + * @param the type parameter + * @param exceptionType the exception type * @param responseProvider the response provider * @return the springdoc route builder */ diff --git a/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/core/providers/ActuatorWebFluxProvider.java b/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/core/providers/ActuatorWebFluxProvider.java index 16298036b..975d5dbf7 100644 --- a/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/core/providers/ActuatorWebFluxProvider.java +++ b/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/core/providers/ActuatorWebFluxProvider.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webflux.core.providers; @@ -42,6 +44,7 @@ /** * The type Web flux actuator provider. + * * @author bnasslahsen */ public class ActuatorWebFluxProvider extends ActuatorProvider { @@ -59,11 +62,11 @@ public class ActuatorWebFluxProvider extends ActuatorProvider { /** * Instantiates a new Actuator web flux provider. * - * @param serverProperties the server properties - * @param springDocConfigProperties the spring doc config properties - * @param managementServerProperties the management server properties - * @param webEndpointProperties the web endpoint properties - * @param webFluxEndpointHandlerMapping the web flux endpoint handler mapping + * @param serverProperties the server properties + * @param springDocConfigProperties the spring doc config properties + * @param managementServerProperties the management server properties + * @param webEndpointProperties the web endpoint properties + * @param webFluxEndpointHandlerMapping the web flux endpoint handler mapping * @param controllerEndpointHandlerMapping the controller endpoint handler mapping */ public ActuatorWebFluxProvider(ServerProperties serverProperties, diff --git a/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/core/providers/SpringWebFluxProvider.java b/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/core/providers/SpringWebFluxProvider.java index e9a9453d9..564ce5bc3 100644 --- a/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/core/providers/SpringWebFluxProvider.java +++ b/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/core/providers/SpringWebFluxProvider.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webflux.core.providers; @@ -45,6 +47,7 @@ /** * The type Spring webflux provider. + * * @author bnasslahsen */ public class SpringWebFluxProvider extends SpringWebProvider { diff --git a/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/core/service/RequestService.java b/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/core/service/RequestService.java index bdf9cadd9..796d6ef29 100644 --- a/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/core/service/RequestService.java +++ b/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/core/service/RequestService.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webflux.core.service; @@ -31,7 +33,6 @@ import org.springdoc.core.discoverer.SpringDocParameterNameDiscoverer; import org.springdoc.core.service.AbstractRequestService; import org.springdoc.core.service.GenericParameterService; -import org.springdoc.core.service.OperationService; import org.springdoc.core.service.RequestBodyService; import org.springframework.http.codec.multipart.FilePart; @@ -44,6 +45,7 @@ /** * The type Request builder. + * * @author bnasslahsen */ public class RequestService extends AbstractRequestService { @@ -58,15 +60,14 @@ public class RequestService extends AbstractRequestService { /** * Instantiates a new Request builder. * - * @param parameterBuilder the parameter builder - * @param requestBodyService the request body builder - * @param operationService the operation builder - * @param parameterCustomizers the parameter customizers + * @param parameterBuilder the parameter builder + * @param requestBodyService the request body builder + * @param parameterCustomizers the parameter customizers * @param localSpringDocParameterNameDiscoverer the local spring doc parameter name discoverer */ public RequestService(GenericParameterService parameterBuilder, RequestBodyService requestBodyService, - OperationService operationService, Optional> parameterCustomizers, + Optional> parameterCustomizers, SpringDocParameterNameDiscoverer localSpringDocParameterNameDiscoverer) { - super(parameterBuilder, requestBodyService, operationService, parameterCustomizers, localSpringDocParameterNameDiscoverer); + super(parameterBuilder, requestBodyService, parameterCustomizers, localSpringDocParameterNameDiscoverer); } } diff --git a/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/core/visitor/RouterFunctionVisitor.java b/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/core/visitor/RouterFunctionVisitor.java index d2bc2a132..995bba1e6 100644 --- a/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/core/visitor/RouterFunctionVisitor.java +++ b/springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/core/visitor/RouterFunctionVisitor.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webflux.core.visitor; @@ -40,6 +42,7 @@ /** * The type Router function visitor. + * * @author bnasslahsen */ public class RouterFunctionVisitor extends AbstractRouterFunctionVisitor implements RouterFunctions.Visitor, RequestPredicates.Visitor { diff --git a/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java b/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java index 0a37e8cc8..5bbdda803 100644 --- a/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java +++ b/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java @@ -21,6 +21,7 @@ import org.junit.jupiter.api.Test; import org.springdoc.core.utils.Constants; +import org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebTestClient; 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; @@ -30,6 +31,7 @@ @WebFluxTest +@AutoConfigureWebTestClient(timeout = "3600000") public abstract class AbstractSpringDocTest extends AbstractCommonTest { public static final HandlerFunction HANDLER_FUNCTION = request -> ServerResponse.ok().build(); @@ -38,7 +40,7 @@ public abstract class AbstractSpringDocTest extends AbstractCommonTest { @Test - public void testApp() throws Exception { + void testApp() throws Exception { String result = null; try { EntityExchangeResult getResult = webTestClient.get().uri(Constants.DEFAULT_API_DOCS_URL + groupName).exchange() diff --git a/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app150/SpringDocApp150Test.java b/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app150/SpringDocApp150Test.java index 570b385f9..8ed30cedf 100644 --- a/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app150/SpringDocApp150Test.java +++ b/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app150/SpringDocApp150Test.java @@ -23,10 +23,8 @@ import test.org.springdoc.api.AbstractSpringDocTest; import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebTestClient; import org.springframework.context.annotation.ComponentScan; -@AutoConfigureWebTestClient(timeout = "3600000") public class SpringDocApp150Test extends AbstractSpringDocTest { @SpringBootApplication diff --git a/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app184/HelloController.java b/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app184/HelloController.java index a38bd2590..30c0effa2 100644 --- a/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app184/HelloController.java +++ b/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app184/HelloController.java @@ -1,6 +1,6 @@ /* * - * * Copyright 2019-2022 the original author or authors. + * * 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. diff --git a/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app184/SpringDocApp184Test.java b/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app184/SpringDocApp184Test.java index 5044b27ab..a666d7e51 100644 --- a/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app184/SpringDocApp184Test.java +++ b/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app184/SpringDocApp184Test.java @@ -47,21 +47,21 @@ public class SpringDocApp184Test extends AbstractSpringDocTest { @Test - public void testGroup1() throws Exception { + void testGroup1() throws Exception { webTestClient.get().uri(Constants.DEFAULT_API_DOCS_URL + "/group1").exchange() .expectStatus().isOk() .expectBody().json(getContent("results/app184-1.json"), true); } @Test - public void testGroup2() throws Exception { + void testGroup2() throws Exception { webTestClient.get().uri(Constants.DEFAULT_API_DOCS_URL + "/group2").exchange() .expectStatus().isOk() .expectBody().json(getContent("results/app184-2.json"), true); } @Test - public void testGroup3() throws Exception { + void testGroup3() throws Exception { webTestClient.get().uri(Constants.DEFAULT_API_DOCS_URL + "/group3").exchange() .expectStatus().isOk() .expectBody().json(getContent("results/app184-3.json"), true); diff --git a/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app187/SpringDocApp187Test.java b/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app187/SpringDocApp187Test.java index 6c7dd75b8..c077434bb 100644 --- a/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app187/SpringDocApp187Test.java +++ b/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app187/SpringDocApp187Test.java @@ -12,7 +12,7 @@ class SpringDocApp187Test extends AbstractSpringDocTest { @Test - public void testAddRouterOperationCustomizerBean() { + void testAddRouterOperationCustomizerBean() { webTestClient.get().uri(Constants.DEFAULT_API_DOCS_URL).exchange() .expectStatus().isOk() .expectBody().json(getContent("results/app187.json"), true); diff --git a/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app188/OrderDemo.java b/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app188/OrderDemo.java index 8c1f0a702..638f9c0e9 100644 --- a/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app188/OrderDemo.java +++ b/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app188/OrderDemo.java @@ -5,28 +5,24 @@ import org.springdoc.core.customizers.GlobalOpenApiCustomizer; import org.springdoc.core.customizers.OpenApiCustomizer; -import org.springframework.core.annotation.Order; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; public class OrderDemo { - @Order(2) public static class Customizer2 implements OpenApiCustomizer, GlobalOpenApiCustomizer { public void customise(OpenAPI openApi) { openApi.addTagsItem(new Tag().name("2")); } } - @Order(3) public static class Customizer3 implements OpenApiCustomizer, GlobalOpenApiCustomizer { public void customise(OpenAPI openApi) { openApi.addTagsItem(new Tag().name("3")); } } - - @Order(1) + public static class Customizer1 implements OpenApiCustomizer, GlobalOpenApiCustomizer { public void customise(OpenAPI openApi) { openApi.addTagsItem(new Tag().name("1")); diff --git a/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app188/SpringDocApp188Test.java b/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app188/SpringDocApp188Test.java index 5f4adadd7..295640c02 100644 --- a/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app188/SpringDocApp188Test.java +++ b/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app188/SpringDocApp188Test.java @@ -13,7 +13,7 @@ class SpringDocApp188Test extends AbstractSpringDocTest { @Test - public void testApp1() { + void testApp1() { webTestClient.get().uri(Constants.DEFAULT_API_DOCS_URL +"/mygroup").exchange() .expectStatus().isOk() .expectBody().json(getContent("results/app188.json"), true); @@ -21,9 +21,9 @@ public void testApp1() { @SpringBootApplication @Import({ - OrderDemo.Customizer3.class, - OrderDemo.Customizer2.class, OrderDemo.Customizer1.class, + OrderDemo.Customizer2.class, + OrderDemo.Customizer3.class, }) @ComponentScan(basePackages = { "org.springdoc", "test.org.springdoc.api.app188" }) static class SpringDocTestApp {} diff --git a/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app190/SpringDocApp190Test.java b/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app190/SpringDocApp190Test.java index c3152e0ff..c98dbb03e 100644 --- a/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app190/SpringDocApp190Test.java +++ b/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app190/SpringDocApp190Test.java @@ -36,7 +36,7 @@ public class SpringDocApp190Test extends AbstractCommonTest { static class SpringDocTestApp {} @Test - public void test_disable_default_api_docs() throws Exception { + void test_disable_default_api_docs() throws Exception { webTestClient.get().uri(Constants.DEFAULT_API_DOCS_URL).exchange() .expectStatus().isNotFound(); } diff --git a/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app190/SpringDocApp190bisTest.java b/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app190/SpringDocApp190bisTest.java index 50b5a96d0..21a048c82 100644 --- a/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app190/SpringDocApp190bisTest.java +++ b/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app190/SpringDocApp190bisTest.java @@ -36,7 +36,7 @@ public class SpringDocApp190bisTest extends AbstractCommonTest { static class SpringDocTestApp {} @Test - public void test_enable_default_api_docs() throws Exception { + void test_enable_default_api_docs() throws Exception { webTestClient.get().uri(Constants.DEFAULT_API_DOCS_URL).exchange() .expectStatus().isOk(); } diff --git a/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app191/Handler/GetNameHandler.java b/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app191/Handler/GetNameHandler.java index 77c5f8c71..00854782a 100644 --- a/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app191/Handler/GetNameHandler.java +++ b/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app191/Handler/GetNameHandler.java @@ -16,12 +16,4 @@ protected Mono apply(ServerRequest serverRequest) { .bodyValue("Name API is called"); } - // Since handle function is present in the BaseHandler class so it is not able to detect but it should - - // Uncommenting below code will work as expected since now explicitly handle is declared here - -// @Override -// public Mono handle(ServerRequest serverRequest) { -// return super.handle(serverRequest); -// } } diff --git a/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app66/SpringDocApp66Test.java b/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app66/SpringDocApp66Test.java index dde4ed946..16119b069 100644 --- a/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app66/SpringDocApp66Test.java +++ b/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app66/SpringDocApp66Test.java @@ -29,7 +29,7 @@ public SpringDocApp66Test() { } @Test - public void testApp2() throws Exception { + void testApp2() throws Exception { webTestClient.get().uri(Constants.DEFAULT_API_DOCS_URL + "streams").exchange() .expectStatus().isNotFound(); } diff --git a/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app67/SpringDocApp67Test.java b/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app67/SpringDocApp67Test.java index 203331366..279d52509 100644 --- a/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app67/SpringDocApp67Test.java +++ b/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app67/SpringDocApp67Test.java @@ -28,7 +28,7 @@ public class SpringDocApp67Test extends AbstractSpringDocTest { @Test - public void testApp() throws Exception { + void testApp() { webTestClient.get().uri(Constants.DEFAULT_API_DOCS_URL + groupName).exchange().expectStatus().isOk().expectBody() .jsonPath("$.openapi").isEqualTo("3.0.1") .jsonPath("$.paths./api.get.tags[0]").isEqualTo("hello-controller") diff --git a/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/core/ReactiveAutoConfigurationTest.java b/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/core/ReactiveAutoConfigurationTest.java index a2d2cd0b3..92cf85aaf 100644 --- a/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/core/ReactiveAutoConfigurationTest.java +++ b/springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/core/ReactiveAutoConfigurationTest.java @@ -33,7 +33,7 @@ public class ReactiveAutoConfigurationTest { .withUserConfiguration(TestApp.class); @Test - public void configurations_successfully_loaded() { + void configurations_successfully_loaded() { contextRunner .run(context -> assertThat(context) .hasNotFailed() @@ -41,7 +41,7 @@ public void configurations_successfully_loaded() { } @Test - public void configurations_not_loaded_when_application_is_not_web() { + void configurations_not_loaded_when_application_is_not_web() { new ApplicationContextRunner() .withUserConfiguration(TestApp.class) .run(context -> assertThat(context) @@ -50,7 +50,7 @@ public void configurations_not_loaded_when_application_is_not_web() { } @Test - public void configurations_not_loaded_when_disabled() { + void configurations_not_loaded_when_disabled() { contextRunner .withPropertyValues("springdoc.api-docs.enabled=false") .run(context -> assertThat(context) @@ -59,7 +59,7 @@ public void configurations_not_loaded_when_disabled() { } @Test - public void configurations_not_loaded_when_reactor_is_not_on_class_path() { + void configurations_not_loaded_when_reactor_is_not_on_class_path() { contextRunner .withClassLoader(new FilteredClassLoader("org.springframework.web.reactive.HandlerResult")) .run(context -> assertThat(context) diff --git a/springdoc-openapi-starter-webflux-api/src/test/resources/logback-test.xml b/springdoc-openapi-starter-webflux-api/src/test/resources/logback-test.xml index 24cd4646e..3fd46cfab 100644 --- a/springdoc-openapi-starter-webflux-api/src/test/resources/logback-test.xml +++ b/springdoc-openapi-starter-webflux-api/src/test/resources/logback-test.xml @@ -1,6 +1,5 @@ - \ No newline at end of file diff --git a/springdoc-openapi-starter-webflux-api/src/test/resources/results/app102.json b/springdoc-openapi-starter-webflux-api/src/test/resources/results/app102.json index 1d4abd05d..d7479b41b 100644 --- a/springdoc-openapi-starter-webflux-api/src/test/resources/results/app102.json +++ b/springdoc-openapi-starter-webflux-api/src/test/resources/results/app102.json @@ -91,6 +91,7 @@ { "name": "nested.param1", "in": "query", + "description": "nested string parameter", "required": false, "schema": { "type": "string" @@ -99,6 +100,7 @@ { "name": "nested.param2", "in": "query", + "description": "nested BigInteger parameter", "required": false, "schema": { "type": "integer" @@ -139,4 +141,4 @@ } } } -} \ No newline at end of file +} diff --git a/springdoc-openapi-starter-webflux-api/src/test/resources/results/app67.json b/springdoc-openapi-starter-webflux-api/src/test/resources/results/app67.json index 8ef7fdaac..91d457d75 100644 --- a/springdoc-openapi-starter-webflux-api/src/test/resources/results/app67.json +++ b/springdoc-openapi-starter-webflux-api/src/test/resources/results/app67.json @@ -16,7 +16,7 @@ "tags": [ "hello-controller" ], - "operationId": "test_5", + "operationId": "test", "responses": { "200": { "description": "OK", @@ -34,7 +34,7 @@ "tags": [ "hello-controller" ], - "operationId": "test_4", + "operationId": "test_2", "responses": { "200": { "description": "OK", @@ -52,7 +52,7 @@ "tags": [ "hello-controller" ], - "operationId": "test", + "operationId": "test_1", "responses": { "200": { "description": "OK", @@ -70,7 +70,7 @@ "tags": [ "hello-controller" ], - "operationId": "test_1", + "operationId": "test_3", "responses": { "200": { "description": "OK", @@ -106,7 +106,7 @@ "tags": [ "hello-controller" ], - "operationId": "test_2", + "operationId": "test_5", "responses": { "200": { "description": "OK", @@ -124,7 +124,7 @@ "tags": [ "hello-controller" ], - "operationId": "test_3", + "operationId": "test_4", "responses": { "200": { "description": "OK", diff --git a/springdoc-openapi-starter-webflux-api/src/test/resources/results/app73.json b/springdoc-openapi-starter-webflux-api/src/test/resources/results/app73.json index 1ce2dc7fb..0e297ed56 100644 --- a/springdoc-openapi-starter-webflux-api/src/test/resources/results/app73.json +++ b/springdoc-openapi-starter-webflux-api/src/test/resources/results/app73.json @@ -11,19 +11,9 @@ } ], "paths": { - "/hello": { - "get": { - "operationId": "hello", - "responses": { - "200": { - "description": "OK" - } - } - } - }, "/echo": { "post": { - "operationId": "echo_1_1", + "operationId": "echo", "requestBody": { "content": { "text/plain": { @@ -57,9 +47,19 @@ } } }, + "/hello": { + "get": { + "operationId": "hello", + "responses": { + "200": { + "description": "OK" + } + } + } + }, "/quotes": { "get": { - "operationId": "fetchQuotes_1_1", + "operationId": "fetchQuotes", "parameters": [ { "name": "size", diff --git a/springdoc-openapi-starter-webflux-api/src/test/resources/results/app74.json b/springdoc-openapi-starter-webflux-api/src/test/resources/results/app74.json index 0a54dbfad..8f0a26a58 100644 --- a/springdoc-openapi-starter-webflux-api/src/test/resources/results/app74.json +++ b/springdoc-openapi-starter-webflux-api/src/test/resources/results/app74.json @@ -16,7 +16,7 @@ "tags": [ "book-repository" ], - "operationId": "findAll_1", + "operationId": "findAll", "responses": { "200": { "description": "OK", diff --git a/springdoc-openapi-starter-webflux-api/src/test/resources/results/app80.json b/springdoc-openapi-starter-webflux-api/src/test/resources/results/app80.json index 22dadf6ea..89c51b6d1 100644 --- a/springdoc-openapi-starter-webflux-api/src/test/resources/results/app80.json +++ b/springdoc-openapi-starter-webflux-api/src/test/resources/results/app80.json @@ -16,7 +16,7 @@ "tags": [ "book-repository" ], - "operationId": "findAll_1", + "operationId": "findAll", "responses": { "200": { "description": "OK", @@ -88,7 +88,7 @@ "tags": [ "book-repository" ], - "operationId": "findAll", + "operationId": "findAll_1", "responses": { "200": { "description": "OK", @@ -134,7 +134,7 @@ "200": { "description": "OK", "content": { - "application/xml": { + "application/json": { "schema": { "type": "array", "items": { @@ -142,7 +142,7 @@ } } }, - "application/json": { + "application/xml": { "schema": { "type": "array", "items": { @@ -160,7 +160,7 @@ "tags": [ "book-repository" ], - "operationId": "findAll_2_1", + "operationId": "findAll_2", "responses": { "200": { "description": "OK", @@ -232,7 +232,7 @@ "tags": [ "book-repository" ], - "operationId": "findAll_2_2", + "operationId": "findAll_3", "responses": { "200": { "description": "OK", @@ -304,7 +304,7 @@ "tags": [ "book-repository" ], - "operationId": "findAll_2_3", + "operationId": "findAll_4", "responses": { "200": { "description": "OK", diff --git a/springdoc-openapi-starter-webflux-api/src/test/resources/results/app86.json b/springdoc-openapi-starter-webflux-api/src/test/resources/results/app86.json index 1ce2dc7fb..0e297ed56 100644 --- a/springdoc-openapi-starter-webflux-api/src/test/resources/results/app86.json +++ b/springdoc-openapi-starter-webflux-api/src/test/resources/results/app86.json @@ -11,19 +11,9 @@ } ], "paths": { - "/hello": { - "get": { - "operationId": "hello", - "responses": { - "200": { - "description": "OK" - } - } - } - }, "/echo": { "post": { - "operationId": "echo_1_1", + "operationId": "echo", "requestBody": { "content": { "text/plain": { @@ -57,9 +47,19 @@ } } }, + "/hello": { + "get": { + "operationId": "hello", + "responses": { + "200": { + "description": "OK" + } + } + } + }, "/quotes": { "get": { - "operationId": "fetchQuotes_1_1", + "operationId": "fetchQuotes", "parameters": [ { "name": "size", diff --git a/springdoc-openapi-starter-webflux-api/src/test/resources/results/app87.json b/springdoc-openapi-starter-webflux-api/src/test/resources/results/app87.json index 0a54dbfad..8f0a26a58 100644 --- a/springdoc-openapi-starter-webflux-api/src/test/resources/results/app87.json +++ b/springdoc-openapi-starter-webflux-api/src/test/resources/results/app87.json @@ -16,7 +16,7 @@ "tags": [ "book-repository" ], - "operationId": "findAll_1", + "operationId": "findAll", "responses": { "200": { "description": "OK", diff --git a/springdoc-openapi-starter-webflux-api/src/test/resources/results/app89.json b/springdoc-openapi-starter-webflux-api/src/test/resources/results/app89.json index 22dadf6ea..ea04eecda 100644 --- a/springdoc-openapi-starter-webflux-api/src/test/resources/results/app89.json +++ b/springdoc-openapi-starter-webflux-api/src/test/resources/results/app89.json @@ -16,7 +16,7 @@ "tags": [ "book-repository" ], - "operationId": "findAll_1", + "operationId": "findAll", "responses": { "200": { "description": "OK", @@ -88,12 +88,12 @@ "tags": [ "book-repository" ], - "operationId": "findAll", + "operationId": "findAll_1", "responses": { "200": { "description": "OK", "content": { - "application/xml": { + "application/json": { "schema": { "type": "array", "items": { @@ -101,7 +101,7 @@ } } }, - "application/json": { + "application/xml": { "schema": { "type": "array", "items": { @@ -134,7 +134,7 @@ "200": { "description": "OK", "content": { - "application/xml": { + "application/json": { "schema": { "type": "array", "items": { @@ -142,7 +142,7 @@ } } }, - "application/json": { + "application/xml": { "schema": { "type": "array", "items": { @@ -160,7 +160,7 @@ "tags": [ "book-repository" ], - "operationId": "findAll_2_1", + "operationId": "findAll_2", "responses": { "200": { "description": "OK", @@ -232,7 +232,7 @@ "tags": [ "book-repository" ], - "operationId": "findAll_2_2", + "operationId": "findAll_3", "responses": { "200": { "description": "OK", @@ -304,7 +304,7 @@ "tags": [ "book-repository" ], - "operationId": "findAll_2_3", + "operationId": "findAll_4", "responses": { "200": { "description": "OK", diff --git a/springdoc-openapi-starter-webflux-api/src/test/resources/results/app90.json b/springdoc-openapi-starter-webflux-api/src/test/resources/results/app90.json index c5979e6fa..ec997c6c6 100644 --- a/springdoc-openapi-starter-webflux-api/src/test/resources/results/app90.json +++ b/springdoc-openapi-starter-webflux-api/src/test/resources/results/app90.json @@ -47,12 +47,12 @@ "tags": [ "book" ], - "operationId": "findAll_1_1", + "operationId": "findAll", "responses": { "200": { "description": "OK", "content": { - "application/xml": { + "application/json": { "schema": { "type": "array", "items": { @@ -60,7 +60,7 @@ } } }, - "application/json": { + "application/xml": { "schema": { "type": "array", "items": { @@ -120,7 +120,7 @@ "tags": [ "book" ], - "operationId": "findAll", + "operationId": "findAll_1", "responses": { "200": { "description": "OK", @@ -184,12 +184,12 @@ "tags": [ "book" ], - "operationId": "findAll_1", + "operationId": "findAll_2", "responses": { "200": { "description": "OK", "content": { - "application/xml": { + "application/json": { "schema": { "type": "array", "items": { @@ -197,7 +197,7 @@ } } }, - "application/json": { + "application/xml": { "schema": { "type": "array", "items": { @@ -215,12 +215,12 @@ "tags": [ "book" ], - "operationId": "findAll_3_1", + "operationId": "findAll_3", "responses": { "200": { "description": "OK", "content": { - "application/xml": { + "application/json": { "schema": { "type": "array", "items": { @@ -228,7 +228,7 @@ } } }, - "application/json": { + "application/xml": { "schema": { "type": "array", "items": { @@ -381,7 +381,7 @@ "positions" ], "description": "Get all positions", - "operationId": "findAll_2", + "operationId": "findAll_4", "responses": { "200": { "description": "OK", @@ -435,7 +435,7 @@ "tags": [ "quotes" ], - "operationId": "echo_1_1", + "operationId": "echo", "requestBody": { "content": { "text/plain": { @@ -487,7 +487,7 @@ "tags": [ "quotes" ], - "operationId": "fetchQuotes_1_1", + "operationId": "fetchQuotes", "parameters": [ { "name": "size", diff --git a/springdoc-openapi-starter-webflux-ui/pom.xml b/springdoc-openapi-starter-webflux-ui/pom.xml index 0b4aa79fb..1fc5e765f 100644 --- a/springdoc-openapi-starter-webflux-ui/pom.xml +++ b/springdoc-openapi-starter-webflux-ui/pom.xml @@ -3,7 +3,7 @@ org.springdoc springdoc-openapi - 2.5.0 + 2.7.0 springdoc-openapi-starter-webflux-ui @@ -18,6 +18,10 @@ org.webjars swagger-ui + + org.webjars + webjars-locator-lite + org.springframework.boot diff --git a/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerConfig.java b/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerConfig.java index 61e65f6db..5c1c4d734 100644 --- a/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerConfig.java +++ b/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerConfig.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webflux.ui; @@ -28,7 +30,6 @@ import org.springdoc.core.configuration.SpringDocConfiguration; import org.springdoc.core.properties.SpringDocConfigProperties; -import org.springdoc.core.properties.SwaggerUiConfigParameters; import org.springdoc.core.properties.SwaggerUiConfigProperties; import org.springdoc.core.properties.SwaggerUiOAuthProperties; import org.springdoc.core.providers.ActuatorProvider; @@ -60,6 +61,7 @@ /** * The type Swagger config. + * * @author bnasslahsen */ @Lazy(false) @@ -72,18 +74,17 @@ public class SwaggerConfig implements WebFluxConfigurer { /** * Swagger welcome swagger welcome web flux. * - * @param swaggerUiConfig the swagger ui config + * @param swaggerUiConfig the swagger ui config * @param springDocConfigProperties the spring doc config properties - * @param swaggerUiConfigParameters the swagger ui config parameters - * @param springWebProvider the spring web provider + * @param springWebProvider the spring web provider * @return the swagger welcome web flux */ @Bean @ConditionalOnMissingBean @ConditionalOnProperty(name = SPRINGDOC_USE_MANAGEMENT_PORT, havingValue = "false", matchIfMissing = true) @Lazy(false) - SwaggerWelcomeWebFlux swaggerWelcome(SwaggerUiConfigProperties swaggerUiConfig, SpringDocConfigProperties springDocConfigProperties, SwaggerUiConfigParameters swaggerUiConfigParameters, SpringWebProvider springWebProvider) { - return new SwaggerWelcomeWebFlux(swaggerUiConfig, springDocConfigProperties, swaggerUiConfigParameters, springWebProvider); + SwaggerWelcomeWebFlux swaggerWelcome(SwaggerUiConfigProperties swaggerUiConfig, SpringDocConfigProperties springDocConfigProperties, SpringWebProvider springWebProvider) { + return new SwaggerWelcomeWebFlux(swaggerUiConfig, springDocConfigProperties,springWebProvider); } /** @@ -117,51 +118,37 @@ SwaggerUiHome swaggerUiHome(Optional optionalWebFluxPropertie /** * Swagger web flux configurer swagger web flux configurer. * - * @param swaggerUiConfigParameters the swagger ui calculated config + * @param swaggerUiConfigProperties the swagger ui calculated config * @param springDocConfigProperties the spring doc config properties - * @param swaggerIndexTransformer the swagger index transformer - * @param actuatorProvider the actuator provider - * @param swaggerResourceResolver the swagger resource resolver + * @param swaggerIndexTransformer the swagger index transformer + * @param actuatorProvider the actuator provider + * @param swaggerResourceResolver the swagger resource resolver * @return the swagger web flux configurer */ @Bean @ConditionalOnMissingBean @Lazy(false) - SwaggerWebFluxConfigurer swaggerWebFluxConfigurer(SwaggerUiConfigParameters swaggerUiConfigParameters, + SwaggerWebFluxConfigurer swaggerWebFluxConfigurer(SwaggerUiConfigProperties swaggerUiConfigProperties, SpringDocConfigProperties springDocConfigProperties, SwaggerIndexTransformer swaggerIndexTransformer, Optional actuatorProvider, SwaggerResourceResolver swaggerResourceResolver) { - return new SwaggerWebFluxConfigurer(swaggerUiConfigParameters, springDocConfigProperties, swaggerIndexTransformer, actuatorProvider, swaggerResourceResolver); + return new SwaggerWebFluxConfigurer(swaggerUiConfigProperties,springDocConfigProperties, swaggerIndexTransformer, actuatorProvider, swaggerResourceResolver); } /** * Index page transformer swagger index transformer. * - * @param swaggerUiConfig the swagger ui config + * @param swaggerUiConfig the swagger ui config * @param swaggerUiOAuthProperties the swagger ui o auth properties - * @param swaggerUiConfigParameters the swagger ui config parameters - * @param swaggerWelcomeCommon the swagger welcome common - * @param objectMapperProvider the object mapper provider + * @param swaggerWelcomeCommon the swagger welcome common + * @param objectMapperProvider the object mapper provider * @return the swagger index transformer */ @Bean @ConditionalOnMissingBean @Lazy(false) SwaggerIndexTransformer indexPageTransformer(SwaggerUiConfigProperties swaggerUiConfig, SwaggerUiOAuthProperties swaggerUiOAuthProperties, - SwaggerUiConfigParameters swaggerUiConfigParameters, SwaggerWelcomeCommon swaggerWelcomeCommon, ObjectMapperProvider objectMapperProvider) { - return new SwaggerIndexPageTransformer(swaggerUiConfig, swaggerUiOAuthProperties, swaggerUiConfigParameters, swaggerWelcomeCommon, objectMapperProvider); - } - - /** - * Swagger ui config parameters swagger ui config parameters. - * - * @param swaggerUiConfig the swagger ui config - * @return the swagger ui config parameters - */ - @Bean - @ConditionalOnMissingBean - @Lazy(false) - SwaggerUiConfigParameters swaggerUiConfigParameters(SwaggerUiConfigProperties swaggerUiConfig) { - return new SwaggerUiConfigParameters(swaggerUiConfig); + SwaggerWelcomeCommon swaggerWelcomeCommon, ObjectMapperProvider objectMapperProvider) { + return new SwaggerIndexPageTransformer(swaggerUiConfig, swaggerUiOAuthProperties, swaggerWelcomeCommon, objectMapperProvider); } /** @@ -198,6 +185,7 @@ SwaggerResourceResolver swaggerResourceResolver(SwaggerUiConfigProperties swagge /** * The type Swagger actuator welcome configuration. + * * @author bnasslashen */ @ConditionalOnProperty(SPRINGDOC_USE_MANAGEMENT_PORT) @@ -208,10 +196,9 @@ static class SwaggerActuatorWelcomeConfiguration { /** * Swagger actuator welcome swagger welcome actuator. * - * @param swaggerUiConfig the swagger ui config - * @param springDocConfigProperties the spring doc config properties - * @param swaggerUiConfigParameters the swagger ui config parameters - * @param webEndpointProperties the web endpoint properties + * @param swaggerUiConfig the swagger ui config + * @param springDocConfigProperties the spring doc config properties + * @param webEndpointProperties the web endpoint properties * @param managementServerProperties the management server properties * @return the swagger welcome actuator */ @@ -219,8 +206,8 @@ static class SwaggerActuatorWelcomeConfiguration { @ConditionalOnMissingBean @Lazy(false) SwaggerWelcomeActuator swaggerActuatorWelcome(SwaggerUiConfigProperties swaggerUiConfig, SpringDocConfigProperties springDocConfigProperties, - SwaggerUiConfigParameters swaggerUiConfigParameters, WebEndpointProperties webEndpointProperties, ManagementServerProperties managementServerProperties) { - return new SwaggerWelcomeActuator(swaggerUiConfig, springDocConfigProperties, swaggerUiConfigParameters, webEndpointProperties, managementServerProperties); + WebEndpointProperties webEndpointProperties, ManagementServerProperties managementServerProperties) { + return new SwaggerWelcomeActuator(swaggerUiConfig, springDocConfigProperties, webEndpointProperties, managementServerProperties); } } } diff --git a/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerConfigResource.java b/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerConfigResource.java index da8eef445..486a483c8 100644 --- a/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerConfigResource.java +++ b/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerConfigResource.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webflux.ui; @@ -36,6 +38,7 @@ /** * The type Swagger config resource. + * * @author bnasslahsen */ @RestController diff --git a/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerIndexPageTransformer.java b/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerIndexPageTransformer.java index 62733a2c2..bb8c54171 100644 --- a/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerIndexPageTransformer.java +++ b/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerIndexPageTransformer.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webflux.ui; @@ -44,6 +46,7 @@ /** * The type Swagger index transformer. + * * @author bnasslahsen */ public class SwaggerIndexPageTransformer extends AbstractSwaggerIndexTransformer implements SwaggerIndexTransformer { @@ -55,28 +58,28 @@ public class SwaggerIndexPageTransformer extends AbstractSwaggerIndexTransformer /** * Instantiates a new Swagger index transformer. - * @param swaggerUiConfig the swagger ui config + * + * @param swaggerUiConfig the swagger ui config * @param swaggerUiOAuthProperties the swagger ui o auth properties - * @param swaggerUiConfigParameters the swagger ui config parameters - * @param swaggerWelcomeCommon the swagger welcome common - * @param objectMapperProvider the object mapper provider + * @param swaggerWelcomeCommon the swagger welcome common + * @param objectMapperProvider the object mapper provider */ - public SwaggerIndexPageTransformer(SwaggerUiConfigProperties swaggerUiConfig, SwaggerUiOAuthProperties swaggerUiOAuthProperties, - SwaggerUiConfigParameters swaggerUiConfigParameters, SwaggerWelcomeCommon swaggerWelcomeCommon, ObjectMapperProvider objectMapperProvider) { - super(swaggerUiConfig, swaggerUiOAuthProperties, swaggerUiConfigParameters, objectMapperProvider); + public SwaggerIndexPageTransformer(SwaggerUiConfigProperties swaggerUiConfig, SwaggerUiOAuthProperties swaggerUiOAuthProperties, + SwaggerWelcomeCommon swaggerWelcomeCommon, ObjectMapperProvider objectMapperProvider) { + super(swaggerUiConfig, swaggerUiOAuthProperties, objectMapperProvider); this.swaggerWelcomeCommon = swaggerWelcomeCommon; } @Override public Mono transform(ServerWebExchange serverWebExchange, Resource resource, ResourceTransformerChain resourceTransformerChain) { - if (swaggerUiConfigParameters.getConfigUrl() == null) - swaggerWelcomeCommon.buildFromCurrentContextPath(serverWebExchange.getRequest()); - + SwaggerUiConfigParameters swaggerUiConfigParameters = new SwaggerUiConfigParameters(swaggerUiConfig); + swaggerWelcomeCommon.buildFromCurrentContextPath(swaggerUiConfigParameters, serverWebExchange.getRequest()); + final AntPathMatcher antPathMatcher = new AntPathMatcher(); try { boolean isIndexFound = antPathMatcher.match("**/swagger-ui/**/" + SWAGGER_INITIALIZER_JS, resource.getURL().toString()); if (isIndexFound) { - String html = defaultTransformations(resource.getInputStream()); + String html = defaultTransformations(swaggerUiConfigParameters, resource.getInputStream()); return Mono.just(new TransformedResource(resource, html.getBytes(StandardCharsets.UTF_8))); } else { diff --git a/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerIndexTransformer.java b/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerIndexTransformer.java index 44d90aba8..eaa4df112 100644 --- a/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerIndexTransformer.java +++ b/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerIndexTransformer.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webflux.ui; @@ -28,6 +30,7 @@ /** * The type Swagger index transformer. + * * @author pverdage */ public interface SwaggerIndexTransformer extends ResourceTransformer { diff --git a/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerResourceResolver.java b/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerResourceResolver.java index 343227120..7e9ee7507 100644 --- a/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerResourceResolver.java +++ b/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerResourceResolver.java @@ -1,58 +1,73 @@ -package org.springdoc.webflux.ui; +/* + * + * * + * * * + * * * * + * * * * * + * * * * * * 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. + * * * * * + * * * * + * * * + * * + * + */ -import java.util.List; +package org.springdoc.webflux.ui; import org.springdoc.core.properties.SwaggerUiConfigProperties; -import org.springdoc.ui.AbstractSwaggerResourceResolver; -import reactor.core.publisher.Mono; -import org.springframework.core.io.Resource; -import org.springframework.web.reactive.resource.ResourceResolver; -import org.springframework.web.reactive.resource.ResourceResolverChain; -import org.springframework.web.server.ServerWebExchange; +import org.springframework.lang.Nullable; +import org.springframework.web.reactive.resource.LiteWebJarsResourceResolver; + +import static org.springdoc.ui.SwaggerResourceResolverUtils.findSwaggerResourcePath; /** - * The type Web jars version resource resolver. + * The type Swagger resource resolver. * * @author bnasslahsen */ -public class SwaggerResourceResolver extends AbstractSwaggerResourceResolver implements ResourceResolver { +public class SwaggerResourceResolver extends LiteWebJarsResourceResolver { + /** + * The Swagger ui config properties. + */ + private final SwaggerUiConfigProperties swaggerUiConfigProperties; + /** * Instantiates a new Web jars version resource resolver. * * @param swaggerUiConfigProperties the swagger ui config properties */ public SwaggerResourceResolver(SwaggerUiConfigProperties swaggerUiConfigProperties) { - super(swaggerUiConfigProperties); + this.swaggerUiConfigProperties = swaggerUiConfigProperties; } - @Override - public Mono resolveResource(ServerWebExchange exchange, String requestPath, List locations, ResourceResolverChain chain) { - return chain.resolveResource(exchange, requestPath, locations) - .switchIfEmpty(Mono.defer(() -> { - String webJarsResourcePath = findWebJarResourcePath(requestPath); - if (webJarsResourcePath != null) { - return chain.resolveResource(exchange, webJarsResourcePath, locations); - } - else { - return Mono.empty(); - } - })); - } + /** + * Find web jar resource path string. + * + * @param pathStr the path + * @return the string + */ + @Nullable @Override - public Mono resolveUrlPath(String resourceUrlPath, List locations, ResourceResolverChain chain) { - return chain.resolveUrlPath(resourceUrlPath, locations) - .switchIfEmpty(Mono.defer(() -> { - String webJarResourcePath = findWebJarResourcePath(resourceUrlPath); - if (webJarResourcePath != null) { - return chain.resolveUrlPath(webJarResourcePath, locations); - } - else { - return Mono.empty(); - } - })); + protected String findWebJarResourcePath(String pathStr) { + String resourcePath = super.findWebJarResourcePath(pathStr); + if(resourcePath == null) + return findSwaggerResourcePath(pathStr, swaggerUiConfigProperties.getVersion()); + return resourcePath; } } \ No newline at end of file diff --git a/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerUiHome.java b/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerUiHome.java index 7e69ddcab..343355c91 100644 --- a/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerUiHome.java +++ b/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerUiHome.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webflux.ui; @@ -44,6 +46,7 @@ /** * Home redirection to swagger api documentation + * * @author bnasslahsen */ @Controller @@ -56,9 +59,9 @@ public class SwaggerUiHome { private String swaggerUiPath; /** - * The Base path. + * The Optional web flux properties. */ - private String basePath = StringUtils.EMPTY; + private final Optional optionalWebFluxProperties; /** * Instantiates a new Swagger ui home. @@ -66,7 +69,7 @@ public class SwaggerUiHome { * @param optionalWebFluxProperties the optional web flux properties */ public SwaggerUiHome(Optional optionalWebFluxProperties) { - optionalWebFluxProperties.ifPresent(webFluxProperties -> this.basePath = StringUtils.defaultIfEmpty(webFluxProperties.getBasePath(), StringUtils.EMPTY)); + this.optionalWebFluxProperties = optionalWebFluxProperties; } /** @@ -78,7 +81,10 @@ public SwaggerUiHome(Optional optionalWebFluxProperties) { @GetMapping(DEFAULT_PATH_SEPARATOR) @Operation(hidden = true) public Mono index(ServerHttpResponse response) { - UriComponentsBuilder uriBuilder = UriComponentsBuilder.fromUriString(this.basePath + swaggerUiPath); + String basePath = optionalWebFluxProperties + .map(props -> StringUtils.defaultIfEmpty(props.getBasePath(), StringUtils.EMPTY)) + .orElse(StringUtils.EMPTY); + UriComponentsBuilder uriBuilder = UriComponentsBuilder.fromUriString(basePath + swaggerUiPath); response.setStatusCode(HttpStatus.FOUND); response.getHeaders().setLocation(URI.create(uriBuilder.build().encode().toString())); return response.setComplete(); diff --git a/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerWebFluxConfigurer.java b/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerWebFluxConfigurer.java index 786f2f8be..9dd9e675d 100644 --- a/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerWebFluxConfigurer.java +++ b/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerWebFluxConfigurer.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webflux.ui; @@ -27,7 +29,7 @@ import java.util.Optional; import org.springdoc.core.properties.SpringDocConfigProperties; -import org.springdoc.core.properties.SwaggerUiConfigParameters; +import org.springdoc.core.properties.SwaggerUiConfigProperties; import org.springdoc.core.providers.ActuatorProvider; import org.springframework.web.reactive.config.ResourceHandlerRegistry; @@ -40,20 +42,11 @@ /** * The type Swagger web flux configurer. + * * @author bnasslahsen */ public class SwaggerWebFluxConfigurer implements WebFluxConfigurer { - /** - * The Swagger path. - */ - private final String swaggerPath; - - /** - * The Web jars prefix url. - */ - private final String webJarsPrefixUrl; - /** * The Swagger index transformer. */ @@ -69,34 +62,45 @@ public class SwaggerWebFluxConfigurer implements WebFluxConfigurer { */ private final SwaggerResourceResolver swaggerResourceResolver; + /** + * The Swagger ui config properties. + */ + private final SwaggerUiConfigProperties swaggerUiConfigProperties; + + /** + * The Spring doc config properties. + */ + private final SpringDocConfigProperties springDocConfigProperties; + /** * Instantiates a new Swagger web flux configurer. * - * @param swaggerUiConfigParameters the swagger ui calculated config + * @param swaggerUiConfigProperties the swagger ui calculated config * @param springDocConfigProperties the spring doc config properties - * @param swaggerIndexTransformer the swagger index transformer - * @param actuatorProvider the actuator provider - * @param swaggerResourceResolver the swagger resource resolver + * @param swaggerIndexTransformer the swagger index transformer + * @param actuatorProvider the actuator provider + * @param swaggerResourceResolver the swagger resource resolver */ - public SwaggerWebFluxConfigurer(SwaggerUiConfigParameters swaggerUiConfigParameters, + public SwaggerWebFluxConfigurer(SwaggerUiConfigProperties swaggerUiConfigProperties, SpringDocConfigProperties springDocConfigProperties, SwaggerIndexTransformer swaggerIndexTransformer, Optional actuatorProvider, SwaggerResourceResolver swaggerResourceResolver) { - this.swaggerPath = swaggerUiConfigParameters.getPath(); - this.webJarsPrefixUrl = springDocConfigProperties.getWebjars().getPrefix(); this.swaggerIndexTransformer = swaggerIndexTransformer; this.actuatorProvider = actuatorProvider; this.swaggerResourceResolver = swaggerResourceResolver; + this.swaggerUiConfigProperties = swaggerUiConfigProperties; + this.springDocConfigProperties = springDocConfigProperties; } @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { StringBuilder uiRootPath = new StringBuilder(); + String swaggerPath = swaggerUiConfigProperties.getPath(); if (swaggerPath.contains(DEFAULT_PATH_SEPARATOR)) uiRootPath.append(swaggerPath, 0, swaggerPath.lastIndexOf(DEFAULT_PATH_SEPARATOR)); if (actuatorProvider.isPresent() && actuatorProvider.get().isUseManagementPort()) uiRootPath.append(actuatorProvider.get().getBasePath()); - registry.addResourceHandler(uiRootPath + webJarsPrefixUrl + ALL_PATTERN) + registry.addResourceHandler(uiRootPath + springDocConfigProperties.getWebjars().getPrefix() + ALL_PATTERN) .addResourceLocations(CLASSPATH_RESOURCE_LOCATION + DEFAULT_WEB_JARS_PREFIX_URL + DEFAULT_PATH_SEPARATOR) .resourceChain(false) .addResolver(swaggerResourceResolver) diff --git a/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerWelcomeActuator.java b/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerWelcomeActuator.java index 1442d93fd..af191383d 100644 --- a/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerWelcomeActuator.java +++ b/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerWelcomeActuator.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webflux.ui; @@ -50,6 +52,7 @@ /** * The type Swagger actuator welcome. + * * @author bnasslashen */ @ControllerEndpoint(id = DEFAULT_SWAGGER_UI_ACTUATOR_PATH) @@ -73,18 +76,16 @@ public class SwaggerWelcomeActuator extends SwaggerWelcomeCommon { /** * Instantiates a new Swagger welcome. * - * @param swaggerUiConfig the swagger ui config - * @param springDocConfigProperties the spring doc config properties - * @param swaggerUiConfigParameters the swagger ui config parameters - * @param webEndpointProperties the web endpoint properties + * @param swaggerUiConfig the swagger ui config + * @param springDocConfigProperties the spring doc config properties + * @param webEndpointProperties the web endpoint properties * @param managementServerProperties the management server properties */ public SwaggerWelcomeActuator(SwaggerUiConfigProperties swaggerUiConfig , SpringDocConfigProperties springDocConfigProperties, - SwaggerUiConfigParameters swaggerUiConfigParameters, WebEndpointProperties webEndpointProperties, ManagementServerProperties managementServerProperties) { - super(swaggerUiConfig, springDocConfigProperties, swaggerUiConfigParameters); + super(swaggerUiConfig, springDocConfigProperties); this.webEndpointProperties = webEndpointProperties; this.managementServerProperties = managementServerProperties; } @@ -119,14 +120,14 @@ public Map getSwaggerUiConfig(ServerHttpRequest request) { } @Override - protected void calculateUiRootPath(StringBuilder... sbUrls) { + protected void calculateUiRootPath(SwaggerUiConfigParameters swaggerUiConfigParameters,StringBuilder... sbUrls) { StringBuilder sbUrl = new StringBuilder(); sbUrl.append(webEndpointProperties.getBasePath()); - calculateUiRootCommon(sbUrl, sbUrls); + calculateUiRootCommon(swaggerUiConfigParameters,sbUrl, sbUrls); } @Override - protected void calculateOauth2RedirectUrl(UriComponentsBuilder uriComponentsBuilder) { + protected void calculateOauth2RedirectUrl(SwaggerUiConfigParameters swaggerUiConfigParameters, UriComponentsBuilder uriComponentsBuilder) { if (StringUtils.isBlank(swaggerUiConfig.getOauth2RedirectUrl()) || !swaggerUiConfigParameters.isValidUrl(swaggerUiConfig.getOauth2RedirectUrl())) { UriComponentsBuilder oauthPrefix = uriComponentsBuilder.path(managementServerProperties.getBasePath() + swaggerUiConfigParameters.getUiRootPath()).path(webJarsPrefixUrl); swaggerUiConfigParameters.setOauth2RedirectUrl(oauthPrefix.path(getOauth2RedirectUrl()).build().toString()); @@ -134,20 +135,20 @@ protected void calculateOauth2RedirectUrl(UriComponentsBuilder uriComponentsBuil } @Override - protected String buildApiDocUrl() { - return buildUrl(contextPath + webEndpointProperties.getBasePath(), DEFAULT_API_DOCS_ACTUATOR_URL); + protected void buildApiDocUrl(SwaggerUiConfigParameters swaggerUiConfigParameters) { + swaggerUiConfigParameters.setApiDocsUrl( buildUrl(swaggerUiConfigParameters.getContextPath() + webEndpointProperties.getBasePath(), DEFAULT_API_DOCS_ACTUATOR_URL)); } @Override - protected String buildUrlWithContextPath(String swaggerUiUrl) { - return buildUrl(contextPath + webEndpointProperties.getBasePath(), swaggerUiUrl); + protected String buildUrlWithContextPath(SwaggerUiConfigParameters swaggerUiConfigParameters, String swaggerUiUrl) { + return buildUrl(swaggerUiConfigParameters.getContextPath() + webEndpointProperties.getBasePath(), swaggerUiUrl); } @Override - protected String buildSwaggerConfigUrl() { - return contextPath + webEndpointProperties.getBasePath() + protected void buildSwaggerConfigUrl(SwaggerUiConfigParameters swaggerUiConfigParameters) { + swaggerUiConfigParameters.setConfigUrl(swaggerUiConfigParameters.getContextPath() + webEndpointProperties.getBasePath() + DEFAULT_PATH_SEPARATOR + DEFAULT_SWAGGER_UI_ACTUATOR_PATH - + DEFAULT_PATH_SEPARATOR + SWAGGER_CONFIG_FILE; + + DEFAULT_PATH_SEPARATOR + SWAGGER_CONFIG_FILE); } } diff --git a/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerWelcomeCommon.java b/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerWelcomeCommon.java index bef2fd87b..bf8d0defb 100644 --- a/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerWelcomeCommon.java +++ b/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerWelcomeCommon.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webflux.ui; @@ -41,6 +43,7 @@ /** * The type Swagger welcome common. + * * @author bnasslashen */ public abstract class SwaggerWelcomeCommon extends AbstractSwaggerWelcome { @@ -49,30 +52,31 @@ public abstract class SwaggerWelcomeCommon extends AbstractSwaggerWelcome { * The Web jars prefix url. */ protected String webJarsPrefixUrl; - + /** * Instantiates a new Abstract swagger welcome. - * @param swaggerUiConfig the swagger ui config + * + * @param swaggerUiConfig the swagger ui config * @param springDocConfigProperties the spring doc config properties - * @param swaggerUiConfigParameters the swagger ui config parameters */ - public SwaggerWelcomeCommon(SwaggerUiConfigProperties swaggerUiConfig, SpringDocConfigProperties springDocConfigProperties, SwaggerUiConfigParameters swaggerUiConfigParameters) { - super(swaggerUiConfig, springDocConfigProperties, swaggerUiConfigParameters); + protected SwaggerWelcomeCommon(SwaggerUiConfigProperties swaggerUiConfig, SpringDocConfigProperties springDocConfigProperties) { + super(swaggerUiConfig, springDocConfigProperties); this.webJarsPrefixUrl = springDocConfigProperties.getWebjars().getPrefix(); } /** * Redirect to ui mono. * - * @param request the request + * @param request the request * @param response the response * @return the mono */ protected Mono redirectToUi(ServerHttpRequest request, ServerHttpResponse response) { - this.buildFromCurrentContextPath(request); - String sbUrl = this.buildUrl(contextPath, swaggerUiConfigParameters.getUiRootPath() + springDocConfigProperties.getWebjars().getPrefix() + getSwaggerUiUrl()); - UriComponentsBuilder uriBuilder = getUriComponentsBuilder(sbUrl); + SwaggerUiConfigParameters swaggerUiConfigParameters = new SwaggerUiConfigParameters(swaggerUiConfig); + this.buildFromCurrentContextPath(swaggerUiConfigParameters, request); + String sbUrl = this.buildUrl(swaggerUiConfigParameters.getContextPath(), swaggerUiConfigParameters.getUiRootPath() + springDocConfigProperties.getWebjars().getPrefix() + getSwaggerUiUrl()); + UriComponentsBuilder uriBuilder = getUriComponentsBuilder(swaggerUiConfigParameters, sbUrl); response.setStatusCode(HttpStatus.FOUND); response.getHeaders().setLocation(URI.create(uriBuilder.build().encode().toString())); return response.setComplete(); @@ -85,23 +89,25 @@ protected Mono redirectToUi(ServerHttpRequest request, ServerHttpResponse * @return the swagger ui config */ protected Map getSwaggerUiConfig(ServerHttpRequest request) { - this.buildFromCurrentContextPath(request); + SwaggerUiConfigParameters swaggerUiConfigParameters = new SwaggerUiConfigParameters(swaggerUiConfig); + this.buildFromCurrentContextPath(swaggerUiConfigParameters, request); return swaggerUiConfigParameters.getConfigParameters(); } /** * From current context path string. * - * @param request the request + * @param swaggerUiConfigParameters the swagger ui config parameters + * @param request the request * @return the string */ - void buildFromCurrentContextPath(ServerHttpRequest request) { - super.init(); - contextPath = request.getPath().contextPath().value(); + void buildFromCurrentContextPath(SwaggerUiConfigParameters swaggerUiConfigParameters, ServerHttpRequest request) { + super.init(swaggerUiConfigParameters); + swaggerUiConfigParameters.setContextPath(request.getPath().contextPath().value()); String url = UriComponentsBuilder.fromHttpRequest(request).toUriString(); if (!AntPathMatcher.DEFAULT_PATH_SEPARATOR.equals(request.getPath().toString())) url = url.replace(request.getPath().toString(), ""); - buildConfigUrl(UriComponentsBuilder.fromUriString(url)); + buildConfigUrl(swaggerUiConfigParameters, UriComponentsBuilder.fromUriString(url)); } } diff --git a/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerWelcomeWebFlux.java b/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerWelcomeWebFlux.java index 34efc6f65..5ad06aa28 100644 --- a/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerWelcomeWebFlux.java +++ b/springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerWelcomeWebFlux.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webflux.ui; @@ -44,33 +46,26 @@ /** * The type Swagger welcome. + * * @author bnasslahsen */ @Controller public class SwaggerWelcomeWebFlux extends SwaggerWelcomeCommon { - /** * The Spring web provider. */ private final SpringWebProvider springWebProvider; - /** - * The Path prefix. - */ - private String pathPrefix; - /** * Instantiates a new Swagger welcome web flux. * - * @param swaggerUiConfig the swagger ui config + * @param swaggerUiConfig the swagger ui config * @param springDocConfigProperties the spring doc config properties - * @param swaggerUiConfigParameters the swagger ui config parameters - * @param springWebProvider the spring web provider + * @param springWebProvider the spring web provider */ - public SwaggerWelcomeWebFlux(SwaggerUiConfigProperties swaggerUiConfig, SpringDocConfigProperties springDocConfigProperties, - SwaggerUiConfigParameters swaggerUiConfigParameters, SpringWebProvider springWebProvider) { - super(swaggerUiConfig, springDocConfigProperties, swaggerUiConfigParameters); + public SwaggerWelcomeWebFlux(SwaggerUiConfigProperties swaggerUiConfig, SpringDocConfigProperties springDocConfigProperties, SpringWebProvider springWebProvider) { + super(swaggerUiConfig, springDocConfigProperties); this.springWebProvider = springWebProvider; } @@ -89,55 +84,35 @@ public Mono redirectToUi(ServerHttpRequest request, ServerHttpResponse res return super.redirectToUi(request, response); } - /** - * Calculate ui root path. - * - * @param sbUrls the sb urls - */ @Override - protected void calculateUiRootPath(StringBuilder... sbUrls) { + protected void calculateUiRootPath(SwaggerUiConfigParameters swaggerUiConfigParameters, StringBuilder... sbUrls) { StringBuilder sbUrl = new StringBuilder(); - calculateUiRootCommon(sbUrl, sbUrls); + calculateUiRootCommon(swaggerUiConfigParameters,sbUrl, sbUrls); } - /** - * Calculate oauth 2 redirect url. - * - * @param uriComponentsBuilder the uri components builder - */ @Override - protected void calculateOauth2RedirectUrl(UriComponentsBuilder uriComponentsBuilder) { + protected void calculateOauth2RedirectUrl(SwaggerUiConfigParameters swaggerUiConfigParameters, UriComponentsBuilder uriComponentsBuilder) { if (StringUtils.isBlank(swaggerUiConfig.getOauth2RedirectUrl()) || !swaggerUiConfigParameters.isValidUrl(swaggerUiConfig.getOauth2RedirectUrl())) { - UriComponentsBuilder oauthPrefix = uriComponentsBuilder.path(contextPath).path(swaggerUiConfigParameters.getUiRootPath()).path(webJarsPrefixUrl); + UriComponentsBuilder oauthPrefix = uriComponentsBuilder.path(swaggerUiConfigParameters.getContextPath()).path(swaggerUiConfigParameters.getUiRootPath()).path(webJarsPrefixUrl); swaggerUiConfigParameters.setOauth2RedirectUrl(oauthPrefix.path(getOauth2RedirectUrl()).build().toString()); } } - /** - * Build api doc url string. - * - * @return the string - */ @Override - protected String buildApiDocUrl() { - return buildUrlWithContextPath(springDocConfigProperties.getApiDocs().getPath()); + protected void buildApiDocUrl(SwaggerUiConfigParameters swaggerUiConfigParameters) { + swaggerUiConfigParameters.setApiDocsUrl(buildUrlWithContextPath(swaggerUiConfigParameters, springDocConfigProperties.getApiDocs().getPath())); } @Override - protected String buildUrlWithContextPath(String swaggerUiUrl) { - if (this.pathPrefix == null) - this.pathPrefix = springWebProvider.findPathPrefix(springDocConfigProperties); - return buildUrl(this.contextPath + this.pathPrefix, swaggerUiUrl); + protected String buildUrlWithContextPath(SwaggerUiConfigParameters swaggerUiConfigParameters, String swaggerUiUrl) { + if (swaggerUiConfigParameters.getPathPrefix() == null) + swaggerUiConfigParameters.setPathPrefix(springWebProvider.findPathPrefix(springDocConfigProperties)); + return buildUrl(swaggerUiConfigParameters.getContextPath() + swaggerUiConfigParameters.getPathPrefix(), swaggerUiUrl); } - /** - * Build swagger config url string. - * - * @return the string - */ @Override - protected String buildSwaggerConfigUrl() { - return this.apiDocsUrl + DEFAULT_PATH_SEPARATOR + SWAGGER_CONFIG_FILE; + protected void buildSwaggerConfigUrl(SwaggerUiConfigParameters swaggerUiConfigParameters) { + swaggerUiConfigParameters.setConfigUrl(swaggerUiConfigParameters.getApiDocsUrl()+ DEFAULT_PATH_SEPARATOR + SWAGGER_CONFIG_FILE); } } diff --git a/springdoc-openapi-starter-webflux-ui/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/springdoc-openapi-starter-webflux-ui/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 6a15d9b8b..f946e27b2 100644 --- a/springdoc-openapi-starter-webflux-ui/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/springdoc-openapi-starter-webflux-ui/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1,5 +1,4 @@ org.springdoc.webflux.ui.SwaggerConfig org.springdoc.core.properties.SwaggerUiConfigProperties -org.springdoc.core.properties.SwaggerUiConfigParameters org.springdoc.core.properties.SwaggerUiOAuthProperties org.springdoc.core.configuration.SpringDocUIConfiguration \ No newline at end of file diff --git a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/AbstractSpringDocActuatorTest.java b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/AbstractSpringDocActuatorTest.java index 84de35823..a52f1db7e 100644 --- a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/AbstractSpringDocActuatorTest.java +++ b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/AbstractSpringDocActuatorTest.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocApp1RedirecFilterTest.java b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocApp1RedirecFilterTest.java index 6bff61bd4..8609d5015 100644 --- a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocApp1RedirecFilterTest.java +++ b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocApp1RedirecFilterTest.java @@ -31,7 +31,7 @@ public class SpringDocApp1RedirecFilterTest extends AbstractSpringDocTest { @Test - public void shouldRedirectWithConfigUrlIgnoringQueryParams() { + void shouldRedirectWithConfigUrlIgnoringQueryParams() { WebTestClient.ResponseSpec responseSpec = webTestClient.get().uri("/swagger-ui.html").exchange() .expectStatus().isFound(); diff --git a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocApp1RedirectConfigUrlTest.java b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocApp1RedirectConfigUrlTest.java index 822181ba7..753f50363 100644 --- a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocApp1RedirectConfigUrlTest.java +++ b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocApp1RedirectConfigUrlTest.java @@ -34,7 +34,7 @@ public class SpringDocApp1RedirectConfigUrlTest extends AbstractSpringDocTest { @Test - public void shouldRedirectWithConfigUrlIgnoringQueryParams() { + void shouldRedirectWithConfigUrlIgnoringQueryParams() { WebTestClient.ResponseSpec responseSpec = webTestClient.get().uri("/swagger-ui.html").exchange() .expectStatus().isFound(); diff --git a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocApp1RedirectDefaultTest.java b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocApp1RedirectDefaultTest.java index 7c524601c..f9e3795ba 100644 --- a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocApp1RedirectDefaultTest.java +++ b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocApp1RedirectDefaultTest.java @@ -29,7 +29,7 @@ public class SpringDocApp1RedirectDefaultTest extends AbstractSpringDocTest { @Test - public void shouldRedirectWithDefaultQueryParams() { + void shouldRedirectWithDefaultQueryParams() { WebTestClient.ResponseSpec responseSpec = webTestClient.get().uri("/swagger-ui.html").exchange() .expectStatus().isFound(); responseSpec.expectHeader() diff --git a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocApp1RedirectLayoutTest.java b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocApp1RedirectLayoutTest.java index c2d5c4a65..0c99df952 100644 --- a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocApp1RedirectLayoutTest.java +++ b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocApp1RedirectLayoutTest.java @@ -31,7 +31,7 @@ public class SpringDocApp1RedirectLayoutTest extends AbstractSpringDocTest { @Test - public void shouldRedirectWithConfigUrlIgnoringQueryParams() { + void shouldRedirectWithConfigUrlIgnoringQueryParams() { WebTestClient.ResponseSpec responseSpec = webTestClient.get().uri("/swagger-ui.html").exchange() .expectStatus().isFound(); diff --git a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocApp1RedirectWithConfigTest.java b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocApp1RedirectWithConfigTest.java index 5c277dc5a..e663aefd9 100644 --- a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocApp1RedirectWithConfigTest.java +++ b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocApp1RedirectWithConfigTest.java @@ -33,7 +33,7 @@ public class SpringDocApp1RedirectWithConfigTest extends AbstractSpringDocTest { @Test - public void shouldRedirectWithConfiguredParams() { + void shouldRedirectWithConfiguredParams() { WebTestClient.ResponseSpec responseSpec = webTestClient.get().uri("/swagger-ui.html").exchange() .expectStatus().isFound(); diff --git a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocApp1Test.java b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocApp1Test.java index 742ef974f..d4a3cb4e6 100644 --- a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocApp1Test.java +++ b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocApp1Test.java @@ -27,7 +27,7 @@ public class SpringDocApp1Test extends AbstractSpringDocTest { @Test - public void shouldDisplaySwaggerUiPage() { + void shouldDisplaySwaggerUiPage() { webTestClient.get().uri("/swagger-ui.html").exchange() .expectStatus().isFound(); } diff --git a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app13/SpringDocApp13Test.java b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app13/SpringDocApp13Test.java index 08d178af1..1597a1130 100644 --- a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app13/SpringDocApp13Test.java +++ b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app13/SpringDocApp13Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -57,14 +57,14 @@ void testIndex() { } @Test - public void testIndexActuator() { + void testIndexActuator() { HttpStatusCode httpStatusMono = webClient.get().uri("/application/swagger-ui") .exchangeToMono(clientResponse -> Mono.just(clientResponse.statusCode())).block(); assertThat(httpStatusMono).isEqualTo(HttpStatus.FOUND); } @Test - public void testIndexSwaggerConfig() throws Exception { + void testIndexSwaggerConfig() throws Exception { String contentAsString = webClient.get().uri("/application/swagger-ui/swagger-config").retrieve() .bodyToMono(String.class).block(); String expected = getContent("results/app13-1.json"); diff --git a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app14/SpringDocApp14Test.java b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app14/SpringDocApp14Test.java index ee6dad883..60b08be10 100644 --- a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app14/SpringDocApp14Test.java +++ b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app14/SpringDocApp14Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -55,14 +55,14 @@ void testIndex() { } @Test - public void testIndexActuator() { + void testIndexActuator() { HttpStatusCode httpStatusMono = webClient.get().uri("/application/swagger-ui") .exchangeToMono(clientResponse -> Mono.just(clientResponse.statusCode())).block(); assertThat(httpStatusMono).isEqualTo(HttpStatus.FOUND); } @Test - public void testIndexSwaggerConfig() throws Exception { + void testIndexSwaggerConfig() throws Exception { String contentAsString = webClient.get().uri("/application/swagger-ui/swagger-config").retrieve() .bodyToMono(String.class).block(); String expected = getContent("results/app14-1.json"); diff --git a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app15/SpringDocApp15Test.java b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app15/SpringDocApp15Test.java index c8b504997..1f8b2a135 100644 --- a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app15/SpringDocApp15Test.java +++ b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app15/SpringDocApp15Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -58,14 +58,14 @@ void testIndex() { } @Test - public void testIndexActuator() { + void testIndexActuator() { HttpStatusCode httpStatusMono = webClient.get().uri("/test/application/swagger-ui") .exchangeToMono(clientResponse -> Mono.just(clientResponse.statusCode())).block(); assertThat(httpStatusMono).isEqualTo(HttpStatus.FOUND); } @Test - public void testIndexSwaggerConfig() throws Exception { + void testIndexSwaggerConfig() throws Exception { String contentAsString = webClient.get().uri("/test/application/swagger-ui/swagger-config").retrieve() .bodyToMono(String.class).block(); String expected = getContent("results/app15-1.json"); diff --git a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app16/SpringDocApp16Test.java b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app16/SpringDocApp16Test.java index 9bdc47292..5f23af5e7 100644 --- a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app16/SpringDocApp16Test.java +++ b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app16/SpringDocApp16Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -58,14 +58,14 @@ void testIndex() { } @Test - public void testIndexActuator() { + void testIndexActuator() { HttpStatusCode httpStatusMono = webClient.get().uri("/test/application/swagger-ui") .exchangeToMono(clientResponse -> Mono.just(clientResponse.statusCode())).block(); assertThat(httpStatusMono).isEqualTo(HttpStatus.FOUND); } @Test - public void testIndexSwaggerConfig() throws Exception { + void testIndexSwaggerConfig() throws Exception { String contentAsString = webClient.get().uri("/test/application/swagger-ui/swagger-config").retrieve() .bodyToMono(String.class).block(); String expected = getContent("results/app16-1.json"); diff --git a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app18/SpringDocApp18Test.java b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app18/SpringDocApp18Test.java index cac864a4e..1a16f01e3 100644 --- a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app18/SpringDocApp18Test.java +++ b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app18/SpringDocApp18Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -61,7 +61,7 @@ void init() { } @Test - public void testIndex() throws Exception { + void testIndex() throws Exception { HttpStatusCode httpStatusMono = webClient.get().uri("/test/documentation/swagger-ui.html") .exchangeToMono(clientResponse -> Mono.just(clientResponse.statusCode())).block(); assertThat(httpStatusMono).isEqualTo(HttpStatus.FOUND); diff --git a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app19/SpringDocApp19Test.java b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app19/SpringDocApp19Test.java index 1a5c13567..a9b7219dc 100644 --- a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app19/SpringDocApp19Test.java +++ b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app19/SpringDocApp19Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -58,7 +58,7 @@ void init() { } @Test - public void testIndex() throws Exception { + void testIndex() throws Exception { HttpStatusCode httpStatusMono = webClient.get().uri("/") .exchangeToMono(clientResponse -> Mono.just(clientResponse.statusCode())).block(); assertThat(httpStatusMono).isEqualTo(HttpStatus.FOUND); diff --git a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app2/SpringDocApp2Test.java b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app2/SpringDocApp2Test.java index 3a01b7ff3..442c2f202 100644 --- a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app2/SpringDocApp2Test.java +++ b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app2/SpringDocApp2Test.java @@ -28,7 +28,7 @@ public class SpringDocApp2Test extends AbstractSpringDocTest { @Test - public void shouldDisplaySwaggerUiPage() { + void shouldDisplaySwaggerUiPage() { webTestClient.get().uri("/swagger-ui.html").exchange() .expectStatus().isNotFound(); } diff --git a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app20/SpringDocApp20Test.java b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app20/SpringDocApp20Test.java index ae94c3a0a..c529460d7 100644 --- a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app20/SpringDocApp20Test.java +++ b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app20/SpringDocApp20Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -58,7 +58,7 @@ void init() { } @Test - public void testIndex() throws Exception { + void testIndex() throws Exception { HttpStatusCode httpStatusMono = webClient.get().uri("/test/swagger-ui.html") .exchangeToMono(clientResponse -> Mono.just(clientResponse.statusCode())).block(); assertThat(httpStatusMono).isEqualTo(HttpStatus.FOUND); diff --git a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app21/SpringDocApp21Test.java b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app21/SpringDocApp21Test.java index cc60cd3a1..312f11ade 100644 --- a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app21/SpringDocApp21Test.java +++ b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app21/SpringDocApp21Test.java @@ -28,7 +28,7 @@ public class SpringDocApp21Test extends AbstractSpringDocTest { @Test - public void testUseRootPath() { + void testUseRootPath() { webTestClient.get().uri("/").exchange() .expectStatus().is3xxRedirection(); webTestClient.get().uri("/swagger-ui.html").exchange() diff --git a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app23/SpringDocApp23Test.java b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app23/SpringDocApp23Test.java index 5085ce923..2f8949afb 100644 --- a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app23/SpringDocApp23Test.java +++ b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app23/SpringDocApp23Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -57,7 +57,7 @@ void init() { } @Test - public void testIndex() throws Exception { + void testIndex() throws Exception { HttpStatusCode httpStatusRoot = webClient.get().uri("/test/") .exchangeToMono(clientResponse -> Mono.just(clientResponse.statusCode())).block(); Assertions.assertThat(httpStatusRoot).isEqualTo(HttpStatus.FOUND); diff --git a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app24/SpringDocApp24Test.java b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app24/SpringDocApp24Test.java index b2bacf0ac..0eace46d3 100644 --- a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app24/SpringDocApp24Test.java +++ b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app24/SpringDocApp24Test.java @@ -34,7 +34,7 @@ public class SpringDocApp24Test extends AbstractSpringDocTest { @Test - public void test_apidocs_disabled() { + void test_apidocs_disabled() { webTestClient.get().uri("/api-docs/swagger-config").exchange() .expectStatus().isOk().expectBody() .jsonPath("$.url").isEqualTo("/api-docs/xxx/v1/openapi.yml") diff --git a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app24/SpringDocConfig.java b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app24/SpringDocConfig.java index 73416f96e..94c3819b0 100644 --- a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app24/SpringDocConfig.java +++ b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app24/SpringDocConfig.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app3/SpringDocApp3RedirectDefaultTest.java b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app3/SpringDocApp3RedirectDefaultTest.java index cde1c80c4..bcfc081d9 100644 --- a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app3/SpringDocApp3RedirectDefaultTest.java +++ b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app3/SpringDocApp3RedirectDefaultTest.java @@ -35,7 +35,7 @@ public class SpringDocApp3RedirectDefaultTest extends AbstractSpringDocTest { @Test - public void shouldRedirectWithDefaultQueryParams() { + void shouldRedirectWithDefaultQueryParams() { WebTestClient.ResponseSpec responseSpec = webTestClient.get().uri("/documentation/swagger-ui.html").exchange() .expectStatus().isFound(); responseSpec.expectHeader() diff --git a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app3/SpringDocApp3RedirectWithPrefixTest.java b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app3/SpringDocApp3RedirectWithPrefixTest.java index 23c408aa7..c93d0744d 100644 --- a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app3/SpringDocApp3RedirectWithPrefixTest.java +++ b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app3/SpringDocApp3RedirectWithPrefixTest.java @@ -34,7 +34,7 @@ public class SpringDocApp3RedirectWithPrefixTest extends AbstractSpringDocTest { @Test - public void shouldRedirectWithPrefix() { + void shouldRedirectWithPrefix() { WebTestClient.ResponseSpec responseSpec = webTestClient.get().uri("/documentation/swagger-ui.html").exchange() .expectStatus().isFound(); responseSpec.expectHeader() diff --git a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app3/SpringDocApp3Test.java b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app3/SpringDocApp3Test.java index dd934b039..18030ea5d 100644 --- a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app3/SpringDocApp3Test.java +++ b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app3/SpringDocApp3Test.java @@ -31,7 +31,7 @@ public class SpringDocApp3Test extends AbstractSpringDocTest { @Test - public void shouldDisplaySwaggerUiPage() { + void shouldDisplaySwaggerUiPage() { webTestClient.get().uri("/documentation/swagger-ui.html").exchange() .expectStatus().isFound(); webTestClient.get().uri("/documentation/webjars/swagger-ui/index.html").exchange() diff --git a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app32/SpringDocBehindProxyTest.java b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app32/SpringDocBehindProxyTest.java index bc4647420..d5f5c013c 100644 --- a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app32/SpringDocBehindProxyTest.java +++ b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app32/SpringDocBehindProxyTest.java @@ -18,6 +18,9 @@ package test.org.springdoc.ui.app32; +import java.util.concurrent.CompletableFuture; +import java.util.stream.IntStream; + import org.junit.jupiter.api.Test; import test.org.springdoc.ui.AbstractSpringDocTest; @@ -36,13 +39,13 @@ public class SpringDocBehindProxyTest extends AbstractSpringDocTest { private static final String X_FORWARD_PREFIX = "/path/prefix"; @Test - public void shouldServeSwaggerUIAtDefaultPath() { + void shouldServeSwaggerUIAtDefaultPath() { webTestClient.get().uri("/webjars/swagger-ui/index.html").exchange() .expectStatus().isOk(); } @Test - public void shouldReturnCorrectInitializerJS() throws Exception { + void shouldReturnCorrectInitializerJS() throws Exception { webTestClient .get().uri("/webjars/swagger-ui/swagger-initializer.js") .header("X-Forwarded-Prefix", X_FORWARD_PREFIX) @@ -56,7 +59,7 @@ public void shouldReturnCorrectInitializerJS() throws Exception { } @Test - public void shouldCalculateOauthRedirectBehindProxy() throws Exception { + void shouldCalculateOauthRedirectBehindProxy() throws Exception { webTestClient .get().uri("/v3/api-docs/swagger-config") .header("X-Forwarded-Proto", "https") @@ -68,7 +71,7 @@ public void shouldCalculateOauthRedirectBehindProxy() throws Exception { } @Test - public void shouldCalculateUrlsBehindProxy() throws Exception { + void shouldCalculateUrlsBehindProxy() throws Exception { webTestClient .get().uri("/v3/api-docs/swagger-config") .header("X-Forwarded-Prefix", X_FORWARD_PREFIX) @@ -80,6 +83,46 @@ public void shouldCalculateUrlsBehindProxy() throws Exception { .isEqualTo("/path/prefix/v3/api-docs/swagger-config"); } + @Test + void shouldReturnCorrectInitializerJSWhenChangingForwardedPrefixHeader() throws Exception { + var tasks = IntStream.range(0, 10).mapToObj(i -> CompletableFuture.runAsync(() -> { + try { + webTestClient.get().uri("/webjars/swagger-ui/swagger-initializer.js") + .header("X-Forwarded-Prefix", "/path/prefix" + i) + .exchange() + .expectStatus().isOk() + .expectBody(String.class) + .consumeWith(response -> + assertThat(response.getResponseBody()) + .contains("\"configUrl\" : \"/path/prefix" + i + "/v3/api-docs/swagger-config\",") + ); + } catch (Exception e) { + throw new RuntimeException(e); + } + })).toArray(CompletableFuture[]::new); + + CompletableFuture.allOf(tasks).join(); + } + + @Test + void shouldCalculateUrlsBehindProxyWhenChangingForwardedPrefixHeader() { + var tasks = IntStream.range(0, 10).mapToObj(i -> CompletableFuture.runAsync(() -> { + try { + webTestClient.get().uri("/v3/api-docs/swagger-config") + .header("X-Forwarded-Prefix", "/path/prefix" + i) + .exchange() + .expectStatus().isOk().expectBody() + .jsonPath("$.url").isEqualTo("/path/prefix" + i + "/v3/api-docs") + .jsonPath("$.configUrl").isEqualTo("/path/prefix" + i + "/v3/api-docs/swagger-config"); + } catch (Exception e) { + throw new RuntimeException(e); + } + })).toArray(CompletableFuture[]::new); + + CompletableFuture.allOf(tasks).join(); + } + + @SpringBootApplication static class SpringDocTestApp {} } diff --git a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app32/SpringDocBehindProxyWithCustomUIPathTest.java b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app32/SpringDocBehindProxyWithCustomUIPathTest.java index 523036699..3c1cf2bdd 100644 --- a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app32/SpringDocBehindProxyWithCustomUIPathTest.java +++ b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app32/SpringDocBehindProxyWithCustomUIPathTest.java @@ -37,7 +37,7 @@ public class SpringDocBehindProxyWithCustomUIPathTest extends AbstractSpringDocT private static final String X_FORWARD_PREFIX = "/path/prefix"; @Test - public void shouldRedirectSwaggerUIFromCustomPath() { + void shouldRedirectSwaggerUIFromCustomPath() { webTestClient .get().uri("/foo/documentation/swagger.html") .header("X-Forwarded-Prefix", X_FORWARD_PREFIX) @@ -47,7 +47,7 @@ public void shouldRedirectSwaggerUIFromCustomPath() { } @Test - public void shouldReturnCorrectInitializerJS() { + void shouldReturnCorrectInitializerJS() { webTestClient .get().uri("/foo/documentation/webjars/swagger-ui/swagger-initializer.js") .header("X-Forwarded-Prefix", X_FORWARD_PREFIX) @@ -61,7 +61,7 @@ public void shouldReturnCorrectInitializerJS() { } @Test - public void shouldCalculateUrlsBehindProxy() throws Exception { + void shouldCalculateUrlsBehindProxy() throws Exception { webTestClient .get().uri("/v3/api-docs/swagger-config") .header("X-Forwarded-Prefix", X_FORWARD_PREFIX) diff --git a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app32/SpringDocBehindProxyWithCustomUIPathWithApiDocsTest.java b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app32/SpringDocBehindProxyWithCustomUIPathWithApiDocsTest.java index dbeff0461..4ce4ec5d7 100644 --- a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app32/SpringDocBehindProxyWithCustomUIPathWithApiDocsTest.java +++ b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app32/SpringDocBehindProxyWithCustomUIPathWithApiDocsTest.java @@ -38,7 +38,7 @@ public class SpringDocBehindProxyWithCustomUIPathWithApiDocsTest extends Abstrac private static final String X_FORWARD_PREFIX = "/path/prefix"; @Test - public void shouldRedirectSwaggerUIFromCustomPath() { + void shouldRedirectSwaggerUIFromCustomPath() { webTestClient .get().uri("/foo/documentation/swagger.html") .header("X-Forwarded-Prefix", X_FORWARD_PREFIX) @@ -48,7 +48,7 @@ public void shouldRedirectSwaggerUIFromCustomPath() { } @Test - public void shouldReturnCorrectInitializerJS() { + void shouldReturnCorrectInitializerJS() { webTestClient .get().uri("/foo/documentation/webjars/swagger-ui/swagger-initializer.js") .header("X-Forwarded-Prefix", X_FORWARD_PREFIX) @@ -62,7 +62,7 @@ public void shouldReturnCorrectInitializerJS() { } @Test - public void shouldCalculateUrlsBehindProxy() { + void shouldCalculateUrlsBehindProxy() { webTestClient .get().uri("/bar/openapi/v3/swagger-config") .header("X-Forwarded-Prefix", X_FORWARD_PREFIX) diff --git a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app33/SpringDocBehindProxyBasePathTest.java b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app33/SpringDocBehindProxyBasePathTest.java new file mode 100644 index 000000000..32b2f2196 --- /dev/null +++ b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app33/SpringDocBehindProxyBasePathTest.java @@ -0,0 +1,89 @@ +/* + * + * * Copyright 2019-2020 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.ui.app33; + +import jakarta.annotation.PostConstruct; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; +import test.org.springdoc.ui.AbstractCommonTest; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; +import org.springframework.boot.test.web.server.LocalServerPort; +import org.springframework.context.annotation.Import; +import org.springframework.http.HttpStatus; +import org.springframework.http.HttpStatusCode; +import org.springframework.web.reactive.function.client.WebClient; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.skyscreamer.jsonassert.JSONAssert.assertEquals; + + +@SpringBootTest(webEnvironment = WebEnvironment.DEFINED_PORT, + properties = { "spring.webflux.base-path=/test", + "server.forward-headers-strategy=framework", + "server.port=9318", + "springdoc.swagger-ui.path=/documentation/swagger-ui.html", + "springdoc.api-docs.path=/documentation/v3/api-docs", + "springdoc.webjars.prefix= /webjars-pref" }) + +@Import(SpringDocConfig.class) +public class SpringDocBehindProxyBasePathTest extends AbstractCommonTest { + + public static final String WEBFLUX_BASE_PATH = "/test"; + public static final String X_FORWARD_PREFIX = "/path/prefix"; + + @LocalServerPort + private int port; + + private WebClient webClient; + + @PostConstruct + void init() { + webClient = WebClient.builder().baseUrl("http://localhost:" + port) + .build(); + } + + @Test + void testIndex() throws Exception { + HttpStatusCode httpStatusMono = webClient.get().uri(WEBFLUX_BASE_PATH+"/documentation/swagger-ui.html") + .header("X-Forwarded-Prefix", X_FORWARD_PREFIX) + .exchangeToMono(clientResponse -> Mono.just(clientResponse.statusCode())).block(); + assertThat(httpStatusMono).isEqualTo(HttpStatus.FOUND); + + httpStatusMono = webClient.get().uri(WEBFLUX_BASE_PATH+"/documentation/webjars-pref/swagger-ui/index.html") + .header("X-Forwarded-Prefix", X_FORWARD_PREFIX) + .exchangeToMono(clientResponse -> Mono.just(clientResponse.statusCode())).block(); + assertThat(httpStatusMono).isEqualTo(HttpStatus.OK); + + String contentAsString = webClient.get().uri(WEBFLUX_BASE_PATH+"/documentation/v3/api-docs/swagger-config") + .header("X-Forwarded-Prefix", X_FORWARD_PREFIX) + .retrieve() + .bodyToMono(String.class).block(); + + String expected = getContent("results/app33.json"); + assertEquals(expected, contentAsString, true); + } + + + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app33/SpringDocConfig.java b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app33/SpringDocConfig.java new file mode 100644 index 000000000..edf233cb4 --- /dev/null +++ b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app33/SpringDocConfig.java @@ -0,0 +1,45 @@ +package test.org.springdoc.ui.app33; + +import java.util.List; + +import org.apache.commons.lang3.reflect.FieldUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.springframework.boot.autoconfigure.web.reactive.WebFluxProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.http.server.reactive.ServerHttpRequest; +import org.springframework.util.CollectionUtils; +import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.server.WebFilter; +import org.springframework.web.server.WebFilterChain; + +@Configuration +public class SpringDocConfig { + + private static final Logger LOGGER = LoggerFactory.getLogger(SpringDocConfig.class); + + + @Bean + public WebFilter rewritePathWebFilter(WebFluxProperties webFluxProperties) { + return (ServerWebExchange exchange, WebFilterChain chain) -> { + try { + ServerHttpRequest originalRequest = (ServerHttpRequest) FieldUtils.readDeclaredField(exchange.getRequest(), "originalRequest", true); + List forwardedPrefixHeaders = originalRequest.getHeaders().get("X-Forwarded-Prefix"); + if (!CollectionUtils.isEmpty(forwardedPrefixHeaders)) { + String forwardedPrefix = forwardedPrefixHeaders.get(0); + ServerHttpRequest mutatedRequest = exchange.getRequest().mutate() + .contextPath(forwardedPrefix + webFluxProperties.getBasePath()) + .build(); + ServerWebExchange mutatedExchange = exchange.mutate().request(mutatedRequest).build(); + return chain.filter(mutatedExchange); + } + + } catch (Exception e) { + LOGGER.error(e.getMessage()); + } + return chain.filter(exchange); + }; + } +} diff --git a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app4/SpringDocOauthPathsTest.java b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app4/SpringDocOauthPathsTest.java index 16d2c222f..83cb385c0 100644 --- a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app4/SpringDocOauthPathsTest.java +++ b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app4/SpringDocOauthPathsTest.java @@ -26,7 +26,7 @@ public class SpringDocOauthPathsTest extends AbstractSpringDocTest { @Test - public void oauth2_redirect_url_calculated() throws Exception { + void oauth2_redirect_url_calculated() throws Exception { webTestClient.get().uri("/v3/api-docs/swagger-config").exchange() .expectStatus().isOk().expectBody() .jsonPath("$.oauth2RedirectUrl").isEqualTo("/webjars/swagger-ui/oauth2-redirect.html"); diff --git a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app4/SpringDocOauthPathsWithPropertyTest.java b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app4/SpringDocOauthPathsWithPropertyTest.java index dad1c4417..e7766ed00 100644 --- a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app4/SpringDocOauthPathsWithPropertyTest.java +++ b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app4/SpringDocOauthPathsWithPropertyTest.java @@ -30,7 +30,7 @@ public class SpringDocOauthPathsWithPropertyTest extends AbstractSpringDocTest { @Test - public void oauth2_redirect_url_calculated() throws Exception { + void oauth2_redirect_url_calculated() throws Exception { webTestClient.get().uri("/v3/api-docs/swagger-config").exchange() .expectStatus().isOk().expectBody() .jsonPath("oauth2RedirectUrl", equalTo("http://localhost:8080/toto/test/swagger-ui/oauth2-redirect.html")); diff --git a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app4/SpringDocOauthRedirectUrlRecalculateTest.java b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app4/SpringDocOauthRedirectUrlRecalculateTest.java index 4af19f3ec..f141d05fe 100644 --- a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app4/SpringDocOauthRedirectUrlRecalculateTest.java +++ b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app4/SpringDocOauthRedirectUrlRecalculateTest.java @@ -28,7 +28,7 @@ public class SpringDocOauthRedirectUrlRecalculateTest extends AbstractSpringDocTest { @Test - public void oauth2_redirect_url_recalculation() throws Exception { + void oauth2_redirect_url_recalculation() throws Exception { webTestClient.get().uri("/v3/api-docs/swagger-config") .header("X-Forwarded-Proto", "https") diff --git a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app4/SpringDocOauthServletPathsTest.java b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app4/SpringDocOauthServletPathsTest.java index 96875348f..aa7fa86ca 100644 --- a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app4/SpringDocOauthServletPathsTest.java +++ b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app4/SpringDocOauthServletPathsTest.java @@ -30,13 +30,13 @@ public class SpringDocOauthServletPathsTest extends AbstractSpringDocTest { @Test - public void should_display_oauth2_redirect_page() throws Exception { + void should_display_oauth2_redirect_page() throws Exception { webTestClient.get().uri("/test/webjars/swagger-ui/oauth2-redirect.html").exchange() .expectStatus().isOk(); } @Test - public void oauth2_redirect_url_calculated_with_context_path_and_servlet_path() throws Exception { + void oauth2_redirect_url_calculated_with_context_path_and_servlet_path() throws Exception { webTestClient.get().uri("/v3/api-docs/swagger-config").exchange() .expectStatus().isOk(); } diff --git a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app5/SpringDocApp5Test.java b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app5/SpringDocApp5Test.java index 9d572af06..75d78cbf4 100644 --- a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app5/SpringDocApp5Test.java +++ b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app5/SpringDocApp5Test.java @@ -28,7 +28,7 @@ public class SpringDocApp5Test extends AbstractSpringDocTest { @Test - public void transformed_index_with_oauth() { + void transformed_index_with_oauth() { super.checkJS("index5"); } diff --git a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app6/SpringDocApp6Test.java b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app6/SpringDocApp6Test.java index 43e470142..a5f7980a9 100644 --- a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app6/SpringDocApp6Test.java +++ b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app6/SpringDocApp6Test.java @@ -35,7 +35,7 @@ public class SpringDocApp6Test extends AbstractSpringDocTest { @Test - public void transformed_index_with_oauth() throws Exception { + void transformed_index_with_oauth() throws Exception { EntityExchangeResult getResult = webTestClient.get().uri("/webjars" + Constants.SWAGGER_INITIALIZER_URL) .exchange() .expectStatus().isOk() diff --git a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app7/SpringDocApp7Test.java b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app7/SpringDocApp7Test.java index 644c7d0d9..019fc372c 100644 --- a/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app7/SpringDocApp7Test.java +++ b/springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app7/SpringDocApp7Test.java @@ -35,7 +35,7 @@ public class SpringDocApp7Test extends AbstractSpringDocTest { @Test - public void transformed_index_with_oauth() throws Exception { + void transformed_index_with_oauth() throws Exception { EntityExchangeResult getResult = webTestClient.get().uri("/webjars" + Constants.SWAGGER_INITIALIZER_URL) .exchange() .expectStatus().isOk() diff --git a/springdoc-openapi-starter-webflux-ui/src/test/resources/results/app32-1.json b/springdoc-openapi-starter-webflux-ui/src/test/resources/results/app32-1.json new file mode 100644 index 000000000..c6f06f1f6 --- /dev/null +++ b/springdoc-openapi-starter-webflux-ui/src/test/resources/results/app32-1.json @@ -0,0 +1,6 @@ +{ + "configUrl": "/path/prefix/documentation/v3/api-docs/swagger-config", + "oauth2RedirectUrl": "http://localhost:9318/path/prefix/documentation/webjars-pref/swagger-ui/oauth2-redirect.html", + "url": "/path/prefix/documentation/v3/api-docs", + "validatorUrl": "" +} diff --git a/springdoc-openapi-starter-webflux-ui/src/test/resources/results/app33.json b/springdoc-openapi-starter-webflux-ui/src/test/resources/results/app33.json new file mode 100644 index 000000000..9d03a31f8 --- /dev/null +++ b/springdoc-openapi-starter-webflux-ui/src/test/resources/results/app33.json @@ -0,0 +1,6 @@ +{ + "configUrl": "/path/prefix/test/documentation/v3/api-docs/swagger-config", + "oauth2RedirectUrl": "http://localhost:9318/path/prefix/test/documentation/webjars-pref/swagger-ui/oauth2-redirect.html", + "url": "/path/prefix/test/documentation/v3/api-docs", + "validatorUrl": "" +} diff --git a/springdoc-openapi-starter-webmvc-api/pom.xml b/springdoc-openapi-starter-webmvc-api/pom.xml index 9b8ac4d47..27744758c 100644 --- a/springdoc-openapi-starter-webmvc-api/pom.xml +++ b/springdoc-openapi-starter-webmvc-api/pom.xml @@ -3,7 +3,7 @@ org.springdoc springdoc-openapi - 2.5.0 + 2.7.0 springdoc-openapi-starter-webmvc-api diff --git a/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/api/MultipleOpenApiActuatorResource.java b/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/api/MultipleOpenApiActuatorResource.java index 9fdde5b9d..8a4dc6203 100644 --- a/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/api/MultipleOpenApiActuatorResource.java +++ b/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/api/MultipleOpenApiActuatorResource.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webmvc.api; @@ -51,6 +53,7 @@ /** * The type Multiple open api actuator resource. + * * @author bnasslashen */ @RestControllerEndpoint(id = DEFAULT_API_DOCS_ACTUATOR_URL) @@ -60,14 +63,14 @@ public class MultipleOpenApiActuatorResource extends MultipleOpenApiResource { /** * Instantiates a new Multiple open api resource. * - * @param groupedOpenApis the grouped open apis - * @param defaultOpenAPIBuilder the default open api builder - * @param requestBuilder the request builder - * @param responseBuilder the response builder - * @param operationParser the operation parser + * @param groupedOpenApis the grouped open apis + * @param defaultOpenAPIBuilder the default open api builder + * @param requestBuilder the request builder + * @param responseBuilder the response builder + * @param operationParser the operation parser * @param springDocConfigProperties the spring doc config properties - * @param springDocProviders the spring doc providers - * @param springDocCustomizers the spring doc customizers + * @param springDocProviders the spring doc providers + * @param springDocCustomizers the spring doc customizers */ public MultipleOpenApiActuatorResource(List groupedOpenApis, ObjectFactory defaultOpenAPIBuilder, AbstractRequestService requestBuilder, GenericResponseService responseBuilder, OperationService operationParser, SpringDocConfigProperties springDocConfigProperties, SpringDocProviders springDocProviders, SpringDocCustomizers springDocCustomizers) { @@ -79,8 +82,8 @@ public MultipleOpenApiActuatorResource(List groupedOpenApis, Obj * Openapi json string. * * @param request the request - * @param group the group - * @param locale the locale + * @param group the group + * @param locale the locale * @return the string * @throws JsonProcessingException the json processing exception */ @@ -95,8 +98,8 @@ public byte[] openapiJson(HttpServletRequest request, @PathVariable String group * Openapi yaml string. * * @param request the request - * @param group the group - * @param locale the locale + * @param group the group + * @param locale the locale * @return the string * @throws JsonProcessingException the json processing exception */ diff --git a/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/api/MultipleOpenApiResource.java b/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/api/MultipleOpenApiResource.java index 673c63185..3c6f44a95 100644 --- a/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/api/MultipleOpenApiResource.java +++ b/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/api/MultipleOpenApiResource.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webmvc.api; @@ -100,16 +102,16 @@ public abstract class MultipleOpenApiResource implements InitializingBean { /** * Instantiates a new Multiple open api resource. * - * @param groupedOpenApis the grouped open apis - * @param defaultOpenAPIBuilder the default open api builder - * @param requestBuilder the request builder - * @param responseBuilder the response builder - * @param operationParser the operation parser + * @param groupedOpenApis the grouped open apis + * @param defaultOpenAPIBuilder the default open api builder + * @param requestBuilder the request builder + * @param responseBuilder the response builder + * @param operationParser the operation parser * @param springDocConfigProperties the spring doc config properties - * @param springDocProviders the spring doc providers - * @param springDocCustomizers the spring doc customizers + * @param springDocProviders the spring doc providers + * @param springDocCustomizers the spring doc customizers */ - public MultipleOpenApiResource(List groupedOpenApis, + protected MultipleOpenApiResource(List groupedOpenApis, ObjectFactory defaultOpenAPIBuilder, AbstractRequestService requestBuilder, GenericResponseService responseBuilder, OperationService operationParser, SpringDocConfigProperties springDocConfigProperties, SpringDocProviders springDocProviders, SpringDocCustomizers springDocCustomizers) { @@ -140,9 +142,7 @@ public void afterPropertiesSet() { springDocConfigProperties.addGroupConfig(groupConfig); return buildWebMvcOpenApiResource(item); }, - (existingValue, newValue) -> { - return existingValue; // choice to keep the existing value - } + (existingValue, newValue) -> existingValue // choice to keep the existing value )); } diff --git a/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/api/MultipleOpenApiWebMvcResource.java b/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/api/MultipleOpenApiWebMvcResource.java index 3096829ae..8b3d559b8 100644 --- a/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/api/MultipleOpenApiWebMvcResource.java +++ b/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/api/MultipleOpenApiWebMvcResource.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webmvc.api; @@ -62,14 +64,14 @@ public class MultipleOpenApiWebMvcResource extends MultipleOpenApiResource { /** * Instantiates a new Multiple open api resource. * - * @param groupedOpenApis the grouped open apis - * @param defaultOpenAPIBuilder the default open api builder - * @param requestBuilder the request builder - * @param responseBuilder the response builder - * @param operationParser the operation parser + * @param groupedOpenApis the grouped open apis + * @param defaultOpenAPIBuilder the default open api builder + * @param requestBuilder the request builder + * @param responseBuilder the response builder + * @param operationParser the operation parser * @param springDocConfigProperties the spring doc config properties - * @param springDocProviders the spring doc providers - * @param springDocCustomizers the spring doc customizers + * @param springDocProviders the spring doc providers + * @param springDocCustomizers the spring doc customizers */ public MultipleOpenApiWebMvcResource(List groupedOpenApis, ObjectFactory defaultOpenAPIBuilder, AbstractRequestService requestBuilder, GenericResponseService responseBuilder, OperationService operationParser, @@ -80,10 +82,10 @@ public MultipleOpenApiWebMvcResource(List groupedOpenApis, Objec /** * Openapi json string. * - * @param request the request + * @param request the request * @param apiDocsUrl the api docs url - * @param group the group - * @param locale the locale + * @param group the group + * @param locale the locale * @return the string * @throws JsonProcessingException the json processing exception */ @@ -98,10 +100,10 @@ public byte[] openapiJson(HttpServletRequest request, @Value(API_DOCS_URL) Strin /** * Openapi yaml string. * - * @param request the request + * @param request the request * @param apiDocsUrl the api docs url - * @param group the group - * @param locale the locale + * @param group the group + * @param locale the locale * @return the string * @throws JsonProcessingException the json processing exception */ diff --git a/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/api/OpenApiActuatorResource.java b/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/api/OpenApiActuatorResource.java index 784077313..7a0d08c38 100644 --- a/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/api/OpenApiActuatorResource.java +++ b/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/api/OpenApiActuatorResource.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webmvc.api; @@ -53,6 +55,7 @@ /** * The type Open api actuator resource. + * * @author bnasslashen */ @RestControllerEndpoint(id = DEFAULT_API_DOCS_ACTUATOR_URL) @@ -63,12 +66,12 @@ public class OpenApiActuatorResource extends OpenApiResource { * Instantiates a new Open api actuator resource. * * @param openAPIBuilderObjectFactory the open api builder object factory - * @param requestBuilder the request builder - * @param responseBuilder the response builder - * @param operationParser the operation parser - * @param springDocConfigProperties the spring doc config properties - * @param springDocProviders the spring doc providers - * @param springDocCustomizers the spring doc customizers + * @param requestBuilder the request builder + * @param responseBuilder the response builder + * @param operationParser the operation parser + * @param springDocConfigProperties the spring doc config properties + * @param springDocProviders the spring doc providers + * @param springDocCustomizers the spring doc customizers */ public OpenApiActuatorResource(ObjectFactory openAPIBuilderObjectFactory, AbstractRequestService requestBuilder, GenericResponseService responseBuilder, @@ -81,14 +84,14 @@ public OpenApiActuatorResource(ObjectFactory openAPIBuilderObjec /** * Instantiates a new Open api actuator resource. * - * @param groupName the group name + * @param groupName the group name * @param openAPIBuilderObjectFactory the open api builder object factory - * @param requestBuilder the request builder - * @param responseBuilder the response builder - * @param operationParser the operation parser - * @param springDocConfigProperties the spring doc config properties - * @param springDocProviders the spring doc providers - * @param springDocCustomizers the spring doc customizers + * @param requestBuilder the request builder + * @param responseBuilder the response builder + * @param operationParser the operation parser + * @param springDocConfigProperties the spring doc config properties + * @param springDocProviders the spring doc providers + * @param springDocCustomizers the spring doc customizers */ public OpenApiActuatorResource(String groupName, ObjectFactory openAPIBuilderObjectFactory, AbstractRequestService requestBuilder, GenericResponseService responseBuilder, @@ -102,7 +105,7 @@ public OpenApiActuatorResource(String groupName, ObjectFactory o * Openapi json string. * * @param request the request - * @param locale the locale + * @param locale the locale * @return the string * @throws JsonProcessingException the json processing exception */ @@ -118,7 +121,7 @@ public byte[] openapiJson(HttpServletRequest request, Locale locale) * Openapi yaml string. * * @param request the request - * @param locale the locale + * @param locale the locale * @return the string * @throws JsonProcessingException the json processing exception */ diff --git a/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/api/OpenApiResource.java b/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/api/OpenApiResource.java index 4b5fd61a7..20d040628 100644 --- a/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/api/OpenApiResource.java +++ b/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/api/OpenApiResource.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webmvc.api; @@ -55,6 +57,7 @@ import org.springframework.aop.support.AopUtils; import org.springframework.beans.factory.ObjectFactory; +import org.springframework.http.server.ServletServerHttpRequest; import org.springframework.util.CollectionUtils; import org.springframework.util.MimeType; import org.springframework.web.bind.annotation.RequestMethod; @@ -74,16 +77,16 @@ public abstract class OpenApiResource extends AbstractOpenApiResource { /** * Instantiates a new Open api resource. * - * @param groupName the group name + * @param groupName the group name * @param openAPIBuilderObjectFactory the open api builder object factory - * @param requestBuilder the request builder - * @param responseBuilder the response builder - * @param operationParser the operation parser - * @param springDocConfigProperties the spring doc config properties - * @param springDocProviders the spring doc providers - * @param springDocCustomizers the spring doc customizers + * @param requestBuilder the request builder + * @param responseBuilder the response builder + * @param operationParser the operation parser + * @param springDocConfigProperties the spring doc config properties + * @param springDocProviders the spring doc providers + * @param springDocCustomizers the spring doc customizers */ - public OpenApiResource(String groupName, ObjectFactory openAPIBuilderObjectFactory, AbstractRequestService requestBuilder, + protected OpenApiResource(String groupName, ObjectFactory openAPIBuilderObjectFactory, AbstractRequestService requestBuilder, GenericResponseService responseBuilder, OperationService operationParser, SpringDocConfigProperties springDocConfigProperties, SpringDocProviders springDocProviders, SpringDocCustomizers springDocCustomizers) { @@ -94,14 +97,14 @@ public OpenApiResource(String groupName, ObjectFactory openAPIBu * Instantiates a new Open api resource. * * @param openAPIBuilderObjectFactory the open api builder object factory - * @param requestBuilder the request builder - * @param responseBuilder the response builder - * @param operationParser the operation parser - * @param springDocConfigProperties the spring doc config properties - * @param springDocProviders the spring doc providers - * @param springDocCustomizers the spring doc customizers + * @param requestBuilder the request builder + * @param responseBuilder the response builder + * @param operationParser the operation parser + * @param springDocConfigProperties the spring doc config properties + * @param springDocProviders the spring doc providers + * @param springDocCustomizers the spring doc customizers */ - public OpenApiResource(ObjectFactory openAPIBuilderObjectFactory, AbstractRequestService requestBuilder, + protected OpenApiResource(ObjectFactory openAPIBuilderObjectFactory, AbstractRequestService requestBuilder, GenericResponseService responseBuilder, OperationService operationParser, SpringDocConfigProperties springDocConfigProperties, SpringDocProviders springDocProviders, SpringDocCustomizers springDocCustomizers) { @@ -111,9 +114,9 @@ public OpenApiResource(ObjectFactory openAPIBuilderObjectFactory /** * Openapi json string. * - * @param request the request + * @param request the request * @param apiDocsUrl the api docs url - * @param locale the locale + * @param locale the locale * @return the string * @throws JsonProcessingException the json processing exception */ @@ -128,9 +131,9 @@ public byte[] openapiJson(HttpServletRequest request, /** * Openapi yaml string. * - * @param request the request + * @param request the request * @param apiDocsUrl the api docs url - * @param locale the locale + * @param locale the locale * @return the string * @throws JsonProcessingException the json processing exception */ @@ -189,9 +192,9 @@ protected void getPaths(Map restControllers, Locale locale, Open * Calculate path. * * @param restControllers the rest controllers - * @param map the map - * @param locale the locale - * @param openAPI the open api + * @param map the map + * @param locale the locale + * @param openAPI the open api */ protected void calculatePath(Map restControllers, Map map, Locale locale, OpenAPI openAPI) { TreeMap methodTreeMap = new TreeMap<>(byReversedRequestMappingInfos()); @@ -237,20 +240,21 @@ private Comparator byReversedRequestMappingInfos() { /** * Calculate server url. * - * @param request the request + * @param request the request * @param apiDocsUrl the api docs url - * @param locale the locale + * @param locale the locale */ protected void calculateServerUrl(HttpServletRequest request, String apiDocsUrl, Locale locale) { super.initOpenAPIBuilder(locale); String calculatedUrl = getServerUrl(request, apiDocsUrl); - openAPIService.setServerBaseUrl(calculatedUrl); + ServletServerHttpRequest serverRequest = request != null ? new ServletServerHttpRequest(request) : null; + openAPIService.setServerBaseUrl(calculatedUrl, serverRequest); } /** * Gets server url. * - * @param request the request + * @param request the request * @param apiDocsUrl the api docs url * @return the server url */ diff --git a/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/api/OpenApiWebMvcResource.java b/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/api/OpenApiWebMvcResource.java index e121c9411..b6dae47d3 100644 --- a/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/api/OpenApiWebMvcResource.java +++ b/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/api/OpenApiWebMvcResource.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webmvc.api; @@ -55,6 +57,7 @@ /** * The type Open api resource. + * * @author bnasslahsen */ @RestController @@ -64,14 +67,14 @@ public class OpenApiWebMvcResource extends OpenApiResource { /** * Instantiates a new Open api web mvc resource. * - * @param groupName the group name + * @param groupName the group name * @param openAPIBuilderObjectFactory the open api builder object factory - * @param requestBuilder the request builder - * @param responseBuilder the response builder - * @param operationParser the operation parser - * @param springDocConfigProperties the spring doc config properties - * @param springDocProviders the spring doc providers - * @param springDocCustomizers the spring doc customizers + * @param requestBuilder the request builder + * @param responseBuilder the response builder + * @param operationParser the operation parser + * @param springDocConfigProperties the spring doc config properties + * @param springDocProviders the spring doc providers + * @param springDocCustomizers the spring doc customizers */ public OpenApiWebMvcResource(String groupName, ObjectFactory openAPIBuilderObjectFactory, AbstractRequestService requestBuilder, GenericResponseService responseBuilder, OperationService operationParser, @@ -84,12 +87,12 @@ public OpenApiWebMvcResource(String groupName, ObjectFactory ope * Instantiates a new Open api web mvc resource. * * @param openAPIBuilderObjectFactory the open api builder object factory - * @param requestBuilder the request builder - * @param responseBuilder the response builder - * @param operationParser the operation parser - * @param springDocConfigProperties the spring doc config properties - * @param springDocProviders the spring doc providers - * @param springDocCustomizers the spring doc customizers + * @param requestBuilder the request builder + * @param responseBuilder the response builder + * @param operationParser the operation parser + * @param springDocConfigProperties the spring doc config properties + * @param springDocProviders the spring doc providers + * @param springDocCustomizers the spring doc customizers */ @Autowired public OpenApiWebMvcResource(ObjectFactory openAPIBuilderObjectFactory, AbstractRequestService requestBuilder, GenericResponseService responseBuilder, diff --git a/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/core/configuration/MultipleOpenApiSupportConfiguration.java b/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/core/configuration/MultipleOpenApiSupportConfiguration.java index 1eeabe2a0..fd227250a 100644 --- a/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/core/configuration/MultipleOpenApiSupportConfiguration.java +++ b/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/core/configuration/MultipleOpenApiSupportConfiguration.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webmvc.core.configuration; @@ -57,6 +59,7 @@ /** * The type Multiple open api support configuration. + * * @author bnasslahsen */ @Lazy(false) @@ -69,14 +72,14 @@ public class MultipleOpenApiSupportConfiguration { /** * Multiple open api resource multiple open api resource. * - * @param groupedOpenApis the grouped open apis - * @param defaultOpenAPIBuilder the default open api builder - * @param requestBuilder the request builder - * @param responseBuilder the response builder - * @param operationParser the operation parser + * @param groupedOpenApis the grouped open apis + * @param defaultOpenAPIBuilder the default open api builder + * @param requestBuilder the request builder + * @param responseBuilder the response builder + * @param operationParser the operation parser * @param springDocConfigProperties the spring doc config properties - * @param springDocProviders the spring doc providers - * @param springDocCustomizers the spring doc customizers + * @param springDocProviders the spring doc providers + * @param springDocCustomizers the spring doc customizers * @return the multiple open api resource */ @Bean @@ -97,6 +100,7 @@ MultipleOpenApiWebMvcResource multipleOpenApiResource(List group /** * The type Spring doc web mvc actuator different configuration. + * * @author bnasslashen */ @ConditionalOnClass(WebMvcEndpointHandlerMapping.class) @@ -106,14 +110,14 @@ static class SpringDocWebMvcActuatorDifferentConfiguration { /** * Multiple open api actuator resource multiple open api actuator resource. * - * @param groupedOpenApis the grouped open apis - * @param defaultOpenAPIBuilder the default open api builder - * @param requestBuilder the request builder - * @param responseBuilder the response builder - * @param operationParser the operation parser + * @param groupedOpenApis the grouped open apis + * @param defaultOpenAPIBuilder the default open api builder + * @param requestBuilder the request builder + * @param responseBuilder the response builder + * @param operationParser the operation parser * @param springDocConfigProperties the spring doc config properties - * @param springDocProviders the spring doc providers - * @param springDocCustomizers the spring doc customizers + * @param springDocProviders the spring doc providers + * @param springDocCustomizers the spring doc customizers * @return the multiple open api actuator resource */ @Bean diff --git a/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/core/configuration/SpringDocWebMvcConfiguration.java b/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/core/configuration/SpringDocWebMvcConfiguration.java index be467c29f..98e41d328 100644 --- a/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/core/configuration/SpringDocWebMvcConfiguration.java +++ b/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/core/configuration/SpringDocWebMvcConfiguration.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webmvc.core.configuration; @@ -31,7 +33,6 @@ import org.springdoc.core.customizers.ParameterCustomizer; import org.springdoc.core.customizers.SpringDocCustomizers; import org.springdoc.core.discoverer.SpringDocParameterNameDiscoverer; -import org.springdoc.core.parsers.ReturnTypeParser; import org.springdoc.core.properties.SpringDocConfigProperties; import org.springdoc.core.providers.ActuatorProvider; import org.springdoc.core.providers.SpringDocProviders; @@ -76,6 +77,7 @@ /** * The type Spring doc web mvc configuration. + * * @author bnasslahsen */ @Lazy(false) @@ -94,12 +96,12 @@ public class SpringDocWebMvcConfiguration { * Open api resource open api resource. * * @param openAPIBuilderObjectFactory the open api builder object factory - * @param requestBuilder the request builder - * @param responseBuilder the response builder - * @param operationParser the operation parser - * @param springDocConfigProperties the spring doc config properties - * @param springDocProviders the spring doc providers - * @param springDocCustomizers the spring doc customizers + * @param requestBuilder the request builder + * @param responseBuilder the response builder + * @param operationParser the operation parser + * @param springDocConfigProperties the spring doc config properties + * @param springDocProviders the spring doc providers + * @param springDocCustomizers the spring doc customizers * @return the open api resource */ @Bean @@ -117,10 +119,9 @@ OpenApiWebMvcResource openApiResource(ObjectFactory openAPIBuild /** * Request builder request builder. * - * @param parameterBuilder the parameter builder - * @param requestBodyService the request body builder - * @param operationService the operation builder - * @param parameterCustomizers the parameter customizers + * @param parameterBuilder the parameter builder + * @param requestBodyService the request body builder + * @param parameterCustomizers the parameter customizers * @param localSpringDocParameterNameDiscoverer the local spring doc parameter name discoverer * @return the request builder */ @@ -128,10 +129,10 @@ OpenApiWebMvcResource openApiResource(ObjectFactory openAPIBuild @ConditionalOnMissingBean @Lazy(false) RequestService requestBuilder(GenericParameterService parameterBuilder, RequestBodyService requestBodyService, - OperationService operationService, Optional> parameterCustomizers, + Optional> parameterCustomizers, SpringDocParameterNameDiscoverer localSpringDocParameterNameDiscoverer) { return new RequestService(parameterBuilder, requestBodyService, - operationService, parameterCustomizers, localSpringDocParameterNameDiscoverer); + parameterCustomizers, localSpringDocParameterNameDiscoverer); } /** @@ -149,21 +150,21 @@ SpringWebProvider springWebProvider() { /** * Response builder generic response builder. * - * @param operationService the operation builder - * @param returnTypeParsers the return type parsers + * @param operationService the operation builder * @param springDocConfigProperties the spring doc config properties - * @param propertyResolverUtils the property resolver utils + * @param propertyResolverUtils the property resolver utils * @return the generic response builder */ @Bean @ConditionalOnMissingBean @Lazy(false) - GenericResponseService responseBuilder(OperationService operationService, List returnTypeParsers, SpringDocConfigProperties springDocConfigProperties, PropertyResolverUtils propertyResolverUtils) { - return new GenericResponseService(operationService, returnTypeParsers, springDocConfigProperties, propertyResolverUtils); + GenericResponseService responseBuilder(OperationService operationService, SpringDocConfigProperties springDocConfigProperties, PropertyResolverUtils propertyResolverUtils) { + return new GenericResponseService(operationService, springDocConfigProperties, propertyResolverUtils); } /** * The type Spring doc web mvc router configuration. + * * @author bnasslahsen */ @ConditionalOnClass(RouterFunction.class) @@ -184,6 +185,7 @@ RouterFunctionWebMvcProvider routerFunctionProvider() { /** * The type Spring doc web mvc actuator configuration. + * * @author bnasslashen */ @ConditionalOnClass(WebMvcEndpointHandlerMapping.class) @@ -192,11 +194,11 @@ static class SpringDocWebMvcActuatorConfiguration { /** * Actuator provider actuator provider. * - * @param serverProperties the server properties - * @param springDocConfigProperties the spring doc config properties - * @param managementServerProperties the management server properties - * @param webEndpointProperties the web endpoint properties - * @param webMvcEndpointHandlerMapping the web mvc endpoint handler mapping + * @param serverProperties the server properties + * @param springDocConfigProperties the spring doc config properties + * @param managementServerProperties the management server properties + * @param webEndpointProperties the web endpoint properties + * @param webMvcEndpointHandlerMapping the web mvc endpoint handler mapping * @param controllerEndpointHandlerMapping the controller endpoint handler mapping * @return the actuator provider */ @@ -222,12 +224,12 @@ ActuatorProvider actuatorProvider(ServerProperties serverProperties, * Open api actuator resource open api actuator resource. * * @param openAPIBuilderObjectFactory the open api builder object factory - * @param requestBuilder the request builder - * @param responseBuilder the response builder - * @param operationParser the operation parser - * @param springDocConfigProperties the spring doc config properties - * @param springDocProviders the spring doc providers - * @param springDocCustomizers the spring doc customizers + * @param requestBuilder the request builder + * @param responseBuilder the response builder + * @param operationParser the operation parser + * @param springDocConfigProperties the spring doc config properties + * @param springDocProviders the spring doc providers + * @param springDocCustomizers the spring doc customizers * @return the open api actuator resource */ @Bean diff --git a/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/core/fn/SpringdocRouteBuilder.java b/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/core/fn/SpringdocRouteBuilder.java index 1a6be0f2a..fbdd6c86f 100644 --- a/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/core/fn/SpringdocRouteBuilder.java +++ b/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/core/fn/SpringdocRouteBuilder.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webmvc.core.fn; @@ -49,6 +51,7 @@ /** * The type Springdoc route builder. + * * @author bnasslahsen */ public class SpringdocRouteBuilder extends AbstractSpringdocRouteBuilder { @@ -85,8 +88,8 @@ public RouterFunction build() { /** * Get springdoc route builder. * - * @param pattern the pattern - * @param handlerFunction the handler function + * @param pattern the pattern + * @param handlerFunction the handler function * @param operationsConsumer the operations consumer * @return the springdoc route builder */ @@ -100,7 +103,7 @@ public SpringdocRouteBuilder GET(String pattern, HandlerFunction /** * Get springdoc route builder. * - * @param handlerFunction the handler function + * @param handlerFunction the handler function * @param operationsConsumer the operations consumer * @return the springdoc route builder */ @@ -114,8 +117,8 @@ public SpringdocRouteBuilder GET(HandlerFunction handlerFunction /** * Get springdoc route builder. * - * @param predicate the predicate - * @param handlerFunction the handler function + * @param predicate the predicate + * @param handlerFunction the handler function * @param operationsConsumer the operations consumer * @return the springdoc route builder */ @@ -129,9 +132,9 @@ public SpringdocRouteBuilder GET(RequestPredicate predicate, HandlerFunction handlerFunctio /** * Head springdoc route builder. * - * @param pattern the pattern - * @param handlerFunction the handler function + * @param pattern the pattern + * @param handlerFunction the handler function * @param operationsConsumer the operations consumer * @return the springdoc route builder */ @@ -174,8 +177,8 @@ public SpringdocRouteBuilder HEAD(String pattern, HandlerFunction handlerFunctio /** * Post springdoc route builder. * - * @param pattern the pattern - * @param handlerFunction the handler function + * @param pattern the pattern + * @param handlerFunction the handler function * @param operationsConsumer the operations consumer * @return the springdoc route builder */ @@ -234,8 +237,8 @@ public SpringdocRouteBuilder POST(String pattern, HandlerFunction handlerFunction /** * Put springdoc route builder. * - * @param pattern the pattern - * @param handlerFunction the handler function + * @param pattern the pattern + * @param handlerFunction the handler function * @param operationsConsumer the operations consumer * @return the springdoc route builder */ @@ -294,8 +297,8 @@ public SpringdocRouteBuilder PUT(String pattern, HandlerFunction /** * Put springdoc route builder. * - * @param predicate the predicate - * @param handlerFunction the handler function + * @param predicate the predicate + * @param handlerFunction the handler function * @param operationsConsumer the operations consumer * @return the springdoc route builder */ @@ -309,9 +312,9 @@ public SpringdocRouteBuilder PUT(RequestPredicate predicate, HandlerFunction handlerFuncti /** * Patch springdoc route builder. * - * @param pattern the pattern - * @param handlerFunction the handler function + * @param pattern the pattern + * @param handlerFunction the handler function * @param operationsConsumer the operations consumer * @return the springdoc route builder */ @@ -354,8 +357,8 @@ public SpringdocRouteBuilder PATCH(String pattern, HandlerFunction handlerFunct /** * Delete springdoc route builder. * - * @param pattern the pattern - * @param handlerFunction the handler function + * @param pattern the pattern + * @param handlerFunction the handler function * @param operationsConsumer the operations consumer * @return the springdoc route builder */ @@ -414,8 +417,8 @@ public SpringdocRouteBuilder DELETE(String pattern, HandlerFunction handlerFunc /** * Options springdoc route builder. * - * @param pattern the pattern - * @param handlerFunction the handler function + * @param pattern the pattern + * @param handlerFunction the handler function * @param operationsConsumer the operations consumer * @return the springdoc route builder */ @@ -474,8 +477,8 @@ public SpringdocRouteBuilder OPTIONS(String pattern, HandlerFunction routerFunction, /** * Resources springdoc route builder. * - * @param pattern the pattern - * @param location the location + * @param pattern the pattern + * @param location the location * @param operationsConsumer the operations consumer * @return the springdoc route builder */ @@ -533,7 +536,7 @@ public SpringdocRouteBuilder resources(String pattern, Resource location, Consum /** * Resources springdoc route builder. * - * @param lookupFunction the lookup function + * @param lookupFunction the lookup function * @param operationsConsumer the operations consumer * @return the springdoc route builder */ @@ -547,9 +550,9 @@ public SpringdocRouteBuilder resources(Function> routerFunctionSupplier, Consumer operationsConsumer) { @@ -562,8 +565,8 @@ public SpringdocRouteBuilder nest(RequestPredicate predicate, Supplier> routerFunctionSupplier, Consumer operationsConsumer) { @@ -592,8 +595,8 @@ public SpringdocRouteBuilder path(String pattern, Supplier requestProcesso /** * After springdoc route builder. * - * @param responseProcessor the response processor + * @param responseProcessor the response processor * @param operationsConsumer the operations consumer * @return the springdoc route builder */ @@ -649,7 +652,7 @@ public SpringdocRouteBuilder after(BiFunction predicate, BiFunction< /** * On error springdoc route builder. * - * @param the type parameter - * @param exceptionType the exception type + * @param the type parameter + * @param exceptionType the exception type * @param responseProvider the response provider * @return the springdoc route builder */ diff --git a/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/core/providers/ActuatorWebMvcProvider.java b/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/core/providers/ActuatorWebMvcProvider.java index 7f0a867ef..7ac56543b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/core/providers/ActuatorWebMvcProvider.java +++ b/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/core/providers/ActuatorWebMvcProvider.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webmvc.core.providers; @@ -44,6 +46,7 @@ /** * The type Web mvc actuator provider. + * * @author bnasslahsen */ public class ActuatorWebMvcProvider extends ActuatorProvider { @@ -61,11 +64,11 @@ public class ActuatorWebMvcProvider extends ActuatorProvider { /** * Instantiates a new Actuator web mvc provider. * - * @param serverProperties the server properties - * @param springDocConfigProperties the spring doc config properties - * @param managementServerProperties the management server properties - * @param webEndpointProperties the web endpoint properties - * @param webMvcEndpointHandlerMapping the web mvc endpoint handler mapping + * @param serverProperties the server properties + * @param springDocConfigProperties the spring doc config properties + * @param managementServerProperties the management server properties + * @param webEndpointProperties the web endpoint properties + * @param webMvcEndpointHandlerMapping the web mvc endpoint handler mapping * @param controllerEndpointHandlerMapping the controller endpoint handler mapping */ public ActuatorWebMvcProvider(ServerProperties serverProperties, diff --git a/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/core/providers/RouterFunctionWebMvcProvider.java b/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/core/providers/RouterFunctionWebMvcProvider.java index d1916e832..2cda7a700 100644 --- a/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/core/providers/RouterFunctionWebMvcProvider.java +++ b/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/core/providers/RouterFunctionWebMvcProvider.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webmvc.core.providers; @@ -47,6 +49,7 @@ /** * The type Router function provider. + * * @author bnasslahsen */ //To keep compatiblity with spring-boot 1 @@ -83,6 +86,7 @@ public void setApplicationContext(ApplicationContext applicationContext) throws /** * The type Router function visitor. + * * @author bnasslahsen */ private class RouterFunctionVisitor extends AbstractRouterFunctionVisitor implements RouterFunctions.Visitor, RequestPredicates.Visitor { diff --git a/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/core/providers/SpringWebMvcProvider.java b/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/core/providers/SpringWebMvcProvider.java index def7487d1..c4eb5b441 100644 --- a/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/core/providers/SpringWebMvcProvider.java +++ b/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/core/providers/SpringWebMvcProvider.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webmvc.core.providers; @@ -44,6 +46,7 @@ /** * The type Spring web mvc provider. + * * @author bnasslahsen */ public class SpringWebMvcProvider extends SpringWebProvider { diff --git a/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/core/service/RequestService.java b/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/core/service/RequestService.java index 1df30d620..c9fe37d7c 100644 --- a/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/core/service/RequestService.java +++ b/springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/core/service/RequestService.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webmvc.core.service; @@ -31,13 +33,13 @@ import org.springdoc.core.discoverer.SpringDocParameterNameDiscoverer; import org.springdoc.core.service.AbstractRequestService; import org.springdoc.core.service.GenericParameterService; -import org.springdoc.core.service.OperationService; import org.springdoc.core.service.RequestBodyService; import static org.springdoc.core.utils.SpringDocUtils.getConfig; /** * The type Request builder. + * * @author bnasslahsen */ public class RequestService extends AbstractRequestService { @@ -54,15 +56,14 @@ public class RequestService extends AbstractRequestService { /** * Instantiates a new Request builder. * - * @param parameterBuilder the parameter builder - * @param requestBodyService the request body builder - * @param operationService the operation builder - * @param parameterCustomizers the parameter customizers + * @param parameterBuilder the parameter builder + * @param requestBodyService the request body builder + * @param parameterCustomizers the parameter customizers * @param localSpringDocParameterNameDiscoverer the local spring doc parameter name discoverer */ public RequestService(GenericParameterService parameterBuilder, RequestBodyService requestBodyService, - OperationService operationService, Optional> parameterCustomizers, + Optional> parameterCustomizers, SpringDocParameterNameDiscoverer localSpringDocParameterNameDiscoverer) { - super(parameterBuilder, requestBodyService, operationService, parameterCustomizers, localSpringDocParameterNameDiscoverer); + super(parameterBuilder, requestBodyService, parameterCustomizers, localSpringDocParameterNameDiscoverer); } } diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/AbstractSpringDocV30Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/AbstractSpringDocV30Test.java index bdbf37b20..f1c8e81af 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/AbstractSpringDocV30Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/AbstractSpringDocV30Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -43,7 +43,7 @@ public abstract class AbstractSpringDocV30Test extends AbstractCommonTest { public static String className; @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { className = getClass().getSimpleName(); String testNumber = className.replaceAll("[^0-9]", ""); MvcResult mockMvcResult = mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)).andExpect(status().isOk()) diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/ApiOriginFilter.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/ApiOriginFilter.java deleted file mode 100644 index f51c4dedc..000000000 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/ApiOriginFilter.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * - * * - * * * - * * * * - * * * * * 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.app1; - -import java.io.IOException; - -import jakarta.servlet.FilterChain; -import jakarta.servlet.FilterConfig; -import jakarta.servlet.ServletException; -import jakarta.servlet.ServletRequest; -import jakarta.servlet.ServletResponse; -import jakarta.servlet.http.HttpServletResponse; - -@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2019-07-08T09:37:36.546Z[GMT]") -public class ApiOriginFilter implements jakarta.servlet.Filter { - @Override - public void doFilter(ServletRequest request, ServletResponse response, - FilterChain chain) throws IOException, ServletException { - HttpServletResponse res = (HttpServletResponse) response; - res.addHeader("Access-Control-Allow-Origin", "*"); - res.addHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT"); - res.addHeader("Access-Control-Allow-Headers", "Content-Type"); - chain.doFilter(request, response); - } - - @Override - public void destroy() { - } - - @Override - public void init(FilterConfig filterConfig) throws ServletException { - } -} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/ApiResponseMessage.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/ApiResponseMessage.java deleted file mode 100644 index e06ad2e49..000000000 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/ApiResponseMessage.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * - * * - * * * - * * * * - * * * * * 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.app1; - -import jakarta.xml.bind.annotation.XmlTransient; - -@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2019-07-08T09:37:36.546Z[GMT]") -@jakarta.xml.bind.annotation.XmlRootElement -public class ApiResponseMessage { - public static final int ERROR = 1; - - public static final int WARNING = 2; - - public static final int INFO = 3; - - public static final int OK = 4; - - public static final int TOO_BUSY = 5; - - int code; - - String type; - - String message; - - public ApiResponseMessage() { - } - - public ApiResponseMessage(int code, String message) { - this.code = code; - switch (code) { - case ERROR: - setType("error"); - break; - case WARNING: - setType("warning"); - break; - case INFO: - setType("info"); - break; - case OK: - setType("ok"); - break; - case TOO_BUSY: - setType("too busy"); - break; - default: - setType("unknown"); - break; - } - this.message = message; - } - - @XmlTransient - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } -} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/ErrorMessage.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/ErrorMessage.java index 81fa2f825..ba4ce126a 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/ErrorMessage.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/ErrorMessage.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/ExceptionTranslator.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/ExceptionTranslator.java index c042e3685..8c5d8dbe2 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/ExceptionTranslator.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/ExceptionTranslator.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/HelloController.java index 2d648b376..f56d97ca9 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/HomeController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/HomeController.java index bbcc0dce7..4eb493570 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/HomeController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/HomeController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/InventoryApi.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/InventoryApi.java index 9010567a9..2e0d00f5e 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/InventoryApi.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/InventoryApi.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/InventoryApiController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/InventoryApiController.java index aa4933e48..3c88f7816 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/InventoryApiController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/InventoryApiController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/InventoryItem.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/InventoryItem.java index b59127a5f..89a40c268 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/InventoryItem.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/InventoryItem.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/ItemController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/ItemController.java index 804e852d8..1fa72bada 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/ItemController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/ItemController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/ItemDTO.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/ItemDTO.java index bc42fb4c5..53faa1aa9 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/ItemDTO.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/ItemDTO.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/ItemLightDTO.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/ItemLightDTO.java index 572e96077..1cebbea5b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/ItemLightDTO.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/ItemLightDTO.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/Manufacturer.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/Manufacturer.java index a81ac80cc..8276edb25 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/Manufacturer.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/Manufacturer.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/PeopleRestService.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/PeopleRestService.java index af2b5c837..b6caeb8ba 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/PeopleRestService.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/PeopleRestService.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/PersonDTO.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/PersonDTO.java index 4fc6191a9..ee01f5b54 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/PersonDTO.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/PersonDTO.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/SpringDocApp1Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/SpringDocApp1Test.java index 9b0cd73df..733d822b5 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/SpringDocApp1Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/SpringDocApp1Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app10/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app10/HelloController.java index b5961527c..1257827a6 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app10/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app10/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app10/SpringDocApp10Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app10/SpringDocApp10Test.java index 60bf777ea..0f305f273 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app10/SpringDocApp10Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app10/SpringDocApp10Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app100/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app100/HelloController.java index d80fdcba2..4c3f1db37 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app100/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app100/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app100/PersonDTO.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app100/PersonDTO.java index efe29ec5d..6d81886ea 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app100/PersonDTO.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app100/PersonDTO.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app100/SpringDocApp100Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app100/SpringDocApp100Test.java index 76ea33096..3e9c66f9a 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app100/SpringDocApp100Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app100/SpringDocApp100Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app101/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app101/HelloController.java index 686fffba8..561400241 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app101/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app101/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app101/HelloDTO.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app101/HelloDTO.java index 3a37ecb82..a331b775c 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app101/HelloDTO.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app101/HelloDTO.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app101/SpringDocApp101Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app101/SpringDocApp101Test.java index 71459ebb1..724086f83 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app101/SpringDocApp101Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app101/SpringDocApp101Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app102/InheritedRequestParams.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app102/InheritedRequestParams.java index fa12b0a82..1d098c5c3 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app102/InheritedRequestParams.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app102/InheritedRequestParams.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app102/RequestParams.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app102/RequestParams.java index 4ef3c62b1..95d040788 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app102/RequestParams.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app102/RequestParams.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app102/SpringDocApp102Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app102/SpringDocApp102Test.java index 401f0bac5..5383be94c 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app102/SpringDocApp102Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app102/SpringDocApp102Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app102/TestController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app102/TestController.java index 04ecb3c18..384cc792c 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app102/TestController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app102/TestController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app103/ExampleBody.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app103/ExampleBody.java index 5264aace2..0f828813b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app103/ExampleBody.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app103/ExampleBody.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app103/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app103/HelloController.java index 20063cc09..abe102c33 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app103/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app103/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app103/SpringDocApp103Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app103/SpringDocApp103Test.java index f1e68129e..40b8b7a82 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app103/SpringDocApp103Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app103/SpringDocApp103Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app104/CrudController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app104/CrudController.java index 6c3e4000a..abc9e4ce2 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app104/CrudController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app104/CrudController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app104/Design.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app104/Design.java index 45a3ae0e8..b93a03563 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app104/Design.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app104/Design.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app104/DesignController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app104/DesignController.java index 18f177621..fe99dda0c 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app104/DesignController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app104/DesignController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app104/HavingPK.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app104/HavingPK.java index cad821173..66b7e14a7 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app104/HavingPK.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app104/HavingPK.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app104/SpringDocApp104Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app104/SpringDocApp104Test.java index f2934b3f8..1271259ad 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app104/SpringDocApp104Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app104/SpringDocApp104Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/SpringDocApp105Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/SpringDocApp105Test.java index 7297c7249..e43ad48ea 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/SpringDocApp105Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/SpringDocApp105Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -60,7 +60,7 @@ public class SpringDocApp105Test extends AbstractSpringDocV30Test { public static String className; @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/stores")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) @@ -68,7 +68,7 @@ public void testApp() throws Exception { } @Test - public void testApp2() throws Exception { + void testApp2() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/users")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) @@ -76,7 +76,7 @@ public void testApp2() throws Exception { } @Test - public void testApp3() throws Exception { + void testApp3() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/pets")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) @@ -84,7 +84,7 @@ public void testApp3() throws Exception { } @Test - public void testApp4() throws Exception { + void testApp4() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/groups test")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/ApiUtil.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/ApiUtil.java index b013e3df1..f2693fc23 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/ApiUtil.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/ApiUtil.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/ExceptionTranslator.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/ExceptionTranslator.java index 1d42f8d6e..718b7ecfa 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/ExceptionTranslator.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/ExceptionTranslator.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/HomeController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/HomeController.java index 38d1aadeb..31510e3cf 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/HomeController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/HomeController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/pet/PetApi.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/pet/PetApi.java index 310b519f8..baa25e173 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/pet/PetApi.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/pet/PetApi.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/pet/PetApiController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/pet/PetApiController.java index 756eda3b7..e2b81c158 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/pet/PetApiController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/pet/PetApiController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/pet/PetApiDelegate.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/pet/PetApiDelegate.java index 2686d2d38..461a6cd6e 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/pet/PetApiDelegate.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/pet/PetApiDelegate.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/pet/PetApiDelegateImpl.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/pet/PetApiDelegateImpl.java index ac9b8fab4..4cb8411d4 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/pet/PetApiDelegateImpl.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/pet/PetApiDelegateImpl.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/store/StoreApi.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/store/StoreApi.java index 102dbdd93..82b808b91 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/store/StoreApi.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/store/StoreApi.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/store/StoreApiController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/store/StoreApiController.java index abdd875d5..11832dea4 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/store/StoreApiController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/store/StoreApiController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/store/StoreApiDelegate.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/store/StoreApiDelegate.java index 5e074978d..352c2bcd4 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/store/StoreApiDelegate.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/store/StoreApiDelegate.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/store/StoreApiDelegateImpl.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/store/StoreApiDelegateImpl.java index bf38c8a05..e319b6c05 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/store/StoreApiDelegateImpl.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/store/StoreApiDelegateImpl.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/user/UserApi.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/user/UserApi.java index da60147fb..9b544228f 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/user/UserApi.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/user/UserApi.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/user/UserApiController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/user/UserApiController.java index 5a873402f..aa2912d05 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/user/UserApiController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/user/UserApiController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/user/UserApiDelegate.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/user/UserApiDelegate.java index d025a570f..6f6dc5860 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/user/UserApiDelegate.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/user/UserApiDelegate.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/user/UserApiDelegateImpl.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/user/UserApiDelegateImpl.java index 9fb9385f2..c7d6237d9 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/user/UserApiDelegateImpl.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/api/user/UserApiDelegateImpl.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/model/Body.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/model/Body.java index 616a4b33b..a39a9c0a0 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/model/Body.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/model/Body.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/model/Body1.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/model/Body1.java index db937be72..15aace704 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/model/Body1.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/model/Body1.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/model/Category.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/model/Category.java index cfc392637..bfdabcd30 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/model/Category.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/model/Category.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/model/ModelApiResponse.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/model/ModelApiResponse.java index 5e56ca4c1..c082cd09d 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/model/ModelApiResponse.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/model/ModelApiResponse.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/model/Order.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/model/Order.java index 06edebb83..0f62ecf2e 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/model/Order.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/model/Order.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/model/Pet.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/model/Pet.java index c59f240a8..a3ddaf3c9 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/model/Pet.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/model/Pet.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/model/Tag.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/model/Tag.java index 315135f05..ef6c62f87 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/model/Tag.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/model/Tag.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/model/User.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/model/User.java index f13e7fa8d..387ce683e 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/model/User.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app105/model/User.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app106/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app106/HelloController.java index 0d9736546..95cc687ab 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app106/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app106/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app106/SpringDocApp106Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app106/SpringDocApp106Test.java index 754a89e09..a6ea4d7f3 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app106/SpringDocApp106Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app106/SpringDocApp106Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app107/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app107/HelloController.java index fd6afbf07..deb37021a 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app107/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app107/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app107/SpringDocApp107Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app107/SpringDocApp107Test.java index c05122160..ce24d893a 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app107/SpringDocApp107Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app107/SpringDocApp107Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app108/ActionResult.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app108/ActionResult.java index 9094fa151..5604cced0 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app108/ActionResult.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app108/ActionResult.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app108/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app108/HelloController.java index 1a71d149a..b68c0ff90 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app108/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app108/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app108/SpringDocApp108Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app108/SpringDocApp108Test.java index 4ff7dd5df..416e416a2 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app108/SpringDocApp108Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app108/SpringDocApp108Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app109/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app109/HelloController.java index 727e12ef8..f10a6caed 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app109/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app109/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app109/SpringDocApp109Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app109/SpringDocApp109Test.java index 554dc09f5..b95536b6a 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app109/SpringDocApp109Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app109/SpringDocApp109Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app11/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app11/HelloController.java index 8c36bb1c4..fdb87f710 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app11/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app11/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app11/SpringDocApp11Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app11/SpringDocApp11Test.java index 2c1f6d171..d57cccf07 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app11/SpringDocApp11Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app11/SpringDocApp11Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app110/ErrorMessage.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app110/ErrorMessage.java index 75d5a0741..458a74269 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app110/ErrorMessage.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app110/ErrorMessage.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app110/GlobalControllerAdvice.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app110/GlobalControllerAdvice.java index 2cfe6fa64..6946ff66c 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app110/GlobalControllerAdvice.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app110/GlobalControllerAdvice.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -60,10 +60,7 @@ public class GlobalControllerAdvice //extends ResponseEntityExceptionHandler @ExceptionHandler(Throwable.class) @ResponseStatus(code = HttpStatus.INTERNAL_SERVER_ERROR) public ResponseEntity problem(final Throwable e) { - String message = e.getMessage(); - //might actually prefer to use a geeric mesasge - - message = "Problem occured"; + String message = "Problem occured"; UUID uuid = UUID.randomUUID(); String logRef = uuid.toString(); logger.error("logRef=" + logRef, message, e); diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app110/Person.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app110/Person.java index 58e518385..c27aab2df 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app110/Person.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app110/Person.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app110/PersonController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app110/PersonController.java index eaac74f59..4f689c20e 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app110/PersonController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app110/PersonController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app110/PersonController2.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app110/PersonController2.java index 43dd3260d..ed80cd1f8 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app110/PersonController2.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app110/PersonController2.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app110/Problem.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app110/Problem.java index d39d8d644..2e4db30bf 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app110/Problem.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app110/Problem.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app110/SpringDocApp110Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app110/SpringDocApp110Test.java index 041471e02..d6cdd00f2 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app110/SpringDocApp110Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app110/SpringDocApp110Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app111/ErrorMessage.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app111/ErrorMessage.java index 0ad77cb10..c31ad2d3d 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app111/ErrorMessage.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app111/ErrorMessage.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app111/GlobalControllerAdvice.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app111/GlobalControllerAdvice.java index 7567cf84a..1dbf22d68 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app111/GlobalControllerAdvice.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app111/GlobalControllerAdvice.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -60,10 +60,7 @@ public class GlobalControllerAdvice //extends ResponseEntityExceptionHandler @ExceptionHandler(Throwable.class) @ResponseStatus(code = HttpStatus.INTERNAL_SERVER_ERROR) public ResponseEntity problem(final Throwable e) { - String message = e.getMessage(); - //might actually prefer to use a geeric mesasge - - message = "Problem occured"; + String message = "Problem occured"; UUID uuid = UUID.randomUUID(); String logRef = uuid.toString(); logger.error("logRef=" + logRef, message, e); diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app111/Person.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app111/Person.java index 63fd56ad6..dbbd2084e 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app111/Person.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app111/Person.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app111/PersonController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app111/PersonController.java index b84ca71ee..05ffe922d 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app111/PersonController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app111/PersonController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app111/PersonController2.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app111/PersonController2.java index d6f088f8a..c791fd3c2 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app111/PersonController2.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app111/PersonController2.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app111/Problem.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app111/Problem.java index c4a9e82e2..0206ac1ed 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app111/Problem.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app111/Problem.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app111/SpringDocApp111Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app111/SpringDocApp111Test.java index 097422656..dad12e8d6 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app111/SpringDocApp111Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app111/SpringDocApp111Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app112/ErrorMessage.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app112/ErrorMessage.java index f860b6a5f..f6a59ad0f 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app112/ErrorMessage.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app112/ErrorMessage.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app112/GlobalControllerAdvice.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app112/GlobalControllerAdvice.java index f7ac14436..df4676df3 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app112/GlobalControllerAdvice.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app112/GlobalControllerAdvice.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -60,10 +60,7 @@ public class GlobalControllerAdvice //extends ResponseEntityExceptionHandler @ExceptionHandler(Throwable.class) @ResponseStatus(code = HttpStatus.INTERNAL_SERVER_ERROR) public ResponseEntity problem(final Throwable e) { - String message = e.getMessage(); - //might actually prefer to use a geeric mesasge - - message = "Problem occured"; + String message = "Problem occured"; UUID uuid = UUID.randomUUID(); String logRef = uuid.toString(); logger.error("logRef=" + logRef, message, e); diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app112/Person.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app112/Person.java index 261a01ab7..560ec4a4d 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app112/Person.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app112/Person.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app112/PersonController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app112/PersonController.java index acc6048d3..fcb6215a8 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app112/PersonController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app112/PersonController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app112/Problem.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app112/Problem.java index 3961b8734..3363db5a6 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app112/Problem.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app112/Problem.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app112/SpringDocApp112Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app112/SpringDocApp112Test.java index b88831b66..68b6e5e6e 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app112/SpringDocApp112Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app112/SpringDocApp112Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app112/sample/PersonController2.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app112/sample/PersonController2.java index 170ac7ef7..69811786a 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app112/sample/PersonController2.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app112/sample/PersonController2.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app113/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app113/HelloController.java index 5de8db421..d488d4b6d 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app113/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app113/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app113/SpringDocApp113Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app113/SpringDocApp113Test.java index 4e7c725c8..3d6571237 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app113/SpringDocApp113Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app113/SpringDocApp113Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app114/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app114/HelloController.java index 8e059df45..ba7799e63 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app114/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app114/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app114/SpringDocApp114Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app114/SpringDocApp114Test.java index 2f838376f..d9ac7c65c 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app114/SpringDocApp114Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app114/SpringDocApp114Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app115/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app115/HelloController.java index 454ac6135..b9dab8b1e 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app115/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app115/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app115/JavaTimeOperationCustomizer.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app115/JavaTimeOperationCustomizer.java index a63ffa547..44564e9b6 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app115/JavaTimeOperationCustomizer.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app115/JavaTimeOperationCustomizer.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app115/SpringDocApp115Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app115/SpringDocApp115Test.java index 83247f2c8..b4ad1cf6b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app115/SpringDocApp115Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app115/SpringDocApp115Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app116/FooErrorHandler.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app116/FooErrorHandler.java index db1f6d8fe..91ed77440 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app116/FooErrorHandler.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app116/FooErrorHandler.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app116/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app116/HelloController.java index 724e4c8dd..c4d86f4a0 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app116/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app116/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app116/SpringDocApp116Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app116/SpringDocApp116Test.java index 5caa1c6a8..57dbdb7c5 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app116/SpringDocApp116Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app116/SpringDocApp116Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app117/HelloApplication.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app117/HelloApplication.java index 393c4d011..7ba64cce8 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app117/HelloApplication.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app117/HelloApplication.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app117/SpringDocApp117Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app117/SpringDocApp117Test.java index 07ae5c0de..17184fc53 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app117/SpringDocApp117Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app117/SpringDocApp117Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app118/AbstractParent.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app118/AbstractParent.java index f494538ff..b019187a9 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app118/AbstractParent.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app118/AbstractParent.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app118/ConcreteParent.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app118/ConcreteParent.java index 4a11af1ed..c5d481343 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app118/ConcreteParent.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app118/ConcreteParent.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app118/Controller.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app118/Controller.java index a351dd2fd..b2c35af3c 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app118/Controller.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app118/Controller.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app118/SpringDocApp118Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app118/SpringDocApp118Test.java index db406ea63..eec233371 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app118/SpringDocApp118Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app118/SpringDocApp118Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app119/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app119/HelloController.java index f403d4fce..6b21f521b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app119/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app119/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -27,6 +27,8 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Encoding; +import io.swagger.v3.oas.annotations.parameters.RequestBody; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.PostMapping; @@ -44,6 +46,7 @@ public class HelloController { produces = MediaType.TEXT_PLAIN_VALUE) public String multiFilesInMultiPart( @RequestPart("params") + @RequestBody(content = @Content(encoding = @Encoding(name="params", contentType=MediaType.APPLICATION_JSON_VALUE))) @Parameter( description = "This is the configuration", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE)) final JsonRequest jsonRequest, diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app119/JsonRequest.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app119/JsonRequest.java index f23f27521..ef43fd161 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app119/JsonRequest.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app119/JsonRequest.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app119/SpringDocApp119Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app119/SpringDocApp119Test.java index 08eb3d76d..ccc968cd8 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app119/SpringDocApp119Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app119/SpringDocApp119Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app12/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app12/HelloController.java index 911d8ad5b..23deedaa4 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app12/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app12/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app12/SpringDocApp12Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app12/SpringDocApp12Test.java index 4033c3f76..e4148fda0 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app12/SpringDocApp12Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app12/SpringDocApp12Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app120/AccountId.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app120/AccountId.java index cf1f80b54..3fb9b1288 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app120/AccountId.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app120/AccountId.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app120/MetaAnnotationController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app120/MetaAnnotationController.java index c481d3c13..15b41296f 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app120/MetaAnnotationController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app120/MetaAnnotationController.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2022 the original author or authors. + * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app120/SpringDocApp120Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app120/SpringDocApp120Test.java index 08c67a3a7..06d0002d9 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app120/SpringDocApp120Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app120/SpringDocApp120Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app121/InheritedRequestParams.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app121/InheritedRequestParams.java index 26e06e4b6..3bf12d49b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app121/InheritedRequestParams.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app121/InheritedRequestParams.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app121/RequestParams.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app121/RequestParams.java index 892e04c60..14f805ed5 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app121/RequestParams.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app121/RequestParams.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app121/SpringDocApp121Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app121/SpringDocApp121Test.java index f711947bc..830de5f42 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app121/SpringDocApp121Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app121/SpringDocApp121Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app121/TestController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app121/TestController.java index 8380ead84..af89c0f61 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app121/TestController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app121/TestController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app122/BaseController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app122/BaseController.java index 10a144787..92f340e2b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app122/BaseController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app122/BaseController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app122/BaseObject.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app122/BaseObject.java index ffcf7e469..aedb70717 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app122/BaseObject.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app122/BaseObject.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app122/CustomerDto.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app122/CustomerDto.java index bbd2a2f62..ec42b9030 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app122/CustomerDto.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app122/CustomerDto.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app122/FirstController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app122/FirstController.java index d3e947a4f..3182aad9e 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app122/FirstController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app122/FirstController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app122/SpringDocApp122Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app122/SpringDocApp122Test.java index bc2818471..11597e396 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app122/SpringDocApp122Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app122/SpringDocApp122Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app122/Wrapper.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app122/Wrapper.java index cc0c49731..0789873e6 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app122/Wrapper.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app122/Wrapper.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app123/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app123/HelloController.java index c469edb12..8297aac4a 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app123/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app123/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app123/MyExceptionHandler.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app123/MyExceptionHandler.java index 74fd0dd10..8f86ee05f 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app123/MyExceptionHandler.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app123/MyExceptionHandler.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app123/SpringDocApp123Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app123/SpringDocApp123Test.java index bd93af3ad..668ff7fa4 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app123/SpringDocApp123Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app123/SpringDocApp123Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app124/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app124/HelloController.java index 72ccdfd5a..730c80660 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app124/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app124/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app124/MyExceptionHandler.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app124/MyExceptionHandler.java index 17932f0e5..126584f49 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app124/MyExceptionHandler.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app124/MyExceptionHandler.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app124/SpringDocApp124Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app124/SpringDocApp124Test.java index aede8d54d..9735cd03e 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app124/SpringDocApp124Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app124/SpringDocApp124Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app126/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app126/HelloController.java index 4568c5020..1c9029a9d 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app126/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app126/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app126/Problem.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app126/Problem.java index 45439b0a6..7491caa32 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app126/Problem.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app126/Problem.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app126/SecurityProblemResponsesConfiguration.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app126/SecurityProblemResponsesConfiguration.java index 83526395b..f4dbd955b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app126/SecurityProblemResponsesConfiguration.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app126/SecurityProblemResponsesConfiguration.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app126/SpringDocApp126Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app126/SpringDocApp126Test.java index 3b332b37d..80e826438 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app126/SpringDocApp126Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app126/SpringDocApp126Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app127/AbstractObject.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app127/AbstractObject.java index e6ba191d2..a205f56ff 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app127/AbstractObject.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app127/AbstractObject.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app127/ConcreteObjectA.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app127/ConcreteObjectA.java index e6eea41a5..f8dfc7d7b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app127/ConcreteObjectA.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app127/ConcreteObjectA.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app127/ConcreteType.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app127/ConcreteType.java index e15a1c3ca..365140758 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app127/ConcreteType.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app127/ConcreteType.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app127/Controller.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app127/Controller.java index 0216aed57..051033f40 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app127/Controller.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app127/Controller.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app127/SpringDocApp127Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app127/SpringDocApp127Test.java index a52c5fc39..facab9836 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app127/SpringDocApp127Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app127/SpringDocApp127Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -41,7 +41,7 @@ public class SpringDocApp127Test extends AbstractSpringDocV30Test { @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { className = getClass().getSimpleName(); String testNumber = className.replaceAll("[^0-9]", ""); MvcResult mockMvcResult = mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + ".yaml")).andExpect(status().isOk()).andReturn(); diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app127/Umbrella.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app127/Umbrella.java index a7eb162ae..95373ed3b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app127/Umbrella.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app127/Umbrella.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app129/ActualReturnedEntity.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app129/ActualReturnedEntity.java index 001a5d0d6..3ef20ac70 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app129/ActualReturnedEntity.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app129/ActualReturnedEntity.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app129/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app129/HelloController.java index dae7c80c0..a11b992b9 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app129/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app129/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app129/OperationResponse.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app129/OperationResponse.java index 6c3fcc983..18d2690d5 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app129/OperationResponse.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app129/OperationResponse.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app129/SpringDocApp129Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app129/SpringDocApp129Test.java index 4f7dfd009..c30cde342 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app129/SpringDocApp129Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app129/SpringDocApp129Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app13/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app13/HelloController.java index fbb971edd..17a192ec6 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app13/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app13/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app13/PersonDTO.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app13/PersonDTO.java index 884ab7bc3..c882dc0ec 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app13/PersonDTO.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app13/PersonDTO.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app13/SpringDocApp13Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app13/SpringDocApp13Test.java index 3a5477d56..2c9f3b1b8 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app13/SpringDocApp13Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app13/SpringDocApp13Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app130/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app130/HelloController.java index 88b1359e2..55c114e3a 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app130/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app130/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app130/SpringDocApp130Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app130/SpringDocApp130Test.java index def2d58bc..b35938dd3 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app130/SpringDocApp130Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app130/SpringDocApp130Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app130/TrackerData.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app130/TrackerData.java index c42519081..9cd3a16f1 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app130/TrackerData.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app130/TrackerData.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app131/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app131/HelloController.java index 58f4d9c1c..8f4ba34b3 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app131/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app131/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app131/Organization.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app131/Organization.java index 049955a0e..5f0b658b5 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app131/Organization.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app131/Organization.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app131/RestControllerError.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app131/RestControllerError.java index 713c8d582..e28658bba 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app131/RestControllerError.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app131/RestControllerError.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app131/SpringDocApp131Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app131/SpringDocApp131Test.java index f648a0799..8e2eded3d 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app131/SpringDocApp131Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app131/SpringDocApp131Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app132/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app132/HelloController.java index f221f3f8f..731416081 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app132/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app132/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app132/Organization.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app132/Organization.java index 80203f4ed..89d061a09 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app132/Organization.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app132/Organization.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app132/RestControllerError.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app132/RestControllerError.java index 80e3f8c11..3172a6792 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app132/RestControllerError.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app132/RestControllerError.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app132/SpringDocApp132Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app132/SpringDocApp132Test.java index 5658f4e72..ce16f46b6 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app132/SpringDocApp132Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app132/SpringDocApp132Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app133/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app133/HelloController.java index 5b29582b9..74e3f3ce0 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app133/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app133/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app133/SpringDocApp133Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app133/SpringDocApp133Test.java index fd5287952..37076e374 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app133/SpringDocApp133Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app133/SpringDocApp133Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app134/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app134/HelloController.java index 2c0e887fb..d99ecc65b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app134/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app134/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app134/OpenApiConfig.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app134/OpenApiConfig.java index a86ef7eb1..f36a27483 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app134/OpenApiConfig.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app134/OpenApiConfig.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app134/SpringDocApp134Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app134/SpringDocApp134Test.java index 0070e02f6..9fa828dd6 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app134/SpringDocApp134Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app134/SpringDocApp134Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -42,7 +42,7 @@ public class SpringDocApp134Test extends AbstractSpringDocV30Test { @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/v1-group")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) @@ -50,7 +50,7 @@ public void testApp() throws Exception { } @Test - public void testApp2() throws Exception { + void testApp2() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/v2-group")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) @@ -58,7 +58,7 @@ public void testApp2() throws Exception { } @Test - public void testApp3() throws Exception { + void testApp3() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/v1-headers-group")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) @@ -66,7 +66,7 @@ public void testApp3() throws Exception { } @Test - public void testApp4() throws Exception { + void testApp4() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/v1-v2-headers-group")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) @@ -74,7 +74,7 @@ public void testApp4() throws Exception { } @Test - public void testApp5() throws Exception { + void testApp5() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/v2-consumes-group")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app135/Book.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app135/Book.java index f50fc0ee1..6f480ff04 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app135/Book.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app135/Book.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app135/BookRepository.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app135/BookRepository.java index dfb8d6be2..0f30b915f 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app135/BookRepository.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app135/BookRepository.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app135/BookRouter.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app135/BookRouter.java index dfdacabf4..cdc463723 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app135/BookRouter.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app135/BookRouter.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app135/SpringDocApp135Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app135/SpringDocApp135Test.java index db6a987d7..8d37cd1d2 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app135/SpringDocApp135Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app135/SpringDocApp135Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app136/OperationIdController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app136/OperationIdController.java index 5f8c85ffb..156de6030 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app136/OperationIdController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app136/OperationIdController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app136/SpringDocApp136Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app136/SpringDocApp136Test.java index 42dcf15e7..98d481358 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app136/SpringDocApp136Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app136/SpringDocApp136Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app137/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app137/HelloController.java index a2a4515bc..fcdbe1d71 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app137/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app137/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app137/OpenApiConfig.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app137/OpenApiConfig.java index fd01367fd..c88e8201e 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app137/OpenApiConfig.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app137/OpenApiConfig.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app137/SpringDocApp137Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app137/SpringDocApp137Test.java index 9855b5567..9a7babfaf 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app137/SpringDocApp137Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app137/SpringDocApp137Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app138/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app138/HelloController.java index d5c4aa2d9..e1abbc596 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app138/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app138/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app138/SpringDocApp138Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app138/SpringDocApp138Test.java index 26e366008..8490dbf4c 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app138/SpringDocApp138Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app138/SpringDocApp138Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -72,7 +72,7 @@ private static Map apiExtensions() { } @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { MvcResult mockMvcResult = mockMvc.perform(MockMvcRequestBuilders.get(Constants.DEFAULT_API_DOCS_URL)).andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))).andReturn(); String result = mockMvcResult.getResponse().getContentAsString(); diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app139/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app139/HelloController.java index 5c035b55e..3d0867692 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app139/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app139/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app139/SpringDocApp139Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app139/SpringDocApp139Test.java index 573d3de02..1c3105e69 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app139/SpringDocApp139Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app139/SpringDocApp139Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app14/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app14/HelloController.java index 02049d2eb..bcc830c2f 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app14/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app14/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app14/SpringDocApp14Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app14/SpringDocApp14Test.java index 5d0b5491a..b7d9502a6 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app14/SpringDocApp14Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app14/SpringDocApp14Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app140/HelloApplication.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app140/HelloApplication.java index 025bccc5b..986f2c611 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app140/HelloApplication.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app140/HelloApplication.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app140/SpringDocApp140Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app140/SpringDocApp140Test.java index 357b55726..27e3b94d3 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app140/SpringDocApp140Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app140/SpringDocApp140Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app141/Book.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app141/Book.java index 87cfb848c..41a5f004c 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app141/Book.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app141/Book.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app141/BookRepository.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app141/BookRepository.java index da37b8896..086b54a61 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app141/BookRepository.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app141/BookRepository.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app141/BookRouter.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app141/BookRouter.java index ef34d6fd6..222196d27 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app141/BookRouter.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app141/BookRouter.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app141/SpringDocApp141Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app141/SpringDocApp141Test.java index c22fd06bc..2c2cd3a34 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app141/SpringDocApp141Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app141/SpringDocApp141Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app142/HelloApplication.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app142/HelloApplication.java index 125dca684..079b3f46f 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app142/HelloApplication.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app142/HelloApplication.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app142/SpringDocApp142Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app142/SpringDocApp142Test.java index 958868b14..5bc18a8fd 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app142/SpringDocApp142Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app142/SpringDocApp142Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app143/HelloHiddenController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app143/HelloHiddenController.java index 4f9a048c5..6ef6d86fc 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app143/HelloHiddenController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app143/HelloHiddenController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app143/SpringDocApp143Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app143/SpringDocApp143Test.java index 84c3f1e36..7d88dc89a 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app143/SpringDocApp143Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app143/SpringDocApp143Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app149/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app149/HelloController.java index 3539c64b2..796242493 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app149/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app149/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app149/HelloMessage.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app149/HelloMessage.java index 1b93bf6af..0adff9035 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app149/HelloMessage.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app149/HelloMessage.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app149/HiddenHelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app149/HiddenHelloController.java index 12d0088f4..327141abb 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app149/HiddenHelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app149/HiddenHelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app149/SpringDocApp149Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app149/SpringDocApp149Test.java index 46299d3de..61393232f 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app149/SpringDocApp149Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app149/SpringDocApp149Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app15/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app15/HelloController.java index 9a487cfe0..8adb0af51 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app15/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app15/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app15/SpringDocApp15Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app15/SpringDocApp15Test.java index 84b9eb7e5..ac245a9d3 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app15/SpringDocApp15Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app15/SpringDocApp15Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app150/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app150/HelloController.java index 52c14a7d0..a93f2511c 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app150/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app150/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app150/SpringDocApp150Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app150/SpringDocApp150Test.java index 54ede6f9e..14339c7d0 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app150/SpringDocApp150Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app150/SpringDocApp150Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app151/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app151/HelloController.java index 46d64da4e..65d74c5f3 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app151/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app151/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app151/SpringDocApp151Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app151/SpringDocApp151Test.java index 6d51c5017..4659e9542 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app151/SpringDocApp151Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app151/SpringDocApp151Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app152/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app152/HelloController.java index 0536dd3d2..bef1e91e6 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app152/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app152/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app152/SpringDocApp152Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app152/SpringDocApp152Test.java index dbb1bdfd0..224c6153a 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app152/SpringDocApp152Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app152/SpringDocApp152Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app153/OrderState.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app153/OrderState.java index e2cc0facd..75fa28f58 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app153/OrderState.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app153/OrderState.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app153/OrderStateMapper.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app153/OrderStateMapper.java index a444f9468..3ded5f0bf 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app153/OrderStateMapper.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app153/OrderStateMapper.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app153/SpringDocApp153Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app153/SpringDocApp153Test.java index 6e6b4dabf..400e20955 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app153/SpringDocApp153Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app153/SpringDocApp153Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app153/TestController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app153/TestController.java index 627a20b8d..327ffd84b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app153/TestController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app153/TestController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app154/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app154/HelloController.java index 0a88bbdf5..0e299ecd5 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app154/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app154/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app154/OpenApiConfiguration.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app154/OpenApiConfiguration.java index 5d86a5b1b..6f5795ba4 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app154/OpenApiConfiguration.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app154/OpenApiConfiguration.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app154/SpringDocApp154Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app154/SpringDocApp154Test.java index 4c86dcfa7..5e6512138 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app154/SpringDocApp154Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app154/SpringDocApp154Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app155/AbstractIntParameterObject.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app155/AbstractIntParameterObject.java index 86f84d56e..2c5afb8d2 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app155/AbstractIntParameterObject.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app155/AbstractIntParameterObject.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app155/AbstractParameterObject.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app155/AbstractParameterObject.java index 0be206c00..01edd2f75 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app155/AbstractParameterObject.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app155/AbstractParameterObject.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app155/ConcreteEnum.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app155/ConcreteEnum.java index 5d0079b99..166d4a7c3 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app155/ConcreteEnum.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app155/ConcreteEnum.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app155/ConcreteIntParameterObject.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app155/ConcreteIntParameterObject.java index 9c3820117..f90ba29c7 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app155/ConcreteIntParameterObject.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app155/ConcreteIntParameterObject.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app155/ConcreteParameterObject.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app155/ConcreteParameterObject.java index 2410f829c..71152caf2 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app155/ConcreteParameterObject.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app155/ConcreteParameterObject.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app155/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app155/HelloController.java index 421cb613b..b08f8f82b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app155/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app155/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app155/SpringDocApp155Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app155/SpringDocApp155Test.java index 1e88bf4d5..e9948b6fd 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app155/SpringDocApp155Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app155/SpringDocApp155Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app156/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app156/HelloController.java index 9a546a0a3..b5d9269c0 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app156/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app156/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app156/SomeEnum.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app156/SomeEnum.java index 724cd090e..d978ab5f8 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app156/SomeEnum.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app156/SomeEnum.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app156/SpringDocApp156Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app156/SpringDocApp156Test.java index bf4435e34..fef61e317 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app156/SpringDocApp156Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app156/SpringDocApp156Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app156/User.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app156/User.java index 6f642b3e8..3835279ba 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app156/User.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app156/User.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app157/Bar.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app157/Bar.java index 490f32ad1..8b445e9d0 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app157/Bar.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app157/Bar.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app157/Foo.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app157/Foo.java index a0d2abc3e..655c576ff 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app157/Foo.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app157/Foo.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app157/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app157/HelloController.java index d4004963f..94cd355b5 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app157/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app157/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app157/SpringDocApp157Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app157/SpringDocApp157Test.java index 365db33ef..90beb266b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app157/SpringDocApp157Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app157/SpringDocApp157Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -60,7 +60,7 @@ public void unregisterConverter() { } @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app157/StringyConverter.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app157/StringyConverter.java index f715cb6bb..f3e8e4bbc 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app157/StringyConverter.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app157/StringyConverter.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app158/CommonFooErrorHandler.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app158/CommonFooErrorHandler.java index 619c50353..a3f1790c2 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app158/CommonFooErrorHandler.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app158/CommonFooErrorHandler.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app158/ErrorDTO.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app158/ErrorDTO.java index 547ff481f..7450b98b5 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app158/ErrorDTO.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app158/ErrorDTO.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app158/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app158/HelloController.java index 1b8676dd1..3d4784422 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app158/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app158/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app158/SimpleDTO.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app158/SimpleDTO.java index 33e95b534..5f10a1447 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app158/SimpleDTO.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app158/SimpleDTO.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app158/SpecificFooErrorHandler.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app158/SpecificFooErrorHandler.java index 3cc43ab51..df55c75bb 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app158/SpecificFooErrorHandler.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app158/SpecificFooErrorHandler.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app158/SpringDocApp158Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app158/SpringDocApp158Test.java index e57c9f55b..f4ce03fde 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app158/SpringDocApp158Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app158/SpringDocApp158Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app159/CustomException.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app159/CustomException.java index 56bc18973..c17bcd2bf 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app159/CustomException.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app159/CustomException.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app159/FooBean.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app159/FooBean.java index 5f4ee5800..688a940c8 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app159/FooBean.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app159/FooBean.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app159/FooErrorHandler.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app159/FooErrorHandler.java index cfc4a1d0f..0aa50257b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app159/FooErrorHandler.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app159/FooErrorHandler.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app159/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app159/HelloController.java index 72a7bb0d7..69d977f00 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app159/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app159/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app159/SpringDocApp159Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app159/SpringDocApp159Test.java index 5183b62c6..207ca6708 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app159/SpringDocApp159Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app159/SpringDocApp159Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app159/Views.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app159/Views.java index 1cb396b25..4d0cef707 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app159/Views.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app159/Views.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app16/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app16/HelloController.java index b2354b9f9..99b5fafe0 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app16/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app16/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app16/SpringDocApp16Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app16/SpringDocApp16Test.java index 5fb8bdc0b..c4bcbef0f 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app16/SpringDocApp16Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app16/SpringDocApp16Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -38,7 +38,7 @@ public class SpringDocApp16Test extends AbstractSpringDocV30Test { @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)) .andExpect(status().isNotFound()); } diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app160/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app160/HelloController.java index 02210a81b..b66c9d484 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app160/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app160/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app160/SpringDocApp160Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app160/SpringDocApp160Test.java index c9f54324c..0c08f11c4 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app160/SpringDocApp160Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app160/SpringDocApp160Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -41,7 +41,7 @@ public class SpringDocApp160Test extends AbstractSpringDocV30Test { @Test - public void testApp2() throws Exception { + void testApp2() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/test")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app161/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app161/HelloController.java index ddad3ed8d..f8d258e2c 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app161/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app161/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app161/SpringDocApp161Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app161/SpringDocApp161Test.java index 35acdb1e8..aa4cacfdc 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app161/SpringDocApp161Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app161/SpringDocApp161Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -34,7 +34,7 @@ public class SpringDocApp161Test extends AbstractSpringDocV30Test { @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { Locale.setDefault(Locale.US); super.testApp(); } diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app162/OpenApiConfig.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app162/OpenApiConfig.java index a3d417a42..ff48d3213 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app162/OpenApiConfig.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app162/OpenApiConfig.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app162/SpringDocApp162Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app162/SpringDocApp162Test.java index d66adf1be..193d21c00 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app162/SpringDocApp162Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app162/SpringDocApp162Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -32,7 +32,7 @@ public class SpringDocApp162Test extends AbstractSpringDocV30Test { @Test - public void testApp2() throws Exception { + void testApp2() throws Exception { super.testApp(); } diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app163/CommissionDto.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app163/CommissionDto.java index 99392bfdd..29bcff3bb 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app163/CommissionDto.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app163/CommissionDto.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app163/CommissionsResource.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app163/CommissionsResource.java index 2f93b0517..8c22977be 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app163/CommissionsResource.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app163/CommissionsResource.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app163/ExampleRegistrationCustomizer.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app163/ExampleRegistrationCustomizer.java index 372785d78..76ab3aa6e 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app163/ExampleRegistrationCustomizer.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app163/ExampleRegistrationCustomizer.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app163/Examples.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app163/Examples.java index d6d91df8d..915e5b11e 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app163/Examples.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app163/Examples.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app163/SpringDocApp163Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app163/SpringDocApp163Test.java index 8a61cc65a..a9c33a4e0 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app163/SpringDocApp163Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app163/SpringDocApp163Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app164/SampleResponseClass.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app164/SampleResponseClass.java index 889f191f2..5807b3e4f 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app164/SampleResponseClass.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app164/SampleResponseClass.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app164/SpringDocApp164Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app164/SpringDocApp164Test.java index 12ca840b6..8151dc8fb 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app164/SpringDocApp164Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app164/SpringDocApp164Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app164/TestApiController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app164/TestApiController.java index 44bc71fe9..14a27da14 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app164/TestApiController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app164/TestApiController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app165/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app165/HelloController.java index e0d74dfa4..8be8e3cde 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app165/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app165/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app165/SpringDocApp165Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app165/SpringDocApp165Test.java index 6c35ddd12..8d9c48be3 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app165/SpringDocApp165Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app165/SpringDocApp165Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app166/GlobalErrorResponseDto.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app166/GlobalErrorResponseDto.java index 7ba133dfd..b7cdd0de0 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app166/GlobalErrorResponseDto.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app166/GlobalErrorResponseDto.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app166/GlobalExceptionHandler.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app166/GlobalExceptionHandler.java index 852e8c5ca..e446c5944 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app166/GlobalExceptionHandler.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app166/GlobalExceptionHandler.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app166/LocalErrorResponseDto.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app166/LocalErrorResponseDto.java index 5257adc01..689958d37 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app166/LocalErrorResponseDto.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app166/LocalErrorResponseDto.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app166/SpringDocApp166Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app166/SpringDocApp166Test.java index af0e2f0ec..d07603bd3 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app166/SpringDocApp166Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app166/SpringDocApp166Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app166/TestApiController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app166/TestApiController.java index 1eb83557f..ce68dd39f 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app166/TestApiController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app166/TestApiController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app167/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app167/HelloController.java index d51bebf5a..1d70dfd72 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app167/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app167/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app167/SpringDocApp167Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app167/SpringDocApp167Test.java index 0cdf326fb..1e9c738d4 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app167/SpringDocApp167Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app167/SpringDocApp167Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app168/AbstractParent.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app168/AbstractParent.java index 7d7f73930..fd529c3ee 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app168/AbstractParent.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app168/AbstractParent.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app168/ConcreteParent.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app168/ConcreteParent.java index c94a0e24d..677cc80f1 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app168/ConcreteParent.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app168/ConcreteParent.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app168/Controller.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app168/Controller.java index 5f43c4688..0cd6e5fb5 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app168/Controller.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app168/Controller.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app168/SpringDocApp168Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app168/SpringDocApp168Test.java index e51629069..71605ec81 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app168/SpringDocApp168Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app168/SpringDocApp168Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app169/DefaultRequestMappingHandlerMapping.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app169/DefaultRequestMappingHandlerMapping.java index df73fed02..fab798cb4 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app169/DefaultRequestMappingHandlerMapping.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app169/DefaultRequestMappingHandlerMapping.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app169/DefaultWebMvcRegistrations.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app169/DefaultWebMvcRegistrations.java index 2e6ed1350..bded61efe 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app169/DefaultWebMvcRegistrations.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app169/DefaultWebMvcRegistrations.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app169/SpringDocApp169Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app169/SpringDocApp169Test.java index 9c2d53172..cedf609be 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app169/SpringDocApp169Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app169/SpringDocApp169Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app169/TestController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app169/TestController.java index 132e269df..a9f480022 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app169/TestController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app169/TestController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app17/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app17/HelloController.java index 064eb043c..d06a8aa70 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app17/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app17/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app17/SpringDocApp17Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app17/SpringDocApp17Test.java index 76c51206b..41a17e21c 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app17/SpringDocApp17Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app17/SpringDocApp17Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app170/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app170/HelloController.java index 330f27842..5402ea591 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app170/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app170/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app170/SpringDocApp170Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app170/SpringDocApp170Test.java index 906ab6c48..1e7fc1553 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app170/SpringDocApp170Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app170/SpringDocApp170Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -35,7 +35,7 @@ public class SpringDocApp170Test extends AbstractSpringDocV30Test { @Test - public void testApp1() throws Exception { + void testApp1() throws Exception { this.testApp(); } diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app171/HelloLocaleController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app171/HelloLocaleController.java index bf5960983..614e748fd 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app171/HelloLocaleController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app171/HelloLocaleController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app171/SpringDocApp171Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app171/SpringDocApp171Test.java index 4ab3c472b..1f6fbde0a 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app171/SpringDocApp171Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app171/SpringDocApp171Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app172/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app172/HelloController.java index dc6756c28..1d0f05db3 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app172/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app172/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app172/SpringDocApp172Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app172/SpringDocApp172Test.java index b16bdf523..0d2c7020f 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app172/SpringDocApp172Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app172/SpringDocApp172Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -46,7 +46,7 @@ public class SpringDocApp172Test extends AbstractSpringDocV30Test { @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/sample-group")) .andExpect(jsonPath("$.openapi", is("3.0.1"))) .andExpect(status().isOk()) diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app173/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app173/HelloController.java index d07c0fc2c..c8ef80cfb 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app173/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app173/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app173/SpringDocApp173Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app173/SpringDocApp173Test.java index b4ea9bee7..f4f66157d 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app173/SpringDocApp173Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app173/SpringDocApp173Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app177/AnnotatedController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app177/AnnotatedController.java index fca639d4a..0b4ea33c5 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app177/AnnotatedController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app177/AnnotatedController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -26,6 +26,8 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; +import java.util.Arrays; +import java.util.List; import org.springdoc.core.filters.OpenApiMethodFilter; import org.springdoc.core.models.GroupedOpenApi; @@ -65,27 +67,23 @@ public String notAnnotatedPost() { } @Bean - public GroupedOpenApi group1OpenApi() { - return GroupedOpenApi.builder() + public List 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/app177/SpringDocApp177Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app177/SpringDocApp177Test.java index 9f63f2f80..ea22a729f 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app177/SpringDocApp177Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app177/SpringDocApp177Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app178/AnnotatedController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app178/AnnotatedController.java index b20204ac6..88d9d6aaf 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app178/AnnotatedController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app178/AnnotatedController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app178/SpringDocApp178Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app178/SpringDocApp178Test.java index fb1002a48..e4f400778 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app178/SpringDocApp178Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app178/SpringDocApp178Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app179/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app179/HelloController.java index 7cbd421fb..981c0d464 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app179/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app179/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app179/MyConfiguration.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app179/MyConfiguration.java index 63ed3d732..780850dfe 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app179/MyConfiguration.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app179/MyConfiguration.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app179/MyIdPathVariable.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app179/MyIdPathVariable.java index 1d1d72e7e..7b4b8e105 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app179/MyIdPathVariable.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app179/MyIdPathVariable.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app179/MyObj.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app179/MyObj.java index c504d1bb1..71ced306b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app179/MyObj.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app179/MyObj.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app179/MyObjArgumentResolver.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app179/MyObjArgumentResolver.java index 8d7d67d51..daefbafe5 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app179/MyObjArgumentResolver.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app179/MyObjArgumentResolver.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app179/MyPathParameterCustomizer.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app179/MyPathParameterCustomizer.java index 703661174..860dc2edc 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app179/MyPathParameterCustomizer.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app179/MyPathParameterCustomizer.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app179/SpringDocApp179Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app179/SpringDocApp179Test.java index 62de415c1..0cdfacc3f 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app179/SpringDocApp179Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app179/SpringDocApp179Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app18/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app18/HelloController.java index c09111ba2..e18d83c5f 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app18/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app18/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app18/SpringDocApp18Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app18/SpringDocApp18Test.java index d7aca2e7d..6d11acb7f 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app18/SpringDocApp18Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app18/SpringDocApp18Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app180/Body.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app180/Body.java index d64556eee..24181d80f 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app180/Body.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app180/Body.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app180/MapExclusion.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app180/MapExclusion.java index 68368e20e..eec3fb5e0 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app180/MapExclusion.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app180/MapExclusion.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app180/RESTService.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app180/RESTService.java index 3c6267ceb..4559d766d 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app180/RESTService.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app180/RESTService.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app180/SpringDocApp180Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app180/SpringDocApp180Test.java index 8198c4234..4882da98a 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app180/SpringDocApp180Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app180/SpringDocApp180Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app181/AbstractParameterObject.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app181/AbstractParameterObject.java index d35fbc76a..88a887a25 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app181/AbstractParameterObject.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app181/AbstractParameterObject.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app181/ConcreteParameterObject.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app181/ConcreteParameterObject.java index 7671ee919..e4302aea5 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app181/ConcreteParameterObject.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app181/ConcreteParameterObject.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app181/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app181/HelloController.java index 3943a8ee6..77bbfb541 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app181/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app181/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app181/SpringDocApp181Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app181/SpringDocApp181Test.java index 658506bc9..64bc94694 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app181/SpringDocApp181Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app181/SpringDocApp181Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app182/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app182/HelloController.java index c8ff3354f..76b7b9260 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app182/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app182/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app182/SpringDocApp182Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app182/SpringDocApp182Test.java index 8217905c6..c9238a62a 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app182/SpringDocApp182Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app182/SpringDocApp182Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app183/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app183/HelloController.java index ae6f00491..9c9321ce1 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app183/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app183/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app183/SpringDocApp183Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app183/SpringDocApp183Test.java index 44adeed4e..fb5e98fdb 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app183/SpringDocApp183Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app183/SpringDocApp183Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app183/User.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app183/User.java index f510a497a..6c66dc426 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app183/User.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app183/User.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app183/UserConverter.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app183/UserConverter.java index e5034cdde..19a8d350b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app183/UserConverter.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app183/UserConverter.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app183/WebConfig.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app183/WebConfig.java index ca94b778a..534a01e00 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app183/WebConfig.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app183/WebConfig.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app184/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app184/HelloController.java index 12b4697fc..19382280e 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app184/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app184/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app184/SpringDocApp184Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app184/SpringDocApp184Test.java index e89067e09..d27923434 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app184/SpringDocApp184Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app184/SpringDocApp184Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -54,21 +54,21 @@ public class SpringDocApp184Test extends AbstractSpringDocV30Test { @Test - public void testGroup1() throws Exception { + void testGroup1() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/group1")) .andExpect(status().isOk()) .andExpect(content().json(getContent("results/3.0.1/app184-1.json"), true)); } @Test - public void testGroup2() throws Exception { + void testGroup2() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/group2")) .andExpect(status().isOk()) .andExpect(content().json(getContent("results/3.0.1/app184-2.json"), true)); } @Test - public void testGroup3() throws Exception { + void testGroup3() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/group3")) .andExpect(status().isOk()) .andExpect(content().json(getContent("results/3.0.1/app184-3.json"), true)); diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app185/Cat.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app185/Cat.java index f9464e04c..ed0226559 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app185/Cat.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app185/Cat.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app185/Dog.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app185/Dog.java index cc4bb66fd..fa34cf70d 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app185/Dog.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app185/Dog.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. 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..208978064 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 @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -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/app185/PetController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app185/PetController.java index 3fdf86d6d..9d6417f6e 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app185/PetController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app185/PetController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app185/SpringDocApp185Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app185/SpringDocApp185Test.java index f20df2946..5c2d397ea 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app185/SpringDocApp185Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app185/SpringDocApp185Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app187/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app187/HelloController.java index 4bc79e85b..2d952aa1a 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app187/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app187/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app187/SpringDocApp187Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app187/SpringDocApp187Test.java index d2e602084..a5ff76bda 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app187/SpringDocApp187Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app187/SpringDocApp187Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app188/FooBar.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app188/FooBar.java index bbc1704cd..6ccc0e938 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app188/FooBar.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app188/FooBar.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app188/FooBarConverter.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app188/FooBarConverter.java index 1b522ed5a..c973fbadd 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app188/FooBarConverter.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app188/FooBarConverter.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app188/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app188/HelloController.java index f1bf44e9d..41a8229f9 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app188/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app188/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app188/SpringDocApp188Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app188/SpringDocApp188Test.java index 8c5c25e0f..c6e630888 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app188/SpringDocApp188Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app188/SpringDocApp188Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app189/SpringDocApp189Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app189/SpringDocApp189Test.java index 39f8cc000..77fc5fd31 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app189/SpringDocApp189Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app189/SpringDocApp189Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2022 the original author or authors. + * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app19/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app19/HelloController.java index 903914d0a..569d94eb1 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app19/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app19/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app19/SpringDocApp19Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app19/SpringDocApp19Test.java index 7b7506cb2..de98bcda6 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app19/SpringDocApp19Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app19/SpringDocApp19Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app190/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app190/HelloController.java index ed2eef112..233227850 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app190/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app190/HelloController.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2022 the original author or authors. + * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app190/SpringDocApp190Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app190/SpringDocApp190Test.java index a342c552f..1723cac94 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app190/SpringDocApp190Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app190/SpringDocApp190Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2022 the original author or authors. + * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app192/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app192/HelloController.java index cc10f5d7e..2e5495630 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app192/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app192/HelloController.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2022 the original author or authors. + * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app192/SpringDocApp192Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app192/SpringDocApp192Test.java index d9a84c3df..468dbf1e2 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app192/SpringDocApp192Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app192/SpringDocApp192Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2022 the original author or authors. + * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app192/SpringDocTestApp.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app192/SpringDocTestApp.java index 4a9ed139b..d37fc6d64 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app192/SpringDocTestApp.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app192/SpringDocTestApp.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2022 the original author or authors. + * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app193/SpringDocApp193Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app193/SpringDocApp193Test.java index c0b0c0f38..0b967785a 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app193/SpringDocApp193Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app193/SpringDocApp193Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2022 the original author or authors. + * * * * 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. @@ -23,12 +23,37 @@ package test.org.springdoc.api.v30.app193; -import test.org.springdoc.api.v30.AbstractSpringDocV30Test; +import org.apache.commons.lang3.JavaVersion; +import org.junit.jupiter.api.Test; +import org.springdoc.core.utils.Constants; +import test.org.springdoc.api.AbstractCommonTest; import org.springframework.boot.autoconfigure.SpringBootApplication; - - -public class SpringDocApp193Test extends AbstractSpringDocV30Test { +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.web.servlet.MvcResult; + +import static org.apache.commons.lang3.SystemUtils.isJavaVersionAtLeast; +import static org.hamcrest.Matchers.is; +import static org.skyscreamer.jsonassert.JSONAssert.assertEquals; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + +@SpringBootTest +public class SpringDocApp193Test extends AbstractCommonTest { + + @Test + protected void testApp() throws Exception { + final MvcResult mockMvcResult = mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)).andExpect(status().isOk()) + .andExpect(jsonPath("$.openapi", is("3.0.1"))).andReturn(); + final String result = mockMvcResult.getResponse().getContentAsString(); + // In Java 21 the getFirst() and getLast() methods were added to the List interface. + // Those are the POJO getters, therefore Jackson will add them during serialization. + // So there are two different expected results for Java prior 21 and starting from Java 21. + final var expectedResponseFile = isJavaVersionAtLeast(JavaVersion.JAVA_21) ? "app193-1.json" : "app193.json"; + final String expected = getContent("results/3.0.1/" + expectedResponseFile); + assertEquals(expected, result, true); + } @SpringBootApplication static class SpringDocTestApp {} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app194/SpringDocApp194Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app194/SpringDocApp194Test.java index 866543a92..001b102d0 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app194/SpringDocApp194Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app194/SpringDocApp194Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2022 the original author or authors. + * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app195/SpringDocApp195Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app195/SpringDocApp195Test.java index 0f00c74cc..b7513f033 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app195/SpringDocApp195Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app195/SpringDocApp195Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2022 the original author or authors. + * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app196/SpringDocApp196Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app196/SpringDocApp196Test.java index 4d4c21424..54fb71834 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app196/SpringDocApp196Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app196/SpringDocApp196Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2022 the original author or authors. + * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app197/SpringDocApp197Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app197/SpringDocApp197Test.java index ec6e25a9b..595a53e40 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app197/SpringDocApp197Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app197/SpringDocApp197Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2022 the original author or authors. + * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app198/SpringDocApp198Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app198/SpringDocApp198Test.java index a46966057..f531e1ebf 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app198/SpringDocApp198Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app198/SpringDocApp198Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2022 the original author or authors. + * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app199/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app199/HelloController.java index 52c3a74ad..f20f32e39 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app199/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app199/HelloController.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2022 the original author or authors. + * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app199/SpringDocApp199Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app199/SpringDocApp199Test.java index 4e526e1d6..1a78f6fe0 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app199/SpringDocApp199Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app199/SpringDocApp199Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2022 the original author or authors. + * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/SpringDocApp2Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/SpringDocApp2Test.java index 28d5de8e7..e6f5cc67c 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/SpringDocApp2Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/SpringDocApp2Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/ApiUtil.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/ApiUtil.java index d22759ad4..4d1da3250 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/ApiUtil.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/ApiUtil.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/ExceptionTranslator.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/ExceptionTranslator.java index 64fd1d1b6..5aa85f08a 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/ExceptionTranslator.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/ExceptionTranslator.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/HomeController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/HomeController.java index 4bdc9930e..18e06d6fb 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/HomeController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/HomeController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/PetApi.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/PetApi.java index 43b2de3d8..10394babc 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/PetApi.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/PetApi.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/PetApiController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/PetApiController.java index cdf9e9f9e..46baaaeee 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/PetApiController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/PetApiController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/PetApiDelegate.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/PetApiDelegate.java index 0c243ada2..7426d1124 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/PetApiDelegate.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/PetApiDelegate.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/PetApiDelegateImpl.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/PetApiDelegateImpl.java index 4fec7b469..3740097f8 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/PetApiDelegateImpl.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/PetApiDelegateImpl.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/StoreApi.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/StoreApi.java index 299a6ab1b..532dd1a8e 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/StoreApi.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/StoreApi.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/StoreApiController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/StoreApiController.java index eb4d80b6b..95faf7014 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/StoreApiController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/StoreApiController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/StoreApiDelegate.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/StoreApiDelegate.java index c17dcde86..d6f2fa32a 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/StoreApiDelegate.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/StoreApiDelegate.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/StoreApiDelegateImpl.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/StoreApiDelegateImpl.java index ecbf124d4..c3927936c 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/StoreApiDelegateImpl.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/StoreApiDelegateImpl.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/UserApi.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/UserApi.java index b08a6def3..8e15283ec 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/UserApi.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/UserApi.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/UserApiController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/UserApiController.java index fb742fddd..9585e6a06 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/UserApiController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/UserApiController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/UserApiDelegate.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/UserApiDelegate.java index 4f4a49e38..142eb34de 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/UserApiDelegate.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/UserApiDelegate.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/UserApiDelegateImpl.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/UserApiDelegateImpl.java index 952a68e5a..6302425f0 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/UserApiDelegateImpl.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/api/UserApiDelegateImpl.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/model/Body.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/model/Body.java index 3bf970d39..f45fda473 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/model/Body.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/model/Body.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/model/Body1.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/model/Body1.java deleted file mode 100644 index c92272dbe..000000000 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/model/Body1.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * - * * - * * * - * * * * - * * * * * 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.app2.model; - -import java.io.File; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.v3.oas.annotations.media.Schema; - -public class Body1 { - - @Schema(description = "Additional data to pass to server") - /** - * Additional data to pass to server - **/ - private String additionalMetadata = null; - - @Schema(description = "file to upload") - /** - * file to upload - **/ - private File file = null; - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private static String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - /** - * Additional data to pass to server - * - * @return additionalMetadata - **/ - @JsonProperty("additionalMetadata") - public String getAdditionalMetadata() { - return additionalMetadata; - } - - public void setAdditionalMetadata(String additionalMetadata) { - this.additionalMetadata = additionalMetadata; - } - - public Body1 additionalMetadata(String additionalMetadata) { - this.additionalMetadata = additionalMetadata; - return this; - } - - /** - * file to upload - * - * @return file - **/ - @JsonProperty("file") - public File getFile() { - return file; - } - - public void setFile(File file) { - this.file = file; - } - - public Body1 file(File file) { - this.file = file; - return this; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Body1 {\n"); - - sb.append(" additionalMetadata: ").append(toIndentedString(additionalMetadata)).append("\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); - sb.append("}"); - return sb.toString(); - } -} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/model/Category.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/model/Category.java index 37535f6e8..ac22ba5a0 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/model/Category.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/model/Category.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/model/ModelApiResponse.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/model/ModelApiResponse.java index 3752ba48b..9fc14f4a6 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/model/ModelApiResponse.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/model/ModelApiResponse.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/model/Order.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/model/Order.java index fcc775311..14a2f276c 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/model/Order.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/model/Order.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/model/Pet.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/model/Pet.java index 1237fb1f2..dcc384161 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/model/Pet.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/model/Pet.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/model/Tag.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/model/Tag.java index dc87df3ba..84498518a 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/model/Tag.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/model/Tag.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/model/User.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/model/User.java index 70e9d13c0..9fe9dbd57 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/model/User.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app2/model/User.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app20/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app20/HelloController.java index 41c11049b..e731ce333 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app20/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app20/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app20/SpringDocApp20Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app20/SpringDocApp20Test.java index ba0355c50..594f26889 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app20/SpringDocApp20Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app20/SpringDocApp20Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app200/SpringDocApp200Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app200/SpringDocApp200Test.java index c2055b1d6..6393306d2 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app200/SpringDocApp200Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app200/SpringDocApp200Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2022 the original author or authors. + * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app201/SpringDocApp201Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app201/SpringDocApp201Test.java index c60f9ee93..5c675c8ad 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app201/SpringDocApp201Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app201/SpringDocApp201Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2022 the original author or authors. + * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app203/OrderDemo.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app203/OrderDemo.java index 84d04d75a..4e22e653b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app203/OrderDemo.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app203/OrderDemo.java @@ -5,28 +5,24 @@ import org.springdoc.core.customizers.GlobalOpenApiCustomizer; import org.springdoc.core.customizers.OpenApiCustomizer; -import org.springframework.core.annotation.Order; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; public class OrderDemo { - @Order(2) public static class Customizer2 implements OpenApiCustomizer, GlobalOpenApiCustomizer { public void customise(OpenAPI openApi) { openApi.addTagsItem(new Tag().name("2")); } } - @Order(3) public static class Customizer3 implements OpenApiCustomizer, GlobalOpenApiCustomizer { public void customise(OpenAPI openApi) { openApi.addTagsItem(new Tag().name("3")); } } - @Order(1) public static class Customizer1 implements OpenApiCustomizer, GlobalOpenApiCustomizer { public void customise(OpenAPI openApi) { openApi.addTagsItem(new Tag().name("1")); diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app203/SpringDocApp203Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app203/SpringDocApp203Test.java index 11eb5551c..b6062a46b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app203/SpringDocApp203Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app203/SpringDocApp203Test.java @@ -41,14 +41,14 @@ public class SpringDocApp203Test extends AbstractSpringDocV30Test { @SpringBootApplication @Import({ - OrderDemo.Customizer3.class, - OrderDemo.Customizer2.class, OrderDemo.Customizer1.class, + OrderDemo.Customizer2.class, + OrderDemo.Customizer3.class, }) static class SpringDocTestApp {} @Test - public void testApp1() throws Exception { + void testApp1() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/mygroup")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app209/SpringDocApp209Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app209/SpringDocApp209Test.java index 5c394123c..a18f07ac7 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app209/SpringDocApp209Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app209/SpringDocApp209Test.java @@ -96,7 +96,7 @@ public int getNumberOfTimesCalculatePathWasCalled() { } @Test - public void shouldOnlyByCalledOnce() throws Exception { + void shouldOnlyByCalledOnce() throws Exception { // assertEquals(1, openAPIService.getNumberOfTimesCalculatePathWasCalled()); className = getClass().getSimpleName(); diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app21/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app21/HelloController.java index 1a77cebc7..9cbae20f9 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app21/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app21/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app21/SpringDocApp21Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app21/SpringDocApp21Test.java index 5f89de351..35ebaba6e 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app21/SpringDocApp21Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app21/SpringDocApp21Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app210/SpringDocApp210Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app210/SpringDocApp210Test.java index 0ac76699a..2908290ad 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app210/SpringDocApp210Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app210/SpringDocApp210Test.java @@ -37,7 +37,7 @@ public class SpringDocApp210Test extends AbstractCommonTest { @Test - public void testApp(){ + protected void testApp(){ assertThrows(IllegalArgumentException.class, () -> GroupedOpenApi.builder().group("").build()); } diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app214/SpringDocApp214Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app214/SpringDocApp214Test.java index 65ed3cb17..dc78d90b6 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app214/SpringDocApp214Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app214/SpringDocApp214Test.java @@ -54,7 +54,7 @@ public class SpringDocApp214Test extends AbstractCommonTest { static class SpringDocTestApp {} @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { assertEquals(4, springDocConfigProperties.getGroupConfigs().stream().map(GroupConfig::getGroup).toList().size()); } diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app215/SpringDocApp215Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app215/SpringDocApp215Test.java index 2871244cb..9a557b7a2 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app215/SpringDocApp215Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app215/SpringDocApp215Test.java @@ -38,7 +38,7 @@ public class SpringDocApp215Test extends AbstractCommonTest { static class SpringDocTestApp {} @Test - public void test_disable_default_api_docs() throws Exception { + void test_disable_default_api_docs() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)).andExpect(status().isNotFound()); } } \ No newline at end of file diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app215/SpringDocApp215bisTest.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app215/SpringDocApp215bisTest.java index 2b0999bfe..ca3266181 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app215/SpringDocApp215bisTest.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app215/SpringDocApp215bisTest.java @@ -38,7 +38,7 @@ public class SpringDocApp215bisTest extends AbstractCommonTest { static class SpringDocTestApp {} @Test - public void test_enable_default_api_docs() throws Exception { + void test_enable_default_api_docs() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)).andExpect(status().isOk()); } } \ No newline at end of file diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app216/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app216/HelloController.java index e3ea9f4c3..fbb0d54ef 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app216/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app216/HelloController.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2022 the original author or authors. + * * * * 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. 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..c0693a87a 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; @@ -45,7 +43,7 @@ public class SpringDocApp217Test extends AbstractSpringDocV30Test { @Test - public void testApp1() throws Exception { + void testApp1() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/demo")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) @@ -53,7 +51,7 @@ public void testApp1() throws Exception { } @Test - public void testApp2() throws Exception { + void testApp2() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/user")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) 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..c8d6e3438 --- /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-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.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..499fe80aa --- /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-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.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..5f1b261a2 --- /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-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.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/app22/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app22/HelloController.java index e6025f7dd..d842d0e36 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app22/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app22/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app22/PersonDTO.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app22/PersonDTO.java index f35fb2940..f38ea54ba 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app22/PersonDTO.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app22/PersonDTO.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app22/SpringDocApp22Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app22/SpringDocApp22Test.java index 969d34e5c..2c061bcdd 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app22/SpringDocApp22Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app22/SpringDocApp22Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. 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/v31/app1/ApiException.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app220/SpringDocApp220Test.java similarity index 68% rename from springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/ApiException.java rename to springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app220/SpringDocApp220Test.java index 1d6c04ea4..b7ce13e67 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/ApiException.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app220/SpringDocApp220Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -22,18 +22,14 @@ * */ -package test.org.springdoc.api.v31.app1; +package test.org.springdoc.api.v30.app220; -public final class ApiException extends Exception { +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; - private static final long serialVersionUID = 1L; +import org.springframework.boot.autoconfigure.SpringBootApplication; - @SuppressWarnings("unused") +public class SpringDocApp220Test extends AbstractSpringDocV30Test { - private final int code; - - public ApiException(int code, String msg) { - super(msg); - this.code = code; - } + @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/app1/ApiException.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app221/SpringDocApp221Test.java similarity index 68% rename from springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/ApiException.java rename to springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app221/SpringDocApp221Test.java index 3c99d2328..d36a828b3 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app1/ApiException.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app221/SpringDocApp221Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -22,18 +22,14 @@ * */ -package test.org.springdoc.api.v30.app1; +package test.org.springdoc.api.v30.app221; -public final class ApiException extends Exception { +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; - private static final long serialVersionUID = 1L; +import org.springframework.boot.autoconfigure.SpringBootApplication; - @SuppressWarnings("unused") +public class SpringDocApp221Test extends AbstractSpringDocV30Test { - private final int code; - - public ApiException(int code, String msg) { - super(msg); - this.code = code; - } + @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..1cab9fbe9 --- /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-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.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..663354f98 --- /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-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.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/java/test/org/springdoc/api/v30/app224/RootModel.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app224/RootModel.java new file mode 100644 index 000000000..5a18b69f4 --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app224/RootModel.java @@ -0,0 +1,27 @@ +package test.org.springdoc.api.v30.app224; + +import com.fasterxml.jackson.annotation.JsonUnwrapped; + +public class RootModel { + + private Integer rootProperty; + + @JsonUnwrapped + private UnwrappedModel unwrappedModel; + + public Integer getRootProperty() { + return rootProperty; + } + + public void setRootProperty(Integer rootProperty) { + this.rootProperty = rootProperty; + } + + public UnwrappedModel getUnwrappedModel() { + return unwrappedModel; + } + + public void setUnwrappedModel(UnwrappedModel unwrappedModel) { + this.unwrappedModel = unwrappedModel; + } +} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app224/SpringDocApp224Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app224/SpringDocApp224Test.java new file mode 100644 index 000000000..fead355a1 --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app224/SpringDocApp224Test.java @@ -0,0 +1,35 @@ +/* + * + * * + * * * + * * * * + * * * * * 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.app224; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp224Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app224/TestController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app224/TestController.java new file mode 100644 index 000000000..e69c8e01d --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app224/TestController.java @@ -0,0 +1,15 @@ +package test.org.springdoc.api.v30.app224; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/api") +public class TestController { + + @GetMapping + public RootModel getRootModel() { + return new RootModel(); + } +} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app224/UnwrappedModel.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app224/UnwrappedModel.java new file mode 100644 index 000000000..3de72ae51 --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app224/UnwrappedModel.java @@ -0,0 +1,14 @@ +package test.org.springdoc.api.v30.app224; + +public class UnwrappedModel { + + private Integer unwrappedProperty; + + public Integer getUnwrappedProperty() { + return unwrappedProperty; + } + + public void setUnwrappedProperty(Integer unwrappedProperty) { + this.unwrappedProperty = unwrappedProperty; + } +} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app225/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app225/HelloController.java new file mode 100644 index 000000000..ac2b7b0af --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app225/HelloController.java @@ -0,0 +1,35 @@ +package test.org.springdoc.api.v30.app225; + +import com.fasterxml.jackson.databind.PropertyNamingStrategies; +import com.fasterxml.jackson.databind.annotation.JsonNaming; +import org.springdoc.core.annotations.ParameterObject; + +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author bnasslahsen + */ +@RestController +@RequestMapping +public class HelloController { + + @PostMapping("/testBoolean") + public void HelloController(@ParameterObject RequestDto requestDto) { + } +} + +@JsonNaming(PropertyNamingStrategies.UpperSnakeCaseStrategy.class) + class RequestDto { + private String personalNumber; + + public String getPersonalNumber() { + return personalNumber; + } + + public void setPersonalNumber(String personalNumber) { + this.personalNumber = personalNumber; + } +} + diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app225/SpringDocApp225Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app225/SpringDocApp225Test.java new file mode 100644 index 000000000..d6e48bb1a --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app225/SpringDocApp225Test.java @@ -0,0 +1,35 @@ +/* + * + * * + * * * + * * * * + * * * * * 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.app225; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp225Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app226/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app226/HelloController.java new file mode 100644 index 000000000..2d71cbb37 --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app226/HelloController.java @@ -0,0 +1,37 @@ +package test.org.springdoc.api.v30.app226; + +import java.util.Map; + +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.ExampleObject; +import io.swagger.v3.oas.annotations.responses.ApiResponse; + +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author bnasslahsen + */ +@RestController +@RequestMapping +public class HelloController { + + @PostMapping("/testBoolean") + @ApiResponse( + useReturnTypeSchema = true, + responseCode = "200", + description = "OK", + content = { + @Content( + mediaType = "*/*", + examples = + @ExampleObject( + name = "success", + value ="...")) + } + ) + public Map HelloController() { + return null; + } +} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app226/SpringDocApp226Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app226/SpringDocApp226Test.java new file mode 100644 index 000000000..e7cd0d048 --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app226/SpringDocApp226Test.java @@ -0,0 +1,35 @@ +/* + * + * * + * * * + * * * * + * * * * * 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.app226; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp226Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app227/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app227/HelloController.java new file mode 100644 index 000000000..d8d9f0287 --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app227/HelloController.java @@ -0,0 +1,43 @@ +/* + * + * * 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.app227; + + +import test.org.springdoc.api.v30.app227.model.Item; +import test.org.springdoc.api.v30.app227.wrapper.NoGenericWrapper; +import test.org.springdoc.api.v30.app227.wrapper.ResponseEntityWrapper; + +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping("/persons") + public ResponseEntityWrapper persons() { + return new ResponseEntityWrapper<>(Item.fromPayload("1", "OK", "String"), HttpStatus.OK); + } + + @GetMapping("/persons2") + public NoGenericWrapper persons2() { + return new NoGenericWrapper(Item.fromPayload("1", "OK", "String"), HttpStatus.OK); + } + +} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app227/SpringDocApp227Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app227/SpringDocApp227Test.java new file mode 100644 index 000000000..79e9c1a26 --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app227/SpringDocApp227Test.java @@ -0,0 +1,30 @@ +/* + * + * * 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.app227; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp227Test extends AbstractSpringDocV30Test { + + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app227/model/Item.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app227/model/Item.java new file mode 100644 index 000000000..fc55e60f0 --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app227/model/Item.java @@ -0,0 +1,14 @@ +package test.org.springdoc.api.v30.app227.model; + +/** + * Base item + */ +public record Item(String id, String type, T resource) { + + /** + * Create Item object + */ + public static Item fromPayload(String id, String type, T payload) { + return new Item<>(id, type, payload); + } +} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app227/wrapper/NoGenericWrapper.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app227/wrapper/NoGenericWrapper.java new file mode 100644 index 000000000..ba32477dc --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app227/wrapper/NoGenericWrapper.java @@ -0,0 +1,12 @@ +package test.org.springdoc.api.v30.app227.wrapper; + + +import test.org.springdoc.api.v30.app227.model.Item; + +import org.springframework.http.HttpStatusCode; + +public class NoGenericWrapper extends ResponseEntityWrapper { + public NoGenericWrapper(Item body, HttpStatusCode status) { + super(body, status); + } +} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app227/wrapper/ResponseEntityWrapper.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app227/wrapper/ResponseEntityWrapper.java new file mode 100644 index 000000000..0c8efb548 --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app227/wrapper/ResponseEntityWrapper.java @@ -0,0 +1,13 @@ +package test.org.springdoc.api.v30.app227.wrapper; + + +import test.org.springdoc.api.v30.app227.model.Item; + +import org.springframework.http.HttpStatusCode; +import org.springframework.http.ResponseEntity; + +public class ResponseEntityWrapper extends ResponseEntity> { + public ResponseEntityWrapper(Item body, HttpStatusCode status) { + super(body, status); + } +} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app228/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app228/HelloController.java new file mode 100644 index 000000000..b19e30d3e --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app228/HelloController.java @@ -0,0 +1,56 @@ +package test.org.springdoc.api.v30.app228; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +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.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author bnasslahsen + */ +@RestController +@RequestMapping +public class HelloController { + + + @PostMapping("swaggerTest") + public String swaggerTest(@RequestBody MyRequest myRequest) { + return null; + } + + public class MyRequest { + @Schema(oneOf = {Child1.class, Child2.class}) + @JsonProperty + private Parent parent; + } + + @JsonSubTypes({ + @JsonSubTypes.Type(value = Child1.class), + @JsonSubTypes.Type(value = Child2.class), + @JsonSubTypes.Type(value = Child3.class), + }) + public abstract class Parent { + @JsonProperty + private String parentProperty; + } + + public class Child1 extends Parent { + @JsonProperty + private String childProperty1; + } + + public class Child2 extends Parent { + @JsonProperty + private String childProperty2; + } + + public class Child3 extends Parent { + @JsonProperty + private String childProperty3; + } + +} \ No newline at end of file diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app228/SpringDocApp228Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app228/SpringDocApp228Test.java new file mode 100644 index 000000000..60eb499f9 --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app228/SpringDocApp228Test.java @@ -0,0 +1,35 @@ +/* + * + * * + * * * + * * * * + * * * * * 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.app228; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp228Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app229/LocaleParam.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app229/LocaleParam.java new file mode 100644 index 000000000..ad3b8d826 --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app229/LocaleParam.java @@ -0,0 +1,66 @@ +/* + * + * * + * * * + * * * * + * * * * * + * * * * * * 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.app229; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.ExampleObject; +import jakarta.validation.Valid; +import jakarta.validation.constraints.Pattern; +import jakarta.validation.constraints.Size; + +import static java.lang.annotation.ElementType.ANNOTATION_TYPE; +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PARAMETER; + +/** + * @author bnasslahsen + */ +@Target({PARAMETER, METHOD, FIELD, ANNOTATION_TYPE}) +@Retention(RetentionPolicy.RUNTIME) +@Parameter( + examples = { + @ExampleObject(name = "ar-ae"), + @ExampleObject(name = "bg-bg"), + @ExampleObject(name = "cs-cz"), + @ExampleObject(name = "de-de"), + @ExampleObject(name = "el-gr"), + @ExampleObject(name = "en-us.src"), + @ExampleObject(name = "hu-hu"), + @ExampleObject(name = "pl-pl"), + @ExampleObject(name = "ro-ro"), + @ExampleObject(name = "sk-sk") + } +) +@Size(min = 2, max = 16) +@Pattern(regexp = "\\w+([-.]?\\w+)*") +@Valid +@interface LocaleParam {} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app229/SpringDocApp229Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app229/SpringDocApp229Test.java new file mode 100644 index 000000000..c252428bb --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app229/SpringDocApp229Test.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.app229; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp229Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app229/XController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app229/XController.java new file mode 100644 index 000000000..617338a42 --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app229/XController.java @@ -0,0 +1,47 @@ +/* + * + * * + * * * + * * * * + * * * * * + * * * * * * 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.app229; + + +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author bnasslahsen + */ +@RestController +public class XController { + + + @GetMapping("/") + public ResponseEntity manualTranslationUpdateRun( + @LocaleParam String locale) { + //..... + return ResponseEntity.accepted().build(); + } +} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app23/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app23/HelloController.java index 7a23a5b9b..1e273a935 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app23/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app23/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app23/SpringDocApp23Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app23/SpringDocApp23Test.java index 57373c53f..259035d91 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app23/SpringDocApp23Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app23/SpringDocApp23Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app230/App230Controller.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app230/App230Controller.java new file mode 100644 index 000000000..de37d116f --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app230/App230Controller.java @@ -0,0 +1,22 @@ +package test.org.springdoc.api.v30.app230; + +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author edudar + */ +@RestController +@RequestMapping +public class App230Controller { + + @PostMapping("/") + public String swaggerTest(@App230RequestBody MyRequest myRequest) { + return null; + } + + public record MyRequest(int id) { + } + +} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app230/App230RequestBody.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app230/App230RequestBody.java new file mode 100644 index 000000000..a275a0a7b --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app230/App230RequestBody.java @@ -0,0 +1,21 @@ +package test.org.springdoc.api.v30.app230; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +import io.swagger.v3.oas.annotations.parameters.RequestBody; + +import static java.lang.annotation.ElementType.ANNOTATION_TYPE; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PARAMETER; + +/** + * @author edudar + */ +@Target({PARAMETER, METHOD, ANNOTATION_TYPE}) +@Retention(RetentionPolicy.RUNTIME) +@RequestBody(required = true) +@interface App230RequestBody { + +} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app230/SpringDocApp230Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app230/SpringDocApp230Test.java new file mode 100644 index 000000000..981e3e664 --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app230/SpringDocApp230Test.java @@ -0,0 +1,40 @@ +/* + * + * * + * * * + * * * * + * * * * * + * * * * * * 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.app230; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + * @author edudar + */ +public class SpringDocApp230Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app231/ApplicationsRestController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app231/ApplicationsRestController.java new file mode 100644 index 000000000..11afc6089 --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app231/ApplicationsRestController.java @@ -0,0 +1,25 @@ +package test.org.springdoc.api.v30.app231; + +import io.swagger.v3.oas.annotations.Operation; +import org.springdoc.core.annotations.ParameterObject; + +import org.springframework.boot.actuate.autoconfigure.wavefront.WavefrontProperties.Application; +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping(value = "/applications", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) +public class ApplicationsRestController { + + @Operation(summary = "Parameter object") + @PostMapping("/parameter-object") + public Application createWithParameterObject( + @RequestBody @ParameterObject SubClass request + ) { + return new Application(); + } + +} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app231/SpringDocApp231Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app231/SpringDocApp231Test.java new file mode 100644 index 000000000..05bdd1c28 --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app231/SpringDocApp231Test.java @@ -0,0 +1,40 @@ +/* + * + * * + * * * + * * * * + * * * * * + * * * * * * 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.app231; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + * @author bnasslahsen + */ +public class SpringDocApp231Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app231/SubClass.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app231/SubClass.java new file mode 100644 index 000000000..c37a37f26 --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app231/SubClass.java @@ -0,0 +1,17 @@ +package test.org.springdoc.api.v30.app231; + +import io.swagger.v3.oas.annotations.media.Schema; + +@Schema(description = "Used to create a new application") +public class SubClass extends SuperClass { + + public SubClass(String name) { + super(name); + } + + @Override + @Schema(description = "Overriding the description in sub class") + public String getName() { + return super.getName(); + } +} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app231/SuperClass.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app231/SuperClass.java new file mode 100644 index 000000000..586435cb8 --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app231/SuperClass.java @@ -0,0 +1,18 @@ +package test.org.springdoc.api.v30.app231; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.Size; + +public class SuperClass { + @Size(min = 1, max = 30) + @Schema(description = "Description from the super class") + private String name; + + public SuperClass(String name) { + this.name = name; + } + + public String getName() { + return name; + } +} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app24/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app24/HelloController.java index c776302ed..c8f8735b4 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app24/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app24/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app24/SpringDocApp24Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app24/SpringDocApp24Test.java index 9d2e3787d..80d6022d4 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app24/SpringDocApp24Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app24/SpringDocApp24Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app24/SpringDocTestApp.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app24/SpringDocTestApp.java index f18552720..8798e2c1f 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app24/SpringDocTestApp.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app24/SpringDocTestApp.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app25/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app25/HelloController.java index c7c95a23d..767bf4081 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app25/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app25/HelloController.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2022 the original author or authors. + * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app25/SpringDocApp25Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app25/SpringDocApp25Test.java index ea0c7f40f..6a608f25c 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app25/SpringDocApp25Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app25/SpringDocApp25Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app26/Bar.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app26/Bar.java index da4f0c71c..ff084dab6 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app26/Bar.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app26/Bar.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app26/Foo.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app26/Foo.java index facb931f5..cf2ebcb47 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app26/Foo.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app26/Foo.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app26/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app26/HelloController.java index 0db2abcfc..3d473ecf9 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app26/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app26/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app26/MyModel.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app26/MyModel.java index 0ef4dc200..af59bb201 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app26/MyModel.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app26/MyModel.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app26/SpringDocApp26Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app26/SpringDocApp26Test.java index 9e336b0e7..338dd6ddd 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app26/SpringDocApp26Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app26/SpringDocApp26Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app27/Advice.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app27/Advice.java index e4a0d42d9..4e94e523c 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app27/Advice.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app27/Advice.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app27/Bar.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app27/Bar.java index b34a91a92..0d0bd36fd 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app27/Bar.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app27/Bar.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app27/Foo.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app27/Foo.java index 445897c1b..eec77e188 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app27/Foo.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app27/Foo.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app27/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app27/HelloController.java index 48cd702c8..0fa1100e8 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app27/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app27/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app27/MyException.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app27/MyException.java index befe9f784..ded90b503 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app27/MyException.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app27/MyException.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app27/SpringDocApp27Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app27/SpringDocApp27Test.java index 23e17245e..876e77de7 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app27/SpringDocApp27Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app27/SpringDocApp27Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -39,7 +39,7 @@ public class SpringDocApp27Test extends AbstractSpringDocV30Test { @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)).andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))).andExpect(jsonPath("$.paths./test.get.responses.500.content.['*/*'].schema.oneOf").isArray()).andExpect(jsonPath("$.paths./test.get.responses.500.content.['*/*'].schema.oneOf[*].$ref", containsInAnyOrder("#/components/schemas/Bar", "#/components/schemas/Foo"))); diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app28/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app28/HelloController.java index 6eaf31816..19ddc3a4c 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app28/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app28/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app28/SpringDocApp28Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app28/SpringDocApp28Test.java index e8ecbe66b..51a4c4fa7 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app28/SpringDocApp28Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app28/SpringDocApp28Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app29/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app29/HelloController.java index 161476706..b8d47c161 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app29/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app29/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app29/SpringDocApp29Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app29/SpringDocApp29Test.java index e6177cede..2b87a4e0a 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app29/SpringDocApp29Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app29/SpringDocApp29Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app29/TrackerData.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app29/TrackerData.java index a776dc7d6..0abb9b905 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app29/TrackerData.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app29/TrackerData.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app30/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app30/HelloController.java index 47e36d11a..776f6af65 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app30/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app30/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app30/SpringDocApp30Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app30/SpringDocApp30Test.java index 7a0da7e81..105dd686b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app30/SpringDocApp30Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app30/SpringDocApp30Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app31/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app31/HelloController.java index 223b14474..3c1794065 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app31/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app31/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app31/SpringDocApp31Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app31/SpringDocApp31Test.java index fe252bbce..0db299446 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app31/SpringDocApp31Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app31/SpringDocApp31Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app32/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app32/HelloController.java index d81eda3ea..03d739169 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app32/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app32/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app32/SpringDocApp32Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app32/SpringDocApp32Test.java index 34b3c4847..bf8acab39 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app32/SpringDocApp32Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app32/SpringDocApp32Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app33/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app33/HelloController.java index ea0abfb65..a9227e30a 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app33/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app33/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app33/SpringDocApp33Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app33/SpringDocApp33Test.java index c29bc156c..4f585d711 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app33/SpringDocApp33Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app33/SpringDocApp33Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app34/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app34/HelloController.java index 76506b7b0..b177afadb 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app34/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app34/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app34/MyExceptionHandler.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app34/MyExceptionHandler.java index d07eb09b4..2001d1ca5 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app34/MyExceptionHandler.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app34/MyExceptionHandler.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app34/SpringDocApp34Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app34/SpringDocApp34Test.java index 876091ea0..ea3f711c9 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app34/SpringDocApp34Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app34/SpringDocApp34Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app35/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app35/HelloController.java index ea39192c6..332f3a4ad 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app35/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app35/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app35/SpringDocApp35Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app35/SpringDocApp35Test.java index f958d2c5e..97a636002 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app35/SpringDocApp35Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app35/SpringDocApp35Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app37/Bar.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app37/Bar.java index 4e865391b..20544a3d9 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app37/Bar.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app37/Bar.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app37/Car.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app37/Car.java index ee3245f37..9e2daf6c5 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app37/Car.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app37/Car.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app37/Foo.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app37/Foo.java index 779e0e82a..cc2a780be 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app37/Foo.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app37/Foo.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app37/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app37/HelloController.java index 31b17f3b3..f67981680 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app37/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app37/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app37/Pet.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app37/Pet.java index 3c3820798..5ce9764c3 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app37/Pet.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app37/Pet.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app37/SpringDocApp37Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app37/SpringDocApp37Test.java index c19d9a0c3..65145a0d8 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app37/SpringDocApp37Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app37/SpringDocApp37Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app38/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app38/HelloController.java index 755d441da..d162e881a 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app38/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app38/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app38/SpringDocApp38Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app38/SpringDocApp38Test.java index f5cdba754..731fe0f10 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app38/SpringDocApp38Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app38/SpringDocApp38Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app39/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app39/HelloController.java index d54f1cb45..c39789407 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app39/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app39/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app39/SpringDocApp39Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app39/SpringDocApp39Test.java index 92d2429c7..61706480b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app39/SpringDocApp39Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app39/SpringDocApp39Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app39/SpringDocTestApp.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app39/SpringDocTestApp.java index 7334828eb..4962e15db 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app39/SpringDocTestApp.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app39/SpringDocTestApp.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app4/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app4/HelloController.java index 183a2279e..4c1023903 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app4/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app4/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app4/SpringDocApp4Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app4/SpringDocApp4Test.java index b628b879e..38656f4ba 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app4/SpringDocApp4Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app4/SpringDocApp4Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app4/TrackerData.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app4/TrackerData.java index 708eb2695..02c7e8cdc 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app4/TrackerData.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app4/TrackerData.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app40/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app40/HelloController.java index 5a8a81592..2aecf94ea 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app40/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app40/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app40/SpringDocApp40Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app40/SpringDocApp40Test.java index f67b5c6ca..54b4e024b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app40/SpringDocApp40Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app40/SpringDocApp40Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app41/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app41/HelloController.java index a73c8ce54..027da3b07 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app41/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app41/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app41/SpringDocApp411Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app41/SpringDocApp411Test.java index ad612e793..bde96d0ea 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app41/SpringDocApp411Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app41/SpringDocApp411Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -44,7 +44,7 @@ public class SpringDocApp411Test extends AbstractSpringDocV30Test { @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { String className = getClass().getSimpleName(); String testNumber = className.replaceAll("[^0-9]", ""); MvcResult mockMvcResult = mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)).andExpect(status().isOk()) diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app41/SpringDocApp41Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app41/SpringDocApp41Test.java index 129512792..f0286ee03 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app41/SpringDocApp41Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app41/SpringDocApp41Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -46,7 +46,7 @@ public class SpringDocApp41Test extends AbstractSpringDocV30Test { @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { String className = getClass().getSimpleName(); String testNumber = className.replaceAll("[^0-9]", ""); MvcResult mockMvcResult = mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)).andExpect(status().isOk()) diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app42/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app42/HelloController.java index f63d5dfe0..97dbde609 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app42/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app42/HelloController.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2022 the original author or authors. + * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app42/SpringDocApp42Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app42/SpringDocApp42Test.java index 08709bcf1..6f7a7fea4 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app42/SpringDocApp42Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app42/SpringDocApp42Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app42/TweetId.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app42/TweetId.java index e8ff3b972..4de18ef77 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app42/TweetId.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app42/TweetId.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app43/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app43/HelloController.java index a5e88d220..d151a5197 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app43/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app43/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app43/SpringDocApp43Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app43/SpringDocApp43Test.java index e842a3b75..475f56975 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app43/SpringDocApp43Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app43/SpringDocApp43Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app44/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app44/HelloController.java index 44b811054..ece6adbfb 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app44/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app44/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app44/SpringDocApp44Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app44/SpringDocApp44Test.java index 96a2935d8..07bba944a 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app44/SpringDocApp44Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app44/SpringDocApp44Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app45/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app45/HelloController.java index c527d7716..c5cfcf864 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app45/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app45/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app45/HelloController2.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app45/HelloController2.java index 4afe0a0bf..da0ed0b6c 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app45/HelloController2.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app45/HelloController2.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app45/OpenApiConfig.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app45/OpenApiConfig.java index 368aca339..0cd371330 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app45/OpenApiConfig.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app45/OpenApiConfig.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app45/PersonDTO.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app45/PersonDTO.java index 53beb0818..f38375254 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app45/PersonDTO.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app45/PersonDTO.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app45/SpringDocApp45Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app45/SpringDocApp45Test.java index bcdc0c4e5..1f510b817 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app45/SpringDocApp45Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app45/SpringDocApp45Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app46/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app46/HelloController.java index 3752a0f2c..bc1998051 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app46/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app46/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app46/SpringDocApp46Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app46/SpringDocApp46Test.java index e02b18b06..046f07a81 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app46/SpringDocApp46Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app46/SpringDocApp46Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app47/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app47/HelloController.java index 5e171bde4..b4797b536 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app47/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app47/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app47/SpringDocApp47Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app47/SpringDocApp47Test.java index ca79ad704..54a82610d 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app47/SpringDocApp47Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app47/SpringDocApp47Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app48/AbstractHelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app48/AbstractHelloController.java index 9489f6cf0..8ddd5fc2d 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app48/AbstractHelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app48/AbstractHelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app48/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app48/HelloController.java index 1a19cbcde..a1a801027 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app48/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app48/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app48/SpringDocApp48Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app48/SpringDocApp48Test.java index c98f96097..03eb3b97c 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app48/SpringDocApp48Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app48/SpringDocApp48Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app49/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app49/HelloController.java index 215191a39..8a0c52cc5 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app49/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app49/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app49/SpringDocApp49Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app49/SpringDocApp49Test.java index 36ac79a9f..878ecf9cd 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app49/SpringDocApp49Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app49/SpringDocApp49Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app49/SpringDocTestApp.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app49/SpringDocTestApp.java index ecf230bd9..decc9a954 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app49/SpringDocTestApp.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app49/SpringDocTestApp.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app5/CustomOpenAPIConfig.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app5/CustomOpenAPIConfig.java index 2257ddcc3..69c8cb8ed 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app5/CustomOpenAPIConfig.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app5/CustomOpenAPIConfig.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app5/sample/OpenAPIResourceBeanConfigurationComponentsSecuritySchemesTest.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app5/sample/OpenAPIResourceBeanConfigurationComponentsSecuritySchemesTest.java index 498fbc049..e6e04ecb4 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app5/sample/OpenAPIResourceBeanConfigurationComponentsSecuritySchemesTest.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app5/sample/OpenAPIResourceBeanConfigurationComponentsSecuritySchemesTest.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -55,7 +55,7 @@ public class OpenAPIResourceBeanConfigurationComponentsSecuritySchemesTest exten * Then: Return security definitions http basic */ @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { mockMvc .perform(get("/api-docs")) .andExpect(status().isOk()) @@ -71,7 +71,7 @@ public void testApp() throws Exception { * Then: Return security definitions with API key */ @Test - public void shouldDefineComponentsSecuritySchemesForApiKey() throws Exception { + void shouldDefineComponentsSecuritySchemesForApiKey() throws Exception { mockMvc .perform(get("/api-docs")) .andExpect(status().isOk()) @@ -87,7 +87,7 @@ public void shouldDefineComponentsSecuritySchemesForApiKey() throws Exception { * Then: Return security definitions with OAuth */ @Test - public void shouldDefineComponentsSecuritySchemesForOAuth2() throws Exception { + void shouldDefineComponentsSecuritySchemesForOAuth2() throws Exception { mockMvc .perform(get("/api-docs")) .andExpect(status().isOk()) diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app5/sample/OpenApiResourceCustomConfigurationTest.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app5/sample/OpenApiResourceCustomConfigurationTest.java index 9a2f83a51..cf04ea02b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app5/sample/OpenApiResourceCustomConfigurationTest.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app5/sample/OpenApiResourceCustomConfigurationTest.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -46,7 +46,7 @@ public class OpenApiResourceCustomConfigurationTest extends AbstractSpringDocV30 * {"openapi":"3.0.1","info":{"title":"Custom API","version":"100"},"paths":{},"components":{}} */ @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { mockMvc .perform(get("/api-docs")) .andExpect(status().isOk()) diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app5/sample/OpenApiResourceNoConfigurationTest.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app5/sample/OpenApiResourceNoConfigurationTest.java index 7cd4a4d32..2fac1b7b5 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app5/sample/OpenApiResourceNoConfigurationTest.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app5/sample/OpenApiResourceNoConfigurationTest.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -43,7 +43,7 @@ public class OpenApiResourceNoConfigurationTest extends AbstractSpringDocV30Test * {"openapi":"3.0.1","info":{"title":"OpenAPI definition","version":"v0"},"paths":{},"components":{}} */ @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { mockMvc .perform(get("/api-docs")) .andExpect(status().isOk()) diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app50/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app50/HelloController.java index a2f15308a..98064646f 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app50/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app50/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app50/SpringDocApp50Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app50/SpringDocApp50Test.java index 2499a67a1..027b89d5e 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app50/SpringDocApp50Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app50/SpringDocApp50Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app50/SpringDocTestApp.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app50/SpringDocTestApp.java index 45ce7359f..afee2386f 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app50/SpringDocTestApp.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app50/SpringDocTestApp.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app51/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app51/HelloController.java index c49e5ff1b..2fdc2f84d 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app51/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app51/HelloController.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2022 the original author or authors. + * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app51/SpringDocApp51Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app51/SpringDocApp51Test.java index 6795f1393..a7c95d1da 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app51/SpringDocApp51Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app51/SpringDocApp51Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app52/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app52/HelloController.java index ea52fd2f5..550b17a97 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app52/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app52/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app52/SpringDocApp52Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app52/SpringDocApp52Test.java index 07005466b..4dab240ed 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app52/SpringDocApp52Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app52/SpringDocApp52Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app53/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app53/HelloController.java index a1716ffae..9186743a4 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app53/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app53/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app53/HelloControllerWithGlobalApiResponse.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app53/HelloControllerWithGlobalApiResponse.java index 6dbaedac5..2a350a88a 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app53/HelloControllerWithGlobalApiResponse.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app53/HelloControllerWithGlobalApiResponse.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app53/SpringDocApp53Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app53/SpringDocApp53Test.java index 02973a80c..b8a748b3a 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app53/SpringDocApp53Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app53/SpringDocApp53Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app54/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app54/HelloController.java index d40c256f3..1d1b9fbf2 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app54/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app54/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app54/MealParty.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app54/MealParty.java index cf5b52ccf..d8e469fbb 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app54/MealParty.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app54/MealParty.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app54/SpringDocApp54Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app54/SpringDocApp54Test.java index ec6552755..897598a03 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app54/SpringDocApp54Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app54/SpringDocApp54Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app54/Views.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app54/Views.java index ff4b83379..780ed9487 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app54/Views.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app54/Views.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app55/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app55/HelloController.java index 925c07de0..ca713850e 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app55/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app55/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app55/SpringDocApp55Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app55/SpringDocApp55Test.java index 050d75fc7..496967733 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app55/SpringDocApp55Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app55/SpringDocApp55Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app56/GlobalExceptionHandler.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app56/GlobalExceptionHandler.java index 5f0a5b387..8a79b0195 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app56/GlobalExceptionHandler.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app56/GlobalExceptionHandler.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app56/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app56/HelloController.java index af7a89aac..f394a811a 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app56/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app56/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app56/SpringDocApp56Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app56/SpringDocApp56Test.java index e3b6022e5..28947aa6b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app56/SpringDocApp56Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app56/SpringDocApp56Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app57/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app57/HelloController.java index 667a5614b..2a02ad52f 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app57/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app57/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app57/SpringDocApp57Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app57/SpringDocApp57Test.java index c2cde51ee..d5f8a377d 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app57/SpringDocApp57Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app57/SpringDocApp57Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app58/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app58/HelloController.java index bb7c32fed..9dd2d72f4 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app58/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app58/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app58/SpringDocApp58Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app58/SpringDocApp58Test.java index 40bccba2b..5c3d0608c 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app58/SpringDocApp58Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app58/SpringDocApp58Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app59/HelloBody.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app59/HelloBody.java index 885530e76..ec81f6e9a 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app59/HelloBody.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app59/HelloBody.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app59/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app59/HelloController.java index 4d2bfe6b8..688f1cad5 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app59/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app59/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app59/HelloController2.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app59/HelloController2.java index 51daa8f96..f8423d4c1 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app59/HelloController2.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app59/HelloController2.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app59/HelloExceptionHandler.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app59/HelloExceptionHandler.java index eb3cf30e2..f5bae0a43 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app59/HelloExceptionHandler.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app59/HelloExceptionHandler.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app59/SpringDocApp59Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app59/SpringDocApp59Test.java index 6a3f08f65..9bcea1e0b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app59/SpringDocApp59Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app59/SpringDocApp59Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app6/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app6/HelloController.java index 2f84d52dc..21f3eb16e 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app6/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app6/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app6/SpringDocApp6Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app6/SpringDocApp6Test.java index a8b56f354..fe752afc6 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app6/SpringDocApp6Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app6/SpringDocApp6Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app60/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app60/HelloController.java index 4e3c7b1e7..59032931f 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app60/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app60/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app60/QueryPaging.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app60/QueryPaging.java index 3a109e29c..4892089b6 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app60/QueryPaging.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app60/QueryPaging.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app60/QuerySort.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app60/QuerySort.java index 3ec2c58cb..e9a6b5b33 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app60/QuerySort.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app60/QuerySort.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app60/SpringDocApp60Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app60/SpringDocApp60Test.java index 4f87e82d9..21ec64f9b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app60/SpringDocApp60Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app60/SpringDocApp60Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app61/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app61/HelloController.java index a84daee7a..f25ee6ee5 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app61/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app61/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app61/SpringDocApp61Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app61/SpringDocApp61Test.java index d972425e0..a8700bf61 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app61/SpringDocApp61Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app61/SpringDocApp61Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app62/BaseController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app62/BaseController.java index bf6c4db76..562ed8bb9 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app62/BaseController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app62/BaseController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app62/SpringDocApp62Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app62/SpringDocApp62Test.java index 65ef4a67c..f2da57315 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app62/SpringDocApp62Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app62/SpringDocApp62Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app62/TestController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app62/TestController.java index 515068e9b..b5d006287 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app62/TestController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app62/TestController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app63/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app63/HelloController.java index eba650f3b..9d1bc2a4b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app63/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app63/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app63/SpringDocApp63Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app63/SpringDocApp63Test.java index 90eeb2c06..7cacecc3b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app63/SpringDocApp63Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app63/SpringDocApp63Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app64/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app64/HelloController.java index 493eeca04..3efb58b43 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app64/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app64/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app64/SpringDocApp64Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app64/SpringDocApp64Test.java index 404ff57c6..e052e254e 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app64/SpringDocApp64Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app64/SpringDocApp64Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app65/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app65/HelloController.java index f5a86f2b4..257fda53b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app65/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app65/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app65/SpringDocApp65Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app65/SpringDocApp65Test.java index 881e90fed..dfce1b370 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app65/SpringDocApp65Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app65/SpringDocApp65Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app66/DefaultHealthCheckApi.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app66/DefaultHealthCheckApi.java index 069329af1..5f95d49d5 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app66/DefaultHealthCheckApi.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app66/DefaultHealthCheckApi.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app66/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app66/HelloController.java index 50d4d20f4..7fb6b5ed8 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app66/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app66/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app66/SpringDocApp66Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app66/SpringDocApp66Test.java index 64b75b093..8abc9b496 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app66/SpringDocApp66Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app66/SpringDocApp66Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app66/UndocumentedClass.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app66/UndocumentedClass.java index 7f3b45621..fce12ce67 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app66/UndocumentedClass.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app66/UndocumentedClass.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app67/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app67/HelloController.java index f4badc2db..d87508d2d 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app67/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app67/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app67/SpringDocApp67Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app67/SpringDocApp67Test.java index 9c9e2d21b..8b9f6df9d 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app67/SpringDocApp67Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app67/SpringDocApp67Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app69/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app69/HelloController.java index 625ad6aa9..82d0ddbd7 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app69/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app69/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app69/PersonDTO.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app69/PersonDTO.java index b91e8987b..205e53827 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app69/PersonDTO.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app69/PersonDTO.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app69/SpringDocApp69Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app69/SpringDocApp69Test.java index cb0c619d3..18037ba00 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app69/SpringDocApp69Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app69/SpringDocApp69Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app7/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app7/HelloController.java index 8ef06912e..36fc8b159 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app7/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app7/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app7/SpringDocApp7Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app7/SpringDocApp7Test.java index f47b7d5b7..7a791067c 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app7/SpringDocApp7Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app7/SpringDocApp7Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/HelloController.java index 0a9801dd2..1925d7abf 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/SpringDocApp70Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/SpringDocApp70Test.java index e77dc6e6d..b3161f3e1 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/SpringDocApp70Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/SpringDocApp70Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/customizer/CustomizedOperation.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/customizer/CustomizedOperation.java index a582c35da..6623777ba 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/customizer/CustomizedOperation.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/customizer/CustomizedOperation.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/customizer/CustomizedParameter.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/customizer/CustomizedParameter.java index b172ed609..52195cbd9 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/customizer/CustomizedParameter.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/customizer/CustomizedParameter.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/customizer/CustomizedProperty.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/customizer/CustomizedProperty.java index 0b7d14c54..8d5d144da 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/customizer/CustomizedProperty.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/customizer/CustomizedProperty.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/customizer/OperationCustomizer.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/customizer/OperationCustomizer.java index f989c5d71..c9aea4b5d 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/customizer/OperationCustomizer.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/customizer/OperationCustomizer.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/customizer/ParameterCustomizer.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/customizer/ParameterCustomizer.java index 62a3a6e74..90b80d245 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/customizer/ParameterCustomizer.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/customizer/ParameterCustomizer.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/customizer/PropertyCustomizer.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/customizer/PropertyCustomizer.java index 4cba96d7f..56bdc8d41 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/customizer/PropertyCustomizer.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/customizer/PropertyCustomizer.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/model/ApiType.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/model/ApiType.java index 90955948c..cc8c6d6ce 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/model/ApiType.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app70/model/ApiType.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app71/Dog.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app71/Dog.java index dd706c533..7115d8a8b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app71/Dog.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app71/Dog.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app71/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app71/HelloController.java index d031a4ccf..3edb0cdc0 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app71/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app71/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app71/SpringDocApp71Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app71/SpringDocApp71Test.java index 53b21bef0..99ab46bed 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app71/SpringDocApp71Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app71/SpringDocApp71Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app72/BlockingAutoConfigurationTest.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app72/BlockingAutoConfigurationTest.java index 8f16214ee..5d3503b78 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app72/BlockingAutoConfigurationTest.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app72/BlockingAutoConfigurationTest.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -35,13 +35,13 @@ import static org.assertj.core.api.Assertions.assertThat; -public class BlockingAutoConfigurationTest { +class BlockingAutoConfigurationTest { private final WebApplicationContextRunner contextRunner = new WebApplicationContextRunner() .withUserConfiguration(TestApp.class); @Test - public void configurations_successfully_loaded() { + void configurations_successfully_loaded() { contextRunner .withPropertyValues("springdoc.show-actuator=true") .run(context -> assertThat(context) @@ -53,7 +53,7 @@ public void configurations_successfully_loaded() { } @Test - public void configurations_not_loaded_when_application_is_not_web() { + void configurations_not_loaded_when_application_is_not_web() { new ApplicationContextRunner() .withUserConfiguration(TestApp.class) .run(context -> assertThat(context) @@ -65,7 +65,7 @@ public void configurations_not_loaded_when_application_is_not_web() { } @Test - public void actuator_configuration_not_loaded_when_not_enabled_explicitly() { + void actuator_configuration_not_loaded_when_not_enabled_explicitly() { contextRunner .run(context -> assertThat(context) .hasNotFailed() @@ -76,7 +76,7 @@ public void actuator_configuration_not_loaded_when_not_enabled_explicitly() { } @Test - public void configurations_not_loaded_when_disabled() { + void configurations_not_loaded_when_disabled() { contextRunner .withPropertyValues("springdoc.api-docs.enabled=false") .run(context -> assertThat(context) @@ -88,7 +88,7 @@ public void configurations_not_loaded_when_disabled() { } @Test - public void configurations_not_loaded_when_mvc_is_not_on_class_path() { + void configurations_not_loaded_when_mvc_is_not_on_class_path() { contextRunner .withClassLoader(new FilteredClassLoader("org.springframework.web.context.support.GenericWebApplicationContext")) .run(context -> assertThat(context) diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app72/CacheAutoConfigurationTest1.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app72/CacheAutoConfigurationTest1.java index 3938500bd..fa5e75694 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app72/CacheAutoConfigurationTest1.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app72/CacheAutoConfigurationTest1.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -37,7 +37,7 @@ public class CacheAutoConfigurationTest1 { .withUserConfiguration(TestApp.class); @Test - public void cache_configuration_loaded_when_not_disabled_explicitly() { + void cache_configuration_loaded_when_not_disabled_explicitly() { contextRunner .run(context -> assertThat(context) .hasNotFailed() @@ -48,7 +48,7 @@ public void cache_configuration_loaded_when_not_disabled_explicitly() { } @Test - public void cache_configuration_loaded_when_disabled_explicitly() { + void cache_configuration_loaded_when_disabled_explicitly() { contextRunner .withPropertyValues("springdoc.cache.disabled=false") .run(context -> assertThat(context) @@ -60,7 +60,7 @@ public void cache_configuration_loaded_when_disabled_explicitly() { } @Test - public void cache_configurations_successfully_disabled() { + void cache_configurations_successfully_disabled() { contextRunner .withPropertyValues("springdoc.cache.disabled=true") .run(context -> assertThat(context) @@ -72,7 +72,7 @@ public void cache_configurations_successfully_disabled() { } @Test - public void group_configuration_loaded() { + void group_configuration_loaded() { contextRunner .withPropertyValues("springdoc.group-configs[0].group=stores", "springdoc.group-configs[0].paths-to-match=/store/**") .run(context -> assertThat(context) diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app72/GroupAutoConfigurationTest.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app72/GroupAutoConfigurationTest.java index 092e52554..d84e01c5b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app72/GroupAutoConfigurationTest.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app72/GroupAutoConfigurationTest.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -39,7 +39,7 @@ public class GroupAutoConfigurationTest { .withUserConfiguration(TestApp.class); @Test - public void group_configuration_loaded() { + void group_configuration_loaded() { contextRunner .run(context -> assertThat(context) .hasNotFailed() diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app73/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app73/HelloController.java index 6c6ae972f..e682feda0 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app73/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app73/HelloController.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2022 the original author or authors. + * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app73/SpringDocApp73Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app73/SpringDocApp73Test.java index 1397926f8..3728cd581 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app73/SpringDocApp73Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app73/SpringDocApp73Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app74/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app74/HelloController.java index 3e75e0942..23e70c34e 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app74/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app74/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app74/SpringDocApp74Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app74/SpringDocApp74Test.java index 1c7558b5b..5e6b7e1ef 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app74/SpringDocApp74Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app74/SpringDocApp74Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app75/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app75/HelloController.java index cd3ac145d..8467eb7cd 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app75/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app75/HelloController.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2022 the original author or authors. + * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app75/PersonDTO.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app75/PersonDTO.java index 7fe41c7b7..e75e5ed5c 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app75/PersonDTO.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app75/PersonDTO.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app75/RestResponseEntityExceptionHandler.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app75/RestResponseEntityExceptionHandler.java index 21c44de61..b8831f8a6 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app75/RestResponseEntityExceptionHandler.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app75/RestResponseEntityExceptionHandler.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app75/SpringDocApp75Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app75/SpringDocApp75Test.java index 3fae6d34e..81df64446 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app75/SpringDocApp75Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app75/SpringDocApp75Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app76/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app76/HelloController.java index 57d2b1739..3b04950a8 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app76/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app76/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app76/SpringDocApp76Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app76/SpringDocApp76Test.java index 7c887cf6c..ccf8a7c03 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app76/SpringDocApp76Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app76/SpringDocApp76Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app77/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app77/HelloController.java index 5ad83c772..f91ea3d9b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app77/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app77/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app77/SpringDocApp77Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app77/SpringDocApp77Test.java index 5805afa38..984b16956 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app77/SpringDocApp77Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app77/SpringDocApp77Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app78/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app78/HelloController.java index 1f6998660..112aa549c 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app78/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app78/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app78/PersonDTO.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app78/PersonDTO.java index 3f6ab2c7a..e1bf2f615 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app78/PersonDTO.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app78/PersonDTO.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app78/SpringDocApp78Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app78/SpringDocApp78Test.java index 036d5adc8..0f3e2f935 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app78/SpringDocApp78Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app78/SpringDocApp78Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app79/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app79/HelloController.java index b895997a6..3978b6c3c 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app79/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app79/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app79/SpringDocApp79Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app79/SpringDocApp79Test.java index b08bb5d92..585c6635c 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app79/SpringDocApp79Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app79/SpringDocApp79Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app8/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app8/HelloController.java index c9532abf7..d9d1d3f67 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app8/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app8/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app8/SpringDocApp8Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app8/SpringDocApp8Test.java index 1b82aa068..03d344e88 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app8/SpringDocApp8Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app8/SpringDocApp8Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -37,7 +37,7 @@ public class SpringDocApp8Test extends AbstractSpringDocV30Test { @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { mockMvc.perform(get("/myapp" + Constants.DEFAULT_API_DOCS_URL).contextPath("/myapp")) .andExpect(status().isOk()); } diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app80/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app80/HelloController.java index 30b35aac4..04cca3c4c 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app80/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app80/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app80/SpringDocApp80Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app80/SpringDocApp80Test.java index 483170707..a950625f8 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app80/SpringDocApp80Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app80/SpringDocApp80Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app80/TestObject.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app80/TestObject.java index cd34f3105..3a5532024 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app80/TestObject.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app80/TestObject.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app81/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app81/HelloController.java index 3ee074ec3..2b54d20c4 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app81/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app81/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app81/SpringDocApp81Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app81/SpringDocApp81Test.java index 903fcb1af..02bec677d 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app81/SpringDocApp81Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app81/SpringDocApp81Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -40,7 +40,7 @@ public class SpringDocApp81Test extends AbstractSpringDocV30Test { @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)).andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) .andExpect(jsonPath("$.paths./api.get.tags[0]", containsString("hello-controller"))) diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app82/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app82/HelloController.java index 36f1fc074..6a292cf37 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app82/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app82/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app82/PersonDTO.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app82/PersonDTO.java index 86629bb37..0b1e2b6cd 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app82/PersonDTO.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app82/PersonDTO.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app82/SpringDocApp82Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app82/SpringDocApp82Test.java index bff3332eb..787068c1a 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app82/SpringDocApp82Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app82/SpringDocApp82Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app83/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app83/HelloController.java index 474493397..195629100 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app83/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app83/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app83/PersonDTO.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app83/PersonDTO.java index 3a884922c..9389d5fed 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app83/PersonDTO.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app83/PersonDTO.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app83/SpringDocApp83Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app83/SpringDocApp83Test.java index 9e125939a..9ab9e682d 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app83/SpringDocApp83Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app83/SpringDocApp83Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app84/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app84/HelloController.java index b40fdf373..33cf1fd27 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app84/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app84/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app84/SpringDocApp84Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app84/SpringDocApp84Test.java index 72f164008..6cd974a3a 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app84/SpringDocApp84Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app84/SpringDocApp84Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app85/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app85/HelloController.java index 42cc5f58c..f2df69458 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app85/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app85/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app85/SpringDocApp85Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app85/SpringDocApp85Test.java index 39dbefbd2..8f8937e22 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app85/SpringDocApp85Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app85/SpringDocApp85Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app86/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app86/HelloController.java index fc81e4a93..76667c398 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app86/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app86/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app86/SpringDocApp86Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app86/SpringDocApp86Test.java index 731e4a464..6996ffbd1 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app86/SpringDocApp86Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app86/SpringDocApp86Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app86/test/HelloController2.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app86/test/HelloController2.java index 7620ec14c..69f3a06f3 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app86/test/HelloController2.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app86/test/HelloController2.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app87/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app87/HelloController.java index b2542f0e7..2dce262b1 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app87/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app87/HelloController.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2022 the original author or authors. + * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app87/SpringDocApp87Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app87/SpringDocApp87Test.java index e2553616b..2d427b929 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app87/SpringDocApp87Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app87/SpringDocApp87Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app88/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app88/HelloController.java index 8748f03b0..8de612c9d 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app88/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app88/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app88/SpringDocApp88Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app88/SpringDocApp88Test.java index 30037e41b..5c1ca74d8 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app88/SpringDocApp88Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app88/SpringDocApp88Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app89/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app89/HelloController.java index b7ca9f092..ca70c6510 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app89/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app89/HelloController.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2022 the original author or authors. + * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app89/SpringDocApp89Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app89/SpringDocApp89Test.java index 2b0066c64..c7f07b519 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app89/SpringDocApp89Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app89/SpringDocApp89Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app9/MyApi.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app9/MyApi.java index db310b226..778f77bc0 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app9/MyApi.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app9/MyApi.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app9/MyApiController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app9/MyApiController.java index e59387022..96210e19b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app9/MyApiController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app9/MyApiController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app9/SpringDocApp9Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app9/SpringDocApp9Test.java index 749f607c5..082a06908 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app9/SpringDocApp9Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app9/SpringDocApp9Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app90/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app90/HelloController.java index 39304b074..b38f9ff4b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app90/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app90/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app90/SpringDocApp90Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app90/SpringDocApp90Test.java index 034121724..037dd0d72 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app90/SpringDocApp90Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app90/SpringDocApp90Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app90/SpringDocTestApp.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app90/SpringDocTestApp.java index ab5748e25..0665f5a8c 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app90/SpringDocTestApp.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app90/SpringDocTestApp.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app90/User.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app90/User.java index 748d4504e..dd3d806af 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app90/User.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app90/User.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app91/Advice.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app91/Advice.java index 50034311f..8c6bfdd42 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app91/Advice.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app91/Advice.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app91/ApiError.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app91/ApiError.java index 8de622c02..9badf9447 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app91/ApiError.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app91/ApiError.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app91/Greeting.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app91/Greeting.java index e0fcd668e..dd4834641 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app91/Greeting.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app91/Greeting.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app91/GreetingController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app91/GreetingController.java index 88420de2d..743550b26 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app91/GreetingController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app91/GreetingController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app91/SpringDocApp91Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app91/SpringDocApp91Test.java index e168cc1ce..8c96a9c23 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app91/SpringDocApp91Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app91/SpringDocApp91Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app92/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app92/HelloController.java index 8dbb76305..1b29de81c 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app92/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app92/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app92/ParameterCustomizer.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app92/ParameterCustomizer.java index fb03d0246..bb32ee472 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app92/ParameterCustomizer.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app92/ParameterCustomizer.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app92/SpringDocApp92Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app92/SpringDocApp92Test.java index ed9bbc359..35c08b1d9 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app92/SpringDocApp92Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app92/SpringDocApp92Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app93/BaseClientModel.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app93/BaseClientModel.java index 6d52e06a6..7c8f8124a 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app93/BaseClientModel.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app93/BaseClientModel.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app93/BaseController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app93/BaseController.java index 8c38038dc..0cae1642d 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app93/BaseController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app93/BaseController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app93/SpecificClientModel.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app93/SpecificClientModel.java index 7da6f0ffa..33ca124ac 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app93/SpecificClientModel.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app93/SpecificClientModel.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app93/SpecificController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app93/SpecificController.java index d217c3364..3b7c854d3 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app93/SpecificController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app93/SpecificController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app93/SpringDocApp93Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app93/SpringDocApp93Test.java index f8dd6b998..c0764ec1d 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app93/SpringDocApp93Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app93/SpringDocApp93Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app94/SpringDocApp94Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app94/SpringDocApp94Test.java index 79b54d4b2..9c7856e73 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app94/SpringDocApp94Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app94/SpringDocApp94Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app95/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app95/HelloController.java index e7e334e70..6634d082e 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app95/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app95/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app95/SpringDocApp95Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app95/SpringDocApp95Test.java index caeba076d..e32225882 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app95/SpringDocApp95Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app95/SpringDocApp95Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app96/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app96/HelloController.java index 42980338d..f130edd70 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app96/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app96/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app96/SpringDocApp96Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app96/SpringDocApp96Test.java index 2af46b9c6..548affc3c 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app96/SpringDocApp96Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app96/SpringDocApp96Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app97/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app97/HelloController.java index 1d44e2c5d..e16ff736f 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app97/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app97/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app97/SpringDocApp97Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app97/SpringDocApp97Test.java index 3b992d8c7..913b435d6 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app97/SpringDocApp97Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app97/SpringDocApp97Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app97/StudentV1.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app97/StudentV1.java index 71985b201..432412ebf 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app97/StudentV1.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app97/StudentV1.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app97/StudentV2.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app97/StudentV2.java index debbcc0c2..060124337 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app97/StudentV2.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app97/StudentV2.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app97/StudentV3.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app97/StudentV3.java index fcbbac53f..5a584b88f 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app97/StudentV3.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app97/StudentV3.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app98/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app98/HelloController.java index 2cd02647c..5fff25c16 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app98/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app98/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app98/IgnoredAnnotationParameter.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app98/IgnoredAnnotationParameter.java index 3d9959c25..dcce9187e 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app98/IgnoredAnnotationParameter.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app98/IgnoredAnnotationParameter.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app98/SpringDocApp98Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app98/SpringDocApp98Test.java index 4dca9c5fc..c9b65494e 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app98/SpringDocApp98Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app98/SpringDocApp98Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app99/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app99/HelloController.java index 800602c16..87bee3c80 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app99/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app99/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app99/SpringDocApp99Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app99/SpringDocApp99Test.java index 111cbe2a3..891d00872 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app99/SpringDocApp99Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app99/SpringDocApp99Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/AbstractSpringDocV31Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/AbstractSpringDocV31Test.java index 142c687a0..7c69d37bf 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/AbstractSpringDocV31Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/AbstractSpringDocV31Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -45,7 +45,7 @@ public abstract class AbstractSpringDocV31Test extends AbstractCommonTest { public static String className; @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { className = getClass().getSimpleName(); String testNumber = className.replaceAll("[^0-9]", ""); MvcResult mockMvcResult = mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)).andExpect(status().isOk()) diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/ApiOriginFilter.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/ApiOriginFilter.java deleted file mode 100644 index f079cda74..000000000 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/ApiOriginFilter.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * - * * - * * * - * * * * - * * * * * 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.v31.app1; - -import java.io.IOException; - -import jakarta.servlet.FilterChain; -import jakarta.servlet.FilterConfig; -import jakarta.servlet.ServletException; -import jakarta.servlet.ServletRequest; -import jakarta.servlet.ServletResponse; -import jakarta.servlet.http.HttpServletResponse; - -@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2019-07-08T09:37:36.546Z[GMT]") -public class ApiOriginFilter implements jakarta.servlet.Filter { - @Override - public void doFilter(ServletRequest request, ServletResponse response, - FilterChain chain) throws IOException, ServletException { - HttpServletResponse res = (HttpServletResponse) response; - res.addHeader("Access-Control-Allow-Origin", "*"); - res.addHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT"); - res.addHeader("Access-Control-Allow-Headers", "Content-Type"); - chain.doFilter(request, response); - } - - @Override - public void destroy() { - } - - @Override - public void init(FilterConfig filterConfig) throws ServletException { - } -} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/ApiResponseMessage.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/ApiResponseMessage.java deleted file mode 100644 index c6685f3c3..000000000 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/ApiResponseMessage.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * - * * - * * * - * * * * - * * * * * 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.v31.app1; - -import jakarta.xml.bind.annotation.XmlTransient; - -@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2019-07-08T09:37:36.546Z[GMT]") -@jakarta.xml.bind.annotation.XmlRootElement -public class ApiResponseMessage { - public static final int ERROR = 1; - - public static final int WARNING = 2; - - public static final int INFO = 3; - - public static final int OK = 4; - - public static final int TOO_BUSY = 5; - - int code; - - String type; - - String message; - - public ApiResponseMessage() { - } - - public ApiResponseMessage(int code, String message) { - this.code = code; - switch (code) { - case ERROR: - setType("error"); - break; - case WARNING: - setType("warning"); - break; - case INFO: - setType("info"); - break; - case OK: - setType("ok"); - break; - case TOO_BUSY: - setType("too busy"); - break; - default: - setType("unknown"); - break; - } - this.message = message; - } - - @XmlTransient - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } -} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/ErrorMessage.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/ErrorMessage.java index 8bc1a1a10..660748d6f 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/ErrorMessage.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/ErrorMessage.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/ExceptionTranslator.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/ExceptionTranslator.java index 0f92c139d..60e93e330 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/ExceptionTranslator.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/ExceptionTranslator.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/HelloController.java index ff1e7332e..9831f9a3d 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/HomeController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/HomeController.java index dab8fa0d7..ec377dd41 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/HomeController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/HomeController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/InventoryApi.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/InventoryApi.java index 3808d3bc3..c84890178 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/InventoryApi.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/InventoryApi.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/InventoryApiController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/InventoryApiController.java index fd8d77680..eea9f4b39 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/InventoryApiController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/InventoryApiController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/InventoryItem.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/InventoryItem.java index ab0459cb1..2a1696383 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/InventoryItem.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/InventoryItem.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/ItemController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/ItemController.java index 94b4c5f3c..698de7868 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/ItemController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/ItemController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/ItemDTO.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/ItemDTO.java index e130afa55..254348f72 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/ItemDTO.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/ItemDTO.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/ItemLightDTO.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/ItemLightDTO.java index 4316de4aa..10f6a67f6 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/ItemLightDTO.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/ItemLightDTO.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/Manufacturer.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/Manufacturer.java index 3a6115626..8b7f16cc2 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/Manufacturer.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/Manufacturer.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/PeopleRestService.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/PeopleRestService.java index 5bbe6f510..f335aac0a 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/PeopleRestService.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/PeopleRestService.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/PersonDTO.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/PersonDTO.java index 8d8698130..3023fb457 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/PersonDTO.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/PersonDTO.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/SpringDocApp1Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/SpringDocApp1Test.java index 083453bc7..cfaf5d013 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/SpringDocApp1Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app1/SpringDocApp1Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app10/GreetController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app10/GreetController.java new file mode 100644 index 000000000..71bcde546 --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app10/GreetController.java @@ -0,0 +1,38 @@ +/* + * + * * 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.v31.app10; + +import java.util.Map; + +import io.swagger.v3.oas.annotations.Operation; + +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class GreetController { + @PostMapping("/greet") + @Operation(summary = "Greet") + public String greet( + @io.swagger.v3.oas.annotations.parameters.RequestBody(description = "Some description", required = false) + @RequestBody(required = false) Map body) { + return body.getOrDefault("greet", "Hello"); + } +} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app10/SpringDocApp10Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app10/SpringDocApp10Test.java new file mode 100644 index 000000000..af96adf03 --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app10/SpringDocApp10Test.java @@ -0,0 +1,31 @@ +/* + * + * * 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.v31.app10; + +import test.org.springdoc.api.v31.AbstractSpringDocV31Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp10Test extends AbstractSpringDocV31Test { + + @SpringBootApplication + static class SpringDocTestApp { + + } +} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/SpringDocApp2Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/SpringDocApp2Test.java index 10841446b..e594c537f 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/SpringDocApp2Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/SpringDocApp2Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/ApiUtil.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/ApiUtil.java index a61e54257..fe6bbd103 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/ApiUtil.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/ApiUtil.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/ExceptionTranslator.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/ExceptionTranslator.java index b7597bd97..cf15f5a93 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/ExceptionTranslator.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/ExceptionTranslator.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/HomeController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/HomeController.java index e265a5f8f..f2ded6848 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/HomeController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/HomeController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/PetApi.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/PetApi.java index 1a2e87e68..d79020aa0 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/PetApi.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/PetApi.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/PetApiController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/PetApiController.java index 7f008969f..8fd101313 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/PetApiController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/PetApiController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/PetApiDelegate.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/PetApiDelegate.java index b6a85a273..9a0f49e4b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/PetApiDelegate.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/PetApiDelegate.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/PetApiDelegateImpl.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/PetApiDelegateImpl.java index b0f981ea2..cbd296f4a 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/PetApiDelegateImpl.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/PetApiDelegateImpl.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/StoreApi.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/StoreApi.java index d32e42586..6b00e4fbd 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/StoreApi.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/StoreApi.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/StoreApiController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/StoreApiController.java index 03568c39e..8c3f0595c 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/StoreApiController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/StoreApiController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/StoreApiDelegate.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/StoreApiDelegate.java index 3ce7fa435..128693766 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/StoreApiDelegate.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/StoreApiDelegate.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/StoreApiDelegateImpl.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/StoreApiDelegateImpl.java index ec5b350c0..914b2c915 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/StoreApiDelegateImpl.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/StoreApiDelegateImpl.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/UserApi.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/UserApi.java index 53bdb35cd..531c74456 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/UserApi.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/UserApi.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/UserApiController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/UserApiController.java index dfc32f806..1b9cd2213 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/UserApiController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/UserApiController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/UserApiDelegate.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/UserApiDelegate.java index 459b11a7b..0a357177b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/UserApiDelegate.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/UserApiDelegate.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/UserApiDelegateImpl.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/UserApiDelegateImpl.java index 820e16d55..95111dd99 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/UserApiDelegateImpl.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/api/UserApiDelegateImpl.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/model/Body.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/model/Body.java index 9155510e5..fb98fe551 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/model/Body.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/model/Body.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/model/Body1.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/model/Body1.java deleted file mode 100644 index e7ff14bef..000000000 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/model/Body1.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * - * * - * * * - * * * * - * * * * * 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.v31.app2.model; - -import java.io.File; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.v3.oas.annotations.media.Schema; - -public class Body1 { - - @Schema(description = "Additional data to pass to server") - /** - * Additional data to pass to server - **/ - private String additionalMetadata = null; - - @Schema(description = "file to upload") - /** - * file to upload - **/ - private File file = null; - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - /** - * Additional data to pass to server - * - * @return additionalMetadata - **/ - @JsonProperty("additionalMetadata") - public String getAdditionalMetadata() { - return additionalMetadata; - } - - public void setAdditionalMetadata(String additionalMetadata) { - this.additionalMetadata = additionalMetadata; - } - - public Body1 additionalMetadata(String additionalMetadata) { - this.additionalMetadata = additionalMetadata; - return this; - } - - /** - * file to upload - * - * @return file - **/ - @JsonProperty("file") - public File getFile() { - return file; - } - - public void setFile(File file) { - this.file = file; - } - - public Body1 file(File file) { - this.file = file; - return this; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Body1 {\n"); - - sb.append(" additionalMetadata: ").append(toIndentedString(additionalMetadata)).append("\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); - sb.append("}"); - return sb.toString(); - } -} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/model/Category.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/model/Category.java index 48669a394..d949b0c7e 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/model/Category.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/model/Category.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/model/ModelApiResponse.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/model/ModelApiResponse.java index 42a02aa6d..cd71405e4 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/model/ModelApiResponse.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/model/ModelApiResponse.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/model/Order.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/model/Order.java index 62aee8e8d..fd91e5034 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/model/Order.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/model/Order.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/model/Pet.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/model/Pet.java index faf0b9bd6..141ea23f0 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/model/Pet.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/model/Pet.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/model/Tag.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/model/Tag.java index d780c6ffb..064444ced 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/model/Tag.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/model/Tag.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/model/User.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/model/User.java index 4973b610f..1336a7e9c 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/model/User.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app2/model/User.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app4/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app4/HelloController.java index eab07c403..42a30e27d 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app4/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app4/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app4/SpringDocApp4Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app4/SpringDocApp4Test.java index 21bc18d71..4524da731 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app4/SpringDocApp4Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app4/SpringDocApp4Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app4/TrackerData.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app4/TrackerData.java index c4b444bfe..09e60a18f 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app4/TrackerData.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app4/TrackerData.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app5/SpringDocApp5Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app5/SpringDocApp5Test.java index 4d7b0e302..166fa1974 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app5/SpringDocApp5Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app5/SpringDocApp5Test.java @@ -19,7 +19,7 @@ class SpringDocApp5Test extends AbstractSpringDocV31Test { @Test - public void testAddRouterOperationCustomizerBean() throws Exception { + void testAddRouterOperationCustomizerBean() throws Exception { className = getClass().getSimpleName(); String testNumber = className.replaceAll("[^0-9]", ""); MvcResult mockMvcResult = diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app6/DummyData.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app6/DummyData.java index 4cbfaba86..300f59ecd 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app6/DummyData.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app6/DummyData.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2022 the original author or authors. + * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app6/GetBodyController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app6/GetBodyController.java index 27a32a8a2..7021d1209 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app6/GetBodyController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app6/GetBodyController.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2022 the original author or authors. + * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app6/SpringDocApp6Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app6/SpringDocApp6Test.java index e80de672b..a334374b3 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app6/SpringDocApp6Test.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app6/SpringDocApp6Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2022 the original author or authors. + * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app9/SpringDocApp9Test.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app9/SpringDocApp9Test.java new file mode 100644 index 000000000..737b8aa3a --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app9/SpringDocApp9Test.java @@ -0,0 +1,37 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2023 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.v31.app9; + +import test.org.springdoc.api.v31.AbstractSpringDocV31Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.test.context.TestPropertySource; + +@TestPropertySource(properties = "springdoc.remove-broken-reference-definitions=false") +public class SpringDocApp9Test extends AbstractSpringDocV31Test { + + @SpringBootApplication + static class SpringDocTestApp { + + } +} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app9/WebHookResource.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app9/WebHookResource.java new file mode 100644 index 000000000..1d28b96a0 --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app9/WebHookResource.java @@ -0,0 +1,52 @@ +package test.org.springdoc.api.v31.app9; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Webhook; +import io.swagger.v3.oas.annotations.Webhooks; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.parameters.RequestBody; +import io.swagger.v3.oas.annotations.responses.ApiResponse; + +import org.springframework.stereotype.Component; + +@Webhooks({ + @Webhook( + name = "newPet", + operation = @Operation( + requestBody = @RequestBody( + description = "Information about a new pet in the system", + content = { + @Content( + mediaType = "application/json", + schema = @Schema( + description = "Webhook Pet", + implementation = RequestDto.class + ) + ) + } + ), + method = "post", + responses = @ApiResponse( + responseCode = "200", + description = "Return a 200 status to indicate that the data was received successfully" + ) + ) + ) +}) +@Component +public class WebHookResource {} + + +class RequestDto { + + private String personalNumber; + + public String getPersonalNumber() { + return personalNumber; + } + + public void setPersonalNumber(String personalNumber) { + this.personalNumber = personalNumber; + } +} \ No newline at end of file diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app102.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app102.json index 4d105d418..0f17e72f0 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app102.json +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app102.json @@ -82,6 +82,7 @@ { "name": "nested.param1", "in": "query", + "description": "nested string parameter", "required": false, "schema": { "type": "string" @@ -90,6 +91,7 @@ { "name": "nested.param2", "in": "query", + "description": "nested BigInteger parameter", "required": false, "schema": { "type": "integer" diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app106.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app106.json index 57677aa0f..37b143029 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app106.json +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app106.json @@ -17,7 +17,7 @@ "hello-controller" ], "summary": "find-articles", - "operationId": "findArticles_1", + "operationId": "findArticles", "parameters": [ { "name": "If-Modified-Since", diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app108.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app108.json index 8375715aa..e4e98e576 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app108.json +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app108.json @@ -16,7 +16,7 @@ "tags": [ "hello-controller" ], - "operationId": "update_1", + "operationId": "update", "parameters": [ { "name": "toto", diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app119.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app119.json index a377e00fb..5f03c5312 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app119.json +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app119.json @@ -41,6 +41,11 @@ "$ref": "#/components/schemas/JsonRequest" } } + }, + "encoding": { + "params": { + "contentType": "application/json" + } } } } diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app121.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app121.json index 176bb8823..9375efe11 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app121.json +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app121.json @@ -91,6 +91,7 @@ { "name": "nested.param1", "in": "query", + "description": "nested string parameter", "required": false, "schema": { "type": "string" @@ -99,6 +100,7 @@ { "name": "nested.param2", "in": "query", + "description": "nested BigInteger parameter", "required": false, "schema": { "type": "integer" diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app122.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app122.json index d7a836d13..ed18e58c0 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app122.json +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app122.json @@ -17,7 +17,7 @@ "example" ], "summary": "create", - "operationId": "create_1", + "operationId": "create", "requestBody": { "content": { "application/json": { diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app126.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app126.json index 442057409..3bea48404 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app126.json +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app126.json @@ -18,7 +18,7 @@ ], "summary": "getAllCurrencies", "description": "Get all currencies", - "operationId": "getAllCurrencies_1", + "operationId": "getAllCurrencies", "responses": { "401": { "$ref": "#/components/responses/http401NoToken" @@ -62,15 +62,15 @@ "type": "object" } }, + "status": { + "type": "integer", + "format": "int32" + }, "title": { "type": "string" }, "detail": { "type": "string" - }, - "status": { - "type": "integer", - "format": "int32" } } } diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app135.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app135.json index 42418d7cf..80f9ab7d8 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app135.json +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app135.json @@ -62,7 +62,7 @@ "200": { "description": "OK", "content": { - "application/xml": { + "application/json": { "schema": { "type": "array", "items": { @@ -70,7 +70,7 @@ } } }, - "application/json": { + "application/xml": { "schema": { "type": "array", "items": { @@ -88,7 +88,7 @@ "tags": [ "book-repository" ], - "operationId": "findAll_1_1", + "operationId": "findAll_1", "responses": { "200": { "description": "OK", @@ -160,7 +160,7 @@ "tags": [ "book-repository" ], - "operationId": "findAll_1_2", + "operationId": "findAll_2", "responses": { "200": { "description": "OK", @@ -232,7 +232,7 @@ "tags": [ "book-repository" ], - "operationId": "findAll_1_3", + "operationId": "findAll_3", "responses": { "200": { "description": "OK", @@ -304,7 +304,7 @@ "tags": [ "book-repository" ], - "operationId": "findAll_1_4", + "operationId": "findAll_4", "responses": { "200": { "description": "OK", diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app141.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app141.json index 42418d7cf..c75a3a94d 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app141.json +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app141.json @@ -21,7 +21,7 @@ "200": { "description": "OK", "content": { - "application/xml": { + "application/json": { "schema": { "type": "array", "items": { @@ -29,7 +29,7 @@ } } }, - "application/json": { + "application/xml": { "schema": { "type": "array", "items": { @@ -62,7 +62,7 @@ "200": { "description": "OK", "content": { - "application/xml": { + "application/json": { "schema": { "type": "array", "items": { @@ -70,7 +70,7 @@ } } }, - "application/json": { + "application/xml": { "schema": { "type": "array", "items": { @@ -88,7 +88,7 @@ "tags": [ "book-repository" ], - "operationId": "findAll_1_1", + "operationId": "findAll_1", "responses": { "200": { "description": "OK", @@ -160,7 +160,7 @@ "tags": [ "book-repository" ], - "operationId": "findAll_1_2", + "operationId": "findAll_2", "responses": { "200": { "description": "OK", @@ -232,7 +232,7 @@ "tags": [ "book-repository" ], - "operationId": "findAll_1_3", + "operationId": "findAll_3", "responses": { "200": { "description": "OK", @@ -304,7 +304,7 @@ "tags": [ "book-repository" ], - "operationId": "findAll_1_4", + "operationId": "findAll_4", "responses": { "200": { "description": "OK", diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app143.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app143.json index 0c7014757..904951914 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app143.json +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app143.json @@ -100,37 +100,6 @@ } } } - }, - "/actuator/health/**": { - "get": { - "tags": [ - "Actuator" - ], - "summary": "Actuator web endpoint 'health-path'", - "operationId": "health-path", - "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" - } - } - } - } - } - } } }, "components": { diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app161.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app161.json index e425730c0..fb1b822c0 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app161.json +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app161.json @@ -85,7 +85,7 @@ "hello-controller" ], "summary": "This is a test message", - "operationId": "test_1", + "operationId": "test", "requestBody": { "content": { "multipart/form-data": { 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/app193-1.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app193-1.json new file mode 100644 index 000000000..e3a0dfd38 --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app193-1.json @@ -0,0 +1,158 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "OpenAPI definition", + "version": "v0" + }, + "servers": [ + { + "url": "http://localhost", + "description": "Generated server url" + } + ], + "paths": { + "/test": { + "get": { + "tags": [ + "basic-controller" + ], + "summary": "get", + "description": "Provides a list of books.", + "operationId": "get", + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/Books" + } + ] + } + } + } + } + } + } + }, + "/test1": { + "get": { + "tags": [ + "basic-controller" + ], + "summary": "get1", + "description": "Provides an animal.", + "operationId": "get1", + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/Cat" + }, + { + "$ref": "#/components/schemas/Dog" + } + ] + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "Book": + { + "type": "object", + "properties": + { + "title": + { + "type": "string" + } + }, + "description": "Represents a Book." + }, + "Books": { + "type": "array", + "description": "Represents a list of Books.", + "allOf": [ + { + "$ref": "#/components/schemas/Knowledge" + }, + { + "type": "object", + "properties": { + "empty": { + "type": "boolean" + }, + "first": + { + "$ref": "#/components/schemas/Book" + }, + "last": + { + "$ref": "#/components/schemas/Book" + } + } + } + ] + }, + "Knowledge": { + "type": "object", + "description": "Represents the knowledge." + }, + "Animal": { + "type": "object", + "description": "Represents an Animal class." + }, + "Cat": { + "type": "object", + "description": "Represents a Cat class.", + "allOf": [ + { + "$ref": "#/components/schemas/Animal" + }, + { + "type": "object", + "properties": { + "speed": { + "type": "integer", + "format": "int32" + } + } + } + ] + }, + "Dog": { + "type": "object", + "description": "Represents a Dog class.", + "allOf": [ + { + "$ref": "#/components/schemas/Animal" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "integer", + "format": "int32" + } + } + } + ] + } + } + } +} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app196.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app196.json index bfcd29f4d..0b39821f1 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app196.json +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app196.json @@ -120,37 +120,6 @@ } } } - }, - "/actuator/health/**": { - "get": { - "tags": [ - "Actuator" - ], - "summary": "Actuator web endpoint 'health-path'", - "operationId": "health-path", - "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" - } - } - } - } - } - } } }, "components": { diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app198.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app198.json index d7fb08a57..251cb0d2d 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app198.json +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app198.json @@ -16,7 +16,7 @@ "tags": [ "hello-controller" ], - "operationId": "test_1", + "operationId": "test", "responses": { "200": { "description": "OK", diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app205.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app205.json index f7ec3b2b0..70eafa7b4 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app205.json +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app205.json @@ -1,46 +1,46 @@ { - "openapi": "3.0.1", - "info": { - "title": "OpenAPI definition", - "version": "v0" -}, - "servers": [ - { - "url": "http://localhost", - "description": "Generated server url" - } - ], - "paths": { - "/test/{*param}": { - "get": { - "tags": [ - "my-controller" - ], - "operationId": "testingMethod", - "parameters": [ - { - "name": "param", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "*/*": { - "schema": { - "type": "string" + "openapi": "3.0.1", + "info": { + "title": "OpenAPI definition", + "version": "v0" + }, + "servers": [ + { + "url": "http://localhost", + "description": "Generated server url" + } + ], + "paths": { + "/test/{param}": { + "get": { + "tags": [ + "my-controller" + ], + "operationId": "testingMethod", + "parameters": [ + { + "name": "param", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "string" + } + } + } + } + } + } + } + }, + "components": {} } -} -} -} -} -} -} -}, - "components": {} -} \ No newline at end of file diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app206.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app206.json index 165ccf314..15af3c649 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app206.json +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app206.json @@ -16,14 +16,15 @@ "tags": [ "required-mode-controller" ], - "operationId": "index_1", + "operationId": "index", "parameters": [ { "name": "id", "in": "query", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } }, { @@ -57,7 +58,8 @@ "in": "query", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int32" } } ], diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app211.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app211.json index f2b9b4346..0bb57161b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app211.json +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app211.json @@ -16,7 +16,7 @@ "tags": [ "hello-controller" ], - "operationId": "index_1", + "operationId": "index", "responses": { "200": { "description": "OK", diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app216.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app216.json index 27d4c5e0c..0641bc89d 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app216.json +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app216.json @@ -17,7 +17,7 @@ "hello-controller" ], "description": "a", - "operationId": "b_1", + "operationId": "b", "responses": { "200": { "description": "OK", 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/app224.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app224.json new file mode 100644 index 000000000..d83020e50 --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app224.json @@ -0,0 +1,52 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "OpenAPI definition", + "version": "v0" + }, + "servers": [ + { + "url": "http://localhost", + "description": "Generated server url" + } + ], + "paths": { + "/api": { + "get": { + "tags": [ + "test-controller" + ], + "operationId": "getRootModel", + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/RootModel" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "RootModel": { + "type": "object", + "properties": { + "rootProperty": { + "type": "integer", + "format": "int32" + }, + "unwrappedProperty": { + "type": "integer", + "format": "int32" + } + } + } + } + } +} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app225.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app225.json new file mode 100644 index 000000000..096ec64b7 --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app225.json @@ -0,0 +1,39 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "OpenAPI definition", + "version": "v0" + }, + "servers": [ + { + "url": "http://localhost", + "description": "Generated server url" + } + ], + "paths": { + "/testBoolean": { + "post": { + "tags": [ + "hello-controller" + ], + "operationId": "HelloController", + "parameters": [ + { + "name": "PERSONAL_NUMBER", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + } + }, + "components": {} +} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app226.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app226.json new file mode 100644 index 000000000..55698a84d --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app226.json @@ -0,0 +1,45 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "OpenAPI definition", + "version": "v0" + }, + "servers": [ + { + "url": "http://localhost", + "description": "Generated server url" + } + ], + "paths": { + "/testBoolean": { + "post": { + "tags": [ + "hello-controller" + ], + "operationId": "HelloController", + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "examples": { + "success": { + "description": "success", + "value": "..." + } + } + } + } + } + } + } + } + }, + "components": {} +} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app227.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app227.json new file mode 100644 index 000000000..5daf9e326 --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app227.json @@ -0,0 +1,73 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "OpenAPI definition", + "version": "v0" + }, + "servers": [ + { + "url": "http://localhost", + "description": "Generated server url" + } + ], + "paths": { + "/persons": { + "get": { + "tags": [ + "hello-controller" + ], + "operationId": "persons", + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ItemString" + } + } + } + } + } + } + }, + "/persons2": { + "get": { + "tags": [ + "hello-controller" + ], + "operationId": "persons2", + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ItemString" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "ItemString": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string" + }, + "resource": { + "type": "string" + } + } + } + } + } +} \ No newline at end of file diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app228.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app228.json new file mode 100644 index 000000000..31e46a53e --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app228.json @@ -0,0 +1,105 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "OpenAPI definition", + "version": "v0" + }, + "servers": [ + { + "url": "http://localhost", + "description": "Generated server url" + } + ], + "paths": { + "/swaggerTest": { + "post": { + "tags": [ + "hello-controller" + ], + "operationId": "swaggerTest", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MyRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "string" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "Child1": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/Parent" + }, + { + "type": "object", + "properties": { + "childProperty1": { + "type": "string" + } + } + } + ] + }, + "Child2": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/Parent" + }, + { + "type": "object", + "properties": { + "childProperty2": { + "type": "string" + } + } + } + ] + }, + "MyRequest": { + "type": "object", + "properties": { + "parent": { + "$ref": "#/components/schemas/Parent" + } + } + }, + "Parent": { + "type": "object", + "properties": { + "parentProperty": { + "type": "string" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/Child1" + }, + { + "$ref": "#/components/schemas/Child2" + } + ] + } + } + } +} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app229.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app229.json new file mode 100644 index 000000000..98ae4950b --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app229.json @@ -0,0 +1,81 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "OpenAPI definition", + "version": "v0" + }, + "servers": [ + { + "url": "http://localhost", + "description": "Generated server url" + } + ], + "paths": { + "/": { + "get": { + "tags": [ + "x-controller" + ], + "operationId": "manualTranslationUpdateRun", + "parameters": [ + { + "name": "locale", + "in": "query", + "required": true, + "schema": { + "maxLength": 16, + "minLength": 2, + "pattern": "\\w+([-.]?\\w+)*", + "type": "string" + }, + "examples": { + "el-gr": { + "description": "el-gr" + }, + "pl-pl": { + "description": "pl-pl" + }, + "de-de": { + "description": "de-de" + }, + "hu-hu": { + "description": "hu-hu" + }, + "en-us.src": { + "description": "en-us.src" + }, + "ro-ro": { + "description": "ro-ro" + }, + "sk-sk": { + "description": "sk-sk" + }, + "bg-bg": { + "description": "bg-bg" + }, + "ar-ae": { + "description": "ar-ae" + }, + "cs-cz": { + "description": "cs-cz" + } + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "object" + } + } + } + } + } + } + } + }, + "components": {} +} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app230.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app230.json new file mode 100644 index 000000000..5d328c26d --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app230.json @@ -0,0 +1,58 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "OpenAPI definition", + "version": "v0" + }, + "servers": [ + { + "url": "http://localhost", + "description": "Generated server url" + } + ], + "paths": { + "/": { + "post": { + "tags": [ + "app-230-controller" + ], + "operationId": "swaggerTest", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MyRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "string" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "MyRequest": { + "properties": { + "id": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + } + } + } +} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app231.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app231.json new file mode 100644 index 000000000..9912b0e7f --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app231.json @@ -0,0 +1,77 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "OpenAPI definition", + "version": "v0" + }, + "servers": [ + { + "url": "http://localhost", + "description": "Generated server url" + } + ], + "paths": { + "/applications/parameter-object": { + "post": { + "tags": [ + "applications-rest-controller" + ], + "summary": "Parameter object", + "operationId": "createWithParameterObject", + "parameters": [ + { + "name": "name", + "in": "query", + "description": "Overriding the description in sub class", + "required": false, + "schema": { + "maxLength": 30, + "minLength": 1, + "type": "string", + "description": "Overriding the description in sub class" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Application" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "Application": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "serviceName": { + "type": "string" + }, + "clusterName": { + "type": "string" + }, + "shardName": { + "type": "string" + }, + "customTags": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } +} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app37.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app37.json index 627fc2abc..fc1963ba1 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app37.json +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app37.json @@ -16,17 +16,17 @@ "tags": [ "hello-controller" ], - "operationId": "petsPost_1", + "operationId": "petsPost", "requestBody": { "content": { - "application/json": { + "text/plain": { "schema": { - "$ref": "#/components/schemas/Pet" + "type": "string" } }, - "text/plain": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/Pet" } } } @@ -43,9 +43,14 @@ "tags": [ "hello-controller" ], - "operationId": "process_1_1", + "operationId": "process", "requestBody": { "content": { + "application/x.c+json": { + "schema": { + "$ref": "#/components/schemas/Car" + } + }, "application/x.b+json": { "schema": { "$ref": "#/components/schemas/Bar" @@ -55,11 +60,6 @@ "schema": { "$ref": "#/components/schemas/Foo" } - }, - "application/x.c+json": { - "schema": { - "$ref": "#/components/schemas/Car" - } } } }, @@ -67,6 +67,11 @@ "200": { "description": "OK", "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Car" + } + }, "text/plain": { "schema": { "oneOf": [ @@ -78,11 +83,6 @@ } ] } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Car" - } } } } @@ -100,26 +100,26 @@ } } }, - "Bar": { + "Car": { "type": "object", "properties": { - "bar": { + "car": { "type": "string" } } }, - "Foo": { + "Bar": { "type": "object", "properties": { - "foo": { + "bar": { "type": "string" } } }, - "Car": { + "Foo": { "type": "object", "properties": { - "car": { + "foo": { "type": "string" } } 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-api/src/test/resources/results/3.0.1/app47.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app47.json index b683fac32..6ddd43110 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app47.json +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app47.json @@ -46,7 +46,7 @@ "tags": [ "basic-controller" ], - "operationId": "get1_1_1", + "operationId": "get1", "parameters": [ { "name": "foo", @@ -96,4 +96,3 @@ }, "components": {} } - \ No newline at end of file diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app51.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app51.json index 55e35e2b6..b4b326ba9 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app51.json +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app51.json @@ -16,7 +16,7 @@ "tags": [ "hello-controller" ], - "operationId": "hello_1", + "operationId": "hello", "requestBody": { "content": { "application/json": { @@ -190,4 +190,4 @@ } }, "components": {} -} \ No newline at end of file +} diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app91.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app91.json index 32d710f08..2c4246f73 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app91.json +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app91.json @@ -63,7 +63,7 @@ "Demo" ], "summary": "This API will return a random greeting.", - "operationId": "sayHello_1", + "operationId": "sayHello", "responses": { "200": { "description": "OK", diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app93.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app93.json index 62cade080..462cfe210 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app93.json +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app93.json @@ -16,7 +16,7 @@ "tags": [ "specific-controller" ], - "operationId": "get_1", + "operationId": "get", "parameters": [ { "name": "param", diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app1.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app1.json index 67f595272..b7829258b 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app1.json +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app1.json @@ -236,6 +236,7 @@ "required": false, "explode": false, "schema": { + "type": "array", "items": {} } } @@ -453,6 +454,7 @@ "content": { "application/json": { "schema": { + "type": "array", "items": { "$ref": "#/components/schemas/PersonDTO" } @@ -515,6 +517,7 @@ "components": { "schemas": { "ErrorMessage": { + "type": "object", "properties": { "id": { "type": "string" @@ -525,6 +528,7 @@ } }, "PersonDTO": { + "type": "object", "properties": { "email": { "type": "string" @@ -538,6 +542,7 @@ } }, "ItemLightDTO": { + "type": "object", "properties": { "description": { "type": "string" @@ -554,6 +559,7 @@ } }, "InventoryItem": { + "type": "object", "properties": { "id": { "type": "string", @@ -580,6 +586,7 @@ ] }, "Manufacturer": { + "type": "object", "properties": { "name": { "type": "string", @@ -599,6 +606,7 @@ ] }, "ItemDTO": { + "type": "object", "properties": { "itemID": { "type": "string" diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app10.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app10.json new file mode 100644 index 000000000..c20537fa9 --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app10.json @@ -0,0 +1,52 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "OpenAPI definition", + "version": "v0" + }, + "servers": [ + { + "url": "http://localhost", + "description": "Generated server url" + } + ], + "paths": { + "/greet": { + "post": { + "tags": [ + "greet-controller" + ], + "summary": "Greet", + "operationId": "greet", + "requestBody": { + "description": "Some description", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "string" + } + } + } + } + } + } + } + }, + "components": { + + } +} \ No newline at end of file diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app2.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app2.json index 5bae75d1d..c431409f8 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app2.json +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app2.json @@ -61,8 +61,8 @@ } } }, - "200": { - "description": "successful operation", + "404": { + "description": "User not found", "content": { "application/xml": { "schema": { @@ -76,8 +76,8 @@ } } }, - "404": { - "description": "User not found", + "200": { + "description": "successful operation", "content": { "application/xml": { "schema": { @@ -464,8 +464,8 @@ } } }, - "404": { - "description": "Pet not found", + "200": { + "description": "successful operation", "content": { "application/xml": { "schema": { @@ -479,8 +479,8 @@ } } }, - "200": { - "description": "successful operation", + "404": { + "description": "Pet not found", "content": { "application/xml": { "schema": { @@ -901,6 +901,7 @@ "content": { "application/json": { "schema": { + "type": "array", "items": {} } } @@ -953,6 +954,7 @@ "content": { "application/xml": { "schema": { + "type": "array", "items": { "$ref": "#/components/schemas/Pet" } @@ -960,6 +962,7 @@ }, "application/json": { "schema": { + "type": "array", "items": { "$ref": "#/components/schemas/Pet" } @@ -1017,6 +1020,7 @@ "content": { "application/xml": { "schema": { + "type": "array", "items": { "$ref": "#/components/schemas/Pet" } @@ -1024,6 +1028,7 @@ }, "application/json": { "schema": { + "type": "array", "items": { "$ref": "#/components/schemas/Pet" } @@ -1046,6 +1051,7 @@ "components": { "schemas": { "User": { + "type": "object", "properties": { "id": { "type": "integer", @@ -1077,6 +1083,7 @@ } }, "Category": { + "type": "object", "properties": { "id": { "type": "integer", @@ -1088,6 +1095,7 @@ } }, "Pet": { + "type": "object", "properties": { "id": { "type": "integer", @@ -1128,6 +1136,7 @@ ] }, "Tag": { + "type": "object", "properties": { "id": { "type": "integer", @@ -1139,6 +1148,7 @@ } }, "Order": { + "type": "object", "properties": { "complete": { "type": "boolean" @@ -1166,6 +1176,7 @@ } }, "ModelApiResponse": { + "type": "object", "properties": { "code": { "type": "integer", diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app4.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app4.json index bdd288eaa..584edad37 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app4.json +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app4.json @@ -45,6 +45,7 @@ "components": { "schemas": { "test.org.springdoc.api.v31.app4.TrackerData": { + "type": "object", "properties": { "trackerId": { "type": "string", diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app6.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app6.json index 6c8b64925..b944be7e5 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app6.json +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app6.json @@ -45,6 +45,7 @@ "components": { "schemas": { "DummyData": { + "type": "object", "properties": { "trackerId": { "type": "string" diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app7.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app7.json index 60bf98686..f5635e871 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app7.json +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app7.json @@ -35,6 +35,7 @@ "components": { "schemas": { "ExamplesResponse": { + "type": "object", "properties": { "name": { "type": "string", @@ -46,7 +47,7 @@ "subject": { "type": "string", "description": "subject", - "example":"Hello", + "example": "Hello", "examples": [ "Hello", "World" diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app8.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app8.json index 8bc72ac52..1a26bde25 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app8.json +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app8.json @@ -35,6 +35,7 @@ "components": { "schemas": { "ExamplesResponse": { + "type": "object", "properties": { "self": { "$ref": "#/components/schemas/UserInfo", @@ -58,6 +59,7 @@ ] }, "FooBar": { + "type": "object", "deprecated": true, "description": "the foo bar", "properties": { @@ -76,6 +78,7 @@ ] }, "UserInfo": { + "type": "object", "description": "user info", "properties": { "name": { diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app9.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app9.json new file mode 100644 index 000000000..1ee84bb45 --- /dev/null +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app9.json @@ -0,0 +1,48 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "OpenAPI definition", + "version": "v0" + }, + "servers": [ + { + "url": "http://localhost", + "description": "Generated server url" + } + ], + "paths": {}, + "components": { + "schemas": { + "RequestDto": { + "type": "object", + "properties": { + "personalNumber": { + "type": "string" + } + } + } + } + }, + "webhooks": { + "newPet": { + "post": { + "requestBody": { + "description": "Information about a new pet in the system", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RequestDto", + "description": "Webhook Pet" + } + } + } + }, + "responses": { + "200": { + "description": "Return a 200 status to indicate that the data was received successfully" + } + } + } + } + } +} diff --git a/springdoc-openapi-starter-webmvc-ui/pom.xml b/springdoc-openapi-starter-webmvc-ui/pom.xml index d987eb1c8..eb73f019d 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.7.0 springdoc-openapi-starter-webmvc-ui @@ -23,6 +23,10 @@ org.webjars swagger-ui + + org.webjars + webjars-locator-lite + org.springframework.boot spring-boot-starter-security diff --git a/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerConfig.java b/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerConfig.java index 5fcc32f69..00985a5ff 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerConfig.java +++ b/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerConfig.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webmvc.ui; @@ -28,7 +30,6 @@ import org.springdoc.core.configuration.SpringDocConfiguration; import org.springdoc.core.properties.SpringDocConfigProperties; -import org.springdoc.core.properties.SwaggerUiConfigParameters; import org.springdoc.core.properties.SwaggerUiConfigProperties; import org.springdoc.core.properties.SwaggerUiOAuthProperties; import org.springdoc.core.providers.ActuatorProvider; @@ -57,6 +58,7 @@ /** * The type Swagger config. + * * @author bnasslahsen */ @Lazy(false) @@ -69,18 +71,17 @@ public class SwaggerConfig { /** * Swagger welcome swagger welcome web mvc. * - * @param swaggerUiConfig the swagger ui config + * @param swaggerUiConfig the swagger ui config * @param springDocConfigProperties the spring doc config properties - * @param swaggerUiConfigParameters the swagger ui config parameters - * @param springWebProvider the spring web provider + * @param springWebProvider the spring web provider * @return the swagger welcome web mvc */ @Bean @ConditionalOnMissingBean @ConditionalOnProperty(name = SPRINGDOC_USE_MANAGEMENT_PORT, havingValue = "false", matchIfMissing = true) @Lazy(false) - SwaggerWelcomeWebMvc swaggerWelcome(SwaggerUiConfigProperties swaggerUiConfig, SpringDocConfigProperties springDocConfigProperties, SwaggerUiConfigParameters swaggerUiConfigParameters, SpringWebProvider springWebProvider) { - return new SwaggerWelcomeWebMvc(swaggerUiConfig, springDocConfigProperties, swaggerUiConfigParameters, springWebProvider); + SwaggerWelcomeWebMvc swaggerWelcome(SwaggerUiConfigProperties swaggerUiConfig, SpringDocConfigProperties springDocConfigProperties, SpringWebProvider springWebProvider) { + return new SwaggerWelcomeWebMvc(swaggerUiConfig, springDocConfigProperties, springWebProvider); } /** @@ -125,49 +126,35 @@ SwaggerUiHome swaggerUiHome() { /** * Index page transformer swagger index transformer. * - * @param swaggerUiConfig the swagger ui config + * @param swaggerUiConfig the swagger ui config * @param swaggerUiOAuthProperties the swagger ui o auth properties - * @param swaggerUiConfigParameters the swagger ui config parameters - * @param swaggerWelcomeCommon the swagger welcome common - * @param objectMapperProvider the object mapper provider + * @param swaggerWelcomeCommon the swagger welcome common + * @param objectMapperProvider the object mapper provider * @return the swagger index transformer */ @Bean @ConditionalOnMissingBean @Lazy(false) - SwaggerIndexTransformer indexPageTransformer(SwaggerUiConfigProperties swaggerUiConfig, SwaggerUiOAuthProperties swaggerUiOAuthProperties, - SwaggerUiConfigParameters swaggerUiConfigParameters, SwaggerWelcomeCommon swaggerWelcomeCommon, ObjectMapperProvider objectMapperProvider) { - return new SwaggerIndexPageTransformer(swaggerUiConfig, swaggerUiOAuthProperties, swaggerUiConfigParameters, swaggerWelcomeCommon, objectMapperProvider); + SwaggerIndexTransformer indexPageTransformer(SwaggerUiConfigProperties swaggerUiConfig, SwaggerUiOAuthProperties swaggerUiOAuthProperties, + SwaggerWelcomeCommon swaggerWelcomeCommon, ObjectMapperProvider objectMapperProvider) { + return new SwaggerIndexPageTransformer(swaggerUiConfig, swaggerUiOAuthProperties, swaggerWelcomeCommon, objectMapperProvider); } /** * Swagger web mvc configurer swagger web mvc configurer. * - * @param swaggerUiConfigParameters the swagger ui calculated config - * @param swaggerIndexTransformer the swagger index transformer - * @param actuatorProvider the actuator provider - * @param swaggerResourceResolver the swagger resource resolver + * @param swaggerUiConfigProperties the swagger ui calculated config + * @param swaggerIndexTransformer the swagger index transformer + * @param actuatorProvider the actuator provider + * @param swaggerResourceResolver the swagger resource resolver * @return the swagger web mvc configurer */ @Bean @ConditionalOnMissingBean @Lazy(false) - SwaggerWebMvcConfigurer swaggerWebMvcConfigurer(SwaggerUiConfigParameters swaggerUiConfigParameters, + SwaggerWebMvcConfigurer swaggerWebMvcConfigurer(SwaggerUiConfigProperties swaggerUiConfigProperties, SwaggerIndexTransformer swaggerIndexTransformer, Optional actuatorProvider, SwaggerResourceResolver swaggerResourceResolver) { - return new SwaggerWebMvcConfigurer(swaggerUiConfigParameters, swaggerIndexTransformer, actuatorProvider, swaggerResourceResolver); - } - - /** - * Swagger ui config parameters swagger ui config parameters. - * - * @param swaggerUiConfig the swagger ui config - * @return the swagger ui config parameters - */ - @Bean - @ConditionalOnMissingBean - @Lazy(false) - SwaggerUiConfigParameters swaggerUiConfigParameters(SwaggerUiConfigProperties swaggerUiConfig) { - return new SwaggerUiConfigParameters(swaggerUiConfig); + return new SwaggerWebMvcConfigurer(swaggerUiConfigProperties, swaggerIndexTransformer, actuatorProvider, swaggerResourceResolver); } /** @@ -194,17 +181,16 @@ static class SwaggerActuatorWelcomeConfiguration { /** * Swagger actuator welcome swagger welcome actuator. * - * @param swaggerUiConfig the swagger ui config + * @param swaggerUiConfig the swagger ui config * @param springDocConfigProperties the spring doc config properties - * @param swaggerUiConfigParameters the swagger ui config parameters - * @param webEndpointProperties the web endpoint properties + * @param webEndpointProperties the web endpoint properties * @return the swagger welcome actuator */ @Bean @ConditionalOnMissingBean @Lazy(false) - SwaggerWelcomeActuator swaggerActuatorWelcome(SwaggerUiConfigProperties swaggerUiConfig, SpringDocConfigProperties springDocConfigProperties, SwaggerUiConfigParameters swaggerUiConfigParameters, WebEndpointProperties webEndpointProperties) { - return new SwaggerWelcomeActuator(swaggerUiConfig, springDocConfigProperties, swaggerUiConfigParameters, webEndpointProperties); + SwaggerWelcomeActuator swaggerActuatorWelcome(SwaggerUiConfigProperties swaggerUiConfig, SpringDocConfigProperties springDocConfigProperties, WebEndpointProperties webEndpointProperties) { + return new SwaggerWelcomeActuator(swaggerUiConfig, springDocConfigProperties, webEndpointProperties); } } } diff --git a/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerConfigResource.java b/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerConfigResource.java index 3381c8650..b4a84c1ce 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerConfigResource.java +++ b/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerConfigResource.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webmvc.ui; @@ -36,6 +38,7 @@ /** * The type Swagger config resource. + * * @author bnasslahsen */ @RestController diff --git a/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerIndexPageTransformer.java b/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerIndexPageTransformer.java index 53191b919..bc328d551 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerIndexPageTransformer.java +++ b/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerIndexPageTransformer.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webmvc.ui; @@ -43,6 +45,7 @@ /** * The type Swagger index transformer. + * * @author bnasslahsen */ public class SwaggerIndexPageTransformer extends AbstractSwaggerIndexTransformer implements SwaggerIndexTransformer { @@ -54,29 +57,29 @@ public class SwaggerIndexPageTransformer extends AbstractSwaggerIndexTransformer /** * Instantiates a new Swagger index transformer. - * @param swaggerUiConfig the swagger ui config + * + * @param swaggerUiConfig the swagger ui config * @param swaggerUiOAuthProperties the swagger ui o auth properties - * @param swaggerUiConfigParameters the swagger ui config parameters - * @param swaggerWelcomeCommon the swagger welcome common - * @param objectMapperProvider the object mapper provider + * @param swaggerWelcomeCommon the swagger welcome common + * @param objectMapperProvider the object mapper provider */ public SwaggerIndexPageTransformer(SwaggerUiConfigProperties swaggerUiConfig, SwaggerUiOAuthProperties swaggerUiOAuthProperties, - SwaggerUiConfigParameters swaggerUiConfigParameters, SwaggerWelcomeCommon swaggerWelcomeCommon, ObjectMapperProvider objectMapperProvider) { - super(swaggerUiConfig, swaggerUiOAuthProperties, swaggerUiConfigParameters, objectMapperProvider); + SwaggerWelcomeCommon swaggerWelcomeCommon, ObjectMapperProvider objectMapperProvider) { + super(swaggerUiConfig, swaggerUiOAuthProperties, objectMapperProvider); this.swaggerWelcomeCommon = swaggerWelcomeCommon; } @Override public Resource transform(HttpServletRequest request, Resource resource, ResourceTransformerChain transformerChain) throws IOException { - if (swaggerUiConfigParameters.getConfigUrl() == null) - swaggerWelcomeCommon.buildFromCurrentContextPath(request); - + SwaggerUiConfigParameters swaggerUiConfigParameters = new SwaggerUiConfigParameters(swaggerUiConfig); + swaggerWelcomeCommon.buildFromCurrentContextPath(swaggerUiConfigParameters, request); + final AntPathMatcher antPathMatcher = new AntPathMatcher(); boolean isIndexFound = antPathMatcher.match("**/swagger-ui/**/" + SWAGGER_INITIALIZER_JS, resource.getURL().toString()); if (isIndexFound) { - String html = defaultTransformations(resource.getInputStream()); + String html = defaultTransformations(swaggerUiConfigParameters, resource.getInputStream()); return new TransformedResource(resource, html.getBytes(StandardCharsets.UTF_8)); } else diff --git a/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerIndexTransformer.java b/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerIndexTransformer.java index 6e1f911a9..442aaf01c 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerIndexTransformer.java +++ b/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerIndexTransformer.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webmvc.ui; @@ -28,6 +30,7 @@ /** * The type Swagger index page transformer. + * * @author pverdage */ public interface SwaggerIndexTransformer extends ResourceTransformer { diff --git a/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerResourceResolver.java b/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerResourceResolver.java index 4a980f69b..2135654ea 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerResourceResolver.java +++ b/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerResourceResolver.java @@ -1,21 +1,49 @@ -package org.springdoc.webmvc.ui; +/* + * + * * + * * * + * * * * + * * * * * + * * * * * * 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. + * * * * * + * * * * + * * * + * * + * + */ -import java.util.List; +package org.springdoc.webmvc.ui; -import jakarta.servlet.http.HttpServletRequest; import org.springdoc.core.properties.SwaggerUiConfigProperties; -import org.springdoc.ui.AbstractSwaggerResourceResolver; -import org.springframework.core.io.Resource; -import org.springframework.web.servlet.resource.ResourceResolver; -import org.springframework.web.servlet.resource.ResourceResolverChain; +import org.springframework.lang.Nullable; +import org.springframework.web.servlet.resource.LiteWebJarsResourceResolver; + +import static org.springdoc.ui.SwaggerResourceResolverUtils.findSwaggerResourcePath; /** * The type Web jars version resource resolver. * * @author bnasslahsen */ -public class SwaggerResourceResolver extends AbstractSwaggerResourceResolver implements ResourceResolver { +public class SwaggerResourceResolver extends LiteWebJarsResourceResolver { + + /** + * The Swagger ui config properties. + */ + private final SwaggerUiConfigProperties swaggerUiConfigProperties; /** * Instantiates a new Web jars version resource resolver. @@ -23,27 +51,22 @@ public class SwaggerResourceResolver extends AbstractSwaggerResourceResolver imp * @param swaggerUiConfigProperties the swagger ui config properties */ public SwaggerResourceResolver(SwaggerUiConfigProperties swaggerUiConfigProperties) { - super(swaggerUiConfigProperties); + this.swaggerUiConfigProperties = swaggerUiConfigProperties; } + /** + * Find web jar resource path string. + * + * @param pathStr the path + * @return the string + */ + @Nullable @Override - public Resource resolveResource(HttpServletRequest request, String requestPath, List locations, ResourceResolverChain chain) { - Resource resolved = chain.resolveResource(request, requestPath, locations); - if (resolved == null) { - String webJarResourcePath = findWebJarResourcePath(requestPath); - if (webJarResourcePath != null) - return chain.resolveResource(request, webJarResourcePath, locations); - } - return resolved; } - - @Override - public String resolveUrlPath(String resourcePath, List locations, ResourceResolverChain chain) { - String path = chain.resolveUrlPath(resourcePath, locations); - if (path == null) { - String webJarResourcePath = findWebJarResourcePath(resourcePath); - if (webJarResourcePath != null) - return chain.resolveUrlPath(webJarResourcePath, locations); - } - return path; + protected String findWebJarResourcePath(String pathStr) { + String resourcePath = super.findWebJarResourcePath(pathStr); + if(resourcePath == null) + return findSwaggerResourcePath(pathStr, swaggerUiConfigProperties.getVersion()); + return resourcePath; } + } \ No newline at end of file diff --git a/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerUiHome.java b/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerUiHome.java index f7ca92520..c17c55fe9 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerUiHome.java +++ b/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerUiHome.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webmvc.ui; @@ -42,9 +44,15 @@ @Controller public class SwaggerUiHome { + /** + * The Swagger ui path. + */ @Value(SWAGGER_UI_PATH) private String swaggerUiPath; + /** + * The Mvc servlet path. + */ @Value(MVC_SERVLET_PATH) private String mvcServletPath; diff --git a/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerWebMvcConfigurer.java b/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerWebMvcConfigurer.java index 8a11ea445..7fb695971 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerWebMvcConfigurer.java +++ b/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerWebMvcConfigurer.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webmvc.ui; @@ -27,7 +29,7 @@ import java.util.List; import java.util.Optional; -import org.springdoc.core.properties.SwaggerUiConfigParameters; +import org.springdoc.core.properties.SwaggerUiConfigProperties; import org.springdoc.core.providers.ActuatorProvider; import org.springframework.format.FormatterRegistry; @@ -57,15 +59,11 @@ /** * The type Swagger web mvc configurer. + * * @author bnasslahsen */ public class SwaggerWebMvcConfigurer implements WebMvcConfigurer { - /** - * The Swagger path. - */ - private final String swaggerPath; - /** * The Swagger index transformer. */ @@ -76,6 +74,10 @@ public class SwaggerWebMvcConfigurer implements WebMvcConfigurer { */ private final Optional actuatorProvider; + /** + * The Swagger ui config properties. + */ + private final SwaggerUiConfigProperties swaggerUiConfigProperties; /** * The Swagger resource resolver. @@ -85,23 +87,24 @@ public class SwaggerWebMvcConfigurer implements WebMvcConfigurer { /** * Instantiates a new Swagger web mvc configurer. * - * @param swaggerUiConfigParameters the swagger ui calculated config - * @param swaggerIndexTransformer the swagger index transformer - * @param actuatorProvider the actuator provider - * @param swaggerResourceResolver the swagger resource resolver + * @param swaggerUiConfigProperties the swagger ui calculated config + * @param swaggerIndexTransformer the swagger index transformer + * @param actuatorProvider the actuator provider + * @param swaggerResourceResolver the swagger resource resolver */ - public SwaggerWebMvcConfigurer(SwaggerUiConfigParameters swaggerUiConfigParameters, + public SwaggerWebMvcConfigurer(SwaggerUiConfigProperties swaggerUiConfigProperties, SwaggerIndexTransformer swaggerIndexTransformer, Optional actuatorProvider, SwaggerResourceResolver swaggerResourceResolver) { - this.swaggerPath = swaggerUiConfigParameters.getPath(); this.swaggerIndexTransformer = swaggerIndexTransformer; this.actuatorProvider = actuatorProvider; this.swaggerResourceResolver = swaggerResourceResolver; + this.swaggerUiConfigProperties = swaggerUiConfigProperties; } @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { StringBuilder uiRootPath = new StringBuilder(); + String swaggerPath = swaggerUiConfigProperties.getPath(); if (swaggerPath.contains(DEFAULT_PATH_SEPARATOR)) uiRootPath.append(swaggerPath, 0, swaggerPath.lastIndexOf(DEFAULT_PATH_SEPARATOR)); if (actuatorProvider.isPresent() && actuatorProvider.get().isUseManagementPort()) diff --git a/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerWelcomeActuator.java b/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerWelcomeActuator.java index 521769c26..567f385a0 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerWelcomeActuator.java +++ b/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerWelcomeActuator.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webmvc.ui; @@ -50,6 +52,9 @@ @ControllerEndpoint(id = DEFAULT_SWAGGER_UI_ACTUATOR_PATH) public class SwaggerWelcomeActuator extends SwaggerWelcomeCommon { + /** + * The constant SWAGGER_CONFIG_ACTUATOR_URL. + */ private static final String SWAGGER_CONFIG_ACTUATOR_URL = DEFAULT_PATH_SEPARATOR + SWAGGER_CONFIG_FILE; /** @@ -59,13 +64,13 @@ public class SwaggerWelcomeActuator extends SwaggerWelcomeCommon { /** * Instantiates a new Swagger welcome. - * @param swaggerUiConfig the swagger ui config - * @param springDocConfigProperties the spring doc config properties - * @param swaggerUiConfigParameters the swagger ui config parameters - * @param webEndpointProperties the web endpoint properties + * + * @param swaggerUiConfig the swagger ui config + * @param springDocConfigProperties the swagger ui config parameters + * @param webEndpointProperties the web endpoint properties */ - public SwaggerWelcomeActuator(SwaggerUiConfigProperties swaggerUiConfig, SpringDocConfigProperties springDocConfigProperties, SwaggerUiConfigParameters swaggerUiConfigParameters, WebEndpointProperties webEndpointProperties) { - super(swaggerUiConfig, springDocConfigProperties, swaggerUiConfigParameters); + public SwaggerWelcomeActuator(SwaggerUiConfigProperties swaggerUiConfig, SpringDocConfigProperties springDocConfigProperties,WebEndpointProperties webEndpointProperties) { + super(swaggerUiConfig, springDocConfigProperties); this.webEndpointProperties = webEndpointProperties; } @@ -97,27 +102,27 @@ public Map openapiJson(HttpServletRequest request) { } @Override - protected void calculateUiRootPath(StringBuilder... sbUrls) { + protected void calculateUiRootPath(SwaggerUiConfigParameters swaggerUiConfigParameters, StringBuilder... sbUrls) { StringBuilder sbUrl = new StringBuilder(); sbUrl.append(webEndpointProperties.getBasePath()); - calculateUiRootCommon(sbUrl, sbUrls); + calculateUiRootCommon(swaggerUiConfigParameters, sbUrl, sbUrls); } @Override - protected String buildApiDocUrl() { - return buildUrl(contextPath + webEndpointProperties.getBasePath(), DEFAULT_API_DOCS_ACTUATOR_URL); + protected void buildApiDocUrl(SwaggerUiConfigParameters swaggerUiConfigParameters) { + swaggerUiConfigParameters.setApiDocsUrl(buildUrl(swaggerUiConfigParameters.getContextPath() + webEndpointProperties.getBasePath(), DEFAULT_API_DOCS_ACTUATOR_URL)); } @Override - protected String buildUrlWithContextPath(String swaggerUiUrl) { - return buildUrl(contextPath + webEndpointProperties.getBasePath(), swaggerUiUrl); + protected String buildUrlWithContextPath(SwaggerUiConfigParameters swaggerUiConfigParameters, String swaggerUiUrl) { + return buildUrl(swaggerUiConfigParameters.getContextPath() + webEndpointProperties.getBasePath(), swaggerUiUrl); } @Override - protected String buildSwaggerConfigUrl() { - return contextPath + webEndpointProperties.getBasePath() + protected void buildSwaggerConfigUrl(SwaggerUiConfigParameters swaggerUiConfigParameters) { + swaggerUiConfigParameters.setConfigUrl(swaggerUiConfigParameters.getContextPath() + webEndpointProperties.getBasePath() + DEFAULT_PATH_SEPARATOR + DEFAULT_SWAGGER_UI_ACTUATOR_PATH - + DEFAULT_PATH_SEPARATOR + SWAGGER_CONFIG_FILE; + + DEFAULT_PATH_SEPARATOR + SWAGGER_CONFIG_FILE); } } diff --git a/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerWelcomeCommon.java b/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerWelcomeCommon.java index bd236c693..a417ffa39 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerWelcomeCommon.java +++ b/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerWelcomeCommon.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webmvc.ui; @@ -40,18 +42,18 @@ /** * The type Swagger welcome common. + * * @author bnasslashen */ public abstract class SwaggerWelcomeCommon extends AbstractSwaggerWelcome { /** * Instantiates a new Abstract swagger welcome. - * @param swaggerUiConfig the swagger ui config + * + * @param swaggerUiConfig the swagger ui config * @param springDocConfigProperties the spring doc config properties - * @param swaggerUiConfigParameters the swagger ui config parameters */ - public SwaggerWelcomeCommon(SwaggerUiConfigProperties swaggerUiConfig, SpringDocConfigProperties springDocConfigProperties, - SwaggerUiConfigParameters swaggerUiConfigParameters) { - super(swaggerUiConfig, springDocConfigProperties, swaggerUiConfigParameters); + protected SwaggerWelcomeCommon(SwaggerUiConfigProperties swaggerUiConfig, SpringDocConfigProperties springDocConfigProperties) { + super(swaggerUiConfig, springDocConfigProperties); } /** @@ -61,9 +63,10 @@ public SwaggerWelcomeCommon(SwaggerUiConfigProperties swaggerUiConfig, SpringDoc * @return the response entity */ protected ResponseEntity redirectToUi(HttpServletRequest request) { - buildFromCurrentContextPath(request); - String sbUrl = contextPath + swaggerUiConfigParameters.getUiRootPath() + getSwaggerUiUrl(); - UriComponentsBuilder uriBuilder = getUriComponentsBuilder(sbUrl); + SwaggerUiConfigParameters swaggerUiConfigParameters = new SwaggerUiConfigParameters(swaggerUiConfig); + buildFromCurrentContextPath(swaggerUiConfigParameters, request); + String sbUrl = swaggerUiConfigParameters.getContextPath() + swaggerUiConfigParameters.getUiRootPath() + getSwaggerUiUrl(); + UriComponentsBuilder uriBuilder = getUriComponentsBuilder(swaggerUiConfigParameters, sbUrl); // forward all queryParams from original request request.getParameterMap().forEach(uriBuilder::queryParam); @@ -80,12 +83,13 @@ protected ResponseEntity redirectToUi(HttpServletRequest request) { * @return the map */ protected Map openapiJson(HttpServletRequest request) { - buildFromCurrentContextPath(request); + SwaggerUiConfigParameters swaggerUiConfigParameters = new SwaggerUiConfigParameters(swaggerUiConfig); + buildFromCurrentContextPath(swaggerUiConfigParameters, request); return swaggerUiConfigParameters.getConfigParameters(); } @Override - protected void calculateOauth2RedirectUrl(UriComponentsBuilder uriComponentsBuilder) { + protected void calculateOauth2RedirectUrl(SwaggerUiConfigParameters swaggerUiConfigParameters, UriComponentsBuilder uriComponentsBuilder) { if (StringUtils.isBlank(swaggerUiConfig.getOauth2RedirectUrl()) || !swaggerUiConfigParameters.isValidUrl(swaggerUiConfig.getOauth2RedirectUrl())) swaggerUiConfigParameters.setOauth2RedirectUrl(uriComponentsBuilder .path(swaggerUiConfigParameters.getUiRootPath()) @@ -95,11 +99,13 @@ protected void calculateOauth2RedirectUrl(UriComponentsBuilder uriComponentsBuil /** * From current context path. * - * @param request the request + * @param swaggerUiConfigParameters the swagger ui config parameters + * @param request the request */ - void buildFromCurrentContextPath(HttpServletRequest request) { - super.init(); - contextPath = request.getContextPath(); - buildConfigUrl(ServletUriComponentsBuilder.fromCurrentContextPath()); + void buildFromCurrentContextPath(SwaggerUiConfigParameters swaggerUiConfigParameters, HttpServletRequest request) { + super.init(swaggerUiConfigParameters); + swaggerUiConfigParameters.setContextPath(request.getContextPath()); + buildConfigUrl(swaggerUiConfigParameters, ServletUriComponentsBuilder.fromCurrentContextPath()); } + } diff --git a/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerWelcomeWebMvc.java b/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerWelcomeWebMvc.java index 84220d656..e6aa41c6a 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerWelcomeWebMvc.java +++ b/springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerWelcomeWebMvc.java @@ -3,23 +3,25 @@ * * * * * * * * * - * * * * * 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 + * * * * * * 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. * * * * * - * * * * * 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 org.springdoc.webmvc.ui; @@ -44,6 +46,7 @@ /** * The type Swagger welcome. + * * @author bnasslahsen */ @Controller @@ -61,88 +64,55 @@ public class SwaggerWelcomeWebMvc extends SwaggerWelcomeCommon { @Value(MVC_SERVLET_PATH) private String mvcServletPath; - /** - * The Path prefix. - */ - private String pathPrefix; - /** * Instantiates a new Swagger welcome web mvc. - * @param swaggerUiConfig the swagger ui config + * + * @param swaggerUiConfig the swagger ui config * @param springDocConfigProperties the spring doc config properties - * @param swaggerUiConfigParameters the swagger ui config parameters - * @param springWebProvider the spring web provider + * @param springWebProvider the spring web provider */ - public SwaggerWelcomeWebMvc(SwaggerUiConfigProperties swaggerUiConfig, SpringDocConfigProperties springDocConfigProperties, SwaggerUiConfigParameters swaggerUiConfigParameters, SpringWebProvider springWebProvider) { - super(swaggerUiConfig, springDocConfigProperties, swaggerUiConfigParameters); + public SwaggerWelcomeWebMvc(SwaggerUiConfigProperties swaggerUiConfig, SpringDocConfigProperties springDocConfigProperties, SpringWebProvider springWebProvider) { + super(swaggerUiConfig, springDocConfigProperties); this.springWebProvider = springWebProvider; } - - /** - * Redirect to ui string. - * - * @param request the request - * @return the string - */ + @Operation(hidden = true) @GetMapping(SWAGGER_UI_PATH) @Override public ResponseEntity redirectToUi(HttpServletRequest request) { return super.redirectToUi(request); } - - /** - * Calculate ui root path. - * - * @param sbUrls the sb urls - */ + @Override - protected void calculateUiRootPath(StringBuilder... sbUrls) { + protected void calculateUiRootPath(SwaggerUiConfigParameters swaggerUiConfigParameters, StringBuilder... sbUrls) { StringBuilder sbUrl = new StringBuilder(); if (SpringDocUtils.isValidPath(mvcServletPath)) sbUrl.append(mvcServletPath); - calculateUiRootCommon(sbUrl, sbUrls); + calculateUiRootCommon(swaggerUiConfigParameters, sbUrl, sbUrls); } - - /** - * Build url string. - * - * @param contextPath the context path - * @param docsUrl the docs url - * @return the string - */ + @Override protected String buildUrl(String contextPath, final String docsUrl) { if (SpringDocUtils.isValidPath(mvcServletPath)) contextPath += mvcServletPath; return super.buildUrl(contextPath, docsUrl); } - - /** - * Build api doc url string. - * - * @return the string - */ + @Override - protected String buildApiDocUrl() { - return buildUrlWithContextPath(springDocConfigProperties.getApiDocs().getPath()); + protected void buildApiDocUrl(SwaggerUiConfigParameters swaggerUiConfigParameters) { + swaggerUiConfigParameters.setApiDocsUrl(buildUrlWithContextPath(swaggerUiConfigParameters, springDocConfigProperties.getApiDocs().getPath())); } @Override - protected String buildUrlWithContextPath(String swaggerUiUrl) { - if (this.pathPrefix == null) - this.pathPrefix = springWebProvider.findPathPrefix(springDocConfigProperties); - return buildUrl(contextPath + pathPrefix, swaggerUiUrl); + protected String buildUrlWithContextPath(SwaggerUiConfigParameters swaggerUiConfigParameters, String swaggerUiUrl) { + if (swaggerUiConfigParameters.getPathPrefix() == null) + swaggerUiConfigParameters.setPathPrefix(springWebProvider.findPathPrefix(springDocConfigProperties)); + return buildUrl(swaggerUiConfigParameters.getContextPath() + swaggerUiConfigParameters.getPathPrefix(), swaggerUiUrl); } - - /** - * Build swagger config url string. - * - * @return the string - */ + @Override - protected String buildSwaggerConfigUrl() { - return apiDocsUrl + DEFAULT_PATH_SEPARATOR + SWAGGER_CONFIG_FILE; + protected void buildSwaggerConfigUrl(SwaggerUiConfigParameters swaggerUiConfigParameters) { + swaggerUiConfigParameters.setConfigUrl(swaggerUiConfigParameters.getApiDocsUrl() + DEFAULT_PATH_SEPARATOR + SWAGGER_CONFIG_FILE); } } \ No newline at end of file diff --git a/springdoc-openapi-starter-webmvc-ui/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/springdoc-openapi-starter-webmvc-ui/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 74e2072b9..6ee14cfc1 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/springdoc-openapi-starter-webmvc-ui/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1,5 +1,4 @@ org.springdoc.webmvc.ui.SwaggerConfig org.springdoc.core.properties.SwaggerUiConfigProperties -org.springdoc.core.properties.SwaggerUiConfigParameters org.springdoc.core.properties.SwaggerUiOAuthProperties org.springdoc.core.configuration.SpringDocUIConfiguration \ No newline at end of file diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/AbstractSpringDocActuatorTest.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/AbstractSpringDocActuatorTest.java index a8920cba3..96a8a9545 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/AbstractSpringDocActuatorTest.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/AbstractSpringDocActuatorTest.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/AbstractSpringDocTest.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/AbstractSpringDocTest.java index 11fb19a40..a6cd22a4a 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/AbstractSpringDocTest.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/AbstractSpringDocTest.java @@ -18,6 +18,7 @@ package test.org.springdoc.ui; +import org.apache.commons.lang3.StringUtils; import org.springdoc.core.utils.Constants; import org.springframework.boot.test.context.SpringBootTest; @@ -33,25 +34,31 @@ public abstract class AbstractSpringDocTest extends AbstractCommonTest { public static String className; - protected void checkJS(String fileName, String uri) throws Exception { - MvcResult mvcResult = mockMvc.perform(get(uri)).andExpect(status().isOk()).andReturn(); + protected void checkJS(String fileName, String uri, String contextPath) throws Exception { + MvcResult mvcResult = mockMvc.perform(get(contextPath+uri).contextPath(contextPath)).andExpect(status().isOk()).andReturn(); String transformedIndex = mvcResult.getResponse().getContentAsString(); assertTrue(transformedIndex.contains("window.ui")); assertEquals("no-store", mvcResult.getResponse().getHeader("Cache-Control")); assertEquals(this.getContent(fileName), transformedIndex.replace("\r", "")); } - protected void chekJS(String fileName) throws Exception { - checkJS(fileName, Constants.SWAGGER_INITIALIZER_URL); + protected void chekJS(String fileName,String contextPath) throws Exception { + checkJS(fileName, Constants.SWAGGER_INITIALIZER_URL,contextPath); + } + + protected void chekJS(String contextPath) throws Exception { + className = getClass().getSimpleName(); + String testNumber = className.replaceAll("[^0-9]", ""); + checkJS("results/app" + testNumber, Constants.SWAGGER_INITIALIZER_URL,contextPath); } protected void chekJS() throws Exception { className = getClass().getSimpleName(); String testNumber = className.replaceAll("[^0-9]", ""); - checkJS("results/app" + testNumber, Constants.SWAGGER_INITIALIZER_URL); + checkJS("results/app" + testNumber, Constants.SWAGGER_INITIALIZER_URL, StringUtils.EMPTY); } - protected void checkJSResult(String fileName, String htmlResult) throws Exception { + protected void checkJSResult(String fileName, String htmlResult) { assertTrue(htmlResult.contains("window.ui")); assertEquals(this.getContent(fileName), htmlResult.replace("\r", "")); } diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocApp1Test.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocApp1Test.java index 2b24c0779..a1ddb33fb 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocApp1Test.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocApp1Test.java @@ -32,14 +32,14 @@ public class SpringDocApp1Test extends AbstractSpringDocTest { @Test - public void shouldDisplaySwaggerUiPage() throws Exception { + void shouldDisplaySwaggerUiPage() throws Exception { mockMvc.perform(get("/swagger-ui/index.html")) .andExpect(status().isOk()) .andExpect(content().string(containsString("Swagger UI"))); } @Test - public void originalIndex() throws Exception { + void originalIndex() throws Exception { super.chekJS(); } diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocAppRedirectWithPrefixTest.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocAppRedirectWithPrefixTest.java index fdf58ea94..36d909224 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocAppRedirectWithPrefixTest.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocAppRedirectWithPrefixTest.java @@ -18,6 +18,7 @@ package test.org.springdoc.ui.app1; +import org.apache.commons.lang3.StringUtils; import org.junit.jupiter.api.Test; import org.springdoc.core.utils.Constants; import test.org.springdoc.ui.AbstractSpringDocTest; @@ -38,14 +39,14 @@ public class SpringDocAppRedirectWithPrefixTest extends AbstractSpringDocTest { @Test - public void shouldRedirectWithPrefix() throws Exception { + void shouldRedirectWithPrefix() throws Exception { mockMvc.perform(get("/documentation/v3/api-docs/swagger-config")) .andExpect(status().isOk()) .andExpect(jsonPath("validatorUrl", equalTo(""))) .andExpect(jsonPath("oauth2RedirectUrl", equalTo("http://localhost/documentation/swagger-ui/oauth2-redirect.html"))); - super.checkJS("results/app1-prefix", "/documentation" + Constants.SWAGGER_INITIALIZER_URL); + super.checkJS("results/app1-prefix", "/documentation" + Constants.SWAGGER_INITIALIZER_URL, StringUtils.EMPTY); } @SpringBootApplication diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocConfigPathsTest.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocConfigPathsTest.java index 4d35b8312..f707d80cb 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocConfigPathsTest.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocConfigPathsTest.java @@ -40,7 +40,7 @@ public class SpringDocConfigPathsTest extends AbstractSpringDocTest { @Test - public void should_display_swaggerui_page() throws Exception { + void should_display_swaggerui_page() throws Exception { mockMvc.perform(get("/context-path/servlet-path/test/swagger.html").contextPath("/context-path").servletPath("/servlet-path")) .andExpect(status().isFound()); mockMvc.perform(get("/context-path/servlet-path/test/swagger-ui/index.html").contextPath("/context-path").servletPath("/servlet-path")) diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocRedirectDefaultTest.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocRedirectDefaultTest.java index 22862e0ad..38b9afa0f 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocRedirectDefaultTest.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocRedirectDefaultTest.java @@ -30,7 +30,7 @@ public class SpringDocRedirectDefaultTest extends AbstractSpringDocTest { @Test - public void shouldRedirectWithDefaultQueryParams() throws Exception { + void shouldRedirectWithDefaultQueryParams() throws Exception { mockMvc.perform(get("/swagger-ui.html")) .andExpect(status().isFound()) .andExpect(header().string("Location", "/swagger-ui/index.html")); diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocRedirectFilterTest.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocRedirectFilterTest.java index 1543b09cf..25e0048e6 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocRedirectFilterTest.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocRedirectFilterTest.java @@ -32,7 +32,7 @@ public class SpringDocRedirectFilterTest extends AbstractSpringDocTest { @Test - public void shouldRedirectWithConfigUrlIgnoringQueryParams() throws Exception { + void shouldRedirectWithConfigUrlIgnoringQueryParams() throws Exception { mockMvc.perform(get("/swagger-ui.html")) .andExpect(status().isFound()) .andExpect(header().string("Location", "/swagger-ui/index.html")); diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocRedirectOriginalQueryParamsTest.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocRedirectOriginalQueryParamsTest.java index bd8d29e6f..14065e162 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocRedirectOriginalQueryParamsTest.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocRedirectOriginalQueryParamsTest.java @@ -30,7 +30,7 @@ public class SpringDocRedirectOriginalQueryParamsTest extends AbstractSpringDocTest { @Test - public void shouldRedirectWithOriginalQueryParams() throws Exception { + void shouldRedirectWithOriginalQueryParams() throws Exception { mockMvc.perform(get("/swagger-ui.html").queryParam("paramA", "123").queryParam("paramB", "e n c o d e d ! % &")) .andExpect(status().isFound()) .andExpect(header().string("Location", @@ -38,7 +38,7 @@ public void shouldRedirectWithOriginalQueryParams() throws Exception { } @Test - public void shouldRedirectWithOriginalQueryParamsHavingMultipleValues() throws Exception { + void shouldRedirectWithOriginalQueryParamsHavingMultipleValues() throws Exception { mockMvc.perform(get("/swagger-ui.html").queryParam("paramA", "1", "2", "3")) .andExpect(status().isFound()) .andExpect(header().string("Location", diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocSwaggerConfigTest.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocSwaggerConfigTest.java index a4e030b47..fedbb254b 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocSwaggerConfigTest.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocSwaggerConfigTest.java @@ -39,7 +39,7 @@ public class SpringDocSwaggerConfigTest extends AbstractSpringDocActuatorTest { @Test - public void testIndexSwaggerConfig() throws Exception { + void testIndexSwaggerConfig() throws Exception { mockMvc.perform(get("/demo/api/v3/api-docs/swagger-config").contextPath("/demo/api")) .andExpect(status().isOk()) .andExpect(jsonPath("validatorUrl", equalTo(""))) diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocSwaggerConfigWithBothFileGeneratedSpecsTest.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocSwaggerConfigWithBothFileGeneratedSpecsTest.java index d32fd1d8f..201a63717 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocSwaggerConfigWithBothFileGeneratedSpecsTest.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocSwaggerConfigWithBothFileGeneratedSpecsTest.java @@ -46,7 +46,7 @@ public class SpringDocSwaggerConfigWithBothFileGeneratedSpecsTest extends AbstractSpringDocActuatorTest { @Test - public void testIndexSwaggerConfig() throws Exception { + void testIndexSwaggerConfig() throws Exception { mockMvc.perform(get("/demo/api/v3/api-docs/swagger-config").contextPath("/demo/api")) .andExpect(status().isOk()) .andExpect(jsonPath("validatorUrl", equalTo(""))) diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app10/SpringDocApp10Test.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app10/SpringDocApp10Test.java index 3cb104540..a49435e81 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app10/SpringDocApp10Test.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app10/SpringDocApp10Test.java @@ -34,14 +34,14 @@ public class SpringDocApp10Test extends AbstractSpringDocTest { @Test - public void shouldDisplaySwaggerUiPage() throws Exception { + void shouldDisplaySwaggerUiPage() throws Exception { MvcResult mvcResult = mockMvc.perform(get("/swagger-ui/index.html")).andExpect(status().isOk()).andReturn(); String contentAsString = mvcResult.getResponse().getContentAsString(); assertTrue(contentAsString.contains("Swagger UI")); } @Test - public void originalIndex() throws Exception { + void originalIndex() throws Exception { super.chekJS(); } diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app13/SpringDocApp13Test.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app13/SpringDocApp13Test.java index 8f8dd0392..4ef00a02a 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app13/SpringDocApp13Test.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app13/SpringDocApp13Test.java @@ -44,13 +44,13 @@ void testIndex() throws Exception { } @Test - public void testIndexActuator() { + void testIndexActuator() { String contentAsString = actuatorRestTemplate.getForObject("/application/swagger-ui", String.class); assertTrue(contentAsString.contains("Swagger UI")); } @Test - public void testIndexSwaggerConfig() throws Exception { + void testIndexSwaggerConfig() throws Exception { String contentAsString = actuatorRestTemplate.getForObject("/application/swagger-ui/swagger-config", String.class); String expected = getContent("results/app13-1.json"); assertEquals(expected, contentAsString, true); diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app14/SpringDocApp14Test.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app14/SpringDocApp14Test.java index 873b6a0ae..b0974c254 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app14/SpringDocApp14Test.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app14/SpringDocApp14Test.java @@ -44,13 +44,13 @@ void testIndex() throws Exception { } @Test - public void testIndexActuator() { + void testIndexActuator() { String contentAsString = actuatorRestTemplate.getForObject("/application/swagger-ui", String.class); assertTrue(contentAsString.contains("Swagger UI")); } @Test - public void testIndexSwaggerConfig() throws Exception { + void testIndexSwaggerConfig() throws Exception { String contentAsString = actuatorRestTemplate.getForObject("/application/swagger-ui/swagger-config", String.class); String expected = getContent("results/app14-1.json"); assertEquals(expected, contentAsString, true); diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app15/SpringDocApp15Test.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app15/SpringDocApp15Test.java index 49bdf6f3f..d22960442 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app15/SpringDocApp15Test.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app15/SpringDocApp15Test.java @@ -47,13 +47,13 @@ void testIndex() throws Exception { } @Test - public void testIndexActuator() { + void testIndexActuator() { String contentAsString = actuatorRestTemplate.getForObject("/test/application/swagger-ui", String.class); assertTrue(contentAsString.contains("Swagger UI")); } @Test - public void testIndexSwaggerConfig() throws Exception { + void testIndexSwaggerConfig() throws Exception { String contentAsString = actuatorRestTemplate.getForObject("/test/application/swagger-ui/swagger-config", String.class); String expected = getContent("results/app15-1.json"); assertEquals(expected, contentAsString, true); diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app16/SpringDocApp16Test.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app16/SpringDocApp16Test.java index 1f0034452..1e904ba5c 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app16/SpringDocApp16Test.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app16/SpringDocApp16Test.java @@ -47,13 +47,13 @@ void testIndex() throws Exception { } @Test - public void testIndexActuator() { + void testIndexActuator() { String contentAsString = actuatorRestTemplate.getForObject("/test/application/swagger-ui", String.class); assertTrue(contentAsString.contains("Swagger UI")); } @Test - public void testIndexSwaggerConfig() throws Exception { + void testIndexSwaggerConfig() throws Exception { String contentAsString = actuatorRestTemplate.getForObject("/test/application/swagger-ui/swagger-config", String.class); String expected = getContent("results/app16-1.json"); assertEquals(expected, contentAsString, true); diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app18/SpringDocApp18Test.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app18/SpringDocApp18Test.java index 52e486c68..50481e6fe 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app18/SpringDocApp18Test.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app18/SpringDocApp18Test.java @@ -36,7 +36,7 @@ public class SpringDocApp18Test extends AbstractSpringDocTest { @Test - public void testTryItOutEnabled() throws Exception { + void testTryItOutEnabled() throws Exception { mockMvc.perform(get("/v3/api-docs/swagger-config")) .andExpect(status().isOk()) .andExpect(jsonPath("displayOperationId", equalTo(true))) diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app19/SpringDocApp19Test.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app19/SpringDocApp19Test.java index af2b15576..44931db39 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app19/SpringDocApp19Test.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app19/SpringDocApp19Test.java @@ -31,7 +31,7 @@ public class SpringDocApp19Test extends AbstractSpringDocTest { @Test - public void testUseRootPath() throws Exception { + void testUseRootPath() throws Exception { mockMvc.perform(get("/")) .andExpect(status().is3xxRedirection()); mockMvc.perform(get("/swagger-ui.html")) diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app2/SpringDocApp2Test.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app2/SpringDocApp2Test.java index 75676cf5f..4a0fc9163 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app2/SpringDocApp2Test.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app2/SpringDocApp2Test.java @@ -31,7 +31,7 @@ public class SpringDocApp2Test extends AbstractSpringDocTest { @Test - public void test() throws Exception { + void test() throws Exception { mockMvc.perform(get("/swagger-ui/index.html")) .andExpect(status().isNotFound()); } diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app21/SpringDocApp21Test.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app21/SpringDocApp21Test.java index 296ec2b3a..acb8278d0 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app21/SpringDocApp21Test.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app21/SpringDocApp21Test.java @@ -32,7 +32,7 @@ public class SpringDocApp21Test extends AbstractSpringDocTest { @Test - public void testAddSwaggerUiVersionToPath() throws Exception { + void testAddSwaggerUiVersionToPath() throws Exception { mockMvc.perform(get("/swagger-ui.html")) .andExpect(status().isFound()) .andExpect(header().string("Location", "/swagger-ui/index.html")); @@ -41,7 +41,7 @@ public void testAddSwaggerUiVersionToPath() throws Exception { } @Test - public void shouldRedirectWithPrefix() throws Exception { + void shouldRedirectWithPrefix() throws Exception { mockMvc.perform(get("/rest/v3/api-docs/swagger-config")) .andExpect(status().isOk()) .andExpect(jsonPath("validatorUrl", equalTo(""))) diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app22/SpringDocApp22Test.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app22/SpringDocApp22Test.java index 7b4d384e1..8dee4261b 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app22/SpringDocApp22Test.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app22/SpringDocApp22Test.java @@ -36,7 +36,7 @@ public class SpringDocApp22Test extends AbstractSpringDocTest { @Test - public void test_apidocs_disabled() throws Exception { + void test_apidocs_disabled() throws Exception { mockMvc.perform(get("/api-docs/swagger-config")) .andExpect(status().isOk()) .andExpect(jsonPath("url", equalTo("/api-docs/xxx/v1/openapi.yml"))) diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app22/SpringDocTestApp.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app22/SpringDocTestApp.java index 1e4474372..71c101737 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app22/SpringDocTestApp.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app22/SpringDocTestApp.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app24/SpringDocApp24Test.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app24/SpringDocApp24Test.java index 0164f2268..d275e653c 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app24/SpringDocApp24Test.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app24/SpringDocApp24Test.java @@ -35,7 +35,7 @@ public class SpringDocApp24Test extends AbstractSpringDocTest { @Test - public void shouldRedirectWithConfigUrlIgnoringQueryParams() throws Exception { + void shouldRedirectWithConfigUrlIgnoringQueryParams() throws Exception { mockMvc.perform(get("/swagger-ui.html")) .andExpect(status().isFound()) .andExpect(header().string("Location", "/swagger-ui/index.html")); diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app25/SpringDocApp25Test.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app25/SpringDocApp25Test.java index 3b77ca896..68585c947 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app25/SpringDocApp25Test.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app25/SpringDocApp25Test.java @@ -37,7 +37,7 @@ public class SpringDocApp25Test extends AbstractSpringDocTest { @Test - public void shouldRedirectWithConfiguredParams() throws Exception { + void shouldRedirectWithConfiguredParams() throws Exception { mockMvc.perform(get("/swagger-ui.html")) .andExpect(status().isFound()) .andExpect(header().string("Location", "/swagger-ui/index.html")); diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app26/SpringDocApp26Test.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app26/SpringDocApp26Test.java index cc136644d..6046399e3 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app26/SpringDocApp26Test.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app26/SpringDocApp26Test.java @@ -32,7 +32,7 @@ public class SpringDocApp26Test extends AbstractSpringDocTest { @Test - public void shouldRedirectWithBaseLayout() throws Exception { + void shouldRedirectWithBaseLayout() throws Exception { mockMvc.perform(get("/swagger-ui.html")) .andExpect(status().isFound()) .andExpect(header().string("Location", "/swagger-ui/index.html")); diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app27/SpringDocApp27Test.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app27/SpringDocApp27Test.java index 3da48e109..5b2d08982 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app27/SpringDocApp27Test.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app27/SpringDocApp27Test.java @@ -34,7 +34,7 @@ public class SpringDocApp27Test extends AbstractSpringDocTest { @Test - public void shouldRedirectWithQueryParams() throws Exception { + void shouldRedirectWithQueryParams() throws Exception { mockMvc.perform(get("/swagger-ui.html")) .andExpect(status().isFound()) .andExpect(header().string("Location", "/swagger-ui/index.html?operationsSorter=method&configUrl=/v3/api-docs/swagger-config")); diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app28/SpringDocApp28Test.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app28/SpringDocApp28Test.java index 722632f35..34209ecf8 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app28/SpringDocApp28Test.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app28/SpringDocApp28Test.java @@ -32,7 +32,7 @@ public class SpringDocApp28Test extends AbstractSpringDocTest { @Test - public void shouldRedirectWithFilter() throws Exception { + void shouldRedirectWithFilter() throws Exception { mockMvc.perform(get("/swagger-ui.html")) .andExpect(status().isFound()) .andExpect(header().string("Location", "/swagger-ui/index.html")); diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app29/SpringDocApp29Test.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app29/SpringDocApp29Test.java index 4a7b1d589..84659252c 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app29/SpringDocApp29Test.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app29/SpringDocApp29Test.java @@ -36,7 +36,7 @@ public class SpringDocApp29Test extends AbstractSpringDocTest { @Test - public void test_url_with_context() throws Exception { + void test_url_with_context() throws Exception { mockMvc.perform(get("/context-path/v3/api-docs/swagger-config").contextPath("/context-path")) .andExpect(status().isOk()) .andExpect(jsonPath("url", equalTo("/context-path/api-docs/xxx/v1/openapi.yml"))) diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app3/SpringDocApp3Test.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app3/SpringDocApp3Test.java index f510f2f15..49fe578a9 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app3/SpringDocApp3Test.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app3/SpringDocApp3Test.java @@ -35,7 +35,7 @@ public class SpringDocApp3Test extends AbstractSpringDocTest { @Test - public void app_loads_ok() throws Exception { + void app_loads_ok() throws Exception { this.mockMvc.perform(MockMvcRequestBuilders.get("/")) .andExpect(MockMvcResultMatchers.status().isOk()) .andExpect(MockMvcResultMatchers.forwardedUrl("index.html")); @@ -46,7 +46,7 @@ public void app_loads_ok() throws Exception { } @Test - public void swagger_config_for_no_groups() throws Exception { + void swagger_config_for_no_groups() throws Exception { mockMvc.perform(get("/v3/api-docs/swagger-config")) .andExpect(status().isOk()) .andExpect(jsonPath("configUrl", equalTo("/v3/api-docs/swagger-config"))) diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app30/SpringDocApp30Test.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app30/SpringDocApp30Test.java index 83734b3dd..6354ba688 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app30/SpringDocApp30Test.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app30/SpringDocApp30Test.java @@ -37,7 +37,7 @@ public class SpringDocApp30Test extends AbstractSpringDocTest { @Test - public void test_urls_with_context() throws Exception { + void test_urls_with_context() throws Exception { mockMvc.perform(get("/context-path/v3/api-docs/swagger-config").contextPath("/context-path")) .andExpect(status().isOk()) .andExpect(jsonPath("url").doesNotExist()) diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app31/SpringDocApp31Test.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app31/SpringDocApp31Test.java index 9972d91b8..5d4a007f4 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app31/SpringDocApp31Test.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app31/SpringDocApp31Test.java @@ -36,7 +36,7 @@ public class SpringDocApp31Test extends AbstractSpringDocTest { @Test - public void test_query_config() throws Exception { + void test_query_config() throws Exception { mockMvc.perform(get("/api/")) .andExpect(status().isFound()) .andExpect(header().string("Location", "/api/swagger-ui/index.html?showExtensions=true&configUrl=/v3/api-docs/swagger-config")); diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app32/SpringDocBehindProxyTest.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app32/SpringDocBehindProxyTest.java index 2cdd36480..7d4e99c67 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app32/SpringDocBehindProxyTest.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app32/SpringDocBehindProxyTest.java @@ -18,6 +18,9 @@ package test.org.springdoc.ui.app32; +import java.util.concurrent.CompletableFuture; +import java.util.stream.IntStream; + import org.junit.jupiter.api.Test; import test.org.springdoc.ui.AbstractSpringDocTest; @@ -39,13 +42,13 @@ public class SpringDocBehindProxyTest extends AbstractSpringDocTest { private static final String X_FORWARD_PREFIX = "/path/prefix"; @Test - public void shouldServeSwaggerUIAtDefaultPath() throws Exception { + void shouldServeSwaggerUIAtDefaultPath() throws Exception { mockMvc.perform(get("/swagger-ui/index.html")) .andExpect(status().isOk()); } @Test - public void shouldReturnCorrectInitializerJS() throws Exception { + void shouldReturnCorrectInitializerJS() throws Exception { mockMvc.perform(get("/swagger-ui/swagger-initializer.js") .header("X-Forwarded-Prefix", X_FORWARD_PREFIX)) .andExpect(status().isOk()) @@ -55,7 +58,7 @@ public void shouldReturnCorrectInitializerJS() throws Exception { } @Test - public void shouldCalculateOauthRedirectBehindProxy() throws Exception { + void shouldCalculateOauthRedirectBehindProxy() throws Exception { mockMvc.perform(get("/v3/api-docs/swagger-config") .header("X-Forwarded-Proto", "https") .header("X-Forwarded-Host", "proxy-host") @@ -67,7 +70,7 @@ public void shouldCalculateOauthRedirectBehindProxy() throws Exception { } @Test - public void shouldCalculateUrlsBehindProxy() throws Exception { + void shouldCalculateUrlsBehindProxy() throws Exception { mockMvc.perform(get("/v3/api-docs/swagger-config") .header("X-Forwarded-Prefix", X_FORWARD_PREFIX)) .andExpect(status().isOk()) @@ -79,6 +82,45 @@ public void shouldCalculateUrlsBehindProxy() throws Exception { )); } + @Test + void shouldReturnCorrectInitializerJSWhenChangingForwardedPrefixHeader() throws Exception { + var tasks = IntStream.range(0, 10).mapToObj(i -> CompletableFuture.runAsync(() -> { + try { + mockMvc.perform(get("/swagger-ui/swagger-initializer.js") + .header("X-Forwarded-Prefix", "/path/prefix" + i)) + .andExpect(status().isOk()) + .andExpect(content().string( + containsString("\"configUrl\" : \"/path/prefix" + i + "/v3/api-docs/swagger-config\",") + )); + } catch (Exception e) { + throw new RuntimeException(e); + } + })).toArray(CompletableFuture[]::new); + + CompletableFuture.allOf(tasks).join(); + } + + @Test + void shouldCalculateUrlsBehindProxyWhenChangingForwardedPrefixHeader() { + var tasks = IntStream.range(0, 10).mapToObj(i -> CompletableFuture.runAsync(() -> { + try { + mockMvc.perform(get("/v3/api-docs/swagger-config") + .header("X-Forwarded-Prefix", X_FORWARD_PREFIX + i)) + .andExpect(status().isOk()) + .andExpect(jsonPath("url", + equalTo("/path/prefix" + i + "/v3/api-docs") + )) + .andExpect(jsonPath("configUrl", + equalTo("/path/prefix" + i + "/v3/api-docs/swagger-config") + )); + } catch (Exception e) { + throw new RuntimeException(e); + } + })).toArray(CompletableFuture[]::new); + + CompletableFuture.allOf(tasks).join(); + } + @SpringBootApplication static class SpringDocTestApp {} } diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app32/SpringDocBehindProxyWithCustomUIPathTest.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app32/SpringDocBehindProxyWithCustomUIPathTest.java index 43a1af643..5f637650e 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app32/SpringDocBehindProxyWithCustomUIPathTest.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app32/SpringDocBehindProxyWithCustomUIPathTest.java @@ -41,7 +41,7 @@ public class SpringDocBehindProxyWithCustomUIPathTest extends AbstractSpringDocT private static final String X_FORWARD_PREFIX = "/path/prefix"; @Test - public void shouldRedirectSwaggerUIFromCustomPath() throws Exception { + void shouldRedirectSwaggerUIFromCustomPath() throws Exception { mockMvc.perform(get("/foo/documentation/swagger.html") .header("X-Forwarded-Prefix", X_FORWARD_PREFIX)) .andExpect(status().isFound()) @@ -49,7 +49,7 @@ public void shouldRedirectSwaggerUIFromCustomPath() throws Exception { } @Test - public void shouldReturnCorrectInitializerJS() throws Exception { + void shouldReturnCorrectInitializerJS() throws Exception { mockMvc.perform(get("/foo/documentation/swagger-ui/swagger-initializer.js") .header("X-Forwarded-Prefix", X_FORWARD_PREFIX)) .andExpect(status().isOk()) @@ -59,7 +59,7 @@ public void shouldReturnCorrectInitializerJS() throws Exception { } @Test - public void shouldCalculateUrlsBehindProxy() throws Exception { + void shouldCalculateUrlsBehindProxy() throws Exception { mockMvc.perform(get("/v3/api-docs/swagger-config") .header("X-Forwarded-Prefix", X_FORWARD_PREFIX)) .andExpect(status().isOk()) diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app32/SpringDocBehindProxyWithCustomUIPathWithApiDocsTest.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app32/SpringDocBehindProxyWithCustomUIPathWithApiDocsTest.java index ea6ce57a4..aa069ea58 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app32/SpringDocBehindProxyWithCustomUIPathWithApiDocsTest.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app32/SpringDocBehindProxyWithCustomUIPathWithApiDocsTest.java @@ -41,14 +41,14 @@ public class SpringDocBehindProxyWithCustomUIPathWithApiDocsTest extends Abstrac private static final String X_FORWARD_PREFIX = "/path/prefix"; @Test - public void shouldServeOpenapiJsonUnderCustomPath() throws Exception { + void shouldServeOpenapiJsonUnderCustomPath() throws Exception { mockMvc.perform(get("/bar/openapi/v3") .header("X-Forwarded-Prefix", X_FORWARD_PREFIX)) .andExpect(status().isOk()); } @Test - public void shouldReturnCorrectInitializerJS() throws Exception { + void shouldReturnCorrectInitializerJS() throws Exception { mockMvc.perform(get("/foo/documentation/swagger-ui/swagger-initializer.js") .header("X-Forwarded-Prefix", X_FORWARD_PREFIX)) .andExpect(status().isOk()) @@ -58,7 +58,7 @@ public void shouldReturnCorrectInitializerJS() throws Exception { } @Test - public void shouldCalculateUrlsBehindProxy() throws Exception { + void shouldCalculateUrlsBehindProxy() throws Exception { mockMvc.perform(get("/bar/openapi/v3/swagger-config") .header("X-Forwarded-Prefix", X_FORWARD_PREFIX)) .andExpect(status().isOk()) diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app33/SpringDocApp33Test.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app33/SpringDocApp33Test.java index 49e2382ce..4b62213ef 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app33/SpringDocApp33Test.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app33/SpringDocApp33Test.java @@ -35,7 +35,7 @@ public class SpringDocApp33Test extends AbstractSpringDocTest { @Test - public void shouldRedirectWithConfigUrlIgnoringQueryParams() throws Exception { + void shouldRedirectWithConfigUrlIgnoringQueryParams() throws Exception { mockMvc.perform(get("/swagger-ui.html")) .andExpect(status().isFound()) .andExpect(header().string("Location", "/swagger-ui/index.html")); diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app34/HelloController.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app34/HelloController.java new file mode 100644 index 000000000..cf97ec3da --- /dev/null +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app34/HelloController.java @@ -0,0 +1,37 @@ +/* + * + * * Copyright 2019-2020 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.ui.app34; + + +import jakarta.validation.Valid; +import jakarta.validation.constraints.Size; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping(value = "/persons") + public void persons(@Valid @RequestParam @Size(min = 4, max = 6) String name) { + + } + +} diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app34/SpringDocApp34Test.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app34/SpringDocApp34Test.java new file mode 100644 index 000000000..505002f44 --- /dev/null +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app34/SpringDocApp34Test.java @@ -0,0 +1,48 @@ +/* + * + * * Copyright 2019-2020 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.ui.app34; + +import org.junit.jupiter.api.Test; +import test.org.springdoc.ui.AbstractSpringDocTest; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.test.context.TestPropertySource; + +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.header; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + +@TestPropertySource(properties = { + "springdoc.swagger-ui.supported-submit-methods=" +}) +public class SpringDocApp34Test extends AbstractSpringDocTest { + + @Test + void test() throws Exception { + mockMvc.perform(get("/swagger-ui.html")) + .andExpect(status().isFound()) + .andExpect(header().string("Location", "/swagger-ui/index.html")); + + super.chekJS(); + } + + @SpringBootApplication + static class SpringDocTestApp {} + +} \ No newline at end of file diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app35/HelloController.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app35/HelloController.java new file mode 100644 index 000000000..ae5102f80 --- /dev/null +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app35/HelloController.java @@ -0,0 +1,37 @@ +/* + * + * * Copyright 2019-2020 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.ui.app35; + + +import jakarta.validation.Valid; +import jakarta.validation.constraints.Size; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping(value = "/persons") + public void persons(@Valid @RequestParam @Size(min = 4, max = 6) String name) { + + } + +} diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app35/SpringDocApp35Test.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app35/SpringDocApp35Test.java new file mode 100644 index 000000000..bca32be6e --- /dev/null +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app35/SpringDocApp35Test.java @@ -0,0 +1,48 @@ +/* + * + * * Copyright 2019-2020 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.ui.app35; + +import org.junit.jupiter.api.Test; +import test.org.springdoc.ui.AbstractSpringDocTest; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.test.context.TestPropertySource; + +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.header; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + +@TestPropertySource(properties = { + "springdoc.swagger-ui.supported-submit-methods=put, post, delete, options, head, patch, trace" +}) +public class SpringDocApp35Test extends AbstractSpringDocTest { + + @Test + void test() throws Exception { + mockMvc.perform(get("/swagger-ui.html")) + .andExpect(status().isFound()) + .andExpect(header().string("Location", "/swagger-ui/index.html")); + + super.chekJS(); + } + + @SpringBootApplication + static class SpringDocTestApp {} + +} \ No newline at end of file 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..9a9da8c9b 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 @@ -32,15 +32,15 @@ public class SpringDocApp4Test extends AbstractSpringDocTest { @Test - public void swagger_config_for_multiple_groups() throws Exception { + void swagger_config_for_multiple_groups() throws Exception { mockMvc.perform(get("/v3/api-docs/swagger-config")) .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..347ee04c1 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 @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -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-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app5/SpringDocApp5Test.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app5/SpringDocApp5Test.java index b974e0d60..4f30b091e 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app5/SpringDocApp5Test.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app5/SpringDocApp5Test.java @@ -28,16 +28,19 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; +import static test.org.springdoc.ui.app5.SpringDocApp5Test.CONTEXT_PATH; -@TestPropertySource(properties = "server.servlet.context-path=/context-path") +@TestPropertySource(properties = "server.servlet.context-path="+CONTEXT_PATH) public class SpringDocApp5Test extends AbstractSpringDocTest { + public static final String CONTEXT_PATH = "/context-path"; + @Test - public void oauth2_redirect_url_calculated_with_context_path() throws Exception { - mockMvc.perform(get("/context-path/v3/api-docs/swagger-config").contextPath("/context-path")) + void oauth2_redirect_url_calculated_with_context_path() throws Exception { + mockMvc.perform(get(CONTEXT_PATH+"/v3/api-docs/swagger-config").contextPath("/context-path")) .andExpect(status().isOk()) .andExpect(jsonPath("oauth2RedirectUrl", equalTo("http://localhost/context-path/swagger-ui/oauth2-redirect.html"))); - super.chekJS(); + super.chekJS(CONTEXT_PATH); } @SpringBootApplication diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app5/SpringDocOauthPathsTest.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app5/SpringDocOauthPathsTest.java index bec8ba6fb..bfc03fa1a 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app5/SpringDocOauthPathsTest.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app5/SpringDocOauthPathsTest.java @@ -31,7 +31,7 @@ public class SpringDocOauthPathsTest extends AbstractSpringDocTest { @Test - public void oauth2_redirect_url_calculated() throws Exception { + void oauth2_redirect_url_calculated() throws Exception { mockMvc.perform(get("/v3/api-docs/swagger-config")) .andExpect(status().isOk()) .andExpect(jsonPath("oauth2RedirectUrl", equalTo("http://localhost/swagger-ui/oauth2-redirect.html"))); diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app5/SpringDocOauthPathsWithPropertyTest.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app5/SpringDocOauthPathsWithPropertyTest.java index 196717f28..29950d602 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app5/SpringDocOauthPathsWithPropertyTest.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app5/SpringDocOauthPathsWithPropertyTest.java @@ -33,7 +33,7 @@ public class SpringDocOauthPathsWithPropertyTest extends AbstractSpringDocTest { @Test - public void oauth2_redirect_url_calculated() throws Exception { + void oauth2_redirect_url_calculated() throws Exception { mockMvc.perform(get("/v3/api-docs/swagger-config")) .andExpect(status().isOk()) .andExpect(jsonPath("oauth2RedirectUrl", equalTo("http://localhost:8080/toto/test/swagger-ui/oauth2-redirect.html"))); diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app5/SpringDocOauthRedirectUrlRecalculateTest.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app5/SpringDocOauthRedirectUrlRecalculateTest.java index 12737f90f..85f87a998 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app5/SpringDocOauthRedirectUrlRecalculateTest.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app5/SpringDocOauthRedirectUrlRecalculateTest.java @@ -33,7 +33,7 @@ public class SpringDocOauthRedirectUrlRecalculateTest extends AbstractSpringDocTest { @Test - public void oauth2_redirect_url_recalculation() throws Exception { + void oauth2_redirect_url_recalculation() throws Exception { mockMvc.perform(get("/v3/api-docs/swagger-config").header("X-Forwarded-Proto", "https").header("X-Forwarded-Host", "host1")) .andExpect(status().isOk()) .andExpect(jsonPath("oauth2RedirectUrl", equalTo("https://host1/swagger-ui/oauth2-redirect.html"))); diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app5/SpringDocOauthServletPathsTest.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app5/SpringDocOauthServletPathsTest.java index 561f9f5c3..4c1f09f06 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app5/SpringDocOauthServletPathsTest.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app5/SpringDocOauthServletPathsTest.java @@ -39,7 +39,7 @@ public class SpringDocOauthServletPathsTest extends AbstractSpringDocTest { @Test - public void should_display_oauth2_redirect_page() throws Exception { + void should_display_oauth2_redirect_page() throws Exception { mockMvc.perform(get("/context-path/servlet-path/test/swagger.html").servletPath("/servlet-path").contextPath("/context-path")).andExpect(status().is3xxRedirection()).andReturn(); mockMvc.perform(get("/context-path/servlet-path/test/swagger-ui/oauth2-redirect.html").servletPath("/servlet-path").contextPath("/context-path")).andExpect(status().isOk()).andReturn(); @@ -50,7 +50,7 @@ public void should_display_oauth2_redirect_page() throws Exception { } @Test - public void oauth2_redirect_url_calculated_with_context_path_and_servlet_path() throws Exception { + void oauth2_redirect_url_calculated_with_context_path_and_servlet_path() throws Exception { mockMvc.perform(get("/context-path/servlet-path/v3/api-docs/swagger-config").contextPath("/context-path").servletPath("/servlet-path")) .andExpect(status().isOk()) .andExpect(jsonPath("oauth2RedirectUrl", equalTo("http://localhost/context-path/servlet-path/test/swagger-ui/oauth2-redirect.html"))); diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app6/SpringDocSwaggerUiUrlPropertyTest.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app6/SpringDocSwaggerUiUrlPropertyTest.java index 439697254..6059d48c5 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app6/SpringDocSwaggerUiUrlPropertyTest.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app6/SpringDocSwaggerUiUrlPropertyTest.java @@ -32,7 +32,7 @@ public class SpringDocSwaggerUiUrlPropertyTest extends AbstractSpringDocTest { @Test - public void with_swagger_ui_property() throws Exception { + void with_swagger_ui_property() throws Exception { mockMvc.perform(get("/v3/api-docs/swagger-config")) .andExpect(status().isOk()) .andExpect(jsonPath("url", equalTo("http://myserver:8080/v3/api-docs"))); diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app7/SpringDocApp7Test.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app7/SpringDocApp7Test.java index 4e5ceade8..79f94059f 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app7/SpringDocApp7Test.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app7/SpringDocApp7Test.java @@ -31,7 +31,7 @@ public class SpringDocApp7Test extends AbstractSpringDocTest { @Test - public void transformed_index_with_oauth() throws Exception { + void transformed_index_with_oauth() throws Exception { super.chekJS(); } diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app8/SpringDocApp8MultipleUrlsSeveralParallelRequestsTest.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app8/SpringDocApp8MultipleUrlsSeveralParallelRequestsTest.java new file mode 100644 index 000000000..fb077b093 --- /dev/null +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app8/SpringDocApp8MultipleUrlsSeveralParallelRequestsTest.java @@ -0,0 +1,91 @@ +/* + * + * * Copyright 2019-2020 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.ui.app8; + +import java.util.concurrent.CompletableFuture; +import java.util.stream.Stream; + +import org.junit.jupiter.api.Test; +import test.org.springdoc.ui.AbstractSpringDocTest; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.test.context.TestPropertySource; + +import static java.util.concurrent.CompletableFuture.allOf; +import static java.util.concurrent.CompletableFuture.runAsync; +import static org.hamcrest.CoreMatchers.equalTo; +import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + +/** + * The test to make sure no exceptions are thrown when several parallel requests + * are sent to get Swagger config. + * + * @author Dmitry Lebedko (lebedko.dmitrii@gmail.com) + */ +@TestPropertySource(properties = { + "spring.mvc.servlet.path=/servlet-path", + "springdoc.swagger-ui.urls[0].name=first-user-list", + "springdoc.swagger-ui.urls[0].url=/api-docs.yaml", + "springdoc.swagger-ui.urls[1].name=second-user-list", + "springdoc.swagger-ui.urls[1].url=/api-docs.yaml", + "springdoc.swagger-ui.urls[2].name=third-user-list", + "springdoc.swagger-ui.urls[2].url=/api-docs.yaml" +}) +public class SpringDocApp8MultipleUrlsSeveralParallelRequestsTest extends AbstractSpringDocTest { + + private static final int PARALLEL_REQUEST_NUMBER = 100; + + /** + * Sends {@link SpringDocApp8MultipleUrlsSeveralParallelRequestsTest#PARALLEL_REQUEST_NUMBER} requests + * simultaneously to make sure no exceptions are thrown when getting Swagger config. + */ + @Test + void swagger_config_for_multiple_groups_and_many_parallel_requests() { + assertDoesNotThrow(() -> { + allOf(Stream.generate(() -> runAsync(() -> { + try { + mockMvc.perform(get("/v3/api-docs/swagger-config")) + .andExpect(status().isOk()) + .andExpect(jsonPath("configUrl", equalTo("/servlet-path/v3/api-docs/swagger-config"))) + .andExpect(jsonPath("url").doesNotExist()) + .andExpect(jsonPath("urls.length()", equalTo(3))) + .andExpect(jsonPath("urls[0].url", equalTo("/servlet-path/api-docs.yaml"))) + .andExpect(jsonPath("urls[0].name", equalTo("first-user-list"))) + .andExpect(jsonPath("urls[1].url", equalTo("/servlet-path/api-docs.yaml"))) + .andExpect(jsonPath("urls[1].name", equalTo("second-user-list"))) + .andExpect(jsonPath("urls[2].url", equalTo("/servlet-path/api-docs.yaml"))) + .andExpect(jsonPath("urls[2].name", equalTo("third-user-list"))); + } catch (Exception e) { + throw new RuntimeException(e); + } + })) + .limit(PARALLEL_REQUEST_NUMBER) + .toArray(CompletableFuture[]::new)) + .join(); + }, "Swagger config is supposed to be delivered successfully " + + "no matter how many parallel requests are sent"); + } + + @SpringBootApplication + static class SpringDocTestApp {} + +} \ No newline at end of file diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app8/SpringDocApp8Test.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app8/SpringDocApp8Test.java index d89295c52..f09fc5add 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app8/SpringDocApp8Test.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app8/SpringDocApp8Test.java @@ -36,7 +36,7 @@ public class SpringDocApp8Test extends AbstractSpringDocTest { @Test - public void swagger_config_for_multiple_groups() throws Exception { + void swagger_config_for_multiple_groups() throws Exception { mockMvc.perform(get("/v3/api-docs/swagger-config")) .andExpect(status().isOk()) .andExpect(jsonPath("configUrl", equalTo("/v3/api-docs/swagger-config"))) diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app9/SpringDocApp9Test.java b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app9/SpringDocApp9Test.java index 8fc8870c0..ee3aec2cb 100644 --- a/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app9/SpringDocApp9Test.java +++ b/springdoc-openapi-starter-webmvc-ui/src/test/java/test/org/springdoc/ui/app9/SpringDocApp9Test.java @@ -36,7 +36,7 @@ public class SpringDocApp9Test extends AbstractSpringDocTest { @Test - public void transformed_index_with_oauth() throws Exception { + void transformed_index_with_oauth() throws Exception { super.chekJS(); } diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/resources/results/app34 b/springdoc-openapi-starter-webmvc-ui/src/test/resources/results/app34 new file mode 100644 index 000000000..49c29c34d --- /dev/null +++ b/springdoc-openapi-starter-webmvc-ui/src/test/resources/results/app34 @@ -0,0 +1,25 @@ +window.onload = function() { + // + + // the following lines will be replaced by docker/configurator, when it runs in a docker-container + window.ui = SwaggerUIBundle({ + url: "https://petstore.swagger.io/v2/swagger.json", + dom_id: '#swagger-ui', + deepLinking: true, + presets: [ + SwaggerUIBundle.presets.apis, + SwaggerUIStandalonePreset + ], + plugins: [ + SwaggerUIBundle.plugins.DownloadUrl + ], + layout: "StandaloneLayout" , + + "configUrl" : "/v3/api-docs/swagger-config", + "supportedSubmitMethods" : [ ], + "validatorUrl" : "" + + }); + + // +}; diff --git a/springdoc-openapi-starter-webmvc-ui/src/test/resources/results/app35 b/springdoc-openapi-starter-webmvc-ui/src/test/resources/results/app35 new file mode 100644 index 000000000..76480c0fb --- /dev/null +++ b/springdoc-openapi-starter-webmvc-ui/src/test/resources/results/app35 @@ -0,0 +1,25 @@ +window.onload = function() { + // + + // the following lines will be replaced by docker/configurator, when it runs in a docker-container + window.ui = SwaggerUIBundle({ + url: "https://petstore.swagger.io/v2/swagger.json", + dom_id: '#swagger-ui', + deepLinking: true, + presets: [ + SwaggerUIBundle.presets.apis, + SwaggerUIStandalonePreset + ], + plugins: [ + SwaggerUIBundle.plugins.DownloadUrl + ], + layout: "StandaloneLayout" , + + "configUrl" : "/v3/api-docs/swagger-config", + "supportedSubmitMethods" : [ "put", "post", "delete", "options", "head", "patch", "trace" ], + "validatorUrl" : "" + + }); + + // +}; diff --git a/springdoc-openapi-tests/pom.xml b/springdoc-openapi-tests/pom.xml index 83ac3f9a5..c09f8dcc0 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.7.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..a8904a35d 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.7.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..d40f8cbd6 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 @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -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..208bea214 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; - } + protected void testApp() throws Exception { + 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/app144/SpringDocApp144Test.java b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app144/SpringDocApp144Test.java index 93163322b..cddabb844 100644 --- a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app144/SpringDocApp144Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app144/SpringDocApp144Test.java @@ -38,13 +38,13 @@ public class SpringDocApp144Test extends AbstractSpringDocActuatorTest { @Test - public void testApp() { + void testApp() { webTestClient.get().uri(Constants.DEFAULT_API_DOCS_URL).exchange() .expectStatus().isNotFound(); } @Test - public void testApp1() throws Exception { + void testApp1() throws Exception { String result = webClient.get().uri("/application/openapi").retrieve() .bodyToMono(String.class) .block(); diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app145/SpringDocApp1451Test.java b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app145/SpringDocApp1451Test.java index d5dd052f9..f47274bb2 100644 --- a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app145/SpringDocApp1451Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app145/SpringDocApp1451Test.java @@ -44,7 +44,7 @@ public class SpringDocApp1451Test extends AbstractSpringDocActuatorTest { @Test - public void testApp() { + void testApp() { try { webClient.get().uri("/application/openapi").retrieve() .bodyToMono(String.class).block(); @@ -59,7 +59,7 @@ public void testApp() { } @Test - public void testApp2() throws Exception { + void testApp2() throws Exception { try { String result = webClient.get().uri("/application/openapi/users").retrieve() .bodyToMono(String.class).block(); diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app145/SpringDocApp1452Test.java b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app145/SpringDocApp1452Test.java index 09b58d4c7..b2efc928a 100644 --- a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app145/SpringDocApp1452Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app145/SpringDocApp1452Test.java @@ -41,7 +41,7 @@ public class SpringDocApp1452Test extends AbstractSpringDocActuatorTest { @Test - public void testApp() throws Exception { + void testApp() throws Exception { try { String result = webClient.get().uri("/application/openapi/users").retrieve() .bodyToMono(String.class).block(); diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app145/SpringDocApp145Test.java b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app145/SpringDocApp145Test.java index 8dff87bf2..d723f920b 100644 --- a/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app145/SpringDocApp145Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api/app145/SpringDocApp145Test.java @@ -1,6 +1,6 @@ /* * - * * Copyright 2019-2022 the original author or authors. + * * 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. @@ -43,14 +43,14 @@ public class SpringDocApp145Test extends AbstractSpringDocActuatorTest { @Test - public void testApp() { + void testApp() { webTestClient.get().uri(Constants.DEFAULT_API_DOCS_URL + "/users") .exchange() .expectStatus().isNotFound(); } @Test - public void testApp3() throws Exception { + void testApp3() throws Exception { try { webClient.get().uri("/application/openapi" + "/" + Constants.DEFAULT_GROUP_NAME).retrieve() .bodyToMono(String.class).block(); 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..593016888 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=*", @@ -39,32 +36,17 @@ 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); + void testApp() throws Exception { + 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); + void testApp1() throws Exception { + 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..158bfd4d0 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, @@ -39,33 +36,18 @@ 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); + void testApp() throws Exception { + 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); + void testApp1() throws Exception { + super.testApp("147-2", Constants.ACTUATOR_DEFAULT_GROUP); + } @Test - public void testApp2() throws Exception { + void testApp2() throws Exception { webTestClient.get().uri(Constants.DEFAULT_API_DOCS_URL + "/" + Constants.DEFAULT_GROUP_NAME) .exchange() .expectStatus().isNotFound(); 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..0db1f4cd3 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, @@ -45,23 +44,17 @@ 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); + void testApp() throws Exception { + 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); + void testApp2() throws Exception { + super.testWithWebClient("148-2","/test/application/openapi/x-actuator"); } @Test - public void testApp3() throws Exception { + void testApp3() throws Exception { try { webClient.get().uri("/test/application/openapi" + "/" + Constants.DEFAULT_GROUP_NAME).retrieve() .bodyToMono(String.class).block(); 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..7b6509736 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 @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -26,8 +26,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; @@ -52,28 +50,28 @@ public class SpringDocApp186Test extends AbstractCommonTest { @Test - public void testApp() throws Exception { + void testApp() throws Exception { webTestClient.get().uri(Constants.DEFAULT_API_DOCS_URL).exchange() .expectStatus().isOk() .expectBody().json(getContent("results/app186.json"), true); } @Test - public void testGroupActuatorAsCodeCheckBackwardsCompatibility() throws Exception { + 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 { + 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 { + void testGroupActuatorAsProperties() { webTestClient.get().uri(Constants.DEFAULT_API_DOCS_URL + "/group-actuator-as-properties").exchange() .expectStatus().isOk() .expectBody().json(getContent("results/app186.json"), true); @@ -84,12 +82,10 @@ public void testGroupActuatorAsProperties() throws Exception { static class SpringDocTestApp { @Bean - public GroupedOpenApi asCodeCheckBackwardsCompatibility(ActuatorOpenApiCustomizer actuatorOpenApiCustomiser, - OperationCustomizer actuatorCustomizer, WebEndpointProperties endpointProperties) { + public GroupedOpenApi asCodeCheckBackwardsCompatibility(OperationCustomizer actuatorCustomizer, WebEndpointProperties endpointProperties) { return GroupedOpenApi.builder() .group("group-actuator-as-code-check-backwards-compatibility") .pathsToMatch(endpointProperties.getBasePath() + ALL_PATTERN) - .addOpenApiCustomizer(actuatorOpenApiCustomiser) .addOperationCustomizer(actuatorCustomizer) .build(); } 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..ac7d1a833 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() + protected void testApp() { + 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..7b041b75a 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 @@ -27,7 +27,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'loggers-name'", - "operationId": "loggers-name", + "operationId": "loggerLevels", "parameters": [ { "name": "name", @@ -58,6 +58,9 @@ } } } + }, + "404": { + "description": "Not Found" } } }, @@ -66,7 +69,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'loggers-name'", - "operationId": "loggers-name_2", + "operationId": "configureLogLevel", "parameters": [ { "name": "name", @@ -96,15 +99,11 @@ } }, "responses": { - "200": { - "description": "OK", - "content": { - "*/*": { - "schema": { - "type": "object" - } - } - } + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request" } } } @@ -115,7 +114,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'threaddump'", - "operationId": "threaddump", + "operationId": "threadDump", "responses": { "200": { "description": "OK", @@ -151,7 +150,72 @@ "Actuator" ], "summary": "Actuator web endpoint 'scheduledtasks'", - "operationId": "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", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/octet-stream": { + "schema": { + "type": "object" + } + } + } + }, + "404": { + "description": "Not Found" + } + } + } + }, + "/application/sbom": { + "get": { + "tags": [ + "Actuator" + ], + "summary": "Actuator web endpoint 'sbom'", + "operationId": "sboms", "responses": { "200": { "description": "OK", @@ -182,7 +246,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'metrics-requiredMetricName'", - "operationId": "metrics-requiredMetricName", + "operationId": "metric", "parameters": [ { "name": "requiredMetricName", @@ -191,6 +255,13 @@ "schema": { "type": "string" } + }, + { + "name": "tag", + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { @@ -213,6 +284,9 @@ } } } + }, + "404": { + "description": "Not Found" } } } @@ -223,7 +297,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'metrics'", - "operationId": "metrics", + "operationId": "listNames", "responses": { "200": { "description": "OK", @@ -347,7 +421,16 @@ "Actuator" ], "summary": "Actuator web endpoint 'heapdump'", - "operationId": "heapdump", + "operationId": "heapDump", + "parameters": [ + { + "name": "live", + "in": "query", + "schema": { + "type": "boolean" + } + } + ], "responses": { "200": { "description": "OK", @@ -399,7 +482,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'env-toMatch'", - "operationId": "env-toMatch", + "operationId": "environmentEntry", "parameters": [ { "name": "toMatch", @@ -430,6 +513,9 @@ } } } + }, + "404": { + "description": "Not Found" } } } @@ -440,7 +526,16 @@ "Actuator" ], "summary": "Actuator web endpoint 'env'", - "operationId": "env", + "operationId": "environment", + "parameters": [ + { + "name": "pattern", + "in": "query", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", @@ -471,7 +566,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'configprops-prefix'", - "operationId": "configprops-prefix", + "operationId": "configurationPropertiesWithPrefix", "parameters": [ { "name": "prefix", @@ -502,6 +597,9 @@ } } } + }, + "404": { + "description": "Not Found" } } } @@ -512,7 +610,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'configprops'", - "operationId": "configprops", + "operationId": "configurationProperties", "responses": { "200": { "description": "OK", @@ -574,7 +672,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'caches-cache'", - "operationId": "caches-cache", + "operationId": "cache", "parameters": [ { "name": "cache", @@ -583,6 +681,13 @@ "schema": { "type": "string" } + }, + { + "name": "cacheManager", + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { @@ -605,6 +710,9 @@ } } } + }, + "404": { + "description": "Not Found" } } }, @@ -613,7 +721,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'caches-cache'", - "operationId": "caches-cache_2", + "operationId": "clearCache", "parameters": [ { "name": "cache", @@ -622,28 +730,21 @@ "schema": { "type": "string" } + }, + { + "name": "cacheManager", + "in": "query", + "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" - } - } - } + "204": { + "description": "No Content" + }, + "404": { + "description": "Not Found" } } } @@ -683,17 +784,10 @@ "Actuator" ], "summary": "Actuator web endpoint 'caches'", - "operationId": "caches_2", + "operationId": "clearCaches", "responses": { - "200": { - "description": "OK", - "content": { - "*/*": { - "schema": { - "type": "object" - } - } - } + "204": { + "description": "No Content" } } } 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..0c8297c8f 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 @@ -27,7 +27,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'loggers-name'", - "operationId": "loggers-name", + "operationId": "loggerLevels", "parameters": [ { "name": "name", @@ -58,6 +58,9 @@ } } } + }, + "404": { + "description": "Not Found" } } }, @@ -66,7 +69,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'loggers-name'", - "operationId": "loggers-name_2", + "operationId": "configureLogLevel", "parameters": [ { "name": "name", @@ -96,15 +99,11 @@ } }, "responses": { - "200": { - "description": "OK", - "content": { - "*/*": { - "schema": { - "type": "object" - } - } - } + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request" } } } @@ -115,7 +114,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'threaddump'", - "operationId": "threaddump", + "operationId": "threadDump", "responses": { "200": { "description": "OK", @@ -151,7 +150,72 @@ "Actuator" ], "summary": "Actuator web endpoint 'scheduledtasks'", - "operationId": "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", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/octet-stream": { + "schema": { + "type": "object" + } + } + } + }, + "404": { + "description": "Not Found" + } + } + } + }, + "/application/sbom": { + "get": { + "tags": [ + "Actuator" + ], + "summary": "Actuator web endpoint 'sbom'", + "operationId": "sboms", "responses": { "200": { "description": "OK", @@ -182,7 +246,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'metrics-requiredMetricName'", - "operationId": "metrics-requiredMetricName", + "operationId": "metric", "parameters": [ { "name": "requiredMetricName", @@ -191,6 +255,13 @@ "schema": { "type": "string" } + }, + { + "name": "tag", + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { @@ -213,6 +284,9 @@ } } } + }, + "404": { + "description": "Not Found" } } } @@ -223,7 +297,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'metrics'", - "operationId": "metrics", + "operationId": "listNames", "responses": { "200": { "description": "OK", @@ -347,7 +421,16 @@ "Actuator" ], "summary": "Actuator web endpoint 'heapdump'", - "operationId": "heapdump", + "operationId": "heapDump", + "parameters": [ + { + "name": "live", + "in": "query", + "schema": { + "type": "boolean" + } + } + ], "responses": { "200": { "description": "OK", @@ -399,7 +482,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'env-toMatch'", - "operationId": "env-toMatch", + "operationId": "environmentEntry", "parameters": [ { "name": "toMatch", @@ -430,6 +513,9 @@ } } } + }, + "404": { + "description": "Not Found" } } } @@ -440,7 +526,16 @@ "Actuator" ], "summary": "Actuator web endpoint 'env'", - "operationId": "env", + "operationId": "environment", + "parameters": [ + { + "name": "pattern", + "in": "query", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", @@ -471,7 +566,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'configprops-prefix'", - "operationId": "configprops-prefix", + "operationId": "configurationPropertiesWithPrefix", "parameters": [ { "name": "prefix", @@ -502,6 +597,9 @@ } } } + }, + "404": { + "description": "Not Found" } } } @@ -512,7 +610,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'configprops'", - "operationId": "configprops", + "operationId": "configurationProperties", "responses": { "200": { "description": "OK", @@ -574,7 +672,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'caches-cache'", - "operationId": "caches-cache", + "operationId": "cache", "parameters": [ { "name": "cache", @@ -583,6 +681,13 @@ "schema": { "type": "string" } + }, + { + "name": "cacheManager", + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { @@ -605,6 +710,9 @@ } } } + }, + "404": { + "description": "Not Found" } } }, @@ -613,7 +721,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'caches-cache'", - "operationId": "caches-cache_2", + "operationId": "clearCache", "parameters": [ { "name": "cache", @@ -622,28 +730,21 @@ "schema": { "type": "string" } + }, + { + "name": "cacheManager", + "in": "query", + "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" - } - } - } + "204": { + "description": "No Content" + }, + "404": { + "description": "Not Found" } } } @@ -683,17 +784,10 @@ "Actuator" ], "summary": "Actuator web endpoint 'caches'", - "operationId": "caches_2", + "operationId": "clearCaches", "responses": { - "200": { - "description": "OK", - "content": { - "*/*": { - "schema": { - "type": "object" - } - } - } + "204": { + "description": "No Content" } } } 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..0c8297c8f 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,865 @@ }, "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": [ - "hello-controller" + "Actuator" + ], + "summary": "Actuator web endpoint 'loggers-name'", + "operationId": "loggerLevels", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } ], - "operationId": "persons", "responses": { "200": { "description": "OK", "content": { - "*/*": { + "application/vnd.spring-boot.actuator.v3+json": { "schema": { - "type": "string" + "type": "object" + } + }, + "application/vnd.spring-boot.actuator.v2+json": { + "schema": { + "type": "object" + } + }, + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "404": { + "description": "Not Found" + } + } + }, + "post": { + "tags": [ + "Actuator" + ], + "summary": "Actuator web endpoint 'loggers-name'", + "operationId": "configureLogLevel", + "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": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request" + } + } + } + }, + "/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", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/octet-stream": { + "schema": { + "type": "object" + } + } + } + }, + "404": { + "description": "Not Found" + } + } + } + }, + "/application/sbom": { + "get": { + "tags": [ + "Actuator" + ], + "summary": "Actuator web endpoint 'sbom'", + "operationId": "sboms", + "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": "metric", + "parameters": [ + { + "name": "requiredMetricName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "tag", + "in": "query", + "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" + } + } + } + }, + "404": { + "description": "Not Found" + } + } + } + }, + "/application/metrics": { + "get": { + "tags": [ + "Actuator" + ], + "summary": "Actuator web endpoint 'metrics'", + "operationId": "listNames", + "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", + "parameters": [ + { + "name": "live", + "in": "query", + "schema": { + "type": "boolean" + } + } + ], + "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": [ + "Actuator" + ], + "summary": "Actuator web endpoint 'env-toMatch'", + "operationId": "environmentEntry", + "parameters": [ + { + "name": "toMatch", + "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" + } + } + } + }, + "404": { + "description": "Not Found" + } + } + } + }, + "/application/env": { + "get": { + "tags": [ + "Actuator" + ], + "summary": "Actuator web endpoint 'env'", + "operationId": "environment", + "parameters": [ + { + "name": "pattern", + "in": "query", + "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/{prefix}": { + "get": { + "tags": [ + "Actuator" + ], + "summary": "Actuator web endpoint 'configprops-prefix'", + "operationId": "configurationPropertiesWithPrefix", + "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" + } + } + } + }, + "404": { + "description": "Not Found" + } + } + } + }, + "/application/configprops": { + "get": { + "tags": [ + "Actuator" + ], + "summary": "Actuator web endpoint 'configprops'", + "operationId": "configurationProperties", + "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": "cache", + "parameters": [ + { + "name": "cache", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "cacheManager", + "in": "query", + "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" + } + } + } + }, + "404": { + "description": "Not Found" + } + } + }, + "delete": { + "tags": [ + "Actuator" + ], + "summary": "Actuator web endpoint 'caches-cache'", + "operationId": "clearCache", + "parameters": [ + { + "name": "cache", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "cacheManager", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "404": { + "description": "Not Found" + } + } + } + }, + "/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": "clearCaches", + "responses": { + "204": { + "description": "No Content" + } + } + } + }, + "/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 +873,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..bc0a211d0 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 @@ -27,7 +27,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'loggers-name'", - "operationId": "loggers-name", + "operationId": "loggerLevels", "parameters": [ { "name": "name", @@ -58,6 +58,9 @@ } } } + }, + "404": { + "description": "Not Found" } } }, @@ -66,7 +69,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'loggers-name'", - "operationId": "loggers-name_2", + "operationId": "configureLogLevel", "parameters": [ { "name": "name", @@ -96,15 +99,11 @@ } }, "responses": { - "200": { - "description": "OK", - "content": { - "*/*": { - "schema": { - "type": "object" - } - } - } + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request" } } } @@ -115,7 +114,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'threaddump'", - "operationId": "threaddump", + "operationId": "threadDump", "responses": { "200": { "description": "OK", @@ -151,7 +150,72 @@ "Actuator" ], "summary": "Actuator web endpoint 'scheduledtasks'", - "operationId": "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", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/octet-stream": { + "schema": { + "type": "object" + } + } + } + }, + "404": { + "description": "Not Found" + } + } + } + }, + "/application/sbom": { + "get": { + "tags": [ + "Actuator" + ], + "summary": "Actuator web endpoint 'sbom'", + "operationId": "sboms", "responses": { "200": { "description": "OK", @@ -182,7 +246,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'metrics-requiredMetricName'", - "operationId": "metrics-requiredMetricName", + "operationId": "metric", "parameters": [ { "name": "requiredMetricName", @@ -191,6 +255,13 @@ "schema": { "type": "string" } + }, + { + "name": "tag", + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { @@ -213,6 +284,9 @@ } } } + }, + "404": { + "description": "Not Found" } } } @@ -223,7 +297,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'metrics'", - "operationId": "metrics", + "operationId": "listNames", "responses": { "200": { "description": "OK", @@ -347,7 +421,16 @@ "Actuator" ], "summary": "Actuator web endpoint 'heapdump'", - "operationId": "heapdump", + "operationId": "heapDump", + "parameters": [ + { + "name": "live", + "in": "query", + "schema": { + "type": "boolean" + } + } + ], "responses": { "200": { "description": "OK", @@ -399,7 +482,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'env-toMatch'", - "operationId": "env-toMatch", + "operationId": "environmentEntry", "parameters": [ { "name": "toMatch", @@ -430,6 +513,9 @@ } } } + }, + "404": { + "description": "Not Found" } } } @@ -440,7 +526,16 @@ "Actuator" ], "summary": "Actuator web endpoint 'env'", - "operationId": "env", + "operationId": "environment", + "parameters": [ + { + "name": "pattern", + "in": "query", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", @@ -471,7 +566,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'configprops-prefix'", - "operationId": "configprops-prefix", + "operationId": "configurationPropertiesWithPrefix", "parameters": [ { "name": "prefix", @@ -502,6 +597,9 @@ } } } + }, + "404": { + "description": "Not Found" } } } @@ -512,7 +610,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'configprops'", - "operationId": "configprops", + "operationId": "configurationProperties", "responses": { "200": { "description": "OK", @@ -574,7 +672,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'caches-cache'", - "operationId": "caches-cache", + "operationId": "cache", "parameters": [ { "name": "cache", @@ -583,6 +681,13 @@ "schema": { "type": "string" } + }, + { + "name": "cacheManager", + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { @@ -605,6 +710,9 @@ } } } + }, + "404": { + "description": "Not Found" } } }, @@ -613,7 +721,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'caches-cache'", - "operationId": "caches-cache_2", + "operationId": "clearCache", "parameters": [ { "name": "cache", @@ -622,28 +730,21 @@ "schema": { "type": "string" } + }, + { + "name": "cacheManager", + "in": "query", + "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" - } - } - } + "204": { + "description": "No Content" + }, + "404": { + "description": "Not Found" } } } @@ -683,17 +784,10 @@ "Actuator" ], "summary": "Actuator web endpoint 'caches'", - "operationId": "caches_2", + "operationId": "clearCaches", "responses": { - "200": { - "description": "OK", - "content": { - "*/*": { - "schema": { - "type": "object" - } - } - } + "204": { + "description": "No Content" } } } 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..962339da3 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 @@ -27,7 +27,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'loggers-name'", - "operationId": "loggers-name", + "operationId": "loggerLevels", "parameters": [ { "name": "name", @@ -58,6 +58,9 @@ } } } + }, + "404": { + "description": "Not Found" } } }, @@ -66,7 +69,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'loggers-name'", - "operationId": "loggers-name_2", + "operationId": "configureLogLevel", "parameters": [ { "name": "name", @@ -96,15 +99,11 @@ } }, "responses": { - "200": { - "description": "OK", - "content": { - "*/*": { - "schema": { - "type": "object" - } - } - } + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request" } } } @@ -115,7 +114,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'threaddump'", - "operationId": "threaddump", + "operationId": "threadDump", "responses": { "200": { "description": "OK", @@ -151,7 +150,72 @@ "Actuator" ], "summary": "Actuator web endpoint 'scheduledtasks'", - "operationId": "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" + } + } + } + } + } + } + }, + "/actuator/sbom/{id}": { + "get": { + "tags": [ + "Actuator" + ], + "summary": "Actuator web endpoint 'sbom-id'", + "operationId": "sbom", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/octet-stream": { + "schema": { + "type": "object" + } + } + } + }, + "404": { + "description": "Not Found" + } + } + } + }, + "/actuator/sbom": { + "get": { + "tags": [ + "Actuator" + ], + "summary": "Actuator web endpoint 'sbom'", + "operationId": "sboms", "responses": { "200": { "description": "OK", @@ -182,7 +246,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'metrics-requiredMetricName'", - "operationId": "metrics-requiredMetricName", + "operationId": "metric", "parameters": [ { "name": "requiredMetricName", @@ -191,6 +255,13 @@ "schema": { "type": "string" } + }, + { + "name": "tag", + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { @@ -213,6 +284,9 @@ } } } + }, + "404": { + "description": "Not Found" } } } @@ -223,7 +297,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'metrics'", - "operationId": "metrics", + "operationId": "listNames", "responses": { "200": { "description": "OK", @@ -347,7 +421,16 @@ "Actuator" ], "summary": "Actuator web endpoint 'heapdump'", - "operationId": "heapdump", + "operationId": "heapDump", + "parameters": [ + { + "name": "live", + "in": "query", + "schema": { + "type": "boolean" + } + } + ], "responses": { "200": { "description": "OK", @@ -362,20 +445,23 @@ } } }, - "/actuator/health/{*path}": { + "/actuator/health/{path}": { "get": { "tags": [ "Actuator" ], "summary": "Actuator web endpoint 'health-path'", - "operationId": "health-path", + "operationId": "health", "parameters": [ { - "name": "*path", + "name": "path", "in": "path", "required": true, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -399,6 +485,9 @@ } } } + }, + "404": { + "description": "Not Found" } } } @@ -409,7 +498,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'health'", - "operationId": "health", + "operationId": "health_1", "responses": { "200": { "description": "OK", @@ -440,7 +529,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'env-toMatch'", - "operationId": "env-toMatch", + "operationId": "environmentEntry", "parameters": [ { "name": "toMatch", @@ -471,6 +560,9 @@ } } } + }, + "404": { + "description": "Not Found" } } } @@ -481,7 +573,16 @@ "Actuator" ], "summary": "Actuator web endpoint 'env'", - "operationId": "env", + "operationId": "environment", + "parameters": [ + { + "name": "pattern", + "in": "query", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", @@ -512,7 +613,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'configprops-prefix'", - "operationId": "configprops-prefix", + "operationId": "configurationPropertiesWithPrefix", "parameters": [ { "name": "prefix", @@ -543,6 +644,9 @@ } } } + }, + "404": { + "description": "Not Found" } } } @@ -553,7 +657,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'configprops'", - "operationId": "configprops", + "operationId": "configurationProperties", "responses": { "200": { "description": "OK", @@ -615,7 +719,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'caches-cache'", - "operationId": "caches-cache", + "operationId": "cache", "parameters": [ { "name": "cache", @@ -624,6 +728,13 @@ "schema": { "type": "string" } + }, + { + "name": "cacheManager", + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { @@ -646,6 +757,9 @@ } } } + }, + "404": { + "description": "Not Found" } } }, @@ -654,7 +768,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'caches-cache'", - "operationId": "caches-cache_2", + "operationId": "clearCache", "parameters": [ { "name": "cache", @@ -663,28 +777,21 @@ "schema": { "type": "string" } + }, + { + "name": "cacheManager", + "in": "query", + "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" - } - } - } + "204": { + "description": "No Content" + }, + "404": { + "description": "Not Found" } } } @@ -724,17 +831,10 @@ "Actuator" ], "summary": "Actuator web endpoint 'caches'", - "operationId": "caches_2", + "operationId": "clearCaches", "responses": { - "200": { - "description": "OK", - "content": { - "*/*": { - "schema": { - "type": "object" - } - } - } + "204": { + "description": "No Content" } } } @@ -835,4 +935,4 @@ } } } -} +} \ No newline at end of file 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..22d1b09cc 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.7.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..fb674a750 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 @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -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/AbstractSpringDocTest.java b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java index 84d9f4294..5824868a0 100644 --- a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java +++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java @@ -36,7 +36,7 @@ public abstract class AbstractSpringDocTest extends AbstractCommonTest { public static String className; @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { className = getClass().getSimpleName(); String testNumber = className.replaceAll("[^0-9]", ""); MvcResult mockMvcResult = mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)).andExpect(status().isOk()) diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app128/SpringDocApp128Test.java b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app128/SpringDocApp128Test.java index 12ffe2ab9..c938ce64f 100644 --- a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app128/SpringDocApp128Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app128/SpringDocApp128Test.java @@ -51,7 +51,7 @@ public class SpringDocApp128Test extends AbstractSpringDocTest { } @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)).andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) .andExpect(jsonPath("$.paths./actuator/tenant/customer/{id}.get.operationId", containsString("getTenantById"))) diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app144/SpringDocApp144Test.java b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app144/SpringDocApp144Test.java index 4b10dd3ea..d80cb4239 100644 --- a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app144/SpringDocApp144Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app144/SpringDocApp144Test.java @@ -40,13 +40,13 @@ public class SpringDocApp144Test extends AbstractSpringDocActuatorTest { @Test - public void testApp() throws Exception { + void testApp() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)) .andExpect(status().isNotFound()); } @Test - public void testApp1() throws Exception { + void testApp1() throws Exception { String result = actuatorRestTemplate.getForObject("/application/openapi", String.class); String expected = getContent("results/app144.json"); assertEquals(expected, result, true); diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app145/SpringDocApp145Test.java b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app145/SpringDocApp145Test.java index 251bbf630..b45e5135a 100644 --- a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app145/SpringDocApp145Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app145/SpringDocApp145Test.java @@ -1,6 +1,6 @@ /* * - * * Copyright 2019-2022 the original author or authors. + * * 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. @@ -47,13 +47,13 @@ public class SpringDocApp145Test extends AbstractSpringDocActuatorTest { @Test - public void testApp() throws Exception { + void testApp() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/users")) .andExpect(status().isNotFound()); } @Test - public void testApp1() throws Exception { + void testApp1() throws Exception { try { actuatorRestTemplate.getForObject("/application/openapi", String.class); fail(); @@ -67,14 +67,14 @@ public void testApp1() throws Exception { } @Test - public void testApp2() throws Exception { + void testApp2() throws Exception { String result = actuatorRestTemplate.getForObject("/application/openapi/users", String.class); String expected = getContent("results/app145.json"); assertEquals(expected, result, true); } @Test - public void testApp3() throws Exception { + void testApp3() throws Exception { try { actuatorRestTemplate.getForObject("/application/openapi" + "/" + Constants.DEFAULT_GROUP_NAME, String.class); fail(); diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app147/SpringDocApp147Test.java b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app147/SpringDocApp147Test.java index 2843e2046..ff34a846c 100644 --- a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app147/SpringDocApp147Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app147/SpringDocApp147Test.java @@ -1,6 +1,6 @@ /* * - * * Copyright 2019-2022 the original author or authors. + * * 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. @@ -43,7 +43,7 @@ public class SpringDocApp147Test extends AbstractSpringDocActuatorTest { @Test - public void testApp() throws Exception { + void testApp() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/" + Constants.ACTUATOR_DEFAULT_GROUP)) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) @@ -51,7 +51,7 @@ public void testApp() throws Exception { } @Test - public void testApp1() throws Exception { + void testApp1() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/users")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) @@ -59,7 +59,7 @@ public void testApp1() throws Exception { } @Test - public void testApp2() throws Exception { + void testApp2() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/" + Constants.DEFAULT_GROUP_NAME)) .andExpect(status().isNotFound()); } 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..089f9835c 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 @@ -1,6 +1,6 @@ /* * - * * Copyright 2019-2022 the original author or authors. + * * 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. @@ -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, @@ -47,21 +46,17 @@ 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); + void testApp() throws Exception { + 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); + void testApp2() throws Exception { + super.testWithRestTemplate("148-2","/test/application/openapi/x-actuator"); } @Test - public void testApp3() throws Exception { + void testApp3() throws Exception { try { actuatorRestTemplate.getForObject("/test/application/openapi" + "/" + Constants.DEFAULT_GROUP_NAME, String.class); fail(); diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app186/SpringDocApp186Test.java b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app186/SpringDocApp186Test.java index 2526bcb3e..e448b6403 100644 --- a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app186/SpringDocApp186Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app186/SpringDocApp186Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -25,7 +25,6 @@ package test.org.springdoc.api.app186; import org.junit.jupiter.api.Test; -import org.springdoc.core.customizers.ActuatorOpenApiCustomizer; import org.springdoc.core.customizers.OperationCustomizer; import org.springdoc.core.models.GroupedOpenApi; import org.springdoc.core.utils.Constants; @@ -52,7 +51,7 @@ public class SpringDocApp186Test extends AbstractSpringDocTest { @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)) .andExpect(jsonPath("$.openapi", is("3.0.1"))) .andExpect(status().isOk()) @@ -60,7 +59,7 @@ public void testApp() throws Exception { } @Test - public void testGroupActuatorAsCodeCheckBackwardsCompatibility() throws Exception { + void testGroupActuatorAsCodeCheckBackwardsCompatibility() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/group-actuator-as-code-check-backwards-compatibility")) .andExpect(jsonPath("$.openapi", is("3.0.1"))) .andExpect(status().isOk()) @@ -68,7 +67,7 @@ public void testGroupActuatorAsCodeCheckBackwardsCompatibility() throws Exceptio } @Test - public void testGroupActuatorAsCode() throws Exception { + void testGroupActuatorAsCode() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/group-actuator-as-code")) .andExpect(jsonPath("$.openapi", is("3.0.1"))) .andExpect(status().isOk()) @@ -76,7 +75,7 @@ public void testGroupActuatorAsCode() throws Exception { } @Test - public void testGroupActuatorAsProperties() throws Exception { + void testGroupActuatorAsProperties() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/group-actuator-as-properties")) .andExpect(jsonPath("$.openapi", is("3.0.1"))) .andExpect(status().isOk()) @@ -87,12 +86,10 @@ public void testGroupActuatorAsProperties() throws Exception { static class SpringDocTestApp { @Bean - public GroupedOpenApi asCodeCheckBackwardsCompatibility(ActuatorOpenApiCustomizer actuatorOpenApiCustomiser, - OperationCustomizer actuatorCustomizer, WebEndpointProperties endpointProperties) { + public GroupedOpenApi asCodeCheckBackwardsCompatibility(OperationCustomizer actuatorCustomizer, WebEndpointProperties endpointProperties) { return GroupedOpenApi.builder() .group("group-actuator-as-code-check-backwards-compatibility") .pathsToMatch(endpointProperties.getBasePath() + ALL_PATTERN) - .addOpenApiCustomizer(actuatorOpenApiCustomiser) .addOperationCustomizer(actuatorCustomizer) .build(); } diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app36/SpringDocApp36Test.java b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app36/SpringDocApp36Test.java index 7883c705c..e51e85383 100644 --- a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app36/SpringDocApp36Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app36/SpringDocApp36Test.java @@ -37,7 +37,7 @@ public class SpringDocApp36Test extends AbstractSpringDocTest { @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)).andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) .andExpect(jsonPath("$.paths./actuator/info.get.operationId", containsString("info"))) diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app68/SpringDocApp68Test.java b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app68/SpringDocApp68Test.java index a8e32fdad..0cbbe9cf3 100644 --- a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app68/SpringDocApp68Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app68/SpringDocApp68Test.java @@ -37,10 +37,9 @@ @TestPropertySource(properties = { "management.endpoints.enabled-by-default=true", "springdoc.show-actuator=true" }) public class SpringDocApp68Test extends AbstractSpringDocTest { - public static String className; @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/stores")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) @@ -48,7 +47,7 @@ public void testApp() throws Exception { } @Test - public void testApp2() throws Exception { + void testApp2() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/users")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) @@ -56,7 +55,7 @@ public void testApp2() throws Exception { } @Test - public void testApp3() throws Exception { + void testApp3() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/pets")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) @@ -64,7 +63,7 @@ public void testApp3() throws Exception { } @Test - public void testApp4() throws Exception { + void testApp4() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/groups test")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) @@ -72,7 +71,7 @@ public void testApp4() throws Exception { } @Test - public void testActuator() throws Exception { + void testActuator() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)).andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) .andExpect(jsonPath("$.paths./actuator/health.get.summary", Matchers.is("Actuator web endpoint 'health'"))) @@ -80,7 +79,7 @@ public void testActuator() throws Exception { } @Test - public void testActuatorDescription() throws Exception { + void testActuatorDescription() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)).andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) .andExpect(jsonPath("$.tags", hasSize(4))) @@ -91,7 +90,7 @@ public void testActuatorDescription() throws Exception { } @Test - public void testApp5() throws Exception { + void testApp5() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/user")) .andExpect(status().isNotFound()); } diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app68/SpringDocTestApp.java b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app68/SpringDocConfiguration.java similarity index 95% rename from springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app68/SpringDocTestApp.java rename to springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app68/SpringDocConfiguration.java index 8b1697320..0dfedc891 100644 --- a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app68/SpringDocTestApp.java +++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app68/SpringDocConfiguration.java @@ -34,16 +34,16 @@ import org.springdoc.core.models.GroupedOpenApi; import org.springdoc.core.utils.Constants; -import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; import org.springframework.web.method.HandlerMethod; -@SpringBootApplication -public class SpringDocTestApp { - public static void main(String[] args) { - SpringApplication.run(SpringDocTestApp.class, args); - } +@Configuration +public class SpringDocConfiguration { + + @SpringBootApplication + static class SpringDocTestApp {} @Bean public GroupedOpenApi storeOpenApi() { diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app72/BlockingAutoConfigurationTest.java b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app72/BlockingAutoConfigurationTest.java index 63b2e4149..50037fee8 100644 --- a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app72/BlockingAutoConfigurationTest.java +++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app72/BlockingAutoConfigurationTest.java @@ -29,13 +29,13 @@ import static org.assertj.core.api.Assertions.assertThat; -public class BlockingAutoConfigurationTest { +class BlockingAutoConfigurationTest { private final WebApplicationContextRunner contextRunner = new WebApplicationContextRunner() .withUserConfiguration(TestApp.class); @Test - public void configurations_successfully_loaded() { + void configurations_successfully_loaded() { contextRunner .withPropertyValues("springdoc.show-actuator=true") .run(context -> assertThat(context) @@ -47,7 +47,7 @@ public void configurations_successfully_loaded() { } @Test - public void configurations_not_loaded_when_application_is_not_web() { + void configurations_not_loaded_when_application_is_not_web() { new ApplicationContextRunner() .withUserConfiguration(TestApp.class) .run(context -> assertThat(context) @@ -59,7 +59,7 @@ public void configurations_not_loaded_when_application_is_not_web() { } @Test - public void actuator_configuration_not_loaded_when_not_enabled_explicitly() { + void actuator_configuration_not_loaded_when_not_enabled_explicitly() { contextRunner .run(context -> assertThat(context) .hasNotFailed() @@ -70,7 +70,7 @@ public void actuator_configuration_not_loaded_when_not_enabled_explicitly() { } @Test - public void configurations_not_loaded_when_disabled() { + void configurations_not_loaded_when_disabled() { contextRunner .withPropertyValues("springdoc.api-docs.enabled=false") .run(context -> assertThat(context) @@ -82,7 +82,7 @@ public void configurations_not_loaded_when_disabled() { } @Test - public void configurations_not_loaded_when_mvc_is_not_on_class_path() { + void configurations_not_loaded_when_mvc_is_not_on_class_path() { contextRunner .withClassLoader(new FilteredClassLoader("org.springframework.web.context.support.GenericWebApplicationContext")) .run(context -> assertThat(context) diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app72/CacheAutoConfigurationTest1.java b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app72/CacheAutoConfigurationTest1.java index 3745fec4c..d1b91cef0 100644 --- a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app72/CacheAutoConfigurationTest1.java +++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app72/CacheAutoConfigurationTest1.java @@ -31,7 +31,7 @@ public class CacheAutoConfigurationTest1 { .withUserConfiguration(TestApp.class); @Test - public void cache_configuration_loaded_when_not_disabled_explicitly() { + void cache_configuration_loaded_when_not_disabled_explicitly() { contextRunner .run(context -> assertThat(context) .hasNotFailed() @@ -42,7 +42,7 @@ public void cache_configuration_loaded_when_not_disabled_explicitly() { } @Test - public void cache_configuration_loaded_when_disabled_explicitly() { + void cache_configuration_loaded_when_disabled_explicitly() { contextRunner .withPropertyValues("springdoc.cache.disabled=false") .run(context -> assertThat(context) @@ -54,7 +54,7 @@ public void cache_configuration_loaded_when_disabled_explicitly() { } @Test - public void cache_configurations_successfully_disabled() { + void cache_configurations_successfully_disabled() { contextRunner .withPropertyValues("springdoc.cache.disabled=true") .run(context -> assertThat(context) @@ -66,7 +66,7 @@ public void cache_configurations_successfully_disabled() { } @Test - public void group_configuration_loaded() { + void group_configuration_loaded() { contextRunner .withPropertyValues("springdoc.group-configs[0].group=stores", "springdoc.group-configs[0].paths-to-match=/store/**") .run(context -> assertThat(context) diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app72/GroupAutoConfigurationTest.java b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app72/GroupAutoConfigurationTest.java index 1c2d75204..ef634e5a7 100644 --- a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app72/GroupAutoConfigurationTest.java +++ b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/java/test/org/springdoc/api/app72/GroupAutoConfigurationTest.java @@ -33,7 +33,7 @@ public class GroupAutoConfigurationTest { .withUserConfiguration(TestApp.class); @Test - public void group_configuration_loaded() { + void group_configuration_loaded() { contextRunner .run(context -> assertThat(context) .hasNotFailed() 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..a5bd4f9dd 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 @@ -27,7 +27,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'loggers-name'", - "operationId": "loggers-name", + "operationId": "loggerLevels", "parameters": [ { "name": "name", @@ -58,6 +58,9 @@ } } } + }, + "404": { + "description": "Not Found" } } }, @@ -66,7 +69,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'loggers-name'", - "operationId": "loggers-name_2", + "operationId": "configureLogLevel", "parameters": [ { "name": "name", @@ -96,15 +99,11 @@ } }, "responses": { - "200": { - "description": "OK", - "content": { - "*/*": { - "schema": { - "type": "object" - } - } - } + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request" } } } @@ -164,7 +163,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'threaddump'", - "operationId": "threaddump", + "operationId": "threadDump", "responses": { "200": { "description": "OK", @@ -200,7 +199,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'scheduledtasks'", - "operationId": "scheduledtasks", + "operationId": "scheduledTasks", "responses": { "200": { "description": "OK", @@ -225,13 +224,78 @@ } } }, + "/application/sbom": { + "get": { + "tags": [ + "Actuator" + ], + "summary": "Actuator web endpoint 'sbom'", + "operationId": "sboms", + "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", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/octet-stream": { + "schema": { + "type": "object" + } + } + } + }, + "404": { + "description": "Not Found" + } + } + } + }, "/application/metrics": { "get": { "tags": [ "Actuator" ], "summary": "Actuator web endpoint 'metrics'", - "operationId": "metrics", + "operationId": "listNames", "responses": { "200": { "description": "OK", @@ -262,7 +326,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'metrics-requiredMetricName'", - "operationId": "metrics-requiredMetricName", + "operationId": "metric", "parameters": [ { "name": "requiredMetricName", @@ -271,6 +335,13 @@ "schema": { "type": "string" } + }, + { + "name": "tag", + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { @@ -293,6 +364,9 @@ } } } + }, + "404": { + "description": "Not Found" } } } @@ -396,7 +470,16 @@ "Actuator" ], "summary": "Actuator web endpoint 'heapdump'", - "operationId": "heapdump", + "operationId": "heapDump", + "parameters": [ + { + "name": "live", + "in": "query", + "schema": { + "type": "boolean" + } + } + ], "responses": { "200": { "description": "OK", @@ -448,7 +531,16 @@ "Actuator" ], "summary": "Actuator web endpoint 'env'", - "operationId": "env", + "operationId": "environment", + "parameters": [ + { + "name": "pattern", + "in": "query", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", @@ -479,7 +571,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'env-toMatch'", - "operationId": "env-toMatch", + "operationId": "environmentEntry", "parameters": [ { "name": "toMatch", @@ -510,6 +602,9 @@ } } } + }, + "404": { + "description": "Not Found" } } } @@ -520,7 +615,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'configprops'", - "operationId": "configprops", + "operationId": "configurationProperties", "responses": { "200": { "description": "OK", @@ -551,7 +646,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'configprops-prefix'", - "operationId": "configprops-prefix", + "operationId": "configurationPropertiesWithPrefix", "parameters": [ { "name": "prefix", @@ -582,6 +677,9 @@ } } } + }, + "404": { + "description": "Not Found" } } } @@ -652,17 +750,10 @@ "Actuator" ], "summary": "Actuator web endpoint 'caches'", - "operationId": "caches_2", + "operationId": "clearCaches", "responses": { - "200": { - "description": "OK", - "content": { - "*/*": { - "schema": { - "type": "object" - } - } - } + "204": { + "description": "No Content" } } } @@ -673,7 +764,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'caches-cache'", - "operationId": "caches-cache", + "operationId": "cache", "parameters": [ { "name": "cache", @@ -682,6 +773,13 @@ "schema": { "type": "string" } + }, + { + "name": "cacheManager", + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { @@ -704,6 +802,9 @@ } } } + }, + "404": { + "description": "Not Found" } } }, @@ -712,7 +813,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'caches-cache'", - "operationId": "caches-cache_2", + "operationId": "clearCache", "parameters": [ { "name": "cache", @@ -721,28 +822,21 @@ "schema": { "type": "string" } + }, + { + "name": "cacheManager", + "in": "query", + "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" - } - } - } + "204": { + "description": "No Content" + }, + "404": { + "description": "Not Found" } } } 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..a239113a6 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 @@ -27,7 +27,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'loggers-name'", - "operationId": "loggers-name", + "operationId": "loggerLevels", "parameters": [ { "name": "name", @@ -58,6 +58,9 @@ } } } + }, + "404": { + "description": "Not Found" } } }, @@ -66,7 +69,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'loggers-name'", - "operationId": "loggers-name_2", + "operationId": "configureLogLevel", "parameters": [ { "name": "name", @@ -96,15 +99,11 @@ } }, "responses": { - "200": { - "description": "OK", - "content": { - "*/*": { - "schema": { - "type": "object" - } - } - } + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request" } } } @@ -164,7 +163,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'threaddump'", - "operationId": "threaddump", + "operationId": "threadDump", "responses": { "200": { "description": "OK", @@ -200,7 +199,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'scheduledtasks'", - "operationId": "scheduledtasks", + "operationId": "scheduledTasks", "responses": { "200": { "description": "OK", @@ -225,13 +224,78 @@ } } }, + "/application/sbom": { + "get": { + "tags": [ + "Actuator" + ], + "summary": "Actuator web endpoint 'sbom'", + "operationId": "sboms", + "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", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/octet-stream": { + "schema": { + "type": "object" + } + } + } + }, + "404": { + "description": "Not Found" + } + } + } + }, "/application/metrics": { "get": { "tags": [ "Actuator" ], "summary": "Actuator web endpoint 'metrics'", - "operationId": "metrics", + "operationId": "listNames", "responses": { "200": { "description": "OK", @@ -262,7 +326,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'metrics-requiredMetricName'", - "operationId": "metrics-requiredMetricName", + "operationId": "metric", "parameters": [ { "name": "requiredMetricName", @@ -271,6 +335,13 @@ "schema": { "type": "string" } + }, + { + "name": "tag", + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { @@ -293,6 +364,9 @@ } } } + }, + "404": { + "description": "Not Found" } } } @@ -396,7 +470,16 @@ "Actuator" ], "summary": "Actuator web endpoint 'heapdump'", - "operationId": "heapdump", + "operationId": "heapDump", + "parameters": [ + { + "name": "live", + "in": "query", + "schema": { + "type": "boolean" + } + } + ], "responses": { "200": { "description": "OK", @@ -448,7 +531,16 @@ "Actuator" ], "summary": "Actuator web endpoint 'env'", - "operationId": "env", + "operationId": "environment", + "parameters": [ + { + "name": "pattern", + "in": "query", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", @@ -479,7 +571,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'env-toMatch'", - "operationId": "env-toMatch", + "operationId": "environmentEntry", "parameters": [ { "name": "toMatch", @@ -510,6 +602,9 @@ } } } + }, + "404": { + "description": "Not Found" } } } @@ -520,7 +615,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'configprops'", - "operationId": "configprops", + "operationId": "configurationProperties", "responses": { "200": { "description": "OK", @@ -551,7 +646,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'configprops-prefix'", - "operationId": "configprops-prefix", + "operationId": "configurationPropertiesWithPrefix", "parameters": [ { "name": "prefix", @@ -582,6 +677,9 @@ } } } + }, + "404": { + "description": "Not Found" } } } @@ -652,17 +750,10 @@ "Actuator" ], "summary": "Actuator web endpoint 'caches'", - "operationId": "caches_2", + "operationId": "clearCaches", "responses": { - "200": { - "description": "OK", - "content": { - "*/*": { - "schema": { - "type": "object" - } - } - } + "204": { + "description": "No Content" } } } @@ -673,7 +764,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'caches-cache'", - "operationId": "caches-cache", + "operationId": "cache", "parameters": [ { "name": "cache", @@ -682,6 +773,13 @@ "schema": { "type": "string" } + }, + { + "name": "cacheManager", + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { @@ -704,6 +802,9 @@ } } } + }, + "404": { + "description": "Not Found" } } }, @@ -712,7 +813,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'caches-cache'", - "operationId": "caches-cache_2", + "operationId": "clearCache", "parameters": [ { "name": "cache", @@ -721,28 +822,21 @@ "schema": { "type": "string" } + }, + { + "name": "cacheManager", + "in": "query", + "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" - } - } - } + "204": { + "description": "No Content" + }, + "404": { + "description": "Not Found" } } } 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..f585b1519 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 @@ -27,7 +27,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'loggers-name'", - "operationId": "loggers-name", + "operationId": "loggerLevels", "parameters": [ { "name": "name", @@ -58,6 +58,9 @@ } } } + }, + "404": { + "description": "Not Found" } } }, @@ -66,7 +69,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'loggers-name'", - "operationId": "loggers-name_2", + "operationId": "configureLogLevel", "parameters": [ { "name": "name", @@ -96,15 +99,11 @@ } }, "responses": { - "200": { - "description": "OK", - "content": { - "*/*": { - "schema": { - "type": "object" - } - } - } + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request" } } } @@ -164,7 +163,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'threaddump'", - "operationId": "threaddump", + "operationId": "threadDump", "responses": { "200": { "description": "OK", @@ -200,7 +199,38 @@ "Actuator" ], "summary": "Actuator web endpoint 'scheduledtasks'", - "operationId": "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" + } + } + } + } + } + } + }, + "/actuator/sbom": { + "get": { + "tags": [ + "Actuator" + ], + "summary": "Actuator web endpoint 'sbom'", + "operationId": "sboms", "responses": { "200": { "description": "OK", @@ -225,13 +255,47 @@ } } }, + "/actuator/sbom/{id}": { + "get": { + "tags": [ + "Actuator" + ], + "summary": "Actuator web endpoint 'sbom-id'", + "operationId": "sbom", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/octet-stream": { + "schema": { + "type": "object" + } + } + } + }, + "404": { + "description": "Not Found" + } + } + } + }, "/actuator/metrics": { "get": { "tags": [ "Actuator" ], "summary": "Actuator web endpoint 'metrics'", - "operationId": "metrics", + "operationId": "listNames", "responses": { "200": { "description": "OK", @@ -262,7 +326,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'metrics-requiredMetricName'", - "operationId": "metrics-requiredMetricName", + "operationId": "metric", "parameters": [ { "name": "requiredMetricName", @@ -271,6 +335,13 @@ "schema": { "type": "string" } + }, + { + "name": "tag", + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { @@ -293,6 +364,9 @@ } } } + }, + "404": { + "description": "Not Found" } } } @@ -396,7 +470,16 @@ "Actuator" ], "summary": "Actuator web endpoint 'heapdump'", - "operationId": "heapdump", + "operationId": "heapDump", + "parameters": [ + { + "name": "live", + "in": "query", + "schema": { + "type": "boolean" + } + } + ], "responses": { "200": { "description": "OK", @@ -442,44 +525,22 @@ } } }, - "/actuator/health/**": { + "/actuator/env": { "get": { "tags": [ "Actuator" ], - "summary": "Actuator web endpoint 'health-path'", - "operationId": "health-path", - "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" - } - } + "summary": "Actuator web endpoint 'env'", + "operationId": "environment", + "parameters": [ + { + "name": "pattern", + "in": "query", + "schema": { + "type": "string" } } - } - } - }, - "/actuator/env": { - "get": { - "tags": [ - "Actuator" ], - "summary": "Actuator web endpoint 'env'", - "operationId": "env", "responses": { "200": { "description": "OK", @@ -510,7 +571,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'env-toMatch'", - "operationId": "env-toMatch", + "operationId": "environmentEntry", "parameters": [ { "name": "toMatch", @@ -541,6 +602,9 @@ } } } + }, + "404": { + "description": "Not Found" } } } @@ -551,7 +615,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'configprops'", - "operationId": "configprops", + "operationId": "configurationProperties", "responses": { "200": { "description": "OK", @@ -582,7 +646,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'configprops-prefix'", - "operationId": "configprops-prefix", + "operationId": "configurationPropertiesWithPrefix", "parameters": [ { "name": "prefix", @@ -613,6 +677,9 @@ } } } + }, + "404": { + "description": "Not Found" } } } @@ -683,17 +750,10 @@ "Actuator" ], "summary": "Actuator web endpoint 'caches'", - "operationId": "caches_2", + "operationId": "clearCaches", "responses": { - "200": { - "description": "OK", - "content": { - "*/*": { - "schema": { - "type": "object" - } - } - } + "204": { + "description": "No Content" } } } @@ -704,7 +764,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'caches-cache'", - "operationId": "caches-cache", + "operationId": "cache", "parameters": [ { "name": "cache", @@ -713,6 +773,13 @@ "schema": { "type": "string" } + }, + { + "name": "cacheManager", + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { @@ -735,6 +802,9 @@ } } } + }, + "404": { + "description": "Not Found" } } }, @@ -743,7 +813,7 @@ "Actuator" ], "summary": "Actuator web endpoint 'caches-cache'", - "operationId": "caches-cache_2", + "operationId": "clearCache", "parameters": [ { "name": "cache", @@ -752,28 +822,21 @@ "schema": { "type": "string" } + }, + { + "name": "cacheManager", + "in": "query", + "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" - } - } - } + "204": { + "description": "No Content" + }, + "404": { + "description": "Not Found" } } } @@ -825,4 +888,4 @@ } } } -} \ No newline at end of file +} diff --git a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/resources/results/app36.json b/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/resources/results/app36.json deleted file mode 100644 index d43f61e5f..000000000 --- a/springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/resources/results/app36.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "openapi": "3.0.1", - "info": { - "title": "OpenAPI definition", - "version": "v0" - }, - "servers": [ - { - "url": "http://localhost", - "description": "Generated server url" - } - ], - "paths": { - "/persons": { - "get": { - "operationId": "persons", - "responses": { - "200": { - "description": "default response", - "content": { - "*/*": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/actuator/health": { - "get": { - "tags": [ - "Actuator" - ], - "operationId": "handle", - "responses": { - "200": { - "description": "default response", - "content": { - } - } - } - } - }, - "/actuator/health/**": { - "get": { - "tags": [ - "Actuator" - ], - "operationId": "handle_1", - "responses": { - "200": { - "description": "default response", - "content": { - } - } - } - } - }, - "/actuator/info": { - "get": { - "tags": [ - "Actuator" - ], - "operationId": "handle_2", - "responses": { - "200": { - "description": "default response", - "content": { - } - } - } - } - }, - "/actuator": { - "get": { - "tags": [ - "Actuator" - ], - "operationId": "links", - "responses": { - "200": { - "description": "default response", - "content": { - } - } - } - } - } - }, - "components": { - } -} 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..6c579b3e6 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.7.0 4.0.0 springdoc-openapi-data-rest-tests diff --git a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java index 6b2d22ff1..63cff6c93 100644 --- a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java +++ b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java @@ -65,7 +65,7 @@ public static String getContent(String fileName) { } @Test - public void testApp() throws Exception { + void testApp() throws Exception { className = getClass().getSimpleName(); String testNumber = className.replaceAll("[^0-9]", ""); MvcResult mockMvcResult = mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)).andExpect(status().isOk()) diff --git a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app14/SpringDocApp14Test.java b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app14/SpringDocApp14Test.java index fce659ee2..39c01662a 100644 --- a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app14/SpringDocApp14Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app14/SpringDocApp14Test.java @@ -27,7 +27,6 @@ import org.springdoc.core.configuration.SpringDocDataRestConfiguration; import org.springdoc.core.customizers.DataRestDelegatingMethodParameterCustomizer; -import org.springdoc.core.customizers.DelegatingMethodParameterCustomizer; import org.springdoc.core.providers.RepositoryRestConfigurationProvider; import org.springdoc.core.providers.SpringDataWebPropertiesProvider; import test.org.springdoc.api.AbstractSpringDocTest; @@ -57,7 +56,7 @@ static class SpringDocTestApp { @Bean @ConditionalOnMissingBean @Lazy(false) - DelegatingMethodParameterCustomizer delegatingMethodParameterCustomizer(Optional optionalSpringDataWebPropertiesProvider, Optional optionalRepositoryRestConfiguration) { + DataRestDelegatingMethodParameterCustomizer dataRestDelegatingMethodParameterCustomizer(Optional optionalSpringDataWebPropertiesProvider, Optional optionalRepositoryRestConfiguration) { return new DataRestDelegatingMethodParameterCustomizer(optionalSpringDataWebPropertiesProvider, optionalRepositoryRestConfiguration); } } diff --git a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app20/Bank.java b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app20/Bank.java index 6b37ab62a..7683e9d52 100644 --- a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app20/Bank.java +++ b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app20/Bank.java @@ -35,10 +35,6 @@ public String getCode() { return this.code; } - private void setCode(String code) { - this.code = code; - } - public String getName() { return this.name; } diff --git a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app20/BankRepository.java b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app20/BankRepository.java index c6aea4d7d..81d8e8db3 100644 --- a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app20/BankRepository.java +++ b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app20/BankRepository.java @@ -7,6 +7,4 @@ @Repository @RepositoryRestResource(path = "banks") public interface BankRepository extends JpaRepository, CodeLookupRepository { - // moved to CodeLookupRepository - //Bank findOneByCode(String code); } diff --git a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app3/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app3/HelloController.java index 69de12da8..fa4e73631 100644 --- a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app3/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app3/HelloController.java @@ -20,6 +20,7 @@ import org.springdoc.core.converters.models.PageableAsQueryParam; +import org.springdoc.core.converters.models.SortAsQueryParam; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; @@ -36,4 +37,10 @@ public String operation4() { return "operation4"; } + @GetMapping("operation5") + @SortAsQueryParam + public String operation5() { + return "operation5"; + } + } \ No newline at end of file diff --git a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app301/SpringDocApp301Test.java b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app301/SpringDocApp301Test.java index 95760e808..2dbbb1436 100644 --- a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app301/SpringDocApp301Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app301/SpringDocApp301Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -24,13 +24,11 @@ package test.org.springdoc.api.app301; -import java.lang.reflect.Field; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; -import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.introspect.SimpleMixInResolver; import com.fasterxml.jackson.databind.type.ClassKey; import org.apache.commons.lang3.reflect.FieldUtils; @@ -53,10 +51,8 @@ public class SpringDocApp301Test extends AbstractSpringDocTest { @BeforeEach void init() throws IllegalAccessException { - Field convertersField2 = FieldUtils.getDeclaredField(ObjectMapper.class, "_mixIns", true); - SimpleMixInResolver _mixIns = (SimpleMixInResolver) convertersField2.get(objectMapperProvider.jsonMapper()); - Field convertersField3 = FieldUtils.getDeclaredField(SimpleMixInResolver.class, "_localMixIns", true); - Map> _localMixIns = (Map>) convertersField3.get(_mixIns); + SimpleMixInResolver _mixIns = (SimpleMixInResolver) FieldUtils.readDeclaredField(objectMapperProvider.jsonMapper(), "_mixIns", true); + Map> _localMixIns = (Map>) FieldUtils.readDeclaredField(_mixIns, "_localMixIns", true); Iterator>> it = _localMixIns.entrySet().iterator(); while (it.hasNext()) { Map.Entry> entry = it.next(); @@ -70,10 +66,8 @@ void init() throws IllegalAccessException { @AfterEach void clean() throws IllegalAccessException { - Field convertersField2 = FieldUtils.getDeclaredField(ObjectMapper.class, "_mixIns", true); - SimpleMixInResolver _mixIns = (SimpleMixInResolver) convertersField2.get(objectMapperProvider.jsonMapper()); - Field convertersField3 = FieldUtils.getDeclaredField(SimpleMixInResolver.class, "_localMixIns", true); - Map> _localMixIns = (Map>) convertersField3.get(_mixIns); + SimpleMixInResolver _mixIns = (SimpleMixInResolver) FieldUtils.readDeclaredField(objectMapperProvider.jsonMapper(), "_mixIns", true); + Map> _localMixIns = (Map>) FieldUtils.readDeclaredField(_mixIns, "_localMixIns", true); _localMixIns.putAll(springMixins); } diff --git a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app32/SpringDocApp32Test.java b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app32/SpringDocApp32Test.java index 0a6e2d882..5c8ef96af 100644 --- a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app32/SpringDocApp32Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app32/SpringDocApp32Test.java @@ -27,7 +27,6 @@ import org.springdoc.core.configuration.SpringDocDataRestConfiguration; import org.springdoc.core.customizers.DataRestDelegatingMethodParameterCustomizer; -import org.springdoc.core.customizers.DelegatingMethodParameterCustomizer; import org.springdoc.core.providers.RepositoryRestConfigurationProvider; import org.springdoc.core.providers.SpringDataWebPropertiesProvider; import test.org.springdoc.api.AbstractSpringDocTest; @@ -52,7 +51,7 @@ static class SpringDocTestApp { @Bean @ConditionalOnMissingBean @Lazy(false) - DelegatingMethodParameterCustomizer delegatingMethodParameterCustomizer(Optional optionalSpringDataWebPropertiesProvider, Optional optionalRepositoryRestConfiguration) { + DataRestDelegatingMethodParameterCustomizer dataRestDelegatingMethodParameterCustomizer(Optional optionalSpringDataWebPropertiesProvider, Optional optionalRepositoryRestConfiguration) { return new DataRestDelegatingMethodParameterCustomizer(optionalSpringDataWebPropertiesProvider, optionalRepositoryRestConfiguration); } } diff --git a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app36/EnumFieldHolder.java b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app36/EnumFieldHolder.java index 439bd65fe..bd506b1f5 100644 --- a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app36/EnumFieldHolder.java +++ b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app36/EnumFieldHolder.java @@ -1,6 +1,6 @@ /* * - * * Copyright 2019-2022 the original author or authors. + * * 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. diff --git a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app36/EnumFieldHolderRepository.java b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app36/EnumFieldHolderRepository.java index 88a2b518d..2bde495dd 100644 --- a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app36/EnumFieldHolderRepository.java +++ b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app36/EnumFieldHolderRepository.java @@ -1,6 +1,6 @@ /* * - * * Copyright 2019-2022 the original author or authors. + * * 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. diff --git a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app36/SpringDocApp36Test.java b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app36/SpringDocApp36Test.java index 4bef9476f..74850c071 100644 --- a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app36/SpringDocApp36Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app36/SpringDocApp36Test.java @@ -1,6 +1,6 @@ /* * - * * Copyright 2019-2022 the original author or authors. + * * 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. diff --git a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app37/SpringDocApp37Test.java b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app37/SpringDocApp37Test.java index abb038dc0..705fb5984 100644 --- a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app37/SpringDocApp37Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app37/SpringDocApp37Test.java @@ -1,6 +1,6 @@ /* * - * * Copyright 2019-2022 the original author or authors. + * * 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. diff --git a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app6/EmployeeController.java b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app6/EmployeeController.java index 3c0828e92..0cefc1580 100644 --- a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app6/EmployeeController.java +++ b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app6/EmployeeController.java @@ -31,12 +31,6 @@ @RestController class EmployeeController { - private final EmployeeRepository repository; - - EmployeeController(EmployeeRepository repository) { - this.repository = repository; - } - /** * Look up a single {@link Employee} and transform it into a REST resource. Then return it through Spring Web's * {@link ResponseEntity} fluent API. diff --git a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app9/SpringDocApp9Test.java b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app9/SpringDocApp9Test.java index 2b09dac80..f17f38fe2 100644 --- a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app9/SpringDocApp9Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app9/SpringDocApp9Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -24,12 +24,10 @@ package test.org.springdoc.api.app9; -import java.lang.reflect.Field; import java.util.HashMap; import java.util.Iterator; import java.util.Map; -import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.introspect.SimpleMixInResolver; import com.fasterxml.jackson.databind.type.ClassKey; import org.apache.commons.lang3.reflect.FieldUtils; @@ -53,10 +51,8 @@ public class SpringDocApp9Test extends AbstractSpringDocTest { @BeforeEach void init() throws IllegalAccessException { - Field convertersField2 = FieldUtils.getDeclaredField(ObjectMapper.class, "_mixIns", true); - SimpleMixInResolver _mixIns = (SimpleMixInResolver) convertersField2.get(objectMapperProvider.jsonMapper()); - Field convertersField3 = FieldUtils.getDeclaredField(SimpleMixInResolver.class, "_localMixIns", true); - Map> _localMixIns = (Map>) convertersField3.get(_mixIns); + SimpleMixInResolver _mixIns = (SimpleMixInResolver) FieldUtils.readDeclaredField(objectMapperProvider.jsonMapper(), "_mixIns", true); + Map> _localMixIns = (Map>) FieldUtils.readDeclaredField(_mixIns, "_localMixIns", true); Iterator>> it = _localMixIns.entrySet().iterator(); while (it.hasNext()) { Map.Entry> entry = it.next(); @@ -70,10 +66,8 @@ void init() throws IllegalAccessException { @AfterEach void clean() throws IllegalAccessException { - Field convertersField2 = FieldUtils.getDeclaredField(ObjectMapper.class, "_mixIns", true); - SimpleMixInResolver _mixIns = (SimpleMixInResolver) convertersField2.get(objectMapperProvider.jsonMapper()); - Field convertersField3 = FieldUtils.getDeclaredField(SimpleMixInResolver.class, "_localMixIns", true); - Map> _localMixIns = (Map>) convertersField3.get(_mixIns); + SimpleMixInResolver _mixIns = (SimpleMixInResolver) FieldUtils.readDeclaredField(objectMapperProvider.jsonMapper(), "_mixIns", true); + Map> _localMixIns = (Map>) FieldUtils.readDeclaredField(_mixIns, "_localMixIns", true); _localMixIns.putAll(springMixins); } diff --git a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app10.json b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app10.json index 96d007c9a..d7ea17c5e 100644 --- a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app10.json +++ b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app10.json @@ -17,7 +17,7 @@ "account-entity-controller" ], "description": "get-account", - "operationId": "getCollectionResource-account-get_1", + "operationId": "getCollectionResource-account-get", "responses": { "200": { "description": "OK", @@ -262,7 +262,7 @@ "account-property-reference-controller" ], "description": "get-customer-by-account-Id", - "operationId": "followPropertyReference-account-get_1", + "operationId": "followPropertyReference-account-get", "parameters": [ { "name": "id", @@ -440,7 +440,7 @@ "account-property-reference-controller" ], "description": "get-customer-by-account-Id", - "operationId": "followPropertyReference-account-get", + "operationId": "followPropertyReference-account-get_1", "parameters": [ { "name": "id", @@ -515,7 +515,7 @@ "customer-entity-controller" ], "description": "get-customer", - "operationId": "getCollectionResource-customer-get_1", + "operationId": "getCollectionResource-customer-get", "responses": { "200": { "description": "OK", @@ -611,7 +611,7 @@ "tags": [ "profile-controller" ], - "operationId": "listAllFormsOfMetadata_1", + "operationId": "listAllFormsOfMetadata", "responses": { "200": { "description": "OK", @@ -631,7 +631,7 @@ "tags": [ "profile-controller" ], - "operationId": "descriptor_1_1_1", + "operationId": "descriptor", "responses": { "200": { "description": "OK", diff --git a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app11.json b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app11.json index 4c7b2aa89..f840c5afd 100644 --- a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app11.json +++ b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app11.json @@ -17,7 +17,7 @@ "person-entity-controller" ], "description": "get-person", - "operationId": "getCollectionResource-person-get_1", + "operationId": "getCollectionResource-person-get", "parameters": [ { "name": "page", @@ -135,7 +135,7 @@ "tags": [ "profile-controller" ], - "operationId": "descriptor_1", + "operationId": "descriptor", "responses": { "200": { "description": "OK", diff --git a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app16.json b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app16.json index 697c129cf..e95e0eaf6 100644 --- a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app16.json +++ b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app16.json @@ -23,7 +23,7 @@ ], "summary": "getCollectionResource-account-get", "description": "get-account", - "operationId": "getCollectionResource-account-get_1", + "operationId": "getCollectionResource-account-get", "responses": { "200": { "description": "OK", @@ -310,7 +310,7 @@ ], "summary": "followPropertyReference-account-get", "description": "get-customer-by-account-Id", - "operationId": "followPropertyReference-account-get_1", + "operationId": "followPropertyReference-account-get", "parameters": [ { "name": "id", @@ -512,7 +512,7 @@ ], "summary": "followPropertyReference-account-get", "description": "get-customer-by-account-Id", - "operationId": "followPropertyReference-account-get", + "operationId": "followPropertyReference-account-get_1", "parameters": [ { "name": "id", @@ -599,7 +599,7 @@ ], "summary": "getCollectionResource-customer-get", "description": "get-customer", - "operationId": "getCollectionResource-customer-get_1", + "operationId": "getCollectionResource-customer-get", "responses": { "200": { "description": "OK", @@ -863,7 +863,7 @@ "profile-controller" ], "summary": "listAllFormsOfMetadata", - "operationId": "listAllFormsOfMetadata_1", + "operationId": "listAllFormsOfMetadata", "responses": { "200": { "description": "OK", @@ -884,7 +884,7 @@ "profile-controller" ], "summary": "descriptor", - "operationId": "descriptor_1_1_1", + "operationId": "descriptor", "responses": { "200": { "description": "OK", @@ -915,7 +915,7 @@ "profile-controller" ], "summary": "descriptor", - "operationId": "descriptor_1_1_2", + "operationId": "descriptor_1", "responses": { "200": { "description": "OK", @@ -1038,30 +1038,28 @@ } } }, - "EntityModelCustomer": { + "EntityModelAccount": { "type": "object", "properties": { - "firstname": { - "type": "string" - }, - "lastname": { - "type": "string" + "expiryDate": { + "type": "string", + "format": "date-time" }, "_links": { "$ref": "#/components/schemas/Links" } } }, - "CollectionModelEntityModelCustomer": { + "CollectionModelEntityModelAccount": { "type": "object", "properties": { "_embedded": { "type": "object", "properties": { - "customers": { + "accounts": { "type": "array", "items": { - "$ref": "#/components/schemas/EntityModelCustomer" + "$ref": "#/components/schemas/EntityModelAccount" } } } @@ -1071,71 +1069,49 @@ } } }, - "PageMetadata": { + "EntityModelCustomer": { "type": "object", "properties": { - "size": { - "type": "integer", - "format": "int64" - }, - "totalElements": { - "type": "integer", - "format": "int64" + "firstname": { + "type": "string" }, - "totalPages": { - "type": "integer", - "format": "int64" + "lastname": { + "type": "string" }, - "number": { - "type": "integer", - "format": "int64" + "_links": { + "$ref": "#/components/schemas/Links" } } }, - "PagedModelEntityModelCustomer": { + "CollectionModelObject": { "type": "object", "properties": { "_embedded": { "type": "object", "properties": { - "customers": { + "objects": { "type": "array", "items": { - "$ref": "#/components/schemas/EntityModelCustomer" + "type": "object" } } } }, - "_links": { - "$ref": "#/components/schemas/Links" - }, - "page": { - "$ref": "#/components/schemas/PageMetadata" - } - } - }, - "EntityModelAccount": { - "type": "object", - "properties": { - "expiryDate": { - "type": "string", - "format": "date-time" - }, "_links": { "$ref": "#/components/schemas/Links" } } }, - "CollectionModelEntityModelAccount": { + "CollectionModelEntityModelCustomer": { "type": "object", "properties": { "_embedded": { "type": "object", "properties": { - "accounts": { + "customers": { "type": "array", "items": { - "$ref": "#/components/schemas/EntityModelAccount" + "$ref": "#/components/schemas/EntityModelCustomer" } } } @@ -1145,22 +1121,46 @@ } } }, - "CollectionModelObject": { + "PageMetadata": { + "type": "object", + "properties": { + "size": { + "type": "integer", + "format": "int64" + }, + "totalElements": { + "type": "integer", + "format": "int64" + }, + "totalPages": { + "type": "integer", + "format": "int64" + }, + "number": { + "type": "integer", + "format": "int64" + } + } + }, + "PagedModelEntityModelCustomer": { "type": "object", "properties": { "_embedded": { "type": "object", "properties": { - "objects": { + "customers": { "type": "array", "items": { - "type": "object" + "$ref": "#/components/schemas/EntityModelCustomer" } } } }, "_links": { "$ref": "#/components/schemas/Links" + }, + "page": { + "$ref": "#/components/schemas/PageMetadata" } } }, diff --git a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app17.json b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app17.json index 96b0394ee..e1085bae2 100644 --- a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app17.json +++ b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app17.json @@ -17,7 +17,7 @@ "child-property-entity-controller" ], "description": "get-childproperty", - "operationId": "getCollectionResource-childproperty-get_1", + "operationId": "getCollectionResource-childproperty-get", "parameters": [ { "name": "page", @@ -83,7 +83,7 @@ "tags": [ "profile-controller" ], - "operationId": "listAllFormsOfMetadata_1", + "operationId": "listAllFormsOfMetadata", "responses": { "200": { "description": "OK", @@ -103,7 +103,7 @@ "tags": [ "profile-controller" ], - "operationId": "descriptor_1", + "operationId": "descriptor", "responses": { "200": { "description": "OK", @@ -133,7 +133,7 @@ "tags": [ "profile-controller" ], - "operationId": "descriptor_2", + "operationId": "descriptor_1", "responses": { "200": { "description": "OK", @@ -164,7 +164,7 @@ "property-entity-controller" ], "description": "get-property", - "operationId": "getCollectionResource-property-get_1", + "operationId": "getCollectionResource-property-get", "parameters": [ { "name": "page", @@ -320,7 +320,7 @@ } } }, - "EntityModelProperty": { + "EntityModelChildProperty": { "type": "object", "properties": { "id": { @@ -330,9 +330,6 @@ "name": { "type": "string" }, - "myChildPropertyName": { - "$ref": "#/components/schemas/ChildProperty" - }, "_links": { "$ref": "#/components/schemas/Links" } @@ -359,16 +356,16 @@ } } }, - "PagedModelEntityModelProperty": { + "PagedModelEntityModelChildProperty": { "type": "object", "properties": { "_embedded": { "type": "object", "properties": { - "properties": { + "childProperties": { "type": "array", "items": { - "$ref": "#/components/schemas/EntityModelProperty" + "$ref": "#/components/schemas/EntityModelChildProperty" } } } @@ -381,7 +378,7 @@ } } }, - "EntityModelChildProperty": { + "EntityModelProperty": { "type": "object", "properties": { "id": { @@ -391,21 +388,24 @@ "name": { "type": "string" }, + "myChildPropertyName": { + "$ref": "#/components/schemas/ChildProperty" + }, "_links": { "$ref": "#/components/schemas/Links" } } }, - "PagedModelEntityModelChildProperty": { + "PagedModelEntityModelProperty": { "type": "object", "properties": { "_embedded": { "type": "object", "properties": { - "childProperties": { + "properties": { "type": "array", "items": { - "$ref": "#/components/schemas/EntityModelChildProperty" + "$ref": "#/components/schemas/EntityModelProperty" } } } diff --git a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app20.json b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app20.json index 3ebaa3cd8..8a208bfb0 100644 --- a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app20.json +++ b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app20.json @@ -16,7 +16,7 @@ "bank-entity-controller" ], "description": "get-bank", - "operationId": "getCollectionResource-bank-get_1", + "operationId": "getCollectionResource-bank-get", "parameters": [ { "name": "page", @@ -329,7 +329,7 @@ "tags": [ "profile-controller" ], - "operationId": "listAllFormsOfMetadata_1", + "operationId": "listAllFormsOfMetadata", "responses": { "200": { "description": "OK", @@ -349,7 +349,7 @@ "tags": [ "profile-controller" ], - "operationId": "descriptor_1_1_1", + "operationId": "descriptor", "responses": { "200": { "description": "OK", diff --git a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app21.json b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app21.json index 1b2b1cbce..f61470407 100644 --- a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app21.json +++ b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app21.json @@ -17,7 +17,7 @@ "person-entity-controller" ], "description": "get-person", - "operationId": "getCollectionResource-person-get_1", + "operationId": "getCollectionResource-person-get", "parameters": [ { "name": "page", @@ -142,8 +142,8 @@ } ], "responses": { - "404": { - "description": "Contact not found", + "400": { + "description": "Invalid ID supplied", "content": { "application/hal+json": { "schema": { @@ -155,8 +155,8 @@ } } }, - "405": { - "description": "Validation exception", + "200": { + "description": "successful operation", "content": { "application/hal+json": { "schema": { @@ -168,8 +168,8 @@ } } }, - "400": { - "description": "Invalid ID supplied", + "404": { + "description": "Contact not found", "content": { "application/hal+json": { "schema": { @@ -181,8 +181,8 @@ } } }, - "200": { - "description": "successful operation", + "405": { + "description": "Validation exception", "content": { "application/hal+json": { "schema": { @@ -222,7 +222,7 @@ "tags": [ "profile-controller" ], - "operationId": "descriptor_1", + "operationId": "descriptor", "responses": { "200": { "description": "OK", diff --git a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app22.json b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app22.json index 6db5d37e4..7b0342647 100644 --- a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app22.json +++ b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app22.json @@ -17,7 +17,7 @@ "person-entity-controller" ], "description": "get-person", - "operationId": "getCollectionResource-person-get_1", + "operationId": "getCollectionResource-person-get", "parameters": [ { "name": "page", @@ -103,7 +103,7 @@ "tags": [ "profile-controller" ], - "operationId": "descriptor_1", + "operationId": "descriptor", "responses": { "200": { "description": "OK", diff --git a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app23.json b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app23.json index c1c73d94d..3b2dd10aa 100644 --- a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app23.json +++ b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app23.json @@ -17,7 +17,7 @@ "clinic-entity-controller" ], "description": "get-clinic", - "operationId": "getCollectionResource-clinic-get_1", + "operationId": "getCollectionResource-clinic-get", "responses": { "200": { "description": "OK", @@ -230,7 +230,7 @@ "doctor-entity-controller" ], "description": "get-doctor", - "operationId": "getCollectionResource-doctor-get_1", + "operationId": "getCollectionResource-doctor-get", "responses": { "200": { "description": "OK", @@ -443,7 +443,7 @@ "doctor-property-reference-controller" ], "description": "get-clinic-by-doctor-Id", - "operationId": "followPropertyReference-doctor-get_1", + "operationId": "followPropertyReference-doctor-get", "parameters": [ { "name": "id", @@ -621,7 +621,7 @@ "doctor-property-reference-controller" ], "description": "get-clinic-by-doctor-Id", - "operationId": "followPropertyReference-doctor-get", + "operationId": "followPropertyReference-doctor-get_1", "parameters": [ { "name": "id", @@ -695,7 +695,7 @@ "tags": [ "profile-controller" ], - "operationId": "listAllFormsOfMetadata_1", + "operationId": "listAllFormsOfMetadata", "responses": { "200": { "description": "OK", @@ -715,7 +715,7 @@ "tags": [ "profile-controller" ], - "operationId": "descriptor_1_1_1", + "operationId": "descriptor", "responses": { "200": { "description": "OK", @@ -745,7 +745,7 @@ "tags": [ "profile-controller" ], - "operationId": "descriptor_1_1_2", + "operationId": "descriptor_1", "responses": { "200": { "description": "OK", @@ -853,30 +853,24 @@ } } }, - "EntityModelClinic": { - "required": [ - "name" - ], + "EntityModelDoctor": { "type": "object", "properties": { - "name": { - "type": "string" - }, "_links": { "$ref": "#/components/schemas/Links" } } }, - "CollectionModelEntityModelClinic": { + "CollectionModelEntityModelDoctor": { "type": "object", "properties": { "_embedded": { "type": "object", "properties": { - "clinics": { + "doctors": { "type": "array", "items": { - "$ref": "#/components/schemas/EntityModelClinic" + "$ref": "#/components/schemas/EntityModelDoctor" } } } @@ -886,24 +880,16 @@ } } }, - "EntityModelDoctor": { - "type": "object", - "properties": { - "_links": { - "$ref": "#/components/schemas/Links" - } - } - }, - "CollectionModelEntityModelDoctor": { + "CollectionModelClinic": { "type": "object", "properties": { "_embedded": { "type": "object", "properties": { - "doctors": { + "clinics": { "type": "array", "items": { - "$ref": "#/components/schemas/EntityModelDoctor" + "$ref": "#/components/schemas/ClinicResponse" } } } @@ -932,7 +918,21 @@ } } }, - "CollectionModelClinic": { + "EntityModelClinic": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "_links": { + "$ref": "#/components/schemas/Links" + } + } + }, + "CollectionModelEntityModelClinic": { "type": "object", "properties": { "_embedded": { @@ -941,7 +941,7 @@ "clinics": { "type": "array", "items": { - "$ref": "#/components/schemas/ClinicResponse" + "$ref": "#/components/schemas/EntityModelClinic" } } } diff --git a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app24.json b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app24.json index ad11e0fd4..33090dcc5 100644 --- a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app24.json +++ b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app24.json @@ -105,13 +105,7 @@ "format": "int32" }, "sort": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SortObject" - } - }, - "first": { - "type": "boolean" + "$ref": "#/components/schemas/SortObject" }, "last": { "type": "boolean" @@ -119,6 +113,9 @@ "pageable": { "$ref": "#/components/schemas/PageableObject" }, + "first": { + "type": "boolean" + }, "numberOfElements": { "type": "integer", "format": "int32" @@ -136,16 +133,7 @@ "format": "int64" }, "sort": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SortObject" - } - }, - "paged": { - "type": "boolean" - }, - "unpaged": { - "type": "boolean" + "$ref": "#/components/schemas/SortObject" }, "pageNumber": { "type": "integer", @@ -154,25 +142,25 @@ "pageSize": { "type": "integer", "format": "int32" + }, + "paged": { + "type": "boolean" + }, + "unpaged": { + "type": "boolean" } } }, "SortObject": { "type": "object", "properties": { - "direction": { - "type": "string" - }, - "nullHandling": { - "type": "string" - }, - "ascending": { + "empty": { "type": "boolean" }, - "property": { - "type": "string" + "sorted": { + "type": "boolean" }, - "ignoreCase": { + "unsorted": { "type": "boolean" } } diff --git a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app25.json b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app25.json index 37d589101..bc4d6ea8b 100644 --- a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app25.json +++ b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app25.json @@ -17,7 +17,7 @@ "clinic-entity-controller" ], "description": "get-clinic", - "operationId": "getCollectionResource-clinic-get_1", + "operationId": "getCollectionResource-clinic-get", "responses": { "200": { "description": "OK", @@ -230,7 +230,7 @@ "doctor-entity-controller" ], "description": "get-doctor", - "operationId": "getCollectionResource-doctor-get_1", + "operationId": "getCollectionResource-doctor-get", "responses": { "200": { "description": "OK", @@ -475,7 +475,7 @@ "doctor-property-reference-controller" ], "description": "get-clinic-by-doctor-Id", - "operationId": "followPropertyReference-doctor-get_1", + "operationId": "followPropertyReference-doctor-get", "parameters": [ { "name": "id", @@ -653,7 +653,7 @@ "doctor-property-reference-controller" ], "description": "get-clinic-by-doctor-Id", - "operationId": "followPropertyReference-doctor-get", + "operationId": "followPropertyReference-doctor-get_1", "parameters": [ { "name": "id", @@ -728,7 +728,7 @@ "owner-entity-controller" ], "description": "get-owner", - "operationId": "getCollectionResource-owner-get_1", + "operationId": "getCollectionResource-owner-get", "parameters": [ { "name": "page", @@ -977,7 +977,7 @@ "owner-property-reference-controller" ], "description": "get-pet-by-owner-Id", - "operationId": "followPropertyReference-owner-get_1", + "operationId": "followPropertyReference-owner-get", "parameters": [ { "name": "id", @@ -1155,7 +1155,7 @@ "owner-property-reference-controller" ], "description": "get-pet-by-owner-Id", - "operationId": "followPropertyReference-owner-get", + "operationId": "followPropertyReference-owner-get_1", "parameters": [ { "name": "id", @@ -1230,7 +1230,7 @@ "pet-entity-controller" ], "description": "get-pet", - "operationId": "getCollectionResource-pet-get_1", + "operationId": "getCollectionResource-pet-get", "parameters": [ { "name": "page", @@ -1509,7 +1509,7 @@ "pet-property-reference-controller" ], "description": "get-owner-by-pet-Id", - "operationId": "followPropertyReference-pet-get_1", + "operationId": "followPropertyReference-pet-get", "parameters": [ { "name": "id", @@ -1687,7 +1687,7 @@ "pet-property-reference-controller" ], "description": "get-owner-by-pet-Id", - "operationId": "followPropertyReference-pet-get", + "operationId": "followPropertyReference-pet-get_1", "parameters": [ { "name": "id", @@ -1761,7 +1761,7 @@ "tags": [ "profile-controller" ], - "operationId": "listAllFormsOfMetadata_1", + "operationId": "listAllFormsOfMetadata", "responses": { "200": { "description": "OK", @@ -1781,7 +1781,7 @@ "tags": [ "profile-controller" ], - "operationId": "descriptor_1_1_1", + "operationId": "descriptor", "responses": { "200": { "description": "OK", @@ -1811,7 +1811,7 @@ "tags": [ "profile-controller" ], - "operationId": "descriptor_1_1_2", + "operationId": "descriptor_1", "responses": { "200": { "description": "OK", @@ -1841,7 +1841,7 @@ "tags": [ "profile-controller" ], - "operationId": "descriptor_1_1_3", + "operationId": "descriptor_2", "responses": { "200": { "description": "OK", @@ -1871,7 +1871,7 @@ "tags": [ "profile-controller" ], - "operationId": "descriptor_1_1_4", + "operationId": "descriptor_3", "responses": { "200": { "description": "OK", @@ -2026,149 +2026,6 @@ } } }, - "EntityModelClinic": { - "required": [ - "name" - ], - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "addresses": { - "maxItems": 2147483647, - "minItems": 1, - "uniqueItems": true, - "type": "array", - "items": { - "$ref": "#/components/schemas/Address" - } - }, - "_links": { - "$ref": "#/components/schemas/Links" - } - } - }, - "CollectionModelEntityModelClinic": { - "type": "object", - "properties": { - "_embedded": { - "type": "object", - "properties": { - "clinics": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityModelClinic" - } - } - } - }, - "_links": { - "$ref": "#/components/schemas/Links" - } - } - }, - "EntityModelPet": { - "required": [ - "_type", - "name" - ], - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "_type": { - "type": "string" - }, - "_links": { - "$ref": "#/components/schemas/Links" - } - } - }, - "PageMetadata": { - "type": "object", - "properties": { - "size": { - "type": "integer", - "format": "int64" - }, - "totalElements": { - "type": "integer", - "format": "int64" - }, - "totalPages": { - "type": "integer", - "format": "int64" - }, - "number": { - "type": "integer", - "format": "int64" - } - } - }, - "PagedModelEntityModelPet": { - "type": "object", - "properties": { - "_embedded": { - "type": "object", - "properties": { - "pets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityModelPet" - } - } - } - }, - "_links": { - "$ref": "#/components/schemas/Links" - }, - "page": { - "$ref": "#/components/schemas/PageMetadata" - } - } - }, - "CollectionModelObject": { - "type": "object", - "properties": { - "_embedded": { - "type": "object", - "properties": { - "objects": { - "type": "array", - "items": { - "type": "object" - } - } - } - }, - "_links": { - "$ref": "#/components/schemas/Links" - } - } - }, - "EntityModelOwner": { - "required": [ - "addresses", - "lastname" - ], - "type": "object", - "properties": { - "firstname": { - "type": "string" - }, - "lastname": { - "type": "string" - }, - "addresses": { - "$ref": "#/components/schemas/Address" - }, - "_links": { - "$ref": "#/components/schemas/Links" - } - } - }, "EntityModelDoctor": { "required": [ "firstname", @@ -2303,6 +2160,107 @@ } } }, + "CollectionModelObject": { + "type": "object", + "properties": { + "_embedded": { + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "type": "object" + } + } + } + }, + "_links": { + "$ref": "#/components/schemas/Links" + } + } + }, + "EntityModelPet": { + "required": [ + "_type", + "name" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "_type": { + "type": "string" + }, + "_links": { + "$ref": "#/components/schemas/Links" + } + } + }, + "PageMetadata": { + "type": "object", + "properties": { + "size": { + "type": "integer", + "format": "int64" + }, + "totalElements": { + "type": "integer", + "format": "int64" + }, + "totalPages": { + "type": "integer", + "format": "int64" + }, + "number": { + "type": "integer", + "format": "int64" + } + } + }, + "PagedModelEntityModelPet": { + "type": "object", + "properties": { + "_embedded": { + "type": "object", + "properties": { + "pets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityModelPet" + } + } + } + }, + "_links": { + "$ref": "#/components/schemas/Links" + }, + "page": { + "$ref": "#/components/schemas/PageMetadata" + } + } + }, + "EntityModelOwner": { + "required": [ + "addresses", + "lastname" + ], + "type": "object", + "properties": { + "firstname": { + "type": "string" + }, + "lastname": { + "type": "string" + }, + "addresses": { + "$ref": "#/components/schemas/Address" + }, + "_links": { + "$ref": "#/components/schemas/Links" + } + } + }, "PagedModelEntityModelOwner": { "type": "object", "properties": { @@ -2354,6 +2312,48 @@ } } }, + "EntityModelClinic": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "addresses": { + "maxItems": 2147483647, + "minItems": 1, + "uniqueItems": true, + "type": "array", + "items": { + "$ref": "#/components/schemas/Address" + } + }, + "_links": { + "$ref": "#/components/schemas/Links" + } + } + }, + "CollectionModelEntityModelClinic": { + "type": "object", + "properties": { + "_embedded": { + "type": "object", + "properties": { + "clinics": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityModelClinic" + } + } + } + }, + "_links": { + "$ref": "#/components/schemas/Links" + } + } + }, "ClinicRequestBody": { "required": [ "name" diff --git a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app26.json b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app26.json index ba90577f5..562819ee2 100644 --- a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app26.json +++ b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app26.json @@ -17,7 +17,7 @@ "person-entity-controller" ], "description": "get-person", - "operationId": "getCollectionResource-person-get_1", + "operationId": "getCollectionResource-person-get", "parameters": [ { "name": "page", @@ -151,7 +151,7 @@ "tags": [ "profile-controller" ], - "operationId": "descriptor_1", + "operationId": "descriptor", "responses": { "200": { "description": "OK", diff --git a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app27.json b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app27.json index cb45a6931..dd3633d7b 100644 --- a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app27.json +++ b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app27.json @@ -63,16 +63,7 @@ "format": "int64" }, "sort": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SortObject" - } - }, - "paged": { - "type": "boolean" - }, - "unpaged": { - "type": "boolean" + "$ref": "#/components/schemas/SortObject" }, "pageNumber": { "type": "integer", @@ -81,25 +72,25 @@ "pageSize": { "type": "integer", "format": "int32" + }, + "paged": { + "type": "boolean" + }, + "unpaged": { + "type": "boolean" } } }, "SortObject": { "type": "object", "properties": { - "direction": { - "type": "string" - }, - "nullHandling": { - "type": "string" - }, - "ascending": { + "empty": { "type": "boolean" }, - "property": { - "type": "string" + "sorted": { + "type": "boolean" }, - "ignoreCase": { + "unsorted": { "type": "boolean" } } diff --git a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app29.json b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app29.json index 948afb7ef..8eb0185ab 100644 --- a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app29.json +++ b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app29.json @@ -17,7 +17,7 @@ "person-entity-controller" ], "description": "get-person", - "operationId": "getCollectionResource-person-get_1", + "operationId": "getCollectionResource-person-get", "parameters": [ { "name": "page", @@ -103,7 +103,7 @@ "tags": [ "profile-controller" ], - "operationId": "descriptor_1", + "operationId": "descriptor", "responses": { "200": { "description": "OK", diff --git a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app3.json b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app3.json index 86b1ab4c4..74ca10337 100644 --- a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app3.json +++ b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app3.json @@ -11,6 +11,39 @@ } ], "paths": { + "/demo/operation5": { + "get": { + "tags": [ + "hello-controller" + ], + "operationId": "operation5", + "parameters": [ + { + "name": "sort", + "in": "query", + "description": "Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, "/demo/operation4": { "get": { "tags": [ diff --git a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app34.json b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app34.json index fd2dcf8f8..57c436e53 100644 --- a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app34.json +++ b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app34.json @@ -22,7 +22,7 @@ "The account Repository" ], "description": "get-account", - "operationId": "getCollectionResource-account-get_1", + "operationId": "getCollectionResource-account-get", "responses": { "200": { "description": "OK", @@ -302,7 +302,7 @@ "The account Repository" ], "description": "get-customer-by-account-Id", - "operationId": "followPropertyReference-account-get_1", + "operationId": "followPropertyReference-account-get", "parameters": [ { "name": "id", @@ -500,7 +500,7 @@ "The account Repository" ], "description": "get-customer-by-account-Id", - "operationId": "followPropertyReference-account-get", + "operationId": "followPropertyReference-account-get_1", "parameters": [ { "name": "id", @@ -585,7 +585,7 @@ "The customer Repository" ], "description": "get-customer", - "operationId": "getCollectionResource-customer-get_1", + "operationId": "getCollectionResource-customer-get", "responses": { "200": { "description": "OK", @@ -844,7 +844,7 @@ "The customer Repository" ], "description": "get-account-by-customer-Id", - "operationId": "followPropertyReference-customer-get_1", + "operationId": "followPropertyReference-customer-get", "parameters": [ { "name": "id", @@ -997,7 +997,7 @@ "The customer Repository" ], "description": "get-account-by-customer-Id", - "operationId": "followPropertyReference-customer-get", + "operationId": "followPropertyReference-customer-get_1", "parameters": [ { "name": "id", @@ -1038,7 +1038,7 @@ "tags": [ "profile-controller" ], - "operationId": "listAllFormsOfMetadata_1", + "operationId": "listAllFormsOfMetadata", "responses": { "200": { "description": "OK", @@ -1058,7 +1058,7 @@ "tags": [ "profile-controller" ], - "operationId": "descriptor_1_1_1", + "operationId": "descriptor", "responses": { "200": { "description": "OK", @@ -1088,7 +1088,7 @@ "tags": [ "profile-controller" ], - "operationId": "descriptor_1_1_2", + "operationId": "descriptor_1", "responses": { "200": { "description": "OK", diff --git a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app37.json b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app37.json index 12c142085..6b95b0716 100644 --- a/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app37.json +++ b/springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app37.json @@ -17,7 +17,7 @@ "product-entity-entity-controller" ], "description": "get-productentity", - "operationId": "getCollectionResource-productentity-get_1", + "operationId": "getCollectionResource-productentity-get", "parameters": [ { "name": "page", @@ -558,7 +558,7 @@ "tags": [ "profile-controller" ], - "operationId": "listAllFormsOfMetadata_1", + "operationId": "listAllFormsOfMetadata", "responses": { "200": { "description": "OK", @@ -578,7 +578,7 @@ "tags": [ "profile-controller" ], - "operationId": "descriptor_1_1_1", + "operationId": "descriptor", "responses": { "200": { "description": "OK", @@ -832,4 +832,4 @@ } } } -} \ No newline at end of file +} 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..7cf7b5ac5 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.7.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..e8332bd55 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 @@ -18,14 +18,13 @@ package test.org.springdoc.api; +import org.json.JSONException; import org.junit.jupiter.api.Test; import org.springdoc.core.utils.Constants; 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 +33,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 { + void testApp() { String result = null; try { EntityExchangeResult getResult = webTestClient.get().uri(Constants.DEFAULT_API_DOCS_URL + groupName).exchange() @@ -56,5 +53,9 @@ public void testApp() throws Exception { LOGGER.error(result); throw e; } + catch (JSONException e) { + LOGGER.error(result); + throw new RuntimeException(e); + } } } 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..8c31ec49b 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.7.0 4.0.0 diff --git a/springdoc-openapi-tests/springdoc-openapi-function-webmvc-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java b/springdoc-openapi-tests/springdoc-openapi-function-webmvc-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java index 84d9f4294..d15f27c5f 100644 --- a/springdoc-openapi-tests/springdoc-openapi-function-webmvc-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java +++ b/springdoc-openapi-tests/springdoc-openapi-function-webmvc-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java @@ -36,7 +36,7 @@ public abstract class AbstractSpringDocTest extends AbstractCommonTest { public static String className; @Test - public void testApp() throws Exception { + void testApp() throws Exception { className = getClass().getSimpleName(); String testNumber = className.replaceAll("[^0-9]", ""); MvcResult mockMvcResult = mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)).andExpect(status().isOk()) diff --git a/springdoc-openapi-tests/springdoc-openapi-function-webmvc-tests/src/test/java/test/org/springdoc/api/app174/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-function-webmvc-tests/src/test/java/test/org/springdoc/api/app174/HelloController.java index b63c7ade6..55674e934 100644 --- a/springdoc-openapi-tests/springdoc-openapi-function-webmvc-tests/src/test/java/test/org/springdoc/api/app174/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-function-webmvc-tests/src/test/java/test/org/springdoc/api/app174/HelloController.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-tests/springdoc-openapi-groovy-tests/pom.xml b/springdoc-openapi-tests/springdoc-openapi-groovy-tests/pom.xml index d89bef434..750c9e014 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.7.0 springdoc-openapi-groovy-tests diff --git a/springdoc-openapi-tests/springdoc-openapi-groovy-tests/src/test/groovy/test/org/springdoc/api/AbstractSpringDocTest.java b/springdoc-openapi-tests/springdoc-openapi-groovy-tests/src/test/groovy/test/org/springdoc/api/AbstractSpringDocTest.java index 1524bc420..e7c091b24 100644 --- a/springdoc-openapi-tests/springdoc-openapi-groovy-tests/src/test/groovy/test/org/springdoc/api/AbstractSpringDocTest.java +++ b/springdoc-openapi-tests/springdoc-openapi-groovy-tests/src/test/groovy/test/org/springdoc/api/AbstractSpringDocTest.java @@ -65,7 +65,7 @@ public static String getContent(String fileName) throws Exception { } @Test - public void testApp() throws Exception { + void testApp() throws Exception { className = getClass().getSimpleName(); String testNumber = className.replaceAll("[^0-9]", ""); MvcResult mockMvcResult = mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)).andExpect(status().isOk()) diff --git a/springdoc-openapi-tests/springdoc-openapi-groovy-tests/src/test/groovy/test/org/springdoc/api/app191/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-groovy-tests/src/test/groovy/test/org/springdoc/api/app191/HelloController.java index c1d43c7d9..6942db26f 100644 --- a/springdoc-openapi-tests/springdoc-openapi-groovy-tests/src/test/groovy/test/org/springdoc/api/app191/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-groovy-tests/src/test/groovy/test/org/springdoc/api/app191/HelloController.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2022 the original author or authors. + * * * * 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. diff --git a/springdoc-openapi-tests/springdoc-openapi-groovy-tests/src/test/groovy/test/org/springdoc/api/app191/PersonDTO.java b/springdoc-openapi-tests/springdoc-openapi-groovy-tests/src/test/groovy/test/org/springdoc/api/app191/PersonDTO.java index b6e006e91..99568fdf2 100644 --- a/springdoc-openapi-tests/springdoc-openapi-groovy-tests/src/test/groovy/test/org/springdoc/api/app191/PersonDTO.java +++ b/springdoc-openapi-tests/springdoc-openapi-groovy-tests/src/test/groovy/test/org/springdoc/api/app191/PersonDTO.java @@ -4,7 +4,7 @@ * * * * * * - * * * * Copyright 2019-2022 the original author or authors. + * * * * 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. diff --git a/springdoc-openapi-tests/springdoc-openapi-groovy-tests/src/test/groovy/test/org/springdoc/api/app191/SpringDocApp191Test.java b/springdoc-openapi-tests/springdoc-openapi-groovy-tests/src/test/groovy/test/org/springdoc/api/app191/SpringDocApp191Test.java index 561df94a2..dec9ecf71 100644 --- a/springdoc-openapi-tests/springdoc-openapi-groovy-tests/src/test/groovy/test/org/springdoc/api/app191/SpringDocApp191Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-groovy-tests/src/test/groovy/test/org/springdoc/api/app191/SpringDocApp191Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2022 the original author or authors. + * * * * 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. 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..542bdaf73 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" }, @@ -317,9 +317,6 @@ "type": "integer", "format": "int32" }, - "description": { - "type": "string" - }, "startLine": { "type": "integer", "format": "int32" @@ -328,15 +325,18 @@ "type": "integer", "format": "int32" }, + "meaning": { + "type": "integer", + "format": "int32" + }, "rootText": { "type": "string" }, "anExpression": { "type": "boolean" }, - "meaning": { - "type": "integer", - "format": "int32" + "description": { + "type": "string" } } }, @@ -424,6 +424,10 @@ "void": { "type": "boolean" }, + "superClassDistance": { + "type": "integer", + "format": "int32" + }, "typeDescription": { "type": "string" }, @@ -435,10 +439,6 @@ }, "callSiteLoader": { "$ref": "#/components/schemas/CallSiteClassLoader" - }, - "superClassDistance": { - "type": "integer", - "format": "int32" } } }, @@ -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" }, @@ -1512,10 +1512,10 @@ "type": "integer", "format": "int32" }, - "static": { + "final": { "type": "boolean" }, - "final": { + "static": { "type": "boolean" }, "cachedField": { @@ -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" }, @@ -2184,10 +2184,10 @@ "descriptor": { "type": "string" }, - "static": { + "synthetic": { "type": "boolean" }, - "synthetic": { + "static": { "type": "boolean" }, "declaringClass": { @@ -2348,6 +2348,9 @@ "type": "string" } }, + "nativeAccessEnabled": { + "type": "boolean" + }, "layer": { "type": "object" } @@ -2501,6 +2504,9 @@ "type": "string" } }, + "nativeAccessEnabled": { + "type": "boolean" + }, "layer": { "type": "object" } @@ -2591,14 +2597,14 @@ "weakMetaClass": { "$ref": "#/components/schemas/MetaClass" }, + "cachedClass": { + "$ref": "#/components/schemas/CachedClass" + }, "modifiedExpando": { "$ref": "#/components/schemas/ExpandoMetaClass" }, "metaClassForClass": { "$ref": "#/components/schemas/MetaClass" - }, - "cachedClass": { - "$ref": "#/components/schemas/CachedClass" } } }, @@ -2727,6 +2733,9 @@ "type": "string" } }, + "nativeAccessEnabled": { + "type": "boolean" + }, "layer": { "type": "object" } @@ -2880,6 +2889,9 @@ "type": "string" } }, + "nativeAccessEnabled": { + "type": "boolean" + }, "layer": { "type": "object" } @@ -3114,19 +3126,32 @@ "text": { "type": "string" }, + "redirectNode": { + "type": "boolean" + }, "outerClass": { "$ref": "#/components/schemas/ClassNode" }, - "genericsPlaceHolder": { - "type": "boolean" + "allInterfaces": { + "uniqueItems": true, + "type": "array", + "items": { + "$ref": "#/components/schemas/ClassNode" + } }, - "unresolvedSuperClass": { - "$ref": "#/components/schemas/ClassNode" + "allDeclaredMethods": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MethodNode" + } }, - "plainNodeReference": { - "$ref": "#/components/schemas/ClassNode" + "abstractMethods": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MethodNode" + } }, - "redirectNode": { + "genericsPlaceHolder": { "type": "boolean" }, "primaryClassNode": { @@ -3147,63 +3172,50 @@ "$ref": "#/components/schemas/ClassNode" } }, - "derivedFromGroovyObject": { - "type": "boolean" - }, - "unresolvedInterfaces": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ClassNode" - } - }, "nameWithoutPackage": { "type": "string" }, - "recordComponentNodes": { - "type": "array", - "deprecated": true, - "items": { - "$ref": "#/components/schemas/RecordComponentNode" - } - }, "annotationDefinition": { "type": "boolean" }, - "abstractMethods": { + "plainNodeReference": { + "$ref": "#/components/schemas/ClassNode" + }, + "objectInitializerStatements": { "type": "array", "items": { - "$ref": "#/components/schemas/MethodNode" + "$ref": "#/components/schemas/Statement" } }, - "allInterfaces": { - "uniqueItems": true, + "derivedFromGroovyObject": { + "type": "boolean" + }, + "unresolvedSuperClass": { + "$ref": "#/components/schemas/ClassNode" + }, + "unresolvedInterfaces": { "type": "array", "items": { "$ref": "#/components/schemas/ClassNode" } }, - "allDeclaredMethods": { + "recordComponentNodes": { "type": "array", + "deprecated": true, "items": { - "$ref": "#/components/schemas/MethodNode" - } - }, - "objectInitializerStatements": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Statement" + "$ref": "#/components/schemas/RecordComponentNode" } }, "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 +3268,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 +3297,9 @@ "signerCertPath": { "type": "object", "properties": { + "encodings": { + "type": "object" + }, "certificates": { "type": "array", "items": { @@ -3300,21 +3309,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" @@ -3331,14 +3334,8 @@ "type": "string" }, "encoded": { - "type": "array", - "items": { - "type": "string", - "format": "byte" - } - }, - "encodings": { - "type": "object" + "type": "string", + "format": "byte" } } }, @@ -3352,6 +3349,9 @@ "signerCertPath": { "type": "object", "properties": { + "encodings": { + "type": "object" + }, "certificates": { "type": "array", "items": { @@ -3361,21 +3361,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" @@ -3392,14 +3386,8 @@ "type": "string" }, "encoded": { - "type": "array", - "items": { - "type": "string", - "format": "byte" - } - }, - "encodings": { - "type": "object" + "type": "string", + "format": "byte" } } } @@ -3552,11 +3540,10 @@ "bytecodePostprocessor": { "$ref": "#/components/schemas/BytecodeProcessor" }, - "targetDirectorySafe": { - "type": "string", - "writeOnly": true + "indyEnabled": { + "type": "boolean" }, - "targetBytecodeIfValid": { + "targetDirectorySafe": { "type": "string", "writeOnly": true }, @@ -3571,12 +3558,13 @@ "type": "integer", "format": "int32" }, - "indyEnabled": { - "type": "boolean" - }, "groovydocEnabled": { "type": "boolean" }, + "targetBytecodeIfValid": { + "type": "string", + "writeOnly": true + }, "runtimeGroovydocEnabled": { "type": "boolean" } @@ -3665,6 +3653,9 @@ "constructor": { "type": "boolean" }, + "final": { + "type": "boolean" + }, "static": { "type": "boolean" }, @@ -3677,9 +3668,6 @@ "default": { "type": "boolean" }, - "final": { - "type": "boolean" - }, "abstract": { "type": "boolean" }, @@ -3689,35 +3677,35 @@ "text": { "type": "string" }, - "annotationDefault": { - "type": "boolean", - "writeOnly": true - }, "voidMethod": { "type": "boolean" }, "packageScope": { "type": "boolean" }, - "firstStatement": { - "$ref": "#/components/schemas/Statement" - }, "scriptBody": { "type": "boolean" }, + "firstStatement": { + "$ref": "#/components/schemas/Statement" + }, "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 +3735,16 @@ "configuration": { "$ref": "#/components/schemas/CompilerConfiguration" }, - "warningCount": { - "type": "integer", - "format": "int32" - }, "lastError": { "$ref": "#/components/schemas/Message" }, "errorCount": { "type": "integer", "format": "int32" + }, + "warningCount": { + "type": "integer", + "format": "int32" } } }, @@ -3819,6 +3807,9 @@ "groovyObject": { "type": "boolean" }, + "classInfo": { + "$ref": "#/components/schemas/ClassInfo" + }, "upProperties": { "type": "array", "writeOnly": true, @@ -3864,20 +3855,6 @@ "items": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "bounds": { - "type": "array", - "items": { - "type": "object", - "properties": { - "typeName": { - "type": "string" - } - } - } - }, "annotatedBounds": { "type": "array", "items": { @@ -3906,6 +3883,20 @@ } } }, + "name": { + "type": "string" + }, + "bounds": { + "type": "array", + "items": { + "type": "object", + "properties": { + "typeName": { + "type": "string" + } + } + } + }, "typeName": { "type": "string" }, @@ -4126,20 +4117,6 @@ "items": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "bounds": { - "type": "array", - "items": { - "type": "object", - "properties": { - "typeName": { - "type": "string" - } - } - } - }, "genericDeclaration": { "type": "object" }, @@ -4171,6 +4148,20 @@ } } }, + "name": { + "type": "string" + }, + "bounds": { + "type": "array", + "items": { + "type": "object", + "properties": { + "typeName": { + "type": "string" + } + } + } + }, "typeName": { "type": "string" }, @@ -4436,20 +4427,6 @@ "items": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "bounds": { - "type": "array", - "items": { - "type": "object", - "properties": { - "typeName": { - "type": "string" - } - } - } - }, "annotatedBounds": { "type": "array", "items": { @@ -4478,6 +4455,20 @@ } } }, + "name": { + "type": "string" + }, + "bounds": { + "type": "array", + "items": { + "type": "object", + "properties": { + "typeName": { + "type": "string" + } + } + } + }, "typeName": { "type": "string" }, @@ -4698,20 +4689,6 @@ "items": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "bounds": { - "type": "array", - "items": { - "type": "object", - "properties": { - "typeName": { - "type": "string" - } - } - } - }, "genericDeclaration": { "type": "object" }, @@ -4743,6 +4720,20 @@ } } }, + "name": { + "type": "string" + }, + "bounds": { + "type": "array", + "items": { + "type": "object", + "properties": { + "typeName": { + "type": "string" + } + } + } + }, "typeName": { "type": "string" }, @@ -4995,9 +4986,6 @@ } } } - }, - "classInfo": { - "$ref": "#/components/schemas/ClassInfo" } } }, @@ -5038,13 +5026,13 @@ "instance": { "$ref": "#/components/schemas/AnnotatedNode" }, + "groovydoc": { + "$ref": "#/components/schemas/Groovydoc" + }, "hasNoRealSourcePosition": { "type": "boolean", "writeOnly": true }, - "groovydoc": { - "$ref": "#/components/schemas/Groovydoc" - }, "text": { "type": "string" }, @@ -5124,6 +5112,9 @@ "enum": { "type": "boolean" }, + "final": { + "type": "boolean" + }, "static": { "type": "boolean" }, @@ -5133,9 +5124,6 @@ "protected": { "type": "boolean" }, - "final": { - "type": "boolean" - }, "volatile": { "type": "boolean" }, @@ -5155,13 +5143,13 @@ "instance": { "$ref": "#/components/schemas/AnnotatedNode" }, + "groovydoc": { + "$ref": "#/components/schemas/Groovydoc" + }, "hasNoRealSourcePosition": { "type": "boolean", "writeOnly": true }, - "groovydoc": { - "$ref": "#/components/schemas/Groovydoc" - }, "text": { "type": "string" }, @@ -5368,6 +5356,9 @@ "type": "string" } }, + "nativeAccessEnabled": { + "type": "boolean" + }, "layer": { "type": "object" } @@ -5521,6 +5512,9 @@ "type": "string" } }, + "nativeAccessEnabled": { + "type": "boolean" + }, "layer": { "type": "object" } @@ -5688,13 +5682,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" }, @@ -5846,12 +5840,12 @@ "anonymous": { "type": "boolean" }, - "variableScope": { - "$ref": "#/components/schemas/VariableScope" - }, "outerMostClass": { "$ref": "#/components/schemas/ClassNode" }, + "variableScope": { + "$ref": "#/components/schemas/VariableScope" + }, "interface": { "type": "boolean" }, @@ -5891,16 +5885,29 @@ "text": { "type": "string" }, - "genericsPlaceHolder": { + "redirectNode": { "type": "boolean" }, - "unresolvedSuperClass": { - "$ref": "#/components/schemas/ClassNode" - }, - "plainNodeReference": { - "$ref": "#/components/schemas/ClassNode" + "allInterfaces": { + "uniqueItems": true, + "type": "array", + "items": { + "$ref": "#/components/schemas/ClassNode" + } }, - "redirectNode": { + "allDeclaredMethods": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MethodNode" + } + }, + "abstractMethods": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MethodNode" + } + }, + "genericsPlaceHolder": { "type": "boolean" }, "primaryClassNode": { @@ -5921,63 +5928,50 @@ "$ref": "#/components/schemas/ClassNode" } }, - "derivedFromGroovyObject": { - "type": "boolean" - }, - "unresolvedInterfaces": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ClassNode" - } - }, "nameWithoutPackage": { "type": "string" }, - "recordComponentNodes": { - "type": "array", - "deprecated": true, - "items": { - "$ref": "#/components/schemas/RecordComponentNode" - } - }, "annotationDefinition": { "type": "boolean" }, - "abstractMethods": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MethodNode" - } + "plainNodeReference": { + "$ref": "#/components/schemas/ClassNode" }, - "allInterfaces": { - "uniqueItems": true, + "objectInitializerStatements": { "type": "array", "items": { - "$ref": "#/components/schemas/ClassNode" + "$ref": "#/components/schemas/Statement" } }, - "allDeclaredMethods": { + "derivedFromGroovyObject": { + "type": "boolean" + }, + "unresolvedSuperClass": { + "$ref": "#/components/schemas/ClassNode" + }, + "unresolvedInterfaces": { "type": "array", "items": { - "$ref": "#/components/schemas/MethodNode" + "$ref": "#/components/schemas/ClassNode" } }, - "objectInitializerStatements": { + "recordComponentNodes": { "type": "array", + "deprecated": true, "items": { - "$ref": "#/components/schemas/Statement" + "$ref": "#/components/schemas/RecordComponentNode" } }, "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" }, @@ -6029,10 +6023,10 @@ "MetaClassRegistry": { "type": "object", "properties": { - "metaClassCreationHandle": { + "metaClassCreationHandler": { "$ref": "#/components/schemas/MetaClassCreationHandle" }, - "metaClassCreationHandler": { + "metaClassCreationHandle": { "$ref": "#/components/schemas/MetaClassCreationHandle" }, "metaClassRegistryChangeEventListeners": { @@ -6202,6 +6196,9 @@ "constructor": { "type": "boolean" }, + "final": { + "type": "boolean" + }, "static": { "type": "boolean" }, @@ -6214,9 +6211,6 @@ "default": { "type": "boolean" }, - "final": { - "type": "boolean" - }, "abstract": { "type": "boolean" }, @@ -6226,35 +6220,35 @@ "text": { "type": "string" }, - "annotationDefault": { - "type": "boolean", - "writeOnly": true - }, "voidMethod": { "type": "boolean" }, "packageScope": { "type": "boolean" }, - "firstStatement": { - "$ref": "#/components/schemas/Statement" - }, "scriptBody": { "type": "boolean" }, + "firstStatement": { + "$ref": "#/components/schemas/Statement" + }, "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,19 +6433,32 @@ "text": { "type": "string" }, + "redirectNode": { + "type": "boolean" + }, "outerClass": { "$ref": "#/components/schemas/ClassNode" }, - "genericsPlaceHolder": { - "type": "boolean" + "allInterfaces": { + "uniqueItems": true, + "type": "array", + "items": { + "$ref": "#/components/schemas/ClassNode" + } }, - "unresolvedSuperClass": { - "$ref": "#/components/schemas/ClassNode" + "allDeclaredMethods": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MethodNode" + } }, - "plainNodeReference": { - "$ref": "#/components/schemas/ClassNode" + "abstractMethods": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MethodNode" + } }, - "redirectNode": { + "genericsPlaceHolder": { "type": "boolean" }, "primaryClassNode": { @@ -6472,63 +6479,50 @@ "$ref": "#/components/schemas/ClassNode" } }, - "derivedFromGroovyObject": { - "type": "boolean" - }, - "unresolvedInterfaces": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ClassNode" - } - }, "nameWithoutPackage": { "type": "string" }, - "recordComponentNodes": { - "type": "array", - "deprecated": true, - "items": { - "$ref": "#/components/schemas/RecordComponentNode" - } - }, "annotationDefinition": { "type": "boolean" }, - "abstractMethods": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MethodNode" - } + "plainNodeReference": { + "$ref": "#/components/schemas/ClassNode" }, - "allInterfaces": { - "uniqueItems": true, + "objectInitializerStatements": { "type": "array", "items": { - "$ref": "#/components/schemas/ClassNode" + "$ref": "#/components/schemas/Statement" } }, - "allDeclaredMethods": { + "derivedFromGroovyObject": { + "type": "boolean" + }, + "unresolvedSuperClass": { + "$ref": "#/components/schemas/ClassNode" + }, + "unresolvedInterfaces": { "type": "array", "items": { - "$ref": "#/components/schemas/MethodNode" + "$ref": "#/components/schemas/ClassNode" } }, - "objectInitializerStatements": { + "recordComponentNodes": { "type": "array", + "deprecated": true, "items": { - "$ref": "#/components/schemas/Statement" + "$ref": "#/components/schemas/RecordComponentNode" } }, "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 +6611,12 @@ "statementBlock": { "$ref": "#/components/schemas/BlockStatement" }, - "empty": { - "type": "boolean" - }, "packageName": { "type": "string" }, + "empty": { + "type": "boolean" + }, "package": { "$ref": "#/components/schemas/PackageNode" }, @@ -6695,13 +6689,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 +6775,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 +6863,9 @@ "type": "integer", "format": "int32" }, + "type": { + "$ref": "#/components/schemas/ClassNode" + }, "name": { "type": "string" }, @@ -6878,15 +6875,21 @@ "public": { "type": "boolean" }, - "type": { - "$ref": "#/components/schemas/ClassNode" - }, "private": { "type": "boolean" }, "dynamicTyped": { "type": "boolean" }, + "originType": { + "$ref": "#/components/schemas/ClassNode" + }, + "getterNameOrDefault": { + "type": "string" + }, + "setterNameOrDefault": { + "type": "string" + }, "initialExpression": { "$ref": "#/components/schemas/Expression" }, @@ -6897,25 +6900,16 @@ "type": "boolean", "deprecated": true }, - "originType": { - "$ref": "#/components/schemas/ClassNode" - }, - "getterNameOrDefault": { - "type": "string" - }, - "setterNameOrDefault": { - "type": "string" - }, "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 +6927,12 @@ "ReaderSource": { "type": "object", "properties": { - "reader": { - "type": "object" - }, "uri": { "type": "string", "format": "uri" + }, + "reader": { + "type": "object" } } }, @@ -6988,13 +6982,13 @@ "instance": { "$ref": "#/components/schemas/AnnotatedNode" }, + "groovydoc": { + "$ref": "#/components/schemas/Groovydoc" + }, "hasNoRealSourcePosition": { "type": "boolean", "writeOnly": true }, - "groovydoc": { - "$ref": "#/components/schemas/Groovydoc" - }, "text": { "type": "string" }, @@ -7025,9 +7019,6 @@ "type": "integer", "format": "int32" }, - "description": { - "type": "string" - }, "startLine": { "type": "integer", "format": "int32" @@ -7036,12 +7027,15 @@ "type": "integer", "format": "int32" }, - "rootText": { - "type": "string" - }, "meaning": { "type": "integer", "format": "int32" + }, + "rootText": { + "type": "string" + }, + "description": { + "type": "string" } } }, @@ -7164,11 +7158,11 @@ "empty": { "type": "boolean" }, - "description": { - "type": "string" - }, "anExpression": { "type": "boolean" + }, + "description": { + "type": "string" } } }, @@ -7188,6 +7182,9 @@ "dynamicTyped": { "type": "boolean" }, + "originType": { + "$ref": "#/components/schemas/ClassNode" + }, "initialExpression": { "$ref": "#/components/schemas/Expression" }, @@ -7196,9 +7193,6 @@ }, "closureSharedVariable": { "type": "boolean" - }, - "originType": { - "$ref": "#/components/schemas/ClassNode" } } }, @@ -7229,13 +7223,13 @@ "root": { "type": "boolean" }, + "declaredVariablesIterator": { + "type": "object" + }, "referencedLocalVariablesCount": { "type": "integer", "format": "int32" }, - "declaredVariablesIterator": { - "type": "object" - }, "referencedLocalVariablesIterator": { "type": "object" }, diff --git a/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/pom.xml b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/pom.xml index fc5b3cb86..f76664ca3 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.7.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/AbstractSpringDocTest.java b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java index 5e445165e..08aa39f91 100644 --- a/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java +++ b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -67,7 +67,7 @@ public static String getContent(String fileName) { } @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { className = getClass().getSimpleName(); String testNumber = className.replaceAll("[^0-9]", ""); MvcResult mockMvcResult = mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)).andExpect(status().isOk()) 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..3fee1d1e1 --- /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 + protected 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..6b1b457fb --- /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 + protected 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..ddf6fef87 --- /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 + protected 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/app3/EmployeeController.java b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app3/EmployeeController.java index 5200b96dd..209dd8d7c 100644 --- a/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app3/EmployeeController.java +++ b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app3/EmployeeController.java @@ -31,12 +31,6 @@ @RestController class EmployeeController { - private final EmployeeRepository repository; - - EmployeeController(EmployeeRepository repository) { - this.repository = repository; - } - /** * Look up a single {@link Employee} and transform it into a REST resource. Then return it through Spring Web's * {@link ResponseEntity} fluent API. diff --git a/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app5/hateoas/CompanyModelAssembler.java b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app5/hateoas/CompanyModelAssembler.java index 2eae53159..c893acbf9 100644 --- a/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app5/hateoas/CompanyModelAssembler.java +++ b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app5/hateoas/CompanyModelAssembler.java @@ -21,10 +21,9 @@ public CompanyModelAssembler() { @Override @NonNull public CompanyDto toModel(@NonNull final Company company) { - final CompanyDto dto = CompanyDto.builder() + return CompanyDto.builder() .id(company.getId()) .name(company.getName()) .build(); - return dto; } } \ No newline at end of file diff --git a/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app6/SpringDocApp6Test.java b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app6/SpringDocApp6Test.java index 57b7d2880..92f1dfcdd 100644 --- a/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app6/SpringDocApp6Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app6/SpringDocApp6Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -24,13 +24,11 @@ package test.org.springdoc.api.app6; -import java.lang.reflect.Field; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; -import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.introspect.SimpleMixInResolver; import com.fasterxml.jackson.databind.type.ClassKey; import org.apache.commons.lang3.reflect.FieldUtils; @@ -53,27 +51,23 @@ public class SpringDocApp6Test extends AbstractSpringDocTest { @BeforeEach void init() throws IllegalAccessException { - Field convertersField2 = FieldUtils.getDeclaredField(ObjectMapper.class, "_mixIns", true); - SimpleMixInResolver _mixIns = (SimpleMixInResolver) convertersField2.get(objectMapperProvider.jsonMapper()); - Field convertersField3 = FieldUtils.getDeclaredField(SimpleMixInResolver.class, "_localMixIns", true); - Map> _localMixIns = (Map>) convertersField3.get(_mixIns); - Iterator>> it = _localMixIns.entrySet().iterator(); - while (it.hasNext()) { - Entry> entry = it.next(); + SimpleMixInResolver _mixIns = (SimpleMixInResolver) FieldUtils.readDeclaredField(objectMapperProvider.jsonMapper(),"_mixIns", true); + Map> _localMixIns = (Map>) FieldUtils.readDeclaredField(_mixIns, "_localMixIns", true); + Iterator>> iterator = _localMixIns.entrySet().iterator(); + + while (iterator.hasNext()) { + Entry> entry = iterator.next(); if (entry.getKey().toString().startsWith("org.springframework")) { springMixins.put(entry.getKey(), entry.getValue()); - it.remove(); + iterator.remove(); } } - } @AfterEach void clean() throws IllegalAccessException { - Field convertersField2 = FieldUtils.getDeclaredField(ObjectMapper.class, "_mixIns", true); - SimpleMixInResolver _mixIns = (SimpleMixInResolver) convertersField2.get(objectMapperProvider.jsonMapper()); - Field convertersField3 = FieldUtils.getDeclaredField(SimpleMixInResolver.class, "_localMixIns", true); - Map> _localMixIns = (Map>) convertersField3.get(_mixIns); + SimpleMixInResolver _mixIns = (SimpleMixInResolver) FieldUtils.readDeclaredField(objectMapperProvider.jsonMapper(), "_mixIns", true); + Map> _localMixIns = (Map>) FieldUtils.readDeclaredField(_mixIns, "_localMixIns", true); _localMixIns.putAll(springMixins); } diff --git a/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app7/application/FooResourceAssembler.java b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app7/application/FooResourceAssembler.java index 5a1d9fb47..6a08e4b23 100644 --- a/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app7/application/FooResourceAssembler.java +++ b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app7/application/FooResourceAssembler.java @@ -23,7 +23,7 @@ public void addLinks(EntityModel resource) { linkTo(methodOn(FooController.class).getFoo(UUID.fromString(foo.getFoo()))).withSelfRel()); } catch (Exception e) { - e.printStackTrace(); + throw new RuntimeException(e); } } } diff --git a/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app8/SpringDocApp8Test.java b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app8/SpringDocApp8Test.java index 5f082745c..06a8048d8 100644 --- a/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app8/SpringDocApp8Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/app8/SpringDocApp8Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -24,13 +24,11 @@ package test.org.springdoc.api.app8; -import java.lang.reflect.Field; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; -import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.introspect.SimpleMixInResolver; import com.fasterxml.jackson.databind.type.ClassKey; import org.apache.commons.lang3.reflect.FieldUtils; @@ -53,10 +51,8 @@ public class SpringDocApp8Test extends AbstractSpringDocTest { @BeforeEach void init() throws IllegalAccessException { - Field convertersField2 = FieldUtils.getDeclaredField(ObjectMapper.class, "_mixIns", true); - SimpleMixInResolver _mixIns = (SimpleMixInResolver) convertersField2.get(objectMapperProvider.jsonMapper()); - Field convertersField3 = FieldUtils.getDeclaredField(SimpleMixInResolver.class, "_localMixIns", true); - Map> _localMixIns = (Map>) convertersField3.get(_mixIns); + SimpleMixInResolver _mixIns = (SimpleMixInResolver) FieldUtils.readDeclaredField(objectMapperProvider.jsonMapper(), "_mixIns", true); + Map> _localMixIns = (Map>) FieldUtils.readDeclaredField(_mixIns, "_localMixIns", true); Iterator>> it = _localMixIns.entrySet().iterator(); while (it.hasNext()) { Map.Entry> entry = it.next(); @@ -70,10 +66,8 @@ void init() throws IllegalAccessException { @AfterEach void clean() throws IllegalAccessException { - Field convertersField2 = FieldUtils.getDeclaredField(ObjectMapper.class, "_mixIns", true); - SimpleMixInResolver _mixIns = (SimpleMixInResolver) convertersField2.get(objectMapperProvider.jsonMapper()); - Field convertersField3 = FieldUtils.getDeclaredField(SimpleMixInResolver.class, "_localMixIns", true); - Map> _localMixIns = (Map>) convertersField3.get(_mixIns); + SimpleMixInResolver _mixIns = (SimpleMixInResolver) FieldUtils.readDeclaredField(objectMapperProvider.jsonMapper(), "_mixIns", true); + Map> _localMixIns = (Map>) FieldUtils.readDeclaredField(_mixIns, "_localMixIns", true); _localMixIns.putAll(springMixins); } 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..e755bde7a --- /dev/null +++ b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/resources/results/app10-direct.json @@ -0,0 +1,391 @@ +{ + "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" + }, + "size": { + "type": "integer", + "format": "int32" + }, + "content": { + "type": "array", + "items": { + "type": "string" + } + }, + "number": { + "type": "integer", + "format": "int32" + }, + "sort": { + "$ref": "#/components/schemas/SortObject" + }, + "pageable": { + "$ref": "#/components/schemas/PageableObject" + }, + "first": { + "type": "boolean" + }, + "last": { + "type": "boolean" + }, + "numberOfElements": { + "type": "integer", + "format": "int32" + }, + "empty": { + "type": "boolean" + } + } + }, + "PageableObject": { + "type": "object", + "properties": { + "offset": { + "type": "integer", + "format": "int64" + }, + "sort": { + "$ref": "#/components/schemas/SortObject" + }, + "paged": { + "type": "boolean" + }, + "unpaged": { + "type": "boolean" + }, + "pageSize": { + "type": "integer", + "format": "int32" + }, + "pageNumber": { + "type": "integer", + "format": "int32" + } + } + }, + "SortObject": { + "type": "object", + "properties": { + "empty": { + "type": "boolean" + }, + "unsorted": { + "type": "boolean" + }, + "sorted": { + "type": "boolean" + } + } + }, + "Page": { + "type": "object", + "properties": { + "totalPages": { + "type": "integer", + "format": "int32" + }, + "totalElements": { + "type": "integer", + "format": "int64" + }, + "size": { + "type": "integer", + "format": "int32" + }, + "content": { + "type": "array", + "items": { + "type": "object" + } + }, + "number": { + "type": "integer", + "format": "int32" + }, + "sort": { + "$ref": "#/components/schemas/SortObject" + }, + "pageable": { + "$ref": "#/components/schemas/PageableObject" + }, + "first": { + "type": "boolean" + }, + "last": { + "type": "boolean" + }, + "numberOfElements": { + "type": "integer", + "format": "int32" + }, + "empty": { + "type": "boolean" + } + } + }, + "PageDummyListString": { + "type": "object", + "properties": { + "totalPages": { + "type": "integer", + "format": "int32" + }, + "totalElements": { + "type": "integer", + "format": "int64" + }, + "size": { + "type": "integer", + "format": "int32" + }, + "content": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DummyListString" + } + }, + "number": { + "type": "integer", + "format": "int32" + }, + "sort": { + "$ref": "#/components/schemas/SortObject" + }, + "pageable": { + "$ref": "#/components/schemas/PageableObject" + }, + "first": { + "type": "boolean" + }, + "last": { + "type": "boolean" + }, + "numberOfElements": { + "type": "integer", + "format": "int32" + }, + "empty": { + "type": "boolean" + } + } + } + } + } +} 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..44350a658 --- /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" + } + } + } + } + } +} diff --git a/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/resources/results/app2.json b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/resources/results/app2.json index d5a37d2c6..79166c2c6 100644 --- a/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/resources/results/app2.json +++ b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/resources/results/app2.json @@ -16,7 +16,7 @@ "tags": [ "post-controller" ], - "operationId": "getAll_1", + "operationId": "getAll", "parameters": [ { "name": "pageable", diff --git a/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/resources/results/app5.json b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/resources/results/app5.json index c06ac725a..5bf9f83e8 100644 --- a/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/resources/results/app5.json +++ b/springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/resources/results/app5.json @@ -16,7 +16,7 @@ "tags": [ "company-controller" ], - "operationId": "create_1", + "operationId": "create", "requestBody": { "description": "Details of the Item to be created", "content": { diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/RecordObject__Javadoc.json b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/RecordObject__Javadoc.json deleted file mode 100644 index f0d5b3b7e..000000000 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/RecordObject__Javadoc.json +++ /dev/null @@ -1 +0,0 @@ -{"doc":" Record Object\n\n @param id the id\n @param name the name\n","fields":[],"enumConstants":[],"methods":[],"constructors":[]} \ 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..9d8224c82 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.7.0 4.0.0 diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java index 7496133e3..c14aa7c97 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java @@ -89,7 +89,7 @@ public static String getContent(String fileName) throws Exception { * @throws Exception the exception */ @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { className = getClass().getSimpleName(); String testNumber = className.replaceAll("[^0-9]", ""); MvcResult mockMvcResult = mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)).andExpect(status().isOk()) diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/ApiOriginFilter.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/ApiOriginFilter.java index ce5c09608..87e872c4a 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/ApiOriginFilter.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/ApiOriginFilter.java @@ -30,7 +30,7 @@ /** * The type Api origin filter. */ -public class ApiOriginFilter implements jakarta.servlet.Filter { +class ApiOriginFilter implements jakarta.servlet.Filter { /** * Do filter. * diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/ApiResponseMessage.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/ApiResponseMessage.java index 5f962de32..e161afb2a 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/ApiResponseMessage.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/ApiResponseMessage.java @@ -25,7 +25,7 @@ */ @jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2019-07-08T09:37:36.546Z[GMT]") @jakarta.xml.bind.annotation.XmlRootElement -public class ApiResponseMessage { +class ApiResponseMessage { /** * The constant ERROR. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/ErrorMessage.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/ErrorMessage.java index 6bab556a1..7eb1c3f7b 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/ErrorMessage.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/ErrorMessage.java @@ -21,7 +21,7 @@ /** * The type Error message. */ -public class ErrorMessage { +class ErrorMessage { /** * The Id. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/ExceptionTranslator.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/ExceptionTranslator.java index 1e1808c05..56b2a89e9 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/ExceptionTranslator.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/ExceptionTranslator.java @@ -33,7 +33,7 @@ * The type Exception translator. */ @ControllerAdvice -public class ExceptionTranslator { +class ExceptionTranslator { /** * The constant LOGGER. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/HelloController.java index a13f3c9f8..1ef1f9b75 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/HelloController.java @@ -31,7 +31,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Index string. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/HomeController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/HomeController.java index 72dd1c664..d11d30441 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/HomeController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/HomeController.java @@ -30,7 +30,7 @@ * Home redirection to swagger api documentation */ @Controller -public class HomeController { +class HomeController { /** * The Swagger ui path. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/InventoryApiController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/InventoryApiController.java index 39c2eece5..8969acf11 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/InventoryApiController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/InventoryApiController.java @@ -38,7 +38,7 @@ */ @jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2019-07-08T09:37:36.546Z[GMT]") @RestController -public class InventoryApiController implements InventoryApi { +class InventoryApiController implements InventoryApi { /** diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/InventoryItem.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/InventoryItem.java index 248238e8f..bd8a96720 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/InventoryItem.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/InventoryItem.java @@ -33,7 +33,7 @@ */ @Validated @jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2019-07-08T09:37:36.546Z[GMT]") -public class InventoryItem { +class InventoryItem { /** * The Id. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/ItemController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/ItemController.java index 9d8a26730..ff5a2b887 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/ItemController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/ItemController.java @@ -46,7 +46,7 @@ */ @RestController @Tag(name = "items") -public class ItemController { +class ItemController { /** * Show items list. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/ItemDTO.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/ItemDTO.java index 07b89a5a3..7f8b0aa02 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/ItemDTO.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/ItemDTO.java @@ -24,7 +24,7 @@ * The type Item dto. * @author bnasslahsen */ -public class ItemDTO implements Serializable { +class ItemDTO implements Serializable { /** * serialVersionUID of type long diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/ItemLightDTO.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/ItemLightDTO.java index 058db7c37..366cfa21d 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/ItemLightDTO.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/ItemLightDTO.java @@ -24,7 +24,7 @@ * The type Item light dto. * @author bnasslahsen */ -public class ItemLightDTO implements Serializable { +class ItemLightDTO implements Serializable { /** * serialVersionUID of type long diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/Manufacturer.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/Manufacturer.java index aa4375d6a..d995b98d5 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/Manufacturer.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/Manufacturer.java @@ -32,7 +32,7 @@ */ @Validated @jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2019-07-08T09:37:36.546Z[GMT]") -public class Manufacturer { +class Manufacturer { /** * The Name. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/PeopleRestService.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/PeopleRestService.java index 4a6b2dcc3..803b88779 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/PeopleRestService.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/PeopleRestService.java @@ -49,7 +49,7 @@ */ @RestController @Tag(name = "people") -public class PeopleRestService { +class PeopleRestService { /** * The People. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/PersonDTO.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/PersonDTO.java index a5b400e69..cd8dd27bc 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/PersonDTO.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/PersonDTO.java @@ -21,7 +21,7 @@ /** * The type Person dto. */ -public class PersonDTO { +class PersonDTO { /** * The Email. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/SpringDocApp1Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/SpringDocApp1Test.java index bdbef777d..cf33498bc 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/SpringDocApp1Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app1/SpringDocApp1Test.java @@ -33,7 +33,7 @@ * The type Spring doc app 1 test. */ @TestPropertySource(properties = "springdoc.default-produces-media-type=application/json") -public class SpringDocApp1Test extends AbstractSpringDocTest { +class SpringDocApp1Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app10/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app10/HelloController.java index 4658f364d..72f87433b 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app10/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app10/HelloController.java @@ -32,7 +32,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Test. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app10/SpringDocApp10Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app10/SpringDocApp10Test.java index a44a5f56d..3af79d360 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app10/SpringDocApp10Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app10/SpringDocApp10Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 10 test. */ -public class SpringDocApp10Test extends AbstractSpringDocTest { +class SpringDocApp10Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app100/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app100/HelloController.java index d6f1dc07b..519ecc56d 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app100/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app100/HelloController.java @@ -30,7 +30,7 @@ */ @RestController @Tags(value = @Tag(name = "hello-ap1")) -public class HelloController { +class HelloController { /** * Gets all pets. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app100/PersonDTO.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app100/PersonDTO.java index 55b4206f0..1166d5b3e 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app100/PersonDTO.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app100/PersonDTO.java @@ -24,7 +24,7 @@ * The type Person dto. */ @Schema -public class PersonDTO { +class PersonDTO { /** * The Email. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app100/SpringDocApp100Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app100/SpringDocApp100Test.java index 55bf7b695..53e24d5ef 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app100/SpringDocApp100Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app100/SpringDocApp100Test.java @@ -26,7 +26,7 @@ /** * The type Spring doc app 100 test. */ -public class SpringDocApp100Test extends AbstractSpringDocTest { +class SpringDocApp100Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app101/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app101/HelloController.java index a6decfff3..82f650bc8 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app101/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app101/HelloController.java @@ -13,7 +13,7 @@ */ @RestController @RequestMapping("/hello") -public class HelloController { +class HelloController { /** * Hello hello dto. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app101/HelloDTO.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app101/HelloDTO.java index 31f9bbc8d..fe4847ff6 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app101/HelloDTO.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app101/HelloDTO.java @@ -7,7 +7,7 @@ * The type Hello dto. */ @Schema(description = "${test.app101.schema.hello.description}") -public class HelloDTO { +class HelloDTO { /** * The Id. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app101/SpringDocApp101Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app101/SpringDocApp101Test.java index 592ec3c5c..7a0368db9 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app101/SpringDocApp101Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app101/SpringDocApp101Test.java @@ -28,7 +28,7 @@ * The type Spring doc app 101 test. */ @ActiveProfiles("101") -public class SpringDocApp101Test extends AbstractSpringDocTest { +class SpringDocApp101Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app102/InheritedRequestParams.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app102/InheritedRequestParams.java index b1c711584..13fbe8bbb 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app102/InheritedRequestParams.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app102/InheritedRequestParams.java @@ -6,7 +6,7 @@ /** * The type Inherited request params. */ -public class InheritedRequestParams extends RequestParams { +class InheritedRequestParams extends RequestParams { /** * The Child param. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app102/RequestParams.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app102/RequestParams.java index cb882d42c..e8d2b6839 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app102/RequestParams.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app102/RequestParams.java @@ -11,7 +11,7 @@ /** * The type Request params. */ -public class RequestParams { +class RequestParams { /** * The String param. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app102/SpringDocApp102Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app102/SpringDocApp102Test.java index 76d220b9a..fe1770c24 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app102/SpringDocApp102Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app102/SpringDocApp102Test.java @@ -7,7 +7,7 @@ /** * The type Spring doc app 102 test. */ -public class SpringDocApp102Test extends AbstractSpringDocTest { +class SpringDocApp102Test extends AbstractSpringDocTest { /** * The type Spring doc test app. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app102/TestController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app102/TestController.java index c8730dffb..7ddae72c8 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app102/TestController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app102/TestController.java @@ -11,7 +11,7 @@ * The type Test controller. */ @RestController -public class TestController { +class TestController { /** * Gets test. * diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app103/ExampleBody.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app103/ExampleBody.java index e8c01b4f0..e6b831c7c 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app103/ExampleBody.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app103/ExampleBody.java @@ -3,7 +3,7 @@ /** * The type Example body. */ -public class ExampleBody { +class ExampleBody { /** * The String param. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app103/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app103/HelloController.java index 4b59c3603..9f4af3c26 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app103/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app103/HelloController.java @@ -34,7 +34,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Post my request body string. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app103/SpringDocApp103Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app103/SpringDocApp103Test.java index d33b7f2f4..cbb84e91d 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app103/SpringDocApp103Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app103/SpringDocApp103Test.java @@ -7,7 +7,7 @@ /** * The type Spring doc app 103 test. */ -public class SpringDocApp103Test extends AbstractSpringDocTest { +class SpringDocApp103Test extends AbstractSpringDocTest { /** * The type Spring doc test app. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app104/Design.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app104/Design.java index 1f7da0ec3..5c9878a01 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app104/Design.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app104/Design.java @@ -3,5 +3,5 @@ /** * The type Design. */ -public class Design extends HavingPK { +class Design extends HavingPK { } diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app104/DesignController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app104/DesignController.java index cfeefe031..b4e314246 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app104/DesignController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app104/DesignController.java @@ -11,7 +11,7 @@ @Tag(name = "design") @Controller @RequestMapping("/design") -public class DesignController extends CrudController { +class DesignController extends CrudController { } \ No newline at end of file diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app104/HavingPK.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app104/HavingPK.java index fbd577731..ac3d20aa1 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app104/HavingPK.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app104/HavingPK.java @@ -3,5 +3,5 @@ /** * The type Having pk. */ -public class HavingPK { +class HavingPK { } diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app104/SpringDocApp104Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app104/SpringDocApp104Test.java index 62c8585ec..2b1d35afd 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app104/SpringDocApp104Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app104/SpringDocApp104Test.java @@ -7,7 +7,7 @@ /** * The type Spring doc app 104 test. */ -public class SpringDocApp104Test extends AbstractSpringDocTest { +class SpringDocApp104Test extends AbstractSpringDocTest { /** * The type Spring doc test app. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/SpringDocApp105Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/SpringDocApp105Test.java index afd0453f3..3f91b44c9 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/SpringDocApp105Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/SpringDocApp105Test.java @@ -52,7 +52,7 @@ "springdoc.group-configs[3].paths-to-exclude=/v1/users", "springdoc.group-configs[3].packages-to-scan=test.org.springdoc.api.app105.api.user,test.org.springdoc.api.app105.api.store", }) -public class SpringDocApp105Test extends AbstractSpringDocTest { +class SpringDocApp105Test extends AbstractSpringDocTest { /** * The constant className. @@ -65,7 +65,7 @@ public class SpringDocApp105Test extends AbstractSpringDocTest { * @throws Exception the exception */ @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/stores")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) @@ -78,7 +78,7 @@ public void testApp() throws Exception { * @throws Exception the exception */ @Test - public void testApp2() throws Exception { + void testApp2() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/users")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) @@ -91,7 +91,7 @@ public void testApp2() throws Exception { * @throws Exception the exception */ @Test - public void testApp3() throws Exception { + void testApp3() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/pets")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) @@ -104,7 +104,7 @@ public void testApp3() throws Exception { * @throws Exception the exception */ @Test - public void testApp4() throws Exception { + void testApp4() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/groups test")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/api/ExceptionTranslator.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/api/ExceptionTranslator.java index c32e20fbe..b743c8622 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/api/ExceptionTranslator.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/api/ExceptionTranslator.java @@ -35,7 +35,7 @@ * The type Exception translator. */ @RestControllerAdvice -public class ExceptionTranslator { +class ExceptionTranslator { /** * The Error attributes. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/api/HomeController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/api/HomeController.java index 9a3d663f5..bb86b3787 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/api/HomeController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/api/HomeController.java @@ -30,7 +30,7 @@ * Home redirection to swagger api documentation */ @Controller -public class HomeController { +class HomeController { /** * The Swagger ui path. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/api/pet/PetApiController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/api/pet/PetApiController.java index 3c417f7db..65efc6309 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/api/pet/PetApiController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/api/pet/PetApiController.java @@ -30,7 +30,7 @@ @RestController @RequestMapping("${openapi.openAPIPetstore.base-path:/}") -public class PetApiController implements PetApi { +class PetApiController implements PetApi { /** * The Delegate. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/api/pet/PetApiDelegateImpl.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/api/pet/PetApiDelegateImpl.java index d14a22f07..feb72bed7 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/api/pet/PetApiDelegateImpl.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/api/pet/PetApiDelegateImpl.java @@ -24,7 +24,7 @@ * The type Pet api delegate. */ @Service -public class PetApiDelegateImpl implements PetApiDelegate { +class PetApiDelegateImpl implements PetApiDelegate { } diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/api/store/StoreApiController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/api/store/StoreApiController.java index 4e05f2ec6..7ce9e3984 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/api/store/StoreApiController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/api/store/StoreApiController.java @@ -30,7 +30,7 @@ @RestController @RequestMapping("${openapi.openAPIPetstore.base-path:/}") -public class StoreApiController implements StoreApi { +class StoreApiController implements StoreApi { /** * The Delegate. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/api/store/StoreApiDelegateImpl.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/api/store/StoreApiDelegateImpl.java index 1446e91ae..cd3051772 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/api/store/StoreApiDelegateImpl.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/api/store/StoreApiDelegateImpl.java @@ -24,7 +24,7 @@ * The type Store api delegate. */ @Service -public class StoreApiDelegateImpl implements StoreApiDelegate { +class StoreApiDelegateImpl implements StoreApiDelegate { } diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/api/user/UserApiController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/api/user/UserApiController.java index b31d03e01..98692328f 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/api/user/UserApiController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/api/user/UserApiController.java @@ -30,7 +30,7 @@ @RestController @RequestMapping("${openapi.openAPIPetstore.base-path:/}") -public class UserApiController implements UserApi { +class UserApiController implements UserApi { /** * The Delegate. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/api/user/UserApiDelegateImpl.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/api/user/UserApiDelegateImpl.java index 46770a845..91f65c580 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/api/user/UserApiDelegateImpl.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/api/user/UserApiDelegateImpl.java @@ -24,7 +24,7 @@ * The type User api delegate. */ @Service -public class UserApiDelegateImpl implements UserApiDelegate { +class UserApiDelegateImpl implements UserApiDelegate { } diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/model/Body.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/model/Body.java deleted file mode 100644 index 8aa67127a..000000000 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/model/Body.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * - * * Copyright 2019-2020 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.app105.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.v3.oas.annotations.media.Schema; - -/** - * The type Body. - */ -public class Body { - - /** - * The Name. - */ - @Schema(description = "Updated name of the pet") - /** - * Updated name of the pet - **/ - private String name = null; - - /** - * The Status. - */ - @Schema(description = "Updated status of the pet") - /** - * Updated status of the pet - **/ - private String status = null; - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - * @param o the o - * @return the string - */ - private static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - /** - * Updated name of the pet - * - * @return name name - */ - @JsonProperty("name") - public String getName() { - return name; - } - - /** - * Sets name. - * - * @param name the name - */ - public void setName(String name) { - this.name = name; - } - - /** - * Name body. - * - * @param name the name - * @return the body - */ - public Body name(String name) { - this.name = name; - return this; - } - - /** - * Updated status of the pet - * - * @return status status - */ - @JsonProperty("status") - public String getStatus() { - return status; - } - - /** - * Sets status. - * - * @param status the status - */ - public void setStatus(String status) { - this.status = status; - } - - /** - * Status body. - * - * @param status the status - * @return the body - */ - public Body status(String status) { - this.status = status; - return this; - } - - /** - * To string string. - * - * @return the string - */ - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Body {\n"); - - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append("}"); - return sb.toString(); - } -} diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/model/Body1.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/model/Body1.java deleted file mode 100644 index 7cc00d1c1..000000000 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/model/Body1.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * - * * Copyright 2019-2020 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.app105.model; - -import java.io.File; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.v3.oas.annotations.media.Schema; - -/** - * The type Body 1. - */ -public class Body1 { - - /** - * The Additional metadata. - */ - @Schema(description = "Additional data to pass to server") - /** - * Additional data to pass to server - **/ - private String additionalMetadata = null; - - /** - * The File. - */ - @Schema(description = "file to upload") - /** - * file to upload - **/ - private File file = null; - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - * @param o the o - * @return the string - */ - private static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - /** - * Additional data to pass to server - * - * @return additionalMetadata additional metadata - */ - @JsonProperty("additionalMetadata") - public String getAdditionalMetadata() { - return additionalMetadata; - } - - /** - * Sets additional metadata. - * - * @param additionalMetadata the additional metadata - */ - public void setAdditionalMetadata(String additionalMetadata) { - this.additionalMetadata = additionalMetadata; - } - - /** - * Additional metadata body 1. - * - * @param additionalMetadata the additional metadata - * @return the body 1 - */ - public Body1 additionalMetadata(String additionalMetadata) { - this.additionalMetadata = additionalMetadata; - return this; - } - - /** - * file to upload - * - * @return file file - */ - @JsonProperty("file") - public File getFile() { - return file; - } - - /** - * Sets file. - * - * @param file the file - */ - public void setFile(File file) { - this.file = file; - } - - /** - * File body 1. - * - * @param file the file - * @return the body 1 - */ - public Body1 file(File file) { - this.file = file; - return this; - } - - /** - * To string string. - * - * @return the string - */ - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Body1 {\n"); - - sb.append(" additionalMetadata: ").append(toIndentedString(additionalMetadata)).append("\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); - sb.append("}"); - return sb.toString(); - } -} diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/model/Category.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/model/Category.java index 2d682beba..70f61cf74 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/model/Category.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/model/Category.java @@ -24,7 +24,7 @@ /** * The type Category. */ -public class Category { +class Category { /** * The Id. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/model/Tag.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/model/Tag.java index c8485cac5..2b5bde9af 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/model/Tag.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app105/model/Tag.java @@ -24,7 +24,7 @@ /** * The type Tag. */ -public class Tag { +class Tag { /** * The Id. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app106/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app106/HelloController.java index a022c7961..fb5acdcab 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app106/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app106/HelloController.java @@ -17,7 +17,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Find articles response entity. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app106/SpringDocApp106Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app106/SpringDocApp106Test.java index 9165dcb5b..7bd888b6f 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app106/SpringDocApp106Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app106/SpringDocApp106Test.java @@ -7,7 +7,7 @@ /** * The type Spring doc app 106 test. */ -public class SpringDocApp106Test extends AbstractSpringDocTest { +class SpringDocApp106Test extends AbstractSpringDocTest { /** * The type Spring doc test app. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app107/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app107/HelloController.java index 7a9131705..d3197e70f 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app107/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app107/HelloController.java @@ -10,7 +10,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Gets entity b. @@ -25,7 +25,7 @@ public EntityB getEntityB() { /** * The type Entity b. */ - public class EntityB { + class EntityB { /** * The Field b. @@ -46,7 +46,7 @@ public class EntityB { /** * The type Entity a. */ - public class EntityA { + class EntityA { /** * The Field a. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app107/SpringDocApp107Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app107/SpringDocApp107Test.java index 5c3376fed..7b9c5e512 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app107/SpringDocApp107Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app107/SpringDocApp107Test.java @@ -7,7 +7,7 @@ /** * The type Spring doc app 107 test. */ -public class SpringDocApp107Test extends AbstractSpringDocTest { +class SpringDocApp107Test extends AbstractSpringDocTest { /** * The type Spring doc test app. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app108/ActionResult.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app108/ActionResult.java index 0273e1035..0389238b9 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app108/ActionResult.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app108/ActionResult.java @@ -5,7 +5,7 @@ * * @param the type parameter */ -public class ActionResult { +class ActionResult { /** * The Value. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app108/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app108/HelloController.java index 70dd4c840..fcb84cde4 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app108/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app108/HelloController.java @@ -7,7 +7,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Update action result. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app108/SpringDocApp108Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app108/SpringDocApp108Test.java index 882f78dd6..f633f2db1 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app108/SpringDocApp108Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app108/SpringDocApp108Test.java @@ -7,7 +7,7 @@ /** * The type Spring doc app 108 test. */ -public class SpringDocApp108Test extends AbstractSpringDocTest { +class SpringDocApp108Test extends AbstractSpringDocTest { /** * The type Spring doc test app. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app109/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app109/HelloController.java index ce36f31b9..2475eb449 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app109/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app109/HelloController.java @@ -13,7 +13,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Gets resource. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app109/SpringDocApp109Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app109/SpringDocApp109Test.java index 51bde5ba9..d54099659 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app109/SpringDocApp109Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app109/SpringDocApp109Test.java @@ -7,7 +7,7 @@ /** * The type Spring doc app 109 test. */ -public class SpringDocApp109Test extends AbstractSpringDocTest { +class SpringDocApp109Test extends AbstractSpringDocTest { /** * The type Spring doc test app. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app11/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app11/HelloController.java index 79fa55657..d331c6143 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app11/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app11/HelloController.java @@ -35,7 +35,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Upload documents response entity. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app11/SpringDocApp11Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app11/SpringDocApp11Test.java index fcaf6fc38..12305efa6 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app11/SpringDocApp11Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app11/SpringDocApp11Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 11 test. */ -public class SpringDocApp11Test extends AbstractSpringDocTest { +class SpringDocApp11Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app110/ErrorMessage.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app110/ErrorMessage.java index 85220e03b..acaf87337 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app110/ErrorMessage.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app110/ErrorMessage.java @@ -8,7 +8,7 @@ /** * The type Error message. */ -public class ErrorMessage { +class ErrorMessage { /** * The Errors. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app110/GlobalControllerAdvice.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app110/GlobalControllerAdvice.java index 4bf34d64f..c6d326ac5 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app110/GlobalControllerAdvice.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app110/GlobalControllerAdvice.java @@ -28,7 +28,7 @@ * The type Global controller advice. */ @ControllerAdvice(assignableTypes = PersonController.class) -public class GlobalControllerAdvice //extends ResponseEntityExceptionHandler +class GlobalControllerAdvice //extends ResponseEntityExceptionHandler { /** * Note use base class if you wish to leverage its handling. @@ -45,10 +45,7 @@ public class GlobalControllerAdvice //extends ResponseEntityExceptionHandler @ExceptionHandler(Throwable.class) @ResponseStatus(code = HttpStatus.INTERNAL_SERVER_ERROR) public ResponseEntity problem(final Throwable e) { - String message = e.getMessage(); - //might actually prefer to use a geeric mesasge - - message = "Problem occured"; + String message = "Problem occured"; UUID uuid = UUID.randomUUID(); String logRef = uuid.toString(); logger.error("logRef=" + logRef, message, e); diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app110/Person.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app110/Person.java index 7c84b7a01..b9a8733a9 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app110/Person.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app110/Person.java @@ -13,7 +13,7 @@ /** * The type Person. */ -public class Person { +class Person { /** * The Id. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app110/PersonController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app110/PersonController.java index 371daf1c7..14a140054 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app110/PersonController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app110/PersonController.java @@ -22,7 +22,7 @@ */ @RestController @Validated -public class PersonController { +class PersonController { /** * The Ran. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app110/PersonController2.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app110/PersonController2.java index f5b6f7cd9..4eaede510 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app110/PersonController2.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app110/PersonController2.java @@ -21,7 +21,7 @@ */ @RestController @Validated -public class PersonController2 { +class PersonController2 { /** * The Ran. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app110/Problem.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app110/Problem.java index 9b56428e5..96317413b 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app110/Problem.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app110/Problem.java @@ -3,7 +3,7 @@ /** * The type Problem. */ -public class Problem { +class Problem { /** * The Log ref. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app110/SpringDocApp110Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app110/SpringDocApp110Test.java index 016cc1397..5436f3051 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app110/SpringDocApp110Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app110/SpringDocApp110Test.java @@ -16,7 +16,7 @@ @TestPropertySource(properties = { "application-description=description", "application-version=v1" }) -public class SpringDocApp110Test extends AbstractSpringDocTest { +class SpringDocApp110Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app111/ErrorMessage.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app111/ErrorMessage.java index 7a3f6c866..987d07087 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app111/ErrorMessage.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app111/ErrorMessage.java @@ -8,7 +8,7 @@ /** * The type Error message. */ -public class ErrorMessage { +class ErrorMessage { /** * The Errors. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app111/GlobalControllerAdvice.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app111/GlobalControllerAdvice.java index 2fc3def41..f33033e8d 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app111/GlobalControllerAdvice.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app111/GlobalControllerAdvice.java @@ -28,7 +28,7 @@ * The type Global controller advice. */ @ControllerAdvice(basePackages = "test.org.springdoc.api.appzzz") -public class GlobalControllerAdvice //extends ResponseEntityExceptionHandler +class GlobalControllerAdvice //extends ResponseEntityExceptionHandler { /** * Note use base class if you wish to leverage its handling. @@ -45,10 +45,7 @@ public class GlobalControllerAdvice //extends ResponseEntityExceptionHandler @ExceptionHandler(Throwable.class) @ResponseStatus(code = HttpStatus.INTERNAL_SERVER_ERROR) public ResponseEntity problem(final Throwable e) { - String message = e.getMessage(); - //might actually prefer to use a geeric mesasge - - message = "Problem occured"; + String message = "Problem occured"; UUID uuid = UUID.randomUUID(); String logRef = uuid.toString(); logger.error("logRef=" + logRef, message, e); diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app111/Person.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app111/Person.java index 69e084b82..a73ca5b25 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app111/Person.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app111/Person.java @@ -13,7 +13,7 @@ /** * The type Person. */ -public class Person { +class Person { /** * The Id. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app111/PersonController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app111/PersonController.java index 3299ab725..dc9549618 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app111/PersonController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app111/PersonController.java @@ -21,7 +21,7 @@ */ @RestController @Validated -public class PersonController { +class PersonController { /** * The Ran. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app111/PersonController2.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app111/PersonController2.java index cc4405191..8d915472a 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app111/PersonController2.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app111/PersonController2.java @@ -21,7 +21,7 @@ */ @RestController @Validated -public class PersonController2 { +class PersonController2 { /** * The Ran. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app111/Problem.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app111/Problem.java index 30af4727f..088ca0795 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app111/Problem.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app111/Problem.java @@ -3,7 +3,7 @@ /** * The type Problem. */ -public class Problem { +class Problem { /** * The Log ref. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app111/SpringDocApp111Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app111/SpringDocApp111Test.java index 3a88dd5f1..5894369f9 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app111/SpringDocApp111Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app111/SpringDocApp111Test.java @@ -16,7 +16,7 @@ @TestPropertySource(properties = { "application-description=description", "application-version=v1" }) -public class SpringDocApp111Test extends AbstractSpringDocTest { +class SpringDocApp111Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app112/ErrorMessage.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app112/ErrorMessage.java index 5ce591f02..f0404171c 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app112/ErrorMessage.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app112/ErrorMessage.java @@ -8,7 +8,7 @@ /** * The type Error message. */ -public class ErrorMessage { +class ErrorMessage { /** * The Errors. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app112/GlobalControllerAdvice.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app112/GlobalControllerAdvice.java index d92ef2d4d..1de9557f6 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app112/GlobalControllerAdvice.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app112/GlobalControllerAdvice.java @@ -28,7 +28,7 @@ * The type Global controller advice. */ @ControllerAdvice(basePackages = "test.org.springdoc.api.app112.sample") -public class GlobalControllerAdvice //extends ResponseEntityExceptionHandler +class GlobalControllerAdvice //extends ResponseEntityExceptionHandler { /** * Note use base class if you wish to leverage its handling. @@ -45,10 +45,7 @@ public class GlobalControllerAdvice //extends ResponseEntityExceptionHandler @ExceptionHandler(Throwable.class) @ResponseStatus(code = HttpStatus.INTERNAL_SERVER_ERROR) public ResponseEntity problem(final Throwable e) { - String message = e.getMessage(); - //might actually prefer to use a geeric mesasge - - message = "Problem occured"; + String message = "Problem occured"; UUID uuid = UUID.randomUUID(); String logRef = uuid.toString(); logger.error("logRef=" + logRef, message, e); diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app112/PersonController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app112/PersonController.java index 4fda43069..4d81dd572 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app112/PersonController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app112/PersonController.java @@ -21,7 +21,7 @@ */ @RestController @Validated -public class PersonController { +class PersonController { /** * The Ran. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app112/Problem.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app112/Problem.java index d3ceca40c..ee5127936 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app112/Problem.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app112/Problem.java @@ -3,7 +3,7 @@ /** * The type Problem. */ -public class Problem { +class Problem { /** * The Log ref. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app112/SpringDocApp112Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app112/SpringDocApp112Test.java index cbfb1bd3f..83cd397c3 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app112/SpringDocApp112Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app112/SpringDocApp112Test.java @@ -16,7 +16,7 @@ @TestPropertySource(properties = { "application-description=description", "application-version=v1" }) -public class SpringDocApp112Test extends AbstractSpringDocTest { +class SpringDocApp112Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app112/sample/PersonController2.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app112/sample/PersonController2.java index abf7d7994..99c5556a1 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app112/sample/PersonController2.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app112/sample/PersonController2.java @@ -23,7 +23,7 @@ */ @RestController @Validated -public class PersonController2 { +class PersonController2 { /** * The Ran. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app113/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app113/HelloController.java index 77ec88a77..9ae9acdcf 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app113/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app113/HelloController.java @@ -28,7 +28,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Test. @@ -51,7 +51,7 @@ public void test2(@RequestBody Optional body) { /** * The type Body. */ - public class Body { + class Body { /** * The Field. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app113/SpringDocApp113Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app113/SpringDocApp113Test.java index 8bf9ff750..12bdcb85c 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app113/SpringDocApp113Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app113/SpringDocApp113Test.java @@ -8,7 +8,7 @@ /** * The type Spring doc app 113 test. */ -public class SpringDocApp113Test extends AbstractSpringDocTest { +class SpringDocApp113Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app114/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app114/HelloController.java index 36d39f265..cc51c4e91 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app114/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app114/HelloController.java @@ -31,7 +31,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Gets currency. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app114/SpringDocApp114Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app114/SpringDocApp114Test.java index 3a2860c3a..1f1fa7634 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app114/SpringDocApp114Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app114/SpringDocApp114Test.java @@ -11,7 +11,7 @@ /** * The type Spring doc app 114 test. */ -public class SpringDocApp114Test extends AbstractSpringDocTest { +class SpringDocApp114Test extends AbstractSpringDocTest { static { SpringDocUtils.getConfig().replaceWithClass(MonetaryAmount.class, org.springdoc.core.converters.models.MonetaryAmount.class); diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app115/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app115/HelloController.java index 4a1694486..63f6a4f38 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app115/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app115/HelloController.java @@ -28,7 +28,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Timeouts duration. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app115/JavaTimeOperationCustomizer.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app115/JavaTimeOperationCustomizer.java index 89c254a02..5295dcced 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app115/JavaTimeOperationCustomizer.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app115/JavaTimeOperationCustomizer.java @@ -16,7 +16,7 @@ * The type Java time operation customizer. */ @Component -public class JavaTimeOperationCustomizer implements OperationCustomizer { +class JavaTimeOperationCustomizer implements OperationCustomizer { /** * Customize operation. * diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app115/SpringDocApp115Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app115/SpringDocApp115Test.java index 4b7b6ce0a..745e9d73e 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app115/SpringDocApp115Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app115/SpringDocApp115Test.java @@ -8,7 +8,7 @@ /** * The type Spring doc app 115 test. */ -public class SpringDocApp115Test extends AbstractSpringDocTest { +class SpringDocApp115Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app116/FooErrorHandler.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app116/FooErrorHandler.java index 3aae65921..01be608ce 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app116/FooErrorHandler.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app116/FooErrorHandler.java @@ -9,7 +9,7 @@ * The type Foo error handler. */ @ControllerAdvice(assignableTypes = HelloController.class) -public class FooErrorHandler { +class FooErrorHandler { /** * Store assignment publishing error response entity. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app116/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app116/HelloController.java index 3302edadf..22d268c45 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app116/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app116/HelloController.java @@ -15,7 +15,7 @@ @RestController @RequestMapping("/api") @OpenAPIDefinition(info = @Info(title = "API Examples", version = "1.0"), tags = @Tag(name = "Operations")) -public class HelloController { +class HelloController { /** * Create string. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app116/SpringDocApp116Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app116/SpringDocApp116Test.java index 31528b0bf..dce40d52b 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app116/SpringDocApp116Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app116/SpringDocApp116Test.java @@ -8,7 +8,7 @@ /** * The type Spring doc app 116 test. */ -public class SpringDocApp116Test extends AbstractSpringDocTest { +class SpringDocApp116Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app117/HelloApplication.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app117/HelloApplication.java index 84cef2203..3a8e2ec50 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app117/HelloApplication.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app117/HelloApplication.java @@ -37,7 +37,7 @@ * The type Hello application. */ @Configuration -public class HelloApplication { +class HelloApplication { /** * Routes router function. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app117/SpringDocApp117Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app117/SpringDocApp117Test.java index ce2de0160..4841fba3c 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app117/SpringDocApp117Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app117/SpringDocApp117Test.java @@ -8,7 +8,7 @@ /** * The type Spring doc app 117 test. */ -public class SpringDocApp117Test extends AbstractSpringDocTest { +class SpringDocApp117Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app118/ConcreteParent.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app118/ConcreteParent.java index 8fe1ea9e1..5355669b9 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app118/ConcreteParent.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app118/ConcreteParent.java @@ -13,7 +13,7 @@ @Type(ChildOfConcrete1.class), @Type(ChildOfConcrete2.class) }) -public class ConcreteParent { +class ConcreteParent { /** * The Id. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app118/Controller.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app118/Controller.java index a3f60295c..34f86e513 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app118/Controller.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app118/Controller.java @@ -12,7 +12,7 @@ */ @RestController @RequestMapping("class-hierarchy") -public class Controller { +class Controller { /** * Abstract parent response. * diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app118/SpringDocApp118Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app118/SpringDocApp118Test.java index dd07eec6a..57c55ff5b 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app118/SpringDocApp118Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app118/SpringDocApp118Test.java @@ -8,7 +8,7 @@ /** * The type Spring doc app 118 test. */ -public class SpringDocApp118Test extends AbstractSpringDocTest { +class SpringDocApp118Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app119/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app119/HelloController.java index ac817bd70..66b0b2568 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app119/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app119/HelloController.java @@ -32,7 +32,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Multi files in multi part string. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app119/JsonRequest.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app119/JsonRequest.java index 5eeff6849..5f0baf0b1 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app119/JsonRequest.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app119/JsonRequest.java @@ -3,7 +3,7 @@ /** * The type Json request. */ -public class JsonRequest { +class JsonRequest { /** * The Name. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app119/SpringDocApp119Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app119/SpringDocApp119Test.java index f6ad91b34..cf9ae5ca3 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app119/SpringDocApp119Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app119/SpringDocApp119Test.java @@ -8,7 +8,7 @@ /** * The type Spring doc app 119 test. */ -public class SpringDocApp119Test extends AbstractSpringDocTest { +class SpringDocApp119Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app12/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app12/HelloController.java index 7978dee2e..b5ccfec4e 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app12/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app12/HelloController.java @@ -30,7 +30,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Persons string. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app12/SpringDocApp12Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app12/SpringDocApp12Test.java index 284c74edc..65ee8b3e9 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app12/SpringDocApp12Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app12/SpringDocApp12Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 12 test. */ -public class SpringDocApp12Test extends AbstractSpringDocTest { +class SpringDocApp12Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app120/MetaAnnotationController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app120/MetaAnnotationController.java index 27ec703da..811b21f62 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app120/MetaAnnotationController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app120/MetaAnnotationController.java @@ -45,7 +45,7 @@ * The type Meta annotation controller. */ @RestController -public class MetaAnnotationController { +class MetaAnnotationController { /** * Simple test string. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app120/SpringDocApp120Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app120/SpringDocApp120Test.java index 6f7fdb2fa..1302ab5fc 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app120/SpringDocApp120Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app120/SpringDocApp120Test.java @@ -25,7 +25,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp120Test extends AbstractSpringDocTest { +class SpringDocApp120Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app121/InheritedRequestParams.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app121/InheritedRequestParams.java index d984c6847..ae7ba5a49 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app121/InheritedRequestParams.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app121/InheritedRequestParams.java @@ -5,7 +5,7 @@ /** * The type Inherited request params. */ -public class InheritedRequestParams extends RequestParams { +class InheritedRequestParams extends RequestParams { /** * parameter from child of RequestParams diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app121/RequestParams.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app121/RequestParams.java index 7fb459ad9..42c96a2ec 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app121/RequestParams.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app121/RequestParams.java @@ -10,7 +10,7 @@ /** * The type Request params. */ -public class RequestParams { +class RequestParams { /** * The String param. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app121/SpringDocApp121Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app121/SpringDocApp121Test.java index 2ec54e8ac..c67567556 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app121/SpringDocApp121Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app121/SpringDocApp121Test.java @@ -30,7 +30,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp121Test extends AbstractSpringDocTest { +class SpringDocApp121Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app121/TestController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app121/TestController.java index e6fa8808f..da5c4470f 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app121/TestController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app121/TestController.java @@ -10,7 +10,7 @@ * The type Test controller. */ @RestController -public class TestController { +class TestController { /** * Gets test. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app122/BaseObject.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app122/BaseObject.java index 91f4ea077..3623d55d7 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app122/BaseObject.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app122/BaseObject.java @@ -28,7 +28,7 @@ /** * The type Base object. */ -public class BaseObject { +class BaseObject { /** * The Base str. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app122/CustomerDto.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app122/CustomerDto.java index 58cc1c756..b7f53ca04 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app122/CustomerDto.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app122/CustomerDto.java @@ -28,7 +28,7 @@ /** * The type Customer dto. */ -public class CustomerDto extends BaseObject { +class CustomerDto extends BaseObject { /** * The Customer name. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app122/FirstController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app122/FirstController.java index a50dcea94..05cb73f9d 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app122/FirstController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app122/FirstController.java @@ -32,6 +32,6 @@ */ @RestController @Tag(name = "example") -public class FirstController extends BaseController { +class FirstController extends BaseController { } \ No newline at end of file diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app122/SpringDocApp122Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app122/SpringDocApp122Test.java index 1a99d848d..580a8447d 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app122/SpringDocApp122Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app122/SpringDocApp122Test.java @@ -30,7 +30,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp122Test extends AbstractSpringDocTest { +class SpringDocApp122Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app122/Wrapper.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app122/Wrapper.java index 45a82eccd..9912cc1a3 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app122/Wrapper.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app122/Wrapper.java @@ -30,7 +30,7 @@ * * @param the type parameter */ -public class Wrapper { +class Wrapper { /** diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app123/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app123/HelloController.java index e02791897..9b2f80143 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app123/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app123/HelloController.java @@ -31,7 +31,7 @@ * @param the type parameter */ @RestController -public class HelloController { +class HelloController { /** * Index t. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app123/MyExceptionHandler.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app123/MyExceptionHandler.java index 15aff27d2..2e6942fba 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app123/MyExceptionHandler.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app123/MyExceptionHandler.java @@ -30,7 +30,7 @@ * The type My exception handler. */ @RestControllerAdvice -public class MyExceptionHandler { +class MyExceptionHandler { /** * Bad. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app123/SpringDocApp123Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app123/SpringDocApp123Test.java index 706b1c4d9..abfe6fa0b 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app123/SpringDocApp123Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app123/SpringDocApp123Test.java @@ -30,7 +30,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp123Test extends AbstractSpringDocTest { +class SpringDocApp123Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app124/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app124/HelloController.java index 57bc80a45..5a86bb351 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app124/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app124/HelloController.java @@ -35,7 +35,7 @@ * @param the type parameter */ @RestController -public class HelloController { +class HelloController { /** * Bad. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app124/MyExceptionHandler.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app124/MyExceptionHandler.java index 2e62169d5..53a315624 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app124/MyExceptionHandler.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app124/MyExceptionHandler.java @@ -27,7 +27,7 @@ * The type My exception handler. */ @RestControllerAdvice -public class MyExceptionHandler { +class MyExceptionHandler { /** * Gateway object. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app124/SpringDocApp124Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app124/SpringDocApp124Test.java index 6cc175df8..91a4d1629 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app124/SpringDocApp124Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app124/SpringDocApp124Test.java @@ -30,7 +30,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp124Test extends AbstractSpringDocTest { +class SpringDocApp124Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app125/DeprecatedEntity.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app125/DeprecatedEntity.java index 14f1032bd..023a0927d 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app125/DeprecatedEntity.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app125/DeprecatedEntity.java @@ -6,7 +6,7 @@ * The type Deprecated entity. * @author bnasslahsen */ -public class DeprecatedEntity { +class DeprecatedEntity { /** * The My non deprecated field. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app125/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app125/HelloController.java index 9c7ed9662..a62df822d 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app125/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app125/HelloController.java @@ -10,7 +10,7 @@ * @author bnasslahsen */ @RestController -public class HelloController { +class HelloController { /** * Gets all pets. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app125/SpringDocApp125Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app125/SpringDocApp125Test.java index 6d979c1b8..a3ee34fcf 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app125/SpringDocApp125Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app125/SpringDocApp125Test.java @@ -37,7 +37,7 @@ * Tests Spring meta-annotations as method parameters */ @TestPropertySource(properties = "springdoc.model-converters.deprecating-converter.enabled=false") -public class SpringDocApp125Test extends AbstractSpringDocTest { +class SpringDocApp125Test extends AbstractSpringDocTest { static { Optional deprecatingConverterOptional = diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app126/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app126/HelloController.java index 7c1839986..e79a7e570 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app126/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app126/HelloController.java @@ -45,7 +45,7 @@ // @ApiResponse(responseCode = "401", description = "Invalid authentication.", content = {@Content(schema = @Schema(implementation = Problem.class), mediaType = APPLICATION_PROBLEM_JSON_VALUE)}), // @ApiResponse(responseCode = "401", description = "Invalid authentication.",content = {@Content(schema = @Schema(implementation = Problem.class), mediaType = APPLICATION_PROBLEM_JSON_VALUE)}), // @ApiResponse(responseCode = "403", description = "Missing authorities.",content = {@Content(schema = @Schema(implementation = Problem.class), mediaType = APPLICATION_PROBLEM_JSON_VALUE)}) }) -public class HelloController { +class HelloController { /** * The constant CURRENCIES. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app126/SecurityProblemResponsesConfiguration.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app126/SecurityProblemResponsesConfiguration.java index fcd9a8f0b..da9a2a38c 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app126/SecurityProblemResponsesConfiguration.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app126/SecurityProblemResponsesConfiguration.java @@ -19,7 +19,7 @@ * Configuration class defining standard OpenAPI Specification for operations */ @Configuration -public class SecurityProblemResponsesConfiguration { +class SecurityProblemResponsesConfiguration { /** * The constant HTTP_401_NO_TOKEN. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app126/SpringDocApp126Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app126/SpringDocApp126Test.java index e47f50b06..2d2c16ebb 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app126/SpringDocApp126Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app126/SpringDocApp126Test.java @@ -39,7 +39,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp126Test extends AbstractSpringDocTest { +class SpringDocApp126Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app127/ConcreteObjectA.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app127/ConcreteObjectA.java index 34e15bcd7..d3339226f 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app127/ConcreteObjectA.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app127/ConcreteObjectA.java @@ -3,7 +3,7 @@ /** * The type Concrete object a. */ -public class ConcreteObjectA extends AbstractObject { +class ConcreteObjectA extends AbstractObject { /** * The Description. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app127/Controller.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app127/Controller.java index a69ddcbfe..b0be57945 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app127/Controller.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app127/Controller.java @@ -14,7 +14,7 @@ * The type Controller. */ @RestController -public class Controller { +class Controller { /** * Bug umbrella. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app127/SpringDocApp127Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app127/SpringDocApp127Test.java index 78d202ea5..7fe0afa53 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app127/SpringDocApp127Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app127/SpringDocApp127Test.java @@ -37,7 +37,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp127Test extends AbstractSpringDocTest { +class SpringDocApp127Test extends AbstractSpringDocTest { /** * Test app. @@ -45,7 +45,7 @@ public class SpringDocApp127Test extends AbstractSpringDocTest { * @throws Exception the exception */ @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { className = getClass().getSimpleName(); String testNumber = className.replaceAll("[^0-9]", ""); MvcResult mockMvcResult = mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + ".yaml")).andExpect(status().isOk()).andReturn(); diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app127/Umbrella.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app127/Umbrella.java index 54343057b..ee696ace2 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app127/Umbrella.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app127/Umbrella.java @@ -5,7 +5,7 @@ /** * The type Umbrella. */ -public class Umbrella { +class Umbrella { /** * The Object. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app129/ActualReturnedEntity.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app129/ActualReturnedEntity.java index 2962144a4..a0f3f4c98 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app129/ActualReturnedEntity.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app129/ActualReturnedEntity.java @@ -5,7 +5,7 @@ /** * The type Actual returned entity. */ -public class ActualReturnedEntity { +class ActualReturnedEntity { /** * The Result. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app129/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app129/HelloController.java index 7c5510f4d..b38288785 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app129/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app129/HelloController.java @@ -32,7 +32,7 @@ */ @RestController @RequestMapping(path = "/api", headers = { "userId", "registrationId" }) -public class HelloController { +class HelloController { /** * Update deferred result. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app129/OperationResponse.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app129/OperationResponse.java index 66cbd0a38..7b41eb0e3 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app129/OperationResponse.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app129/OperationResponse.java @@ -7,7 +7,7 @@ * * @param the type parameter */ -public class OperationResponse { +class OperationResponse { /** * The Operation result. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app129/SpringDocApp129Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app129/SpringDocApp129Test.java index 046ab9249..2dfe85a0c 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app129/SpringDocApp129Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app129/SpringDocApp129Test.java @@ -30,7 +30,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp129Test extends AbstractSpringDocTest { +class SpringDocApp129Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app13/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app13/HelloController.java index 3aae634d8..cd48b3d0f 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app13/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app13/HelloController.java @@ -25,7 +25,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Persons string. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app13/PersonDTO.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app13/PersonDTO.java index b61220a66..17e68752d 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app13/PersonDTO.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app13/PersonDTO.java @@ -25,7 +25,7 @@ * The type Person dto. */ @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) -public class PersonDTO { +class PersonDTO { /** * The Email. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app13/SpringDocApp13Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app13/SpringDocApp13Test.java index 8c3f2f163..a1483e4e7 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app13/SpringDocApp13Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app13/SpringDocApp13Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 13 test. */ -public class SpringDocApp13Test extends AbstractSpringDocTest { +class SpringDocApp13Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app130/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app130/HelloController.java index 7897e39bc..1e3e5e5ac 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app130/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app130/HelloController.java @@ -26,7 +26,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * List tracker data. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app130/SpringDocApp130Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app130/SpringDocApp130Test.java index d6dd8a514..755a6a025 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app130/SpringDocApp130Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app130/SpringDocApp130Test.java @@ -30,7 +30,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp130Test extends AbstractSpringDocTest { +class SpringDocApp130Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app130/TrackerData.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app130/TrackerData.java index 3766a094f..2dd4405e6 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app130/TrackerData.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app130/TrackerData.java @@ -28,7 +28,7 @@ * The type Tracker data. */ @Hidden -public class TrackerData { +class TrackerData { /** * The Tracker id. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app131/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app131/HelloController.java index e40c5675d..8b8e4f561 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app131/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app131/HelloController.java @@ -38,7 +38,7 @@ * @param the type parameter */ @RestController -public class HelloController { +class HelloController { /** diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app131/Organization.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app131/Organization.java index fefef9780..98c01ca42 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app131/Organization.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app131/Organization.java @@ -15,7 +15,7 @@ "This is the description being overwritten") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ "id", "name" }) -public class Organization { +class Organization { /** * The Id. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app131/RestControllerError.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app131/RestControllerError.java index 4022ab9e4..d49ae4d19 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app131/RestControllerError.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app131/RestControllerError.java @@ -5,7 +5,7 @@ /** * The type Rest controller error. */ -public class RestControllerError { +class RestControllerError { /** * The Id. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app131/SpringDocApp131Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app131/SpringDocApp131Test.java index 30b42cc24..a7e2bd634 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app131/SpringDocApp131Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app131/SpringDocApp131Test.java @@ -30,7 +30,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp131Test extends AbstractSpringDocTest { +class SpringDocApp131Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app132/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app132/HelloController.java index 24bd87461..a038354b5 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app132/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app132/HelloController.java @@ -38,7 +38,7 @@ * @param the type parameter */ @RestController -public class HelloController { +class HelloController { /** diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app132/Organization.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app132/Organization.java index 59bf9ab69..cd1e1127c 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app132/Organization.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app132/Organization.java @@ -15,7 +15,7 @@ "This is the description being overwritten") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ "id", "name" }) -public class Organization { +class Organization { /** * The Id. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app132/RestControllerError.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app132/RestControllerError.java index 250c07d8f..d716511b1 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app132/RestControllerError.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app132/RestControllerError.java @@ -5,7 +5,7 @@ /** * The type Rest controller error. */ -public class RestControllerError { +class RestControllerError { /** * The Id. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app132/SpringDocApp132Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app132/SpringDocApp132Test.java index 35bdb45b0..5d5d8fd98 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app132/SpringDocApp132Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app132/SpringDocApp132Test.java @@ -30,7 +30,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp132Test extends AbstractSpringDocTest { +class SpringDocApp132Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app133/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app133/HelloController.java index e55a69220..7133d1542 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app133/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app133/HelloController.java @@ -29,7 +29,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Gets message from header 1. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app133/SpringDocApp133Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app133/SpringDocApp133Test.java index f00b023cc..62453d06c 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app133/SpringDocApp133Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app133/SpringDocApp133Test.java @@ -30,7 +30,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp133Test extends AbstractSpringDocTest { +class SpringDocApp133Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app134/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app134/HelloController.java index 2a2600c55..e1379a952 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app134/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app134/HelloController.java @@ -45,7 +45,7 @@ @SpringBootApplication @RestController @Tag(name = "The sample resource") -public class HelloController { +class HelloController { // ----------------------------------------------------------------------------------------------------------------- diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app134/OpenApiConfig.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app134/OpenApiConfig.java index fa6d5de7c..aac5b73df 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app134/OpenApiConfig.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app134/OpenApiConfig.java @@ -9,7 +9,7 @@ * The type Open api config. */ @Configuration -public class OpenApiConfig { +class OpenApiConfig { /** * Group v 1 open api grouped open api. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app134/SpringDocApp134Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app134/SpringDocApp134Test.java index 81a8ec07c..f619e2ca7 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app134/SpringDocApp134Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app134/SpringDocApp134Test.java @@ -38,7 +38,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp134Test extends AbstractSpringDocTest { +class SpringDocApp134Test extends AbstractSpringDocTest { /** * Test app. @@ -46,7 +46,7 @@ public class SpringDocApp134Test extends AbstractSpringDocTest { * @throws Exception the exception */ @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/v1-group")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) @@ -59,7 +59,7 @@ public void testApp() throws Exception { * @throws Exception the exception */ @Test - public void testApp2() throws Exception { + void testApp2() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/v2-group")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) @@ -72,7 +72,7 @@ public void testApp2() throws Exception { * @throws Exception the exception */ @Test - public void testApp3() throws Exception { + void testApp3() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/v1-headers-group")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) @@ -85,7 +85,7 @@ public void testApp3() throws Exception { * @throws Exception the exception */ @Test - public void testApp4() throws Exception { + void testApp4() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/v1-v2-headers-group")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) @@ -98,7 +98,7 @@ public void testApp4() throws Exception { * @throws Exception the exception */ @Test - public void testApp5() throws Exception { + void testApp5() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/v2-consumes-group")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app135/Book.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app135/Book.java index 093a63de0..9ea698276 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app135/Book.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app135/Book.java @@ -23,7 +23,7 @@ /** * The type Book. */ -public class Book { +class Book { /** * The Id. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app135/BookRepository.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app135/BookRepository.java index 6ed607696..caf653823 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app135/BookRepository.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app135/BookRepository.java @@ -29,7 +29,7 @@ * The type Book repository. */ @Component -public class BookRepository { +class BookRepository { /** * Find by author list. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app135/SpringDocApp135Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app135/SpringDocApp135Test.java index cb84d8c6b..fc78132ae 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app135/SpringDocApp135Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app135/SpringDocApp135Test.java @@ -30,7 +30,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp135Test extends AbstractSpringDocTest { +class SpringDocApp135Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app137/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app137/HelloController.java index 2df7982e1..d3fb51c33 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app137/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app137/HelloController.java @@ -28,7 +28,7 @@ */ @RestController @SecurityRequirement(name = "security_auth") -public class HelloController { +class HelloController { /** * Test. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app137/OpenApiConfig.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app137/OpenApiConfig.java index 5f74e87fa..c48254014 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app137/OpenApiConfig.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app137/OpenApiConfig.java @@ -35,4 +35,4 @@ flows = @OAuthFlows(authorizationCode = @OAuthFlow( authorizationUrl = "http://authorization.url" , tokenUrl = "http://token.url", scopes = {}))) -public class OpenApiConfig {} +class OpenApiConfig {} diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app137/SpringDocApp137Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app137/SpringDocApp137Test.java index 517c9a158..a952c0967 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app137/SpringDocApp137Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app137/SpringDocApp137Test.java @@ -32,7 +32,7 @@ * Tests Spring meta-annotations as method parameters */ @TestPropertySource(properties = { "test.server=http://test.toto.com", "test.desc=toto desc" }) -public class SpringDocApp137Test extends AbstractSpringDocTest { +class SpringDocApp137Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app138/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app138/HelloController.java index 52daa9b2d..73e75a5ce 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app138/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app138/HelloController.java @@ -25,7 +25,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Test a. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app138/SpringDocApp138Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app138/SpringDocApp138Test.java index ad0408572..d88d76d96 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app138/SpringDocApp138Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app138/SpringDocApp138Test.java @@ -32,7 +32,7 @@ * Tests Spring meta-annotations as method parameters */ @TestPropertySource(properties = "springdoc.writer-with-order-by-keys=true") -public class SpringDocApp138Test extends AbstractSpringDocTest { +class SpringDocApp138Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app139/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app139/HelloController.java index 830d90c1c..7357246fa 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app139/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app139/HelloController.java @@ -27,7 +27,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Echo 1 string. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app139/SpringDocApp139Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app139/SpringDocApp139Test.java index f98969b4b..0c4918c4f 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app139/SpringDocApp139Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app139/SpringDocApp139Test.java @@ -32,7 +32,7 @@ * Tests Spring meta-annotations as method parameters */ @TestPropertySource(properties = { "test.name=text", "test.value=text", "test.default-value=default-text" }) -public class SpringDocApp139Test extends AbstractSpringDocTest { +class SpringDocApp139Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app14/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app14/HelloController.java index 539304888..101fb8a55 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app14/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app14/HelloController.java @@ -29,7 +29,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Persons. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app14/SpringDocApp14Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app14/SpringDocApp14Test.java index b252391d9..0faffab68 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app14/SpringDocApp14Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app14/SpringDocApp14Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 14 test. */ -public class SpringDocApp14Test extends AbstractSpringDocTest { +class SpringDocApp14Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app140/HelloApplication.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app140/HelloApplication.java index 73fcb5301..73eab0685 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app140/HelloApplication.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app140/HelloApplication.java @@ -60,7 +60,7 @@ * The type Hello application. */ @Configuration -public class HelloApplication { +class HelloApplication { /** * Filter server response. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app140/SpringDocApp140Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app140/SpringDocApp140Test.java index 83a9f3961..d4d169907 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app140/SpringDocApp140Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app140/SpringDocApp140Test.java @@ -31,7 +31,7 @@ /** * The type Spring doc app 140 test. */ -public class SpringDocApp140Test extends AbstractSpringDocTest { +class SpringDocApp140Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app141/Book.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app141/Book.java index cb7144f75..b0ad55ea9 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app141/Book.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app141/Book.java @@ -26,7 +26,7 @@ /** * The type Book. */ -public class Book { +class Book { /** * The Id. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app141/BookRepository.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app141/BookRepository.java index e4234d0af..06974d0a7 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app141/BookRepository.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app141/BookRepository.java @@ -32,7 +32,7 @@ * The type Book repository. */ @Component -public class BookRepository { +class BookRepository { /** * Find by author list. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app141/SpringDocApp141Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app141/SpringDocApp141Test.java index 1313b4e60..4cf55c8dc 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app141/SpringDocApp141Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app141/SpringDocApp141Test.java @@ -30,7 +30,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp141Test extends AbstractSpringDocTest { +class SpringDocApp141Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app142/HelloApplication.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app142/HelloApplication.java index c85cdc551..4a53475d1 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app142/HelloApplication.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app142/HelloApplication.java @@ -47,7 +47,6 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.servlet.function.HandlerFunction; import org.springframework.web.servlet.function.RouterFunction; import org.springframework.web.servlet.function.ServerRequest; import org.springframework.web.servlet.function.ServerResponse; @@ -58,19 +57,8 @@ * The type Hello application. */ @Configuration -public class HelloApplication { +class HelloApplication { - /** - * Filter server response. - * - * @param serverRequest the server request - * @param handlerFunction the handler function - * @return the server response - * @throws Exception the exception - */ - private static ServerResponse filter(ServerRequest serverRequest, HandlerFunction handlerFunction) throws Exception { - return handlerFunction.handle(serverRequest); - } /** * Routes router function. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app142/SpringDocApp142Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app142/SpringDocApp142Test.java index c1b674439..243c78eea 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app142/SpringDocApp142Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app142/SpringDocApp142Test.java @@ -31,7 +31,7 @@ /** * The type Spring doc app 142 test. */ -public class SpringDocApp142Test extends AbstractSpringDocTest { +class SpringDocApp142Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app149/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app149/HelloController.java index 6be8e8545..ad2c4ba32 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app149/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app149/HelloController.java @@ -35,7 +35,7 @@ * @author Azige */ @Controller -public class HelloController { +class HelloController { /** * Hello string. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app149/HelloMessage.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app149/HelloMessage.java index ddf4549c7..5a59bec2e 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app149/HelloMessage.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app149/HelloMessage.java @@ -21,7 +21,7 @@ /** * The type Hello message. */ -public class HelloMessage { +class HelloMessage { /** * The Text. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app149/SpringDocApp149Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app149/SpringDocApp149Test.java index 7c0f6d5ab..c744382ba 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app149/SpringDocApp149Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app149/SpringDocApp149Test.java @@ -27,7 +27,7 @@ * The type Spring doc app 149 test. */ @TestPropertySource(properties = "springdoc.model-and-view-allowed=true") -public class SpringDocApp149Test extends AbstractSpringDocTest { +class SpringDocApp149Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app15/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app15/HelloController.java index fef703df3..e45ae4fc0 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app15/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app15/HelloController.java @@ -31,7 +31,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Persons json object. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app15/SpringDocApp15Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app15/SpringDocApp15Test.java index ffc51a9b1..edf10ffbe 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app15/SpringDocApp15Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app15/SpringDocApp15Test.java @@ -42,7 +42,7 @@ "springdoc.openapidefinition.info.contact.email=My contact email", "springdoc.openapidefinition.info.contact.url=My contact url" }) -public class SpringDocApp15Test extends AbstractSpringDocTest { +class SpringDocApp15Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app150/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app150/HelloController.java index 97ef24997..d57664d6a 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app150/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app150/HelloController.java @@ -38,7 +38,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Test. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app150/SpringDocApp150Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app150/SpringDocApp150Test.java index 6ed8926a4..c5f419fca 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app150/SpringDocApp150Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app150/SpringDocApp150Test.java @@ -26,7 +26,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp150Test extends AbstractSpringDocTest { +class SpringDocApp150Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app151/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app151/HelloController.java index 965b79566..ddfa63685 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app151/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app151/HelloController.java @@ -27,7 +27,7 @@ */ @RestController @RequestMapping("/test") -public class HelloController { +class HelloController { /** * Test int. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app151/SpringDocApp151Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app151/SpringDocApp151Test.java index 599840194..9adcff886 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app151/SpringDocApp151Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app151/SpringDocApp151Test.java @@ -26,7 +26,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp151Test extends AbstractSpringDocTest { +class SpringDocApp151Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app152/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app152/HelloController.java index 029102333..cf60ae7e8 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app152/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app152/HelloController.java @@ -13,7 +13,7 @@ */ @RestController @RequestMapping("/api") -public class HelloController { +class HelloController { /** * Hello world string. @@ -29,7 +29,7 @@ public String helloWorld() { * The type Web config. */ @Configuration - public class WebConfig implements WebMvcConfigurer { + class WebConfig implements WebMvcConfigurer { /** * Configure path match. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app152/SpringDocApp152Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app152/SpringDocApp152Test.java index 5f6a0527f..f2a86f532 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app152/SpringDocApp152Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app152/SpringDocApp152Test.java @@ -26,7 +26,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp152Test extends AbstractSpringDocTest { +class SpringDocApp152Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app153/OrderStateMapper.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app153/OrderStateMapper.java index 22168d6db..f887b0985 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app153/OrderStateMapper.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app153/OrderStateMapper.java @@ -8,7 +8,7 @@ /** * The type Order state mapper. */ -public class OrderStateMapper extends PropertyEditorSupport { +class OrderStateMapper extends PropertyEditorSupport { /** * Sets as text. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app153/SpringDocApp153Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app153/SpringDocApp153Test.java index 8cdc86f1c..730e8bebd 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app153/SpringDocApp153Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app153/SpringDocApp153Test.java @@ -26,7 +26,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp153Test extends AbstractSpringDocTest { +class SpringDocApp153Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app154/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app154/HelloController.java index 188a309ad..c1d29d062 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app154/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app154/HelloController.java @@ -31,7 +31,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app154/OpenApiConfiguration.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app154/OpenApiConfiguration.java index 6b805054f..afb45b440 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app154/OpenApiConfiguration.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app154/OpenApiConfiguration.java @@ -26,5 +26,5 @@ bearerFormat = "JWT" ) }) -public class OpenApiConfiguration { +class OpenApiConfiguration { } \ No newline at end of file diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app154/SpringDocApp154Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app154/SpringDocApp154Test.java index 0550243dc..7f7df1839 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app154/SpringDocApp154Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app154/SpringDocApp154Test.java @@ -26,7 +26,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp154Test extends AbstractSpringDocTest { +class SpringDocApp154Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app155/AbstractIntParameterObject.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app155/AbstractIntParameterObject.java index d1cd1a7c1..0d89e059d 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app155/AbstractIntParameterObject.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app155/AbstractIntParameterObject.java @@ -5,7 +5,7 @@ * * @param the type parameter */ -public class AbstractIntParameterObject { +class AbstractIntParameterObject { /** * The Primitive base field. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app155/AbstractParameterObject.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app155/AbstractParameterObject.java index 8c8ac93d1..664a456fd 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app155/AbstractParameterObject.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app155/AbstractParameterObject.java @@ -8,7 +8,7 @@ * * @param the type parameter */ -public class AbstractParameterObject> { +class AbstractParameterObject> { /** * The Primitive base field. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app155/ConcreteIntParameterObject.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app155/ConcreteIntParameterObject.java index c99364a46..97ef003ac 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app155/ConcreteIntParameterObject.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app155/ConcreteIntParameterObject.java @@ -3,7 +3,7 @@ /** * The type Concrete int parameter object. */ -public class ConcreteIntParameterObject extends AbstractIntParameterObject { +class ConcreteIntParameterObject extends AbstractIntParameterObject { /** * The Primitive concrete field. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app155/ConcreteParameterObject.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app155/ConcreteParameterObject.java index c1a74f77d..e2a21351d 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app155/ConcreteParameterObject.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app155/ConcreteParameterObject.java @@ -3,7 +3,7 @@ /** * The type Concrete parameter object. */ -public class ConcreteParameterObject extends AbstractParameterObject { +class ConcreteParameterObject extends AbstractParameterObject { /** * The Primitive concrete field. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app155/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app155/HelloController.java index 3bab03b89..0587ca62e 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app155/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app155/HelloController.java @@ -29,7 +29,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Say hello response entity. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app155/SpringDocApp155Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app155/SpringDocApp155Test.java index 36910d264..f27a7c5b8 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app155/SpringDocApp155Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app155/SpringDocApp155Test.java @@ -26,7 +26,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp155Test extends AbstractSpringDocTest { +class SpringDocApp155Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app156/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app156/HelloController.java index 1106e9e3e..d645edb0c 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app156/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app156/HelloController.java @@ -13,7 +13,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Hello string. * diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app156/SpringDocApp156Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app156/SpringDocApp156Test.java index 8365e3768..caeac0895 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app156/SpringDocApp156Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app156/SpringDocApp156Test.java @@ -26,7 +26,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp156Test extends AbstractSpringDocTest { +class SpringDocApp156Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app156/User.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app156/User.java index 53f9fb579..f4ec1eceb 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app156/User.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app156/User.java @@ -5,7 +5,7 @@ /** * The type User. */ -public class User { +class User { /** * The Some text. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app157/Bar.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app157/Bar.java index 9ec03c6e8..4fa42edae 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app157/Bar.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app157/Bar.java @@ -3,7 +3,7 @@ /** * A class without a String in it */ -public class Bar { +class Bar { /** * The Child. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app157/Foo.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app157/Foo.java index 416e6792b..05b8c39a7 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app157/Foo.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app157/Foo.java @@ -3,7 +3,7 @@ /** * A class with a String in it */ -public class Foo { +class Foo { /** * The Child. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app157/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app157/HelloController.java index d19833696..4265a2bdf 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app157/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app157/HelloController.java @@ -28,7 +28,7 @@ * ({@code ResponseEntity}). */ @RestController -public class HelloController { +class HelloController { /** * Gets foo. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app157/SpringDocApp157Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app157/SpringDocApp157Test.java index a987d207f..ffedde82f 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app157/SpringDocApp157Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app157/SpringDocApp157Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -47,7 +47,7 @@ * the type is enclosed in an ignored wrapper. We test this by setting up a model converter which * adds "stringy" to the "required" property of a schema's parent, when the sub schema is a String. */ -public class SpringDocApp157Test extends AbstractSpringDocTest { +class SpringDocApp157Test extends AbstractSpringDocTest { /** * The Converters. @@ -71,7 +71,7 @@ public void unregisterConverter() { * @throws Exception the exception */ @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app157/StringyConverter.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app157/StringyConverter.java index dba53fec5..97e650607 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app157/StringyConverter.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app157/StringyConverter.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -38,7 +38,7 @@ @Component -public class StringyConverter implements ModelConverter { +class StringyConverter implements ModelConverter { @Autowired ObjectMapperProvider objectMapperProvider; diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app158/CommonFooErrorHandler.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app158/CommonFooErrorHandler.java index ad14c86b4..47230839c 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app158/CommonFooErrorHandler.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app158/CommonFooErrorHandler.java @@ -7,7 +7,7 @@ /** * The type Common foo error handler. */ -public class CommonFooErrorHandler { +class CommonFooErrorHandler { /** * On exception error dto. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app158/ErrorDTO.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app158/ErrorDTO.java index ab5a164fa..1b3eeef92 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app158/ErrorDTO.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app158/ErrorDTO.java @@ -3,7 +3,7 @@ /** * The type Error dto. */ -public class ErrorDTO { +class ErrorDTO { /** * The Message. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app158/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app158/HelloController.java index 1a61537b9..0360f2779 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app158/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app158/HelloController.java @@ -32,7 +32,7 @@ @RestController @RequestMapping("/api") @OpenAPIDefinition(info = @Info(title = "API Examples", version = "1.0"), tags = @Tag(name = "Operations")) -public class HelloController { +class HelloController { /** * Hello simple dto. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app158/SimpleDTO.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app158/SimpleDTO.java index 766ce8b79..33618eb50 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app158/SimpleDTO.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app158/SimpleDTO.java @@ -3,7 +3,7 @@ /** * The type Simple dto. */ -public class SimpleDTO { +class SimpleDTO { /** * The Payload. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app158/SpecificFooErrorHandler.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app158/SpecificFooErrorHandler.java index 7dc4bdd00..4680982ae 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app158/SpecificFooErrorHandler.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app158/SpecificFooErrorHandler.java @@ -6,5 +6,5 @@ * The type Specific foo error handler. */ @ControllerAdvice(assignableTypes = HelloController.class) -public class SpecificFooErrorHandler extends CommonFooErrorHandler { +class SpecificFooErrorHandler extends CommonFooErrorHandler { } diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app158/SpringDocApp158Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app158/SpringDocApp158Test.java index 88a31de59..9a06672ae 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app158/SpringDocApp158Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app158/SpringDocApp158Test.java @@ -7,7 +7,7 @@ /** * The type Spring doc app 158 test. */ -public class SpringDocApp158Test extends AbstractSpringDocTest { +class SpringDocApp158Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app159/CustomException.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app159/CustomException.java index acd4d3e30..7ac1e9802 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app159/CustomException.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app159/CustomException.java @@ -3,7 +3,7 @@ /** * The type Custom exception. */ -public class CustomException extends RuntimeException { +class CustomException extends RuntimeException { /** * Instantiates a new Custom exception. * diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app159/FooBean.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app159/FooBean.java index fe44de982..93849d8ce 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app159/FooBean.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app159/FooBean.java @@ -5,7 +5,7 @@ /** * The type Foo bean. */ -public class FooBean { +class FooBean { /** * The Message. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app159/FooErrorHandler.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app159/FooErrorHandler.java index 8ad9bf8fe..352a93f65 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app159/FooErrorHandler.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app159/FooErrorHandler.java @@ -12,7 +12,7 @@ * The type Foo error handler. */ @ControllerAdvice(assignableTypes = HelloController.class) -public class FooErrorHandler { +class FooErrorHandler { /** * Store assignment publishing error response entity. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app159/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app159/HelloController.java index 672fabe0b..865a3ab2b 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app159/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app159/HelloController.java @@ -15,7 +15,7 @@ @RestController @RequestMapping("/api") @OpenAPIDefinition(info = @Info(title = "API Examples", version = "1.0"), tags = @Tag(name = "Operations")) -public class HelloController { +class HelloController { /** * Create string. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app159/SpringDocApp159Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app159/SpringDocApp159Test.java index 1070a54ba..c725aa27c 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app159/SpringDocApp159Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app159/SpringDocApp159Test.java @@ -7,7 +7,7 @@ /** * The type Spring doc app 159 test. */ -public class SpringDocApp159Test extends AbstractSpringDocTest { +class SpringDocApp159Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app159/Views.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app159/Views.java index 0cb902f50..a1dbcf1e0 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app159/Views.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app159/Views.java @@ -3,7 +3,7 @@ /** * The type Views. */ -public class Views { +class Views { /** * The type View 1. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app16/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app16/HelloController.java index 6e8f5c36f..dc4bd8641 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app16/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app16/HelloController.java @@ -25,7 +25,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Persons string. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app16/SpringDocApp16Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app16/SpringDocApp16Test.java index 77f33eee9..2899cdd77 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app16/SpringDocApp16Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app16/SpringDocApp16Test.java @@ -32,7 +32,7 @@ * The type Spring doc app 16 test. */ @TestPropertySource(properties = "springdoc.api-docs.enabled=false") -public class SpringDocApp16Test extends AbstractSpringDocTest { +class SpringDocApp16Test extends AbstractSpringDocTest { /** * Test app. @@ -40,7 +40,7 @@ public class SpringDocApp16Test extends AbstractSpringDocTest { * @throws Exception the exception */ @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)) .andExpect(status().isNotFound()); } diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app160/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app160/HelloController.java index c55fb8e78..c81884999 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app160/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app160/HelloController.java @@ -33,7 +33,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Do something interesting error response. @@ -77,13 +77,13 @@ public ResourceBundleMessageSource translator() { */ @PropertySource("classpath:swagger-message-160.properties") @Configuration - public class SwaggerMessage {} + class SwaggerMessage {} /** * The type Error response. */ @Schema(description = "${ErrorResponse}") - public class ErrorResponse { + class ErrorResponse { /** * The Error code. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app160/SpringDocApp160Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app160/SpringDocApp160Test.java index 72fb55ce4..84a5a06c7 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app160/SpringDocApp160Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app160/SpringDocApp160Test.java @@ -9,7 +9,7 @@ * The type Spring doc app 160 test. */ @TestPropertySource(properties = "springdoc.api-docs.resolve-schema-properties=true") -public class SpringDocApp160Test extends AbstractSpringDocTest { +class SpringDocApp160Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app161/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app161/HelloController.java index 847bc4aef..add930dc7 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app161/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app161/HelloController.java @@ -31,7 +31,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app161/SpringDocApp161Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app161/SpringDocApp161Test.java index d5cd27fc7..13c84e5ad 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app161/SpringDocApp161Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app161/SpringDocApp161Test.java @@ -7,7 +7,7 @@ /** * The type Spring doc app 161 test. */ -public class SpringDocApp161Test extends AbstractSpringDocTest { +class SpringDocApp161Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app162/SpringDocApp162Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app162/SpringDocApp162Test.java index 0a0b1f5e9..1bca98ed2 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app162/SpringDocApp162Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app162/SpringDocApp162Test.java @@ -12,7 +12,7 @@ * The type Spring doc app 162 test. */ @TestPropertySource(properties = "springdoc.override-with-generic-response=true") -public class SpringDocApp162Test extends AbstractSpringDocTest { +class SpringDocApp162Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app162/rest/JavadocOnlyRestController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app162/rest/JavadocOnlyRestController.java index 7628e744f..18df12bde 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app162/rest/JavadocOnlyRestController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app162/rest/JavadocOnlyRestController.java @@ -23,7 +23,7 @@ */ @RestController @RequestMapping("/javadoc-only") -public class JavadocOnlyRestController { +class JavadocOnlyRestController { /** * This is the create method's javadoc. * The method's signature: {@code #create(JavadocOnlyRestDto)} diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app162/rest/util/RestExceptionHandler.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app162/rest/util/RestExceptionHandler.java index f24921bd2..f921989d6 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app162/rest/util/RestExceptionHandler.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app162/rest/util/RestExceptionHandler.java @@ -15,7 +15,7 @@ * This javadoc description is ignored by the REST documentation. */ @RestControllerAdvice -public class RestExceptionHandler { +class RestExceptionHandler { /** * REST exception handler for {@code NoResultException}. * diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app163/SpringDocApp163Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app163/SpringDocApp163Test.java index d27a2ae32..4fc870f61 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app163/SpringDocApp163Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app163/SpringDocApp163Test.java @@ -12,7 +12,7 @@ * The type Spring doc app 163 test. */ @TestPropertySource(properties = "springdoc.override-with-generic-response=true") -public class SpringDocApp163Test extends AbstractSpringDocTest { +class SpringDocApp163Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app163/rest/AnnotationOverrideForJavadocRestController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app163/rest/AnnotationOverrideForJavadocRestController.java index a156b28ff..ebdce97de 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app163/rest/AnnotationOverrideForJavadocRestController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app163/rest/AnnotationOverrideForJavadocRestController.java @@ -29,7 +29,7 @@ ) @RestController @RequestMapping("/annotation-override") -public class AnnotationOverrideForJavadocRestController { +class AnnotationOverrideForJavadocRestController { /** * This is the update method's javadoc. * The method's signature: {@code #update(String, AnnotationOverrideForJavadocRestDto)} diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app163/rest/dto/AnnotationOverrideForJavadocRestDto.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app163/rest/dto/AnnotationOverrideForJavadocRestDto.java index a04097397..42401b4bc 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app163/rest/dto/AnnotationOverrideForJavadocRestDto.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app163/rest/dto/AnnotationOverrideForJavadocRestDto.java @@ -24,9 +24,6 @@ public class AnnotationOverrideForJavadocRestDto { */ private AnnotationOverrideForJavadocStaticInnerRestDto inner; - public AnnotationOverrideForJavadocRestDto() { - } - public String getGuid() { return guid; } @@ -52,9 +49,6 @@ public static class AnnotationOverrideForJavadocStaticInnerRestDto { */ private String content; - public AnnotationOverrideForJavadocStaticInnerRestDto() { - } - public String getContent() { return content; } diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app163/rest/dto/AnnotationOverrideForJavadocRestDto2.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app163/rest/dto/AnnotationOverrideForJavadocRestDto2.java index a076ee42f..b8908c924 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app163/rest/dto/AnnotationOverrideForJavadocRestDto2.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app163/rest/dto/AnnotationOverrideForJavadocRestDto2.java @@ -3,15 +3,12 @@ /** * This is the {@code AnnotationOverrideForJavadocRestDto2} class javadoc. */ -public class AnnotationOverrideForJavadocRestDto2 { +class AnnotationOverrideForJavadocRestDto2 { /** * This is the private {@code #guid3} field's javadoc. */ private String guid3; - public AnnotationOverrideForJavadocRestDto2() { - } - public String getGuid3() { return guid3; } diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app163/rest/dto/AnnotationOverrideForJavadocRestDto3.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app163/rest/dto/AnnotationOverrideForJavadocRestDto3.java index 5d327a236..b5714e4b2 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app163/rest/dto/AnnotationOverrideForJavadocRestDto3.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app163/rest/dto/AnnotationOverrideForJavadocRestDto3.java @@ -3,15 +3,12 @@ /** * This is the {@code AnnotationOverrideForJavadocRestDto3} class javadoc. */ -public class AnnotationOverrideForJavadocRestDto3 { +class AnnotationOverrideForJavadocRestDto3 { /** * This is the private {@code #guid4} field's javadoc. */ private String guid4; - public AnnotationOverrideForJavadocRestDto3() { - } - public String getGuid4() { return guid4; } diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app163/rest/util/RestExceptionHandler.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app163/rest/util/RestExceptionHandler.java index 559e10fed..6c0d1e800 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app163/rest/util/RestExceptionHandler.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app163/rest/util/RestExceptionHandler.java @@ -15,7 +15,7 @@ * This javadoc description is ignored by the REST documentation. */ @RestControllerAdvice -public class RestExceptionHandler { +class RestExceptionHandler { /** * REST exception handler for {@code NoResultException}. * diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app164/SpringDocApp164Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app164/SpringDocApp164Test.java index 3e476f0d9..bcfa41c01 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app164/SpringDocApp164Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app164/SpringDocApp164Test.java @@ -10,7 +10,7 @@ /** * The type Spring doc app 164 test. */ -public class SpringDocApp164Test extends AbstractSpringDocTest { +class SpringDocApp164Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app164/rest/NoGenericOverrideRestController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app164/rest/NoGenericOverrideRestController.java index 9aa01087d..a1072449b 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app164/rest/NoGenericOverrideRestController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app164/rest/NoGenericOverrideRestController.java @@ -19,7 +19,7 @@ */ @RestController @RequestMapping("/no-generic-override") -public class NoGenericOverrideRestController { +class NoGenericOverrideRestController { /** * This is the create method's javadoc. * The method's signature: {@code #create(JavadocOnlyRestDto)} diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app164/rest/util/RestExceptionHandler.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app164/rest/util/RestExceptionHandler.java index afd8eb031..3bc2c4f54 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app164/rest/util/RestExceptionHandler.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app164/rest/util/RestExceptionHandler.java @@ -15,7 +15,7 @@ * This javadoc description is ignored by the REST documentation. */ @RestControllerAdvice -public class RestExceptionHandler { +class RestExceptionHandler { /** * REST exception handler for {@code NoResultException}. * diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app166/ConcreteSubclassFromGeneric.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app166/ConcreteSubclassFromGeneric.java index 546b4b48f..d2c390853 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app166/ConcreteSubclassFromGeneric.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app166/ConcreteSubclassFromGeneric.java @@ -1,6 +1,6 @@ package test.org.springdoc.api.app166; -public class ConcreteSubclassFromGeneric extends SimpleGeneric { +class ConcreteSubclassFromGeneric extends SimpleGeneric { /** * Return the top name diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app166/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app166/HelloController.java index 27c360436..9079a8c4c 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app166/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app166/HelloController.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2022 the original author or authors. + * * * * 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. @@ -31,7 +31,7 @@ import org.springframework.web.bind.annotation.RestController; @RestController -public class HelloController { +class HelloController { @GetMapping("/nested") public ResponseEntity nested(@ParameterObject final SimpleOuterClass filter) { return new ResponseEntity<>("{\"Say\": \"Hello\"}", HttpStatus.OK); diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app166/MyData.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app166/MyData.java index 81f76080b..6a06f045b 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app166/MyData.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app166/MyData.java @@ -1,6 +1,6 @@ package test.org.springdoc.api.app166; -public class MyData { +class MyData { /** * Returns the first name diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app166/SimpleGeneric.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app166/SimpleGeneric.java index e9ae46fe0..f17f82d3d 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app166/SimpleGeneric.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app166/SimpleGeneric.java @@ -1,6 +1,6 @@ package test.org.springdoc.api.app166; -public class SimpleGeneric { +class SimpleGeneric { /** * Returns name diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app166/SimpleInnerClass.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app166/SimpleInnerClass.java index 2b0680a51..2066685ff 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app166/SimpleInnerClass.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app166/SimpleInnerClass.java @@ -1,6 +1,6 @@ package test.org.springdoc.api.app166; -public class SimpleInnerClass { +class SimpleInnerClass { /** * Returns the inner inner class diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app166/SimpleInnerInnerClass.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app166/SimpleInnerInnerClass.java index 6b1b758cc..cce502f14 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app166/SimpleInnerInnerClass.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app166/SimpleInnerInnerClass.java @@ -1,6 +1,6 @@ package test.org.springdoc.api.app166; -public class SimpleInnerInnerClass { +class SimpleInnerInnerClass { /** * Returns the name of the inner inner class */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app166/SimpleOuterClass.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app166/SimpleOuterClass.java index 2a5ad114a..0b27785e3 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app166/SimpleOuterClass.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app166/SimpleOuterClass.java @@ -1,6 +1,6 @@ package test.org.springdoc.api.app166; -public class SimpleOuterClass { +class SimpleOuterClass { /** * Returns the name of the outer class diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app166/SpringDocApp166Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app166/SpringDocApp166Test.java index 9963a5f09..326d7e07d 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app166/SpringDocApp166Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app166/SpringDocApp166Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 165 test. */ -public class SpringDocApp166Test extends AbstractSpringDocTest { +class SpringDocApp166Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app167/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app167/HelloController.java index f89818acd..ecb71d40a 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app167/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app167/HelloController.java @@ -25,7 +25,7 @@ * The type Hello controller. */ @RestController("/api") -public class HelloController { +class HelloController { @RequestMapping("/process") public void process() { diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app167/SpringDocApp167Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app167/SpringDocApp167Test.java index 25230ce3d..4a4b62b9a 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app167/SpringDocApp167Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app167/SpringDocApp167Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 167 test. */ -public class SpringDocApp167Test extends AbstractSpringDocTest { +class SpringDocApp167Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app168/DescriptionFieldInRequestBodyIsNullController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app168/DescriptionFieldInRequestBodyIsNullController.java index bc4bd0190..b22cd3cb1 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app168/DescriptionFieldInRequestBodyIsNullController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app168/DescriptionFieldInRequestBodyIsNullController.java @@ -31,7 +31,7 @@ */ @RestController @RequestMapping("description-in-requestbody-is-null") -public class DescriptionFieldInRequestBodyIsNullController { +class DescriptionFieldInRequestBodyIsNullController { /** * Person person. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app168/Person.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app168/Person.java index 4103c0ad0..005af9d69 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app168/Person.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app168/Person.java @@ -3,7 +3,7 @@ /** * The type Person. */ -public class Person { +class Person { /** * The Id. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app168/SpringDocApp168Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app168/SpringDocApp168Test.java index 5a86ed683..600327a20 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app168/SpringDocApp168Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app168/SpringDocApp168Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 168 test. */ -public class SpringDocApp168Test extends AbstractSpringDocTest { +class SpringDocApp168Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app169/RecordController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app169/RecordController.java index 71a5cb9b1..0e35bbf72 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app169/RecordController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app169/RecordController.java @@ -8,7 +8,7 @@ @RestController @RequestMapping("record") -public class RecordController { +class RecordController { @GetMapping public SimpleOuterClass index(@ParameterObject SimpleOuterClass filter) { return null; diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app169/SpringDocApp169Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app169/SpringDocApp169Test.java index ffcef38f2..ef59a25aa 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app169/SpringDocApp169Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app169/SpringDocApp169Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 169 test. */ -public class SpringDocApp169Test extends AbstractSpringDocTest { +class SpringDocApp169Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app17/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app17/HelloController.java index da9030ba2..3afd50f7d 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app17/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app17/HelloController.java @@ -29,7 +29,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Persons. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app17/SpringDocApp17Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app17/SpringDocApp17Test.java index b71575d5c..1459831ac 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app17/SpringDocApp17Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app17/SpringDocApp17Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 17 test. */ -public class SpringDocApp17Test extends AbstractSpringDocTest { +class SpringDocApp17Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app170/BasicController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app170/BasicController.java index 776fc465a..82484d5a0 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app170/BasicController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app170/BasicController.java @@ -8,7 +8,7 @@ @RestController @RequestMapping(path = "/") -public class BasicController { +class BasicController { @GetMapping("/test1") @Operation(summary = "get1", description = "Provides an animal.") diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app170/Cat.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app170/Cat.java index 7f382e927..842c381be 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app170/Cat.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app170/Cat.java @@ -4,7 +4,7 @@ import io.swagger.v3.oas.annotations.media.Schema; @Schema -public class Cat implements Animal { +class Cat implements Animal { private Integer speed; diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app170/Dog.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app170/Dog.java index 6d365a191..2cf7b0d61 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app170/Dog.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app170/Dog.java @@ -4,7 +4,7 @@ import io.swagger.v3.oas.annotations.media.Schema; @Schema(description = "Represents a Dog class.") -public class Dog implements Animal { +class Dog implements Animal { private String name; diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app170/SpringDocApp170Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app170/SpringDocApp170Test.java index b703c9638..ad6c52307 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app170/SpringDocApp170Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app170/SpringDocApp170Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 193 test. */ -public class SpringDocApp170Test extends AbstractSpringDocTest { +class SpringDocApp170Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app171/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app171/HelloController.java index cabd889b5..b2aba84a3 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app171/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app171/HelloController.java @@ -25,7 +25,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * PersonProjection interface. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app171/PersonDTO.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app171/PersonDTO.java index 010b6a328..f85cddf1b 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app171/PersonDTO.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app171/PersonDTO.java @@ -21,7 +21,7 @@ /** * Simulate a dynamically generated class that implements the PersonProjection interface. */ -public class PersonDTO implements PersonProjection { +class PersonDTO implements PersonProjection { private String email; private String firstName; diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app171/SpringDocApp171Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app171/SpringDocApp171Test.java index bf70d207c..552bb8fc4 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app171/SpringDocApp171Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app171/SpringDocApp171Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 193 test. */ -public class SpringDocApp171Test extends AbstractSpringDocTest { +class SpringDocApp171Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app173/Example.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app173/Example.java index b464b8493..82ef811f3 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app173/Example.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app173/Example.java @@ -6,7 +6,7 @@ * The Example object */ @Schema -public class Example { +class Example { private String name; diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app173/ExampleController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app173/ExampleController.java index 0fc537966..03cf2f588 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app173/ExampleController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app173/ExampleController.java @@ -17,7 +17,7 @@ * The Example Controller */ @RestController -public class ExampleController { +class ExampleController { @PostMapping("/example") @Operation(summary = "insert example", description = "Allows to insert an example") diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app173/SpringDocApp173Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app173/SpringDocApp173Test.java index dc229e45d..84d942153 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app173/SpringDocApp173Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app173/SpringDocApp173Test.java @@ -9,7 +9,7 @@ * The type Spring doc app 173 test. */ @TestPropertySource(properties = "example.description=The example object") -public class SpringDocApp173Test extends AbstractSpringDocTest { +class SpringDocApp173Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app174/ExampleController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app174/ExampleController.java new file mode 100644 index 000000000..85c78cae4 --- /dev/null +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app174/ExampleController.java @@ -0,0 +1,24 @@ +package test.org.springdoc.api.app174; + +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * The Example Controller + */ +@RestController +class ExampleController { + + @PostMapping + public Test post(){ + return null; + } + +} + + + + + + + diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app174/Question.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app174/Question.java new file mode 100644 index 000000000..d0ebf7952 --- /dev/null +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app174/Question.java @@ -0,0 +1,42 @@ +package test.org.springdoc.api.app174; + +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +/** + * The type Question. + * + * @author bnasslahsen base class for all questions in test with polymorphism + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + property = "type") +@JsonSubTypes({ + @JsonSubTypes.Type(value = TestQuestion.class, name = "test"), + @JsonSubTypes.Type(value = TextQuestion.class, name = "text") +}) +public abstract class Question { + private final String question; + private final String type; + + public Question(String question, String type) { + this.question = question; + this.type = type; + } + + public String getQuestion() { + return question; + } + + public String getType() { + return type; + } + + @Override + public String toString() { + return "Question{" + + "question='" + question + '\'' + + ", type='" + type + '\'' + + '}'; + } +} \ No newline at end of file diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app174/SpringDocApp174Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app174/SpringDocApp174Test.java new file mode 100644 index 000000000..a69cd90ec --- /dev/null +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app174/SpringDocApp174Test.java @@ -0,0 +1,19 @@ +package test.org.springdoc.api.app174; + +import test.org.springdoc.api.AbstractSpringDocTest; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + * The type Spring doc app 174 test. + */ +class SpringDocApp174Test extends AbstractSpringDocTest { + + /** + * The type Spring doc test app. + */ + @SpringBootApplication + static class SpringDocTestApp { + } + +} diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app174/Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app174/Test.java new file mode 100644 index 000000000..6c872392b --- /dev/null +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app174/Test.java @@ -0,0 +1,44 @@ +package test.org.springdoc.api.app174; + +import java.io.Serializable; +import java.util.List; + +/** + * The type Test. + * + * @author bnasslahsen + */ + +class Test implements Serializable { + + private static final long serialVersionUID = 1L; // Recommended for Serializable classes + + private List questions; + + // No-argument constructor + public Test() { + } + + // Constructor with arguments + public Test(List questions) { + this.questions = questions; + } + + // Getter method for 'questions' + public List getQuestions() { + return questions; + } + + // Setter method for 'questions' + public void setQuestions(List questions) { + this.questions = questions; + } + + // Optionally, you can override toString, hashCode, equals, etc. + @Override + public String toString() { + return "Test{" + + "questions=" + questions + + '}'; + } +} \ No newline at end of file diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app174/TestQuestion.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app174/TestQuestion.java new file mode 100644 index 000000000..2483f271f --- /dev/null +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app174/TestQuestion.java @@ -0,0 +1,42 @@ +package test.org.springdoc.api.app174; + +import java.util.List; + +/** + * The type Test question. + * + * @author bnasslahsen test question + */ +class TestQuestion extends Question { + /** + * list of variants + */ + private final List variants; + /** + * correct answer + */ + private final int answer; + + public TestQuestion(String question, String type, List variants, int answer) { + super(question, type); + this.variants = variants; + this.answer = answer; + } + + public List getVariants() { + return variants; + } + + public int getAnswer() { + return answer; + } + + @Override + public String toString() { + return "TestQuestion{" + + "question='" + getQuestion() + '\'' + + ", variants=" + variants + + ", answer=" + answer + + '}'; + } +} diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app174/TextQuestion.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app174/TextQuestion.java new file mode 100644 index 000000000..1e6cac956 --- /dev/null +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app174/TextQuestion.java @@ -0,0 +1,28 @@ +package test.org.springdoc.api.app174; + +/** + * The type Text question. + * + * @author bnasslahsen + */ +class TextQuestion extends Question { + private final String answer; + + public TextQuestion(String question, String type, String answer) { + super(question, type); + this.answer = answer; + } + + public String getAnswer() { + return answer; + } + + @Override + public String toString() { + return "TextQuestion{" + + "question='" + getQuestion() + '\'' + + ", type='" + getType() + '\'' + + ", answer='" + answer + '\'' + + '}'; + } +} \ No newline at end of file diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app18/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app18/HelloController.java index 7184e5d4d..5521bf253 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app18/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app18/HelloController.java @@ -32,7 +32,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Persons string. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app18/SpringDocApp18Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app18/SpringDocApp18Test.java index 0ea688cca..12807f317 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app18/SpringDocApp18Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app18/SpringDocApp18Test.java @@ -27,7 +27,7 @@ * The type Spring doc app 18 test. */ @TestPropertySource(properties = "springdoc.pre-loading-enabled=true") -public class SpringDocApp18Test extends AbstractSpringDocTest { +class SpringDocApp18Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app19/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app19/HelloController.java index c4ec662b4..64862233e 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app19/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app19/HelloController.java @@ -29,7 +29,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Persons string. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app19/SpringDocApp19Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app19/SpringDocApp19Test.java index b9142c604..a6daf77dc 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app19/SpringDocApp19Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app19/SpringDocApp19Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 19 test. */ -public class SpringDocApp19Test extends AbstractSpringDocTest { +class SpringDocApp19Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/SpringDocApp2Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/SpringDocApp2Test.java index 331b06545..22da251c5 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/SpringDocApp2Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/SpringDocApp2Test.java @@ -31,7 +31,7 @@ /** * The type Spring doc app 2 test. */ -public class SpringDocApp2Test extends AbstractSpringDocTest { +class SpringDocApp2Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/ApiUtil.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/ApiUtil.java index 3bfe80ea1..424fa0e23 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/ApiUtil.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/ApiUtil.java @@ -29,7 +29,7 @@ /** * The type Api util. */ -public class ApiUtil { +class ApiUtil { /** * Sets example response. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/ExceptionTranslator.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/ExceptionTranslator.java index 87fa5a596..12fe1d702 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/ExceptionTranslator.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/ExceptionTranslator.java @@ -35,7 +35,7 @@ * The type Exception translator. */ @RestControllerAdvice -public class ExceptionTranslator { +class ExceptionTranslator { /** * The Error attributes. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/HomeController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/HomeController.java index 73950cc91..19a4c29ba 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/HomeController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/HomeController.java @@ -30,7 +30,7 @@ * Home redirection to swagger api documentation */ @Controller -public class HomeController { +class HomeController { /** * The Swagger ui path. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/PetApiController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/PetApiController.java index 842ac9f47..afca46da4 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/PetApiController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/PetApiController.java @@ -30,7 +30,7 @@ @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") -public class PetApiController implements PetApi { +class PetApiController implements PetApi { /** * The Delegate. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/PetApiDelegateImpl.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/PetApiDelegateImpl.java index be7d00d68..cde0ed585 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/PetApiDelegateImpl.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/PetApiDelegateImpl.java @@ -24,7 +24,7 @@ * The type Pet api delegate. */ @Service -public class PetApiDelegateImpl implements PetApiDelegate { +class PetApiDelegateImpl implements PetApiDelegate { } diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/StoreApiController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/StoreApiController.java index f565367b6..475a59209 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/StoreApiController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/StoreApiController.java @@ -30,7 +30,7 @@ @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") -public class StoreApiController implements StoreApi { +class StoreApiController implements StoreApi { /** * The Delegate. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/StoreApiDelegateImpl.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/StoreApiDelegateImpl.java index 4d7105a8e..48cca44fa 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/StoreApiDelegateImpl.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/StoreApiDelegateImpl.java @@ -24,7 +24,7 @@ * The type Store api delegate. */ @Service -public class StoreApiDelegateImpl implements StoreApiDelegate { +class StoreApiDelegateImpl implements StoreApiDelegate { } diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/UserApiController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/UserApiController.java index 8bd31faf3..a7900af95 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/UserApiController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/UserApiController.java @@ -32,7 +32,7 @@ @Controller @ResponseBody @RequestMapping("${openapi.openAPIPetstore.base-path:/}") -public class UserApiController implements UserApi { +class UserApiController implements UserApi { /** * The Delegate. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/UserApiDelegateImpl.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/UserApiDelegateImpl.java index 113c40bd5..81c53dc09 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/UserApiDelegateImpl.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/api/UserApiDelegateImpl.java @@ -24,7 +24,7 @@ * The type User api delegate. */ @Service -public class UserApiDelegateImpl implements UserApiDelegate { +class UserApiDelegateImpl implements UserApiDelegate { } diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/model/Body.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/model/Body.java deleted file mode 100644 index 89fd95a99..000000000 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/model/Body.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * - * * Copyright 2019-2020 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.app2.model; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The type Body. - */ -public class Body { - - /** - * Updated name of the pet - */ - private String name = null; - - /** - * Updated status of the pet - */ - private String status = null; - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - * @param o the o - * @return the string - */ - private static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - /** - * Updated name of the pet - * - * @return name name - */ - @JsonProperty("name") - public String getName() { - return name; - } - - /** - * Sets name. - * - * @param name the name - */ - public void setName(String name) { - this.name = name; - } - - /** - * Name body. - * - * @param name the name - * @return the body - */ - public Body name(String name) { - this.name = name; - return this; - } - - /** - * Updated status of the pet - * - * @return status status - */ - @JsonProperty("status") - public String getStatus() { - return status; - } - - /** - * Sets status. - * - * @param status the status - */ - public void setStatus(String status) { - this.status = status; - } - - /** - * Status body. - * - * @param status the status - * @return the body - */ - public Body status(String status) { - this.status = status; - return this; - } - - /** - * To string string. - * - * @return the string - */ - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Body {\n"); - - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append("}"); - return sb.toString(); - } -} diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/model/Body1.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/model/Body1.java deleted file mode 100644 index abe480fd7..000000000 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/model/Body1.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * - * * Copyright 2019-2020 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.app2.model; - -import java.io.File; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The type Body 1. - */ -public class Body1 { - - /** - * Additional data to pass to server - */ - private String additionalMetadata = null; - - /** - * file to upload - */ - private File file = null; - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - * @param o the o - * @return the string - */ - private static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - /** - * Additional data to pass to server - * - * @return additionalMetadata additional metadata - */ - @JsonProperty("additionalMetadata") - public String getAdditionalMetadata() { - return additionalMetadata; - } - - /** - * Sets additional metadata. - * - * @param additionalMetadata the additional metadata - */ - public void setAdditionalMetadata(String additionalMetadata) { - this.additionalMetadata = additionalMetadata; - } - - /** - * Additional metadata body 1. - * - * @param additionalMetadata the additional metadata - * @return the body 1 - */ - public Body1 additionalMetadata(String additionalMetadata) { - this.additionalMetadata = additionalMetadata; - return this; - } - - /** - * file to upload - * - * @return file file - */ - @JsonProperty("file") - public File getFile() { - return file; - } - - /** - * Sets file. - * - * @param file the file - */ - public void setFile(File file) { - this.file = file; - } - - /** - * File body 1. - * - * @param file the file - * @return the body 1 - */ - public Body1 file(File file) { - this.file = file; - return this; - } - - /** - * To string string. - * - * @return the string - */ - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Body1 {\n"); - - sb.append(" additionalMetadata: ").append(toIndentedString(additionalMetadata)).append("\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); - sb.append("}"); - return sb.toString(); - } -} diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/model/Category.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/model/Category.java index d70e38473..5673b8e34 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/model/Category.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/model/Category.java @@ -23,7 +23,7 @@ /** * The type Category. */ -public class Category { +class Category { /** * The Id. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/model/Tag.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/model/Tag.java index a4d5bc003..dc541984c 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/model/Tag.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app2/model/Tag.java @@ -24,7 +24,7 @@ /** * The type Tag. */ -public class Tag { +class Tag { /** * The Id. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app20/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app20/HelloController.java index 3c60dd77e..a47bf7f0c 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app20/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app20/HelloController.java @@ -29,7 +29,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Persons. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app20/SpringDocApp20Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app20/SpringDocApp20Test.java index 95819a4c0..df7d4359d 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app20/SpringDocApp20Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app20/SpringDocApp20Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 20 test. */ -public class SpringDocApp20Test extends AbstractSpringDocTest { +class SpringDocApp20Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app21/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app21/HelloController.java index 8ca19eedb..0fdd1b83e 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app21/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app21/HelloController.java @@ -38,7 +38,7 @@ @SecurityScheme(name = "personstore_auth", type = SecuritySchemeType.OAUTH2, flows = @OAuthFlows(implicit = @OAuthFlow(authorizationUrl = "${springdoc.oAuthFlow.authorizationUrl}", scopes = { @OAuthScope(name = "write:persons", description = "modify persons in your account"), @OAuthScope(name = "read:persons", description = "read your persons") }))) -public class HelloController { +class HelloController { /** * Persons. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app21/SpringDocApp21Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app21/SpringDocApp21Test.java index 6f2b1f171..9d4cb5a3e 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app21/SpringDocApp21Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app21/SpringDocApp21Test.java @@ -27,7 +27,7 @@ * The type Spring doc app 21 test. */ @TestPropertySource(properties = "springdoc.oAuthFlow.authorizationUrl=http://personstore.swagger.io/oauth/dialog") -public class SpringDocApp21Test extends AbstractSpringDocTest { +class SpringDocApp21Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app22/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app22/HelloController.java index 925896551..5a5a01002 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app22/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app22/HelloController.java @@ -28,7 +28,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app22/PersonDTO.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app22/PersonDTO.java index e1cafed7d..a0f5932e6 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app22/PersonDTO.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app22/PersonDTO.java @@ -21,7 +21,7 @@ /** * The type Person dto. */ -public class PersonDTO { +class PersonDTO { /** * The Email. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app22/SpringDocApp22Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app22/SpringDocApp22Test.java index d1c9c1b03..e39d6c820 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app22/SpringDocApp22Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app22/SpringDocApp22Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 22 test. */ -public class SpringDocApp22Test extends AbstractSpringDocTest { +class SpringDocApp22Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app23/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app23/HelloController.java index b8f107bf4..a6cb22640 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app23/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app23/HelloController.java @@ -34,7 +34,7 @@ */ @RestController @SecurityScheme(type = SecuritySchemeType.APIKEY, in = SecuritySchemeIn.HEADER, name = "Authorization", paramName = "JWT", description = "A core-auth Bearer token") -public class HelloController { +class HelloController { /** * Persons. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app23/SpringDocApp23Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app23/SpringDocApp23Test.java index f2b7fdbde..d6600286c 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app23/SpringDocApp23Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app23/SpringDocApp23Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 23 test. */ -public class SpringDocApp23Test extends AbstractSpringDocTest { +class SpringDocApp23Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app24/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app24/HelloController.java index deadd4fdc..f5b863c78 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app24/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app24/HelloController.java @@ -34,7 +34,7 @@ */ @RestController @SecurityScheme(type = SecuritySchemeType.APIKEY, in = SecuritySchemeIn.HEADER, name = "Authorization", description = "A core-auth Bearer token") -public class HelloController { +class HelloController { /** * Persons. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app24/SpringDocApp24Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app24/SpringDocApp24Test.java index 452a079a7..cf24c85eb 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app24/SpringDocApp24Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app24/SpringDocApp24Test.java @@ -23,7 +23,7 @@ /** * The type Spring doc app 24 test. */ -public class SpringDocApp24Test extends AbstractSpringDocTest { +class SpringDocApp24Test extends AbstractSpringDocTest { } \ No newline at end of file diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app24/SpringDocTestApp.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app24/SpringDocTestApp.java index 53a2100ec..172d4166a 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app24/SpringDocTestApp.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app24/SpringDocTestApp.java @@ -35,7 +35,7 @@ * The type Spring doc test app. */ @SpringBootApplication -public class SpringDocTestApp { +class SpringDocTestApp { /** * The entry point of application. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app25/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app25/HelloController.java index 8278e234e..a2760a194 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app25/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app25/HelloController.java @@ -37,7 +37,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Check. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app25/SpringDocApp25Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app25/SpringDocApp25Test.java index ecbdd31ef..f4a12140a 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app25/SpringDocApp25Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app25/SpringDocApp25Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 25 test. */ -public class SpringDocApp25Test extends AbstractSpringDocTest { +class SpringDocApp25Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app26/Bar.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app26/Bar.java index 660d26ec5..0f0f32164 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app26/Bar.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app26/Bar.java @@ -21,7 +21,7 @@ /** * The type Bar. */ -public class Bar { +class Bar { /** * The Bar. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app26/Foo.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app26/Foo.java index 4b4f38c70..da6b0a2fb 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app26/Foo.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app26/Foo.java @@ -21,7 +21,7 @@ /** * The type Foo. */ -public class Foo { +class Foo { /** * The Foo. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app26/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app26/HelloController.java index b97d78e01..6584e3711 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app26/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app26/HelloController.java @@ -25,7 +25,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Persons my model. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app26/MyModel.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app26/MyModel.java index feaea7d1c..045de17e0 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app26/MyModel.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app26/MyModel.java @@ -23,7 +23,7 @@ /** * The type My model. */ -public class MyModel { +class MyModel { /** * The Thing. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app26/SpringDocApp26Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app26/SpringDocApp26Test.java index c88531ff5..b871ae8a6 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app26/SpringDocApp26Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app26/SpringDocApp26Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 26 test. */ -public class SpringDocApp26Test extends AbstractSpringDocTest { +class SpringDocApp26Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app27/Advice.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app27/Advice.java index 37b5d1fdc..6ba5ed55e 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app27/Advice.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app27/Advice.java @@ -30,7 +30,7 @@ * The type Advice. */ @RestControllerAdvice -public class Advice { +class Advice { /** * Handle exception foo. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app27/Bar.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app27/Bar.java index d726fcf4a..dccaf02a8 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app27/Bar.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app27/Bar.java @@ -21,7 +21,7 @@ /** * The type Bar. */ -public class Bar { +class Bar { /** * The Bar. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app27/Foo.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app27/Foo.java index 048766358..5e3b5bb0d 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app27/Foo.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app27/Foo.java @@ -21,7 +21,7 @@ /** * The type Foo. */ -public class Foo { +class Foo { /** * The Foo. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app27/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app27/HelloController.java index 1417cfb9f..3c2742c65 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app27/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app27/HelloController.java @@ -26,7 +26,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * The Flag. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app27/MyException.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app27/MyException.java index 2ba70a076..f49c3a6e8 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app27/MyException.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app27/MyException.java @@ -21,7 +21,7 @@ /** * The type My exception. */ -public class MyException extends RuntimeException { +class MyException extends RuntimeException { /** * The constant serialVersionUID. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app27/SpringDocApp27Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app27/SpringDocApp27Test.java index dfbfbe7bb..9e17ed72b 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app27/SpringDocApp27Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app27/SpringDocApp27Test.java @@ -33,7 +33,7 @@ /** * The type Spring doc app 27 test. */ -public class SpringDocApp27Test extends AbstractSpringDocTest { +class SpringDocApp27Test extends AbstractSpringDocTest { /** * Test app. @@ -41,7 +41,7 @@ public class SpringDocApp27Test extends AbstractSpringDocTest { * @throws Exception the exception */ @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)).andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))).andExpect(jsonPath("$.paths./test.get.responses.500.content.['*/*'].schema.oneOf").isArray()).andExpect(jsonPath("$.paths./test.get.responses.500.content.['*/*'].schema.oneOf[*].$ref", containsInAnyOrder("#/components/schemas/Bar", "#/components/schemas/Foo"))); diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app28/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app28/HelloController.java index fc381231c..30f2c77c6 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app28/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app28/HelloController.java @@ -28,7 +28,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Upload 2 string. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app28/SpringDocApp28Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app28/SpringDocApp28Test.java index bd16e4bea..a3c5fc1e8 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app28/SpringDocApp28Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app28/SpringDocApp28Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 28 test. */ -public class SpringDocApp28Test extends AbstractSpringDocTest { +class SpringDocApp28Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app29/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app29/HelloController.java index 21de284d2..5f4f4b6db 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app29/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app29/HelloController.java @@ -34,7 +34,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Post entity list. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app29/SpringDocApp29Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app29/SpringDocApp29Test.java index 282c01d00..dca022fc9 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app29/SpringDocApp29Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app29/SpringDocApp29Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 29 test. */ -public class SpringDocApp29Test extends AbstractSpringDocTest { +class SpringDocApp29Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app29/TrackerData.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app29/TrackerData.java index 702e75efd..190835bc3 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app29/TrackerData.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app29/TrackerData.java @@ -27,7 +27,7 @@ * The type Tracker data. */ @Schema(name = "TrackerData") -public class TrackerData { +class TrackerData { /** * The Tracker id. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app3/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app3/HelloController.java index a08e47582..0e3e4e96f 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app3/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app3/HelloController.java @@ -27,7 +27,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Echo playing card. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app3/PersonDTO.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app3/PersonDTO.java index 4035d5108..973c8443b 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app3/PersonDTO.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app3/PersonDTO.java @@ -21,7 +21,7 @@ /** * The type Person dto. */ -public class PersonDTO { +class PersonDTO { /** * The email diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app3/PlayingCard.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app3/PlayingCard.java index c0246fe3f..747a0c2d4 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app3/PlayingCard.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app3/PlayingCard.java @@ -7,7 +7,7 @@ /** * The type Playing card. */ -public class PlayingCard { +class PlayingCard { /** * The Suit. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app3/SpringDocApp3Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app3/SpringDocApp3Test.java index d927f83a0..25467759a 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app3/SpringDocApp3Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app3/SpringDocApp3Test.java @@ -7,7 +7,7 @@ /** * The type Spring doc app 3 test. */ -public class SpringDocApp3Test extends AbstractSpringDocTest { +class SpringDocApp3Test extends AbstractSpringDocTest { /** * The type Spring doc test app. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app30/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app30/HelloController.java index bc895a284..fe0d6daae 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app30/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app30/HelloController.java @@ -27,7 +27,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Echo string. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app30/SpringDocApp30Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app30/SpringDocApp30Test.java index 3a70faa91..9b06f5862 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app30/SpringDocApp30Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app30/SpringDocApp30Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 30 test. */ -public class SpringDocApp30Test extends AbstractSpringDocTest { +class SpringDocApp30Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app31/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app31/HelloController.java index 97a397d04..082a24e48 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app31/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app31/HelloController.java @@ -34,7 +34,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Subscribe subscription response. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app31/SpringDocApp31Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app31/SpringDocApp31Test.java index e1cc00973..ca0a7ecc4 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app31/SpringDocApp31Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app31/SpringDocApp31Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 31 test. */ -public class SpringDocApp31Test extends AbstractSpringDocTest { +class SpringDocApp31Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app32/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app32/HelloController.java index d0ebc973c..9da86e547 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app32/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app32/HelloController.java @@ -30,7 +30,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Filter post string. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app32/SpringDocApp32Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app32/SpringDocApp32Test.java index 8837c18f1..403a3e8be 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app32/SpringDocApp32Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app32/SpringDocApp32Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 32 test. */ -public class SpringDocApp32Test extends AbstractSpringDocTest { +class SpringDocApp32Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app33/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app33/HelloController.java index 9d8b3177e..085dbf071 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app33/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app33/HelloController.java @@ -31,7 +31,7 @@ * @param the type parameter */ @RestController -public class HelloController { +class HelloController { /** * Index t. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app33/SpringDocApp33Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app33/SpringDocApp33Test.java index 4b7b66446..84116c241 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app33/SpringDocApp33Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app33/SpringDocApp33Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 33 test. */ -public class SpringDocApp33Test extends AbstractSpringDocTest { +class SpringDocApp33Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app34/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app34/HelloController.java index c79651bba..e192e5093 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app34/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app34/HelloController.java @@ -31,7 +31,7 @@ * @param the type parameter */ @RestController -public class HelloController { +class HelloController { /** * Index t. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app34/MyExceptionHandler.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app34/MyExceptionHandler.java index 2b52ca999..f83158ab7 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app34/MyExceptionHandler.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app34/MyExceptionHandler.java @@ -31,7 +31,7 @@ */ @RestControllerAdvice @Hidden -public class MyExceptionHandler extends ResponseEntityExceptionHandler { +class MyExceptionHandler extends ResponseEntityExceptionHandler { /** * Bad object. * diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app34/SpringDocApp34Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app34/SpringDocApp34Test.java index 454c91e37..5d5acccf0 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app34/SpringDocApp34Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app34/SpringDocApp34Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 34 test. */ -public class SpringDocApp34Test extends AbstractSpringDocTest { +class SpringDocApp34Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app35/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app35/HelloController.java index 6218ab930..8d2c1dfd7 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app35/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app35/HelloController.java @@ -33,7 +33,7 @@ */ @Controller @RequestMapping("/api/v1/poc/") -public class HelloController { +class HelloController { /** * Testme response entity. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app35/SpringDocApp35Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app35/SpringDocApp35Test.java index 12e59d8e6..686ba0304 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app35/SpringDocApp35Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app35/SpringDocApp35Test.java @@ -27,7 +27,7 @@ /** * The type Spring doc app 35 test. */ -public class SpringDocApp35Test extends AbstractSpringDocTest { +class SpringDocApp35Test extends AbstractSpringDocTest { static { getConfig().addRestControllers(HelloController.class); diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app37/Bar.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app37/Bar.java index dbb5941b7..0ef75bedf 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app37/Bar.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app37/Bar.java @@ -21,7 +21,7 @@ /** * The type Bar. */ -public class Bar { +class Bar { /** * The Bar. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app37/Car.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app37/Car.java index a310baa09..8e8d11c13 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app37/Car.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app37/Car.java @@ -21,7 +21,7 @@ /** * The type Car. */ -public class Car { +class Car { /** * The Car. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app37/Foo.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app37/Foo.java index e907f5032..85756d914 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app37/Foo.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app37/Foo.java @@ -21,7 +21,7 @@ /** * The type Foo. */ -public class Foo { +class Foo { /** * The Foo. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app37/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app37/HelloController.java index 6f7f2e3d3..3df46159a 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app37/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app37/HelloController.java @@ -31,7 +31,7 @@ * The type Hello controller. */ @RestController("/api") -public class HelloController { +class HelloController { /** * Process foo. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app37/Pet.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app37/Pet.java index dc1561507..dd3446b17 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app37/Pet.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app37/Pet.java @@ -21,7 +21,7 @@ /** * The type Pet. */ -public class Pet { +class Pet { /** * The Pet. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app37/SpringDocApp37Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app37/SpringDocApp37Test.java index 9eaf15162..624d08eca 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app37/SpringDocApp37Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app37/SpringDocApp37Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 37 test. */ -public class SpringDocApp37Test extends AbstractSpringDocTest { +class SpringDocApp37Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app38/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app38/HelloController.java index e958ee5d5..090351308 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app38/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app38/HelloController.java @@ -28,7 +28,7 @@ * The type Hello controller. */ @RestController("/api") -public class HelloController { +class HelloController { /** * Gets model resource. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app38/SpringDocApp38Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app38/SpringDocApp38Test.java index 5d25438c2..cf49de2bf 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app38/SpringDocApp38Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app38/SpringDocApp38Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 38 test. */ -public class SpringDocApp38Test extends AbstractSpringDocTest { +class SpringDocApp38Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app39/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app39/HelloController.java index 692a10eaa..84af2ee98 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app39/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app39/HelloController.java @@ -31,7 +31,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Search employee. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app39/SpringDocApp39Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app39/SpringDocApp39Test.java index c3740d63a..03c832a91 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app39/SpringDocApp39Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app39/SpringDocApp39Test.java @@ -23,7 +23,7 @@ /** * The type Spring doc app 39 test. */ -public class SpringDocApp39Test extends AbstractSpringDocTest { +class SpringDocApp39Test extends AbstractSpringDocTest { } \ No newline at end of file diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app39/SpringDocTestApp.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app39/SpringDocTestApp.java index ed9dfeada..185111bb0 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app39/SpringDocTestApp.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app39/SpringDocTestApp.java @@ -32,7 +32,7 @@ * The type Spring doc test app. */ @SpringBootApplication -public class SpringDocTestApp { +class SpringDocTestApp { /** * The entry point of application. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app4/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app4/HelloController.java index 5a870001d..f86ea0cca 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app4/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app4/HelloController.java @@ -25,7 +25,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * List tracker data. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app4/SpringDocApp4Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app4/SpringDocApp4Test.java index ca5ee412b..eef0de0a4 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app4/SpringDocApp4Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app4/SpringDocApp4Test.java @@ -29,7 +29,7 @@ * The type Spring doc app 4 test. */ @TestPropertySource(properties = "springdoc.use-fqn=true") -public class SpringDocApp4Test extends AbstractSpringDocTest { +class SpringDocApp4Test extends AbstractSpringDocTest { /** * Restore. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app4/TrackerData.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app4/TrackerData.java index 2978b3ff0..19f06fb86 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app4/TrackerData.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app4/TrackerData.java @@ -26,7 +26,7 @@ /** * The type Tracker data. */ -public class TrackerData { +class TrackerData { /** * The Tracker id. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app40/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app40/HelloController.java index 0d6a8dfc2..6b88a1d03 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app40/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app40/HelloController.java @@ -28,7 +28,7 @@ * The type Hello controller. */ @RestController("/api") -public class HelloController { +class HelloController { /** * Gets start form properties. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app40/SpringDocApp40Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app40/SpringDocApp40Test.java index 7fe4d0c7c..6877c71ee 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app40/SpringDocApp40Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app40/SpringDocApp40Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 40 test. */ -public class SpringDocApp40Test extends AbstractSpringDocTest { +class SpringDocApp40Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app41/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app41/HelloController.java index c65c7f6e0..c1eae2978 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app41/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app41/HelloController.java @@ -38,7 +38,7 @@ * The type Hello controller. */ @RestController("/api") -public class HelloController { +class HelloController { /** * Gets file. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app41/SpringDocApp411Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app41/SpringDocApp411Test.java index d3b62e5d4..19de007a6 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app41/SpringDocApp411Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app41/SpringDocApp411Test.java @@ -38,7 +38,7 @@ /** * The type Spring doc app 411 test. */ -public class SpringDocApp411Test extends AbstractSpringDocTest { +class SpringDocApp411Test extends AbstractSpringDocTest { /** * Test app. @@ -46,7 +46,7 @@ public class SpringDocApp411Test extends AbstractSpringDocTest { * @throws Exception the exception */ @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { String className = getClass().getSimpleName(); String testNumber = className.replaceAll("[^0-9]", ""); MvcResult mockMvcResult = mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)).andExpect(status().isOk()) diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app41/SpringDocApp41Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app41/SpringDocApp41Test.java index 251c9364e..32892d65e 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app41/SpringDocApp41Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app41/SpringDocApp41Test.java @@ -40,7 +40,7 @@ * The type Spring doc app 41 test. */ @TestPropertySource(properties = "springdoc.cache.disabled=true") -public class SpringDocApp41Test extends AbstractSpringDocTest { +class SpringDocApp41Test extends AbstractSpringDocTest { /** * Test app. @@ -48,7 +48,7 @@ public class SpringDocApp41Test extends AbstractSpringDocTest { * @throws Exception the exception */ @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { String className = getClass().getSimpleName(); String testNumber = className.replaceAll("[^0-9]", ""); MvcResult mockMvcResult = mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)).andExpect(status().isOk()) diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app42/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app42/HelloController.java index 5722d0dad..da264542d 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app42/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app42/HelloController.java @@ -27,7 +27,7 @@ * The type Hello controller. */ @RestController("/api") -public class HelloController { +class HelloController { /** * Tweets. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app42/SpringDocApp42Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app42/SpringDocApp42Test.java index a6109b3e0..0c92fc0cd 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app42/SpringDocApp42Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app42/SpringDocApp42Test.java @@ -29,7 +29,7 @@ /** * The type Spring doc app 42 test. */ -public class SpringDocApp42Test extends AbstractSpringDocTest { +class SpringDocApp42Test extends AbstractSpringDocTest { /** diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app42/TweetId.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app42/TweetId.java index 600d7b88b..dc34326e0 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app42/TweetId.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app42/TweetId.java @@ -21,7 +21,7 @@ /** * The type Tweet id. */ -public class TweetId { +class TweetId { /** * The Value. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app43/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app43/HelloController.java index a457a0be9..c99a02e26 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app43/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app43/HelloController.java @@ -30,7 +30,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Upload documents response entity. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app43/SpringDocApp43Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app43/SpringDocApp43Test.java index 6e0b90963..7d6f801d0 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app43/SpringDocApp43Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app43/SpringDocApp43Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 43 test. */ -public class SpringDocApp43Test extends AbstractSpringDocTest { +class SpringDocApp43Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app44/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app44/HelloController.java index e8d056211..6b78db2f1 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app44/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app44/HelloController.java @@ -33,7 +33,7 @@ * The type Hello controller. */ @RestController("/api") -public class HelloController { +class HelloController { /** * Hello response entity. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app44/SpringDocApp44Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app44/SpringDocApp44Test.java index d0d885415..52d07050d 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app44/SpringDocApp44Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app44/SpringDocApp44Test.java @@ -33,7 +33,7 @@ /** * The type Spring doc app 44 test. */ -public class SpringDocApp44Test extends AbstractSpringDocTest { +class SpringDocApp44Test extends AbstractSpringDocTest { /** * Test app. @@ -41,7 +41,7 @@ public class SpringDocApp44Test extends AbstractSpringDocTest { * @throws Exception the exception */ @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)).andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))).andExpect(jsonPath("$.paths./helloworld.post.responses.200.content.['application/json'].schema.oneOf").isArray()).andExpect(jsonPath("$.paths./helloworld.post.responses.200.content.['application/json'].schema.oneOf[*].$ref", containsInAnyOrder("#/components/schemas/HelloDTO2", "#/components/schemas/HelloDTO1"))) diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app45/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app45/HelloController.java index be019dec0..55440ef8a 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app45/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app45/HelloController.java @@ -41,7 +41,7 @@ @Tag(name = "People", description = "Use this resource to serve all requests and initiate all operations related to people") @RestController @RequestMapping(value = "/v1/people") -public class HelloController { +class HelloController { /** diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app45/HelloController2.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app45/HelloController2.java index a6946f6b1..d2bf8df88 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app45/HelloController2.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app45/HelloController2.java @@ -42,7 +42,7 @@ @SecurityRequirement(name = "bearer") @RestController @RequestMapping(value = "/v1/people2") -public class HelloController2 { +class HelloController2 { /** diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app45/OpenApiConfig.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app45/OpenApiConfig.java index 509391370..de9a8d0e4 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app45/OpenApiConfig.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app45/OpenApiConfig.java @@ -29,5 +29,5 @@ */ @OpenAPIDefinition(info = @Info(title = "My App", description = "Some long and useful description", version = "v1", license = @License(name = "Apache 2.0", url = "https://www.apache.org/licenses/LICENSE-2.0"))) @SecurityScheme(name = "bearer", type = SecuritySchemeType.HTTP, scheme = "bearer", bearerFormat = "JWT") -public class OpenApiConfig { +class OpenApiConfig { } \ No newline at end of file diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app45/PersonDTO.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app45/PersonDTO.java index a8e8b10de..9f2912e80 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app45/PersonDTO.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app45/PersonDTO.java @@ -21,7 +21,7 @@ /** * The type Person dto. */ -public class PersonDTO { +class PersonDTO { /** * The Email. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app45/SpringDocApp45Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app45/SpringDocApp45Test.java index 1b2debce7..762e7ff56 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app45/SpringDocApp45Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app45/SpringDocApp45Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 45 test. */ -public class SpringDocApp45Test extends AbstractSpringDocTest { +class SpringDocApp45Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app46/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app46/HelloController.java index 6f54428da..7fb014288 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app46/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app46/HelloController.java @@ -33,7 +33,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Persons string. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app46/SpringDocApp46Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app46/SpringDocApp46Test.java index c7f13733e..8b6eacd97 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app46/SpringDocApp46Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app46/SpringDocApp46Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 46 test. */ -public class SpringDocApp46Test extends AbstractSpringDocTest { +class SpringDocApp46Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app47/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app47/HelloController.java index 658b2d1bc..f75afbfc1 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app47/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app47/HelloController.java @@ -32,7 +32,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Gets documents with locale. * diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app47/SpringDocApp47Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app47/SpringDocApp47Test.java index 998eca522..bdea686c2 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app47/SpringDocApp47Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app47/SpringDocApp47Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 47 test. */ -public class SpringDocApp47Test extends AbstractSpringDocTest { +class SpringDocApp47Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app48/AbstractHelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app48/AbstractHelloController.java index 2a95742fe..2f91b87ca 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app48/AbstractHelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app48/AbstractHelloController.java @@ -31,7 +31,7 @@ @ApiResponses({ @ApiResponse(responseCode = "411") }) -public class AbstractHelloController { +class AbstractHelloController { /** * Gets documents. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app48/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app48/HelloController.java index fea96d42a..efa7bb7f7 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app48/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app48/HelloController.java @@ -34,7 +34,7 @@ @ApiResponses({ @ApiResponse(responseCode = "401") }) -public class HelloController extends AbstractHelloController { +class HelloController extends AbstractHelloController { /** * Gets documents. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app48/SpringDocApp48Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app48/SpringDocApp48Test.java index 6e75450ed..e13b06ee5 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app48/SpringDocApp48Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app48/SpringDocApp48Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 48 test. */ -public class SpringDocApp48Test extends AbstractSpringDocTest { +class SpringDocApp48Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app49/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app49/HelloController.java index 901e72b64..7b75fa82a 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app49/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app49/HelloController.java @@ -32,7 +32,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * List list. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app49/SpringDocApp49Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app49/SpringDocApp49Test.java index 3e701da7a..8a1ac3db3 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app49/SpringDocApp49Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app49/SpringDocApp49Test.java @@ -23,7 +23,7 @@ /** * The type Spring doc app 49 test. */ -public class SpringDocApp49Test extends AbstractSpringDocTest { +class SpringDocApp49Test extends AbstractSpringDocTest { } \ No newline at end of file diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app49/SpringDocTestApp.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app49/SpringDocTestApp.java index aae8a33f5..603e563af 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app49/SpringDocTestApp.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app49/SpringDocTestApp.java @@ -33,7 +33,7 @@ * The type Spring doc test app. */ @SpringBootApplication -public class SpringDocTestApp { +class SpringDocTestApp { /** * The entry point of application. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app5/sample/OpenAPIResourceBeanConfigurationComponentsSecuritySchemesTest.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app5/sample/OpenAPIResourceBeanConfigurationComponentsSecuritySchemesTest.java index d24768952..f5500c3d7 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app5/sample/OpenAPIResourceBeanConfigurationComponentsSecuritySchemesTest.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app5/sample/OpenAPIResourceBeanConfigurationComponentsSecuritySchemesTest.java @@ -44,7 +44,7 @@ * The type Open api resource bean configuration components security schemes test. */ @TestPropertySource(properties = "springdoc.api-docs.path=/api-docs") -public class OpenAPIResourceBeanConfigurationComponentsSecuritySchemesTest extends AbstractSpringDocTest { +class OpenAPIResourceBeanConfigurationComponentsSecuritySchemesTest extends AbstractSpringDocTest { /** * Given: Bean configuration with security scheme http basic (shouldDefineComponentsSecuritySchemesForHttpBasic) @@ -53,7 +53,7 @@ public class OpenAPIResourceBeanConfigurationComponentsSecuritySchemesTest exten * @throws Exception the exception */ @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { mockMvc .perform(get("/api-docs")) .andExpect(status().isOk()) @@ -70,7 +70,7 @@ public void testApp() throws Exception { * @throws Exception the exception */ @Test - public void shouldDefineComponentsSecuritySchemesForApiKey() throws Exception { + void shouldDefineComponentsSecuritySchemesForApiKey() throws Exception { mockMvc .perform(get("/api-docs")) .andExpect(status().isOk()) @@ -87,7 +87,7 @@ public void shouldDefineComponentsSecuritySchemesForApiKey() throws Exception { * @throws Exception the exception */ @Test - public void shouldDefineComponentsSecuritySchemesForOAuth2() throws Exception { + void shouldDefineComponentsSecuritySchemesForOAuth2() throws Exception { mockMvc .perform(get("/api-docs")) .andExpect(status().isOk()) diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app5/sample/OpenApiResourceCustomConfigurationTest.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app5/sample/OpenApiResourceCustomConfigurationTest.java index b7d9835ca..c354dcd65 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app5/sample/OpenApiResourceCustomConfigurationTest.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app5/sample/OpenApiResourceCustomConfigurationTest.java @@ -36,7 +36,7 @@ */ @Import(CustomOpenAPIConfig.class) @TestPropertySource(properties = "springdoc.api-docs.path=/api-docs") -public class OpenApiResourceCustomConfigurationTest extends AbstractSpringDocTest { +class OpenApiResourceCustomConfigurationTest extends AbstractSpringDocTest { /** * givenNoConfiguration_whenGetApiJson_returnsDefaultEmptyDocs - should return @@ -44,7 +44,7 @@ public class OpenApiResourceCustomConfigurationTest extends AbstractSpringDocTes * @throws Exception the exception */ @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { mockMvc .perform(get("/api-docs")) .andExpect(status().isOk()) diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app5/sample/OpenApiResourceNoConfigurationTest.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app5/sample/OpenApiResourceNoConfigurationTest.java index bee493f69..9e94b8bcb 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app5/sample/OpenApiResourceNoConfigurationTest.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app5/sample/OpenApiResourceNoConfigurationTest.java @@ -33,7 +33,7 @@ * The type Open api resource no configuration test. */ @TestPropertySource(properties = "springdoc.api-docs.path=/api-docs") -public class OpenApiResourceNoConfigurationTest extends AbstractSpringDocTest { +class OpenApiResourceNoConfigurationTest extends AbstractSpringDocTest { /** * givenNoConfiguration_whenGetApiJson_returnsDefaultEmptyDocs - should return @@ -41,7 +41,7 @@ public class OpenApiResourceNoConfigurationTest extends AbstractSpringDocTest { * @throws Exception the exception */ @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { mockMvc .perform(get("/api-docs")) .andExpect(status().isOk()) diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app50/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app50/HelloController.java index c563901af..d634d8207 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app50/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app50/HelloController.java @@ -31,7 +31,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * List list. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app50/SpringDocApp50Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app50/SpringDocApp50Test.java index 9fc27ef66..55c44dc39 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app50/SpringDocApp50Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app50/SpringDocApp50Test.java @@ -23,7 +23,7 @@ /** * The type Spring doc app 50 test. */ -public class SpringDocApp50Test extends AbstractSpringDocTest { +class SpringDocApp50Test extends AbstractSpringDocTest { } \ No newline at end of file diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app50/SpringDocTestApp.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app50/SpringDocTestApp.java index 1d256dcc6..3d84acfe7 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app50/SpringDocTestApp.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app50/SpringDocTestApp.java @@ -33,7 +33,7 @@ * The type Spring doc test app. */ @SpringBootApplication -public class SpringDocTestApp { +class SpringDocTestApp { /** * The entry point of application. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app51/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app51/HelloController.java index 63c553df1..19bad65da 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app51/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app51/HelloController.java @@ -38,7 +38,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Test 1 string. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app51/SpringDocApp51Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app51/SpringDocApp51Test.java index e05f2e760..4a19e4253 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app51/SpringDocApp51Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app51/SpringDocApp51Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 51 test. */ -public class SpringDocApp51Test extends AbstractSpringDocTest { +class SpringDocApp51Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app52/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app52/HelloController.java index 056a8554b..4ac240cc1 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app52/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app52/HelloController.java @@ -31,7 +31,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Create test 1 string. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app52/SpringDocApp52Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app52/SpringDocApp52Test.java index 6b4d07703..be590d244 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app52/SpringDocApp52Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app52/SpringDocApp52Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 52 test. */ -public class SpringDocApp52Test extends AbstractSpringDocTest { +class SpringDocApp52Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app53/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app53/HelloController.java index ee570048b..8da9c35ff 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app53/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app53/HelloController.java @@ -35,7 +35,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * List with no api response list. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app53/HelloControllerWithGlobalApiResponse.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app53/HelloControllerWithGlobalApiResponse.java index fe9ea5601..4aeb6e41e 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app53/HelloControllerWithGlobalApiResponse.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app53/HelloControllerWithGlobalApiResponse.java @@ -35,7 +35,7 @@ */ @RestController @RequestMapping(path = "/global") -public class HelloControllerWithGlobalApiResponse { +class HelloControllerWithGlobalApiResponse { /** * List with no api response list. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app53/SpringDocApp53Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app53/SpringDocApp53Test.java index 5ca862165..907519058 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app53/SpringDocApp53Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app53/SpringDocApp53Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 53 test. */ -public class SpringDocApp53Test extends AbstractSpringDocTest { +class SpringDocApp53Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app54/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app54/HelloController.java index 10b9b7d9c..c62439f8d 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app54/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app54/HelloController.java @@ -34,7 +34,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Gets meal party. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app54/MealParty.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app54/MealParty.java index fb07ef4f5..5f5f4020f 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app54/MealParty.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app54/MealParty.java @@ -26,7 +26,7 @@ /** * The type Meal party. */ -public class MealParty { +class MealParty { /** * The Name. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app54/SpringDocApp54Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app54/SpringDocApp54Test.java index 29a5db426..c01ac10c9 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app54/SpringDocApp54Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app54/SpringDocApp54Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 54 test. */ -public class SpringDocApp54Test extends AbstractSpringDocTest { +class SpringDocApp54Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app55/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app55/HelloController.java index 7559efb2d..c1cd59288 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app55/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app55/HelloController.java @@ -35,7 +35,7 @@ */ @Controller @Tag(name = "health") -public class HelloController { +class HelloController { /** * Ping endpoint used for health checks. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app55/SpringDocApp55Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app55/SpringDocApp55Test.java index 8c9e873ac..949c6cd7e 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app55/SpringDocApp55Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app55/SpringDocApp55Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 55 test. */ -public class SpringDocApp55Test extends AbstractSpringDocTest { +class SpringDocApp55Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app56/GlobalExceptionHandler.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app56/GlobalExceptionHandler.java index 55cc2e6e0..a9fdfc46d 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app56/GlobalExceptionHandler.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app56/GlobalExceptionHandler.java @@ -32,7 +32,7 @@ * The type Global exception handler. */ @RestControllerAdvice -public class GlobalExceptionHandler { +class GlobalExceptionHandler { /** * Handle unhandled error error dto. * diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app56/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app56/HelloController.java index 0e3fb20f1..f5b696dc2 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app56/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app56/HelloController.java @@ -25,7 +25,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Persons string. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app56/SpringDocApp56Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app56/SpringDocApp56Test.java index 480bc9e4f..6fa54f02e 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app56/SpringDocApp56Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app56/SpringDocApp56Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 56 test. */ -public class SpringDocApp56Test extends AbstractSpringDocTest { +class SpringDocApp56Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app57/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app57/HelloController.java index a7c457000..1e88921ca 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app57/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app57/HelloController.java @@ -29,7 +29,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Gets text. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app57/SpringDocApp57Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app57/SpringDocApp57Test.java index c69fc19d5..085514048 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app57/SpringDocApp57Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app57/SpringDocApp57Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 57 test. */ -public class SpringDocApp57Test extends AbstractSpringDocTest { +class SpringDocApp57Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app58/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app58/HelloController.java index b4940cc82..bc90da29c 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app58/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app58/HelloController.java @@ -33,7 +33,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Example object. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app58/SpringDocApp58Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app58/SpringDocApp58Test.java index f154d2281..e9326afa4 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app58/SpringDocApp58Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app58/SpringDocApp58Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 58 test. */ -public class SpringDocApp58Test extends AbstractSpringDocTest { +class SpringDocApp58Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app59/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app59/HelloController.java index 8800ef8bf..45c8db86d 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app59/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app59/HelloController.java @@ -25,7 +25,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Test. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app59/SpringDocApp59Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app59/SpringDocApp59Test.java index 07a2bee10..6779a221d 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app59/SpringDocApp59Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app59/SpringDocApp59Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 59 test. */ -public class SpringDocApp59Test extends AbstractSpringDocTest { +class SpringDocApp59Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app6/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app6/HelloController.java index 6010fbdec..a7b5ffdb6 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app6/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app6/HelloController.java @@ -32,7 +32,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Say hello response entity. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app6/SpringDocApp6Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app6/SpringDocApp6Test.java index 0dcc432bf..f5e18904b 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app6/SpringDocApp6Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app6/SpringDocApp6Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 6 test. */ -public class SpringDocApp6Test extends AbstractSpringDocTest { +class SpringDocApp6Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app60/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app60/HelloController.java index 949274cc3..e51a5b071 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app60/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app60/HelloController.java @@ -31,7 +31,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * List 1 list. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app60/SpringDocApp60Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app60/SpringDocApp60Test.java index 45f411a90..4e607b47e 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app60/SpringDocApp60Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app60/SpringDocApp60Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 60 test. */ -public class SpringDocApp60Test extends AbstractSpringDocTest { +class SpringDocApp60Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app61/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app61/HelloController.java index d30656562..970eebc77 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app61/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app61/HelloController.java @@ -32,7 +32,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app61/SpringDocApp61Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app61/SpringDocApp61Test.java index 7da4ecd7e..050afb6d7 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app61/SpringDocApp61Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app61/SpringDocApp61Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 61 test. */ -public class SpringDocApp61Test extends AbstractSpringDocTest { +class SpringDocApp61Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app62/SpringDocApp62Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app62/SpringDocApp62Test.java index 842d3c176..08f628182 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app62/SpringDocApp62Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app62/SpringDocApp62Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 62 test. */ -public class SpringDocApp62Test extends AbstractSpringDocTest { +class SpringDocApp62Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app62/TestController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app62/TestController.java index 1b496d3b8..cc61e35eb 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app62/TestController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app62/TestController.java @@ -30,7 +30,7 @@ */ @BaseController @Tag(name = "Test Controller") -public class TestController { +class TestController { /** * Test string. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app63/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app63/HelloController.java index 69ceec9a2..471f45b20 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app63/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app63/HelloController.java @@ -31,7 +31,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Test. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app63/SpringDocApp63Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app63/SpringDocApp63Test.java index 0939fb96a..aa1cf7088 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app63/SpringDocApp63Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app63/SpringDocApp63Test.java @@ -30,7 +30,7 @@ @TestPropertySource(properties = { "springdoc.packagesToScan=hell,hello1, hello.me", "springdoc.packagesToExclude=test.org.springdoc.api.app63.65" }) -public class SpringDocApp63Test extends AbstractSpringDocTest { +class SpringDocApp63Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app64/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app64/HelloController.java index a3045f025..758acfb7d 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app64/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app64/HelloController.java @@ -27,7 +27,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Test 1. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app64/SpringDocApp64Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app64/SpringDocApp64Test.java index 8156fdc28..2251b372d 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app64/SpringDocApp64Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app64/SpringDocApp64Test.java @@ -27,7 +27,7 @@ * The type Spring doc app 64 test. */ @TestPropertySource(properties = "springdoc.paths-to-match=/v1, /api/**") -public class SpringDocApp64Test extends AbstractSpringDocTest { +class SpringDocApp64Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app65/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app65/HelloController.java index 9e7991e1b..e479d9e88 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app65/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app65/HelloController.java @@ -31,7 +31,7 @@ */ @Tag(name = "Health", description = "Health check / ping API") @RestController -public class HelloController { +class HelloController { /** * Ping response entity. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app65/SpringDocApp65Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app65/SpringDocApp65Test.java index ce3fdfc46..102afe729 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app65/SpringDocApp65Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app65/SpringDocApp65Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 65 test. */ -public class SpringDocApp65Test extends AbstractSpringDocTest { +class SpringDocApp65Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app66/DefaultHealthCheckApi.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app66/DefaultHealthCheckApi.java index b5f1f2214..651299d3b 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app66/DefaultHealthCheckApi.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app66/DefaultHealthCheckApi.java @@ -33,7 +33,7 @@ */ @RestController @Hidden -public class DefaultHealthCheckApi { +class DefaultHealthCheckApi { /** * Test date echo string. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app66/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app66/HelloController.java index 350d17f83..dc32d1cfa 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app66/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app66/HelloController.java @@ -31,7 +31,7 @@ */ @Tag(name = "Health", description = "Health check / ping API") @RestController -public class HelloController { +class HelloController { /** * Ping response entity. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app66/SpringDocApp66Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app66/SpringDocApp66Test.java index 270eeeb8b..c54781196 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app66/SpringDocApp66Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app66/SpringDocApp66Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 66 test. */ -public class SpringDocApp66Test extends AbstractSpringDocTest { +class SpringDocApp66Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app66/UndocumentedClass.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app66/UndocumentedClass.java index 2252ac363..9404d0987 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app66/UndocumentedClass.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app66/UndocumentedClass.java @@ -24,6 +24,6 @@ * The type Undocumented class. */ @Hidden -public class UndocumentedClass { +class UndocumentedClass { } diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app67/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app67/HelloController.java index f22531f45..e60ca14cd 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app67/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app67/HelloController.java @@ -40,7 +40,7 @@ @RestController @RequestMapping(path = "/demo", produces = MediaType.TEXT_PLAIN_VALUE) -public class HelloController { +class HelloController { /** * Operation 1 string. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app67/SpringDocApp67Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app67/SpringDocApp67Test.java index 9af91eb2a..01dd40162 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app67/SpringDocApp67Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app67/SpringDocApp67Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 67 test. */ -public class SpringDocApp67Test extends AbstractSpringDocTest { +class SpringDocApp67Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app69/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app69/HelloController.java index da91e141a..a9a837cd8 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app69/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app69/HelloController.java @@ -29,7 +29,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Gets tasks. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app69/PersonDTO.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app69/PersonDTO.java index d48dc9e2f..614c352d5 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app69/PersonDTO.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app69/PersonDTO.java @@ -21,7 +21,7 @@ /** * The type Person dto. */ -public class PersonDTO { +class PersonDTO { /** * The Email. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app69/SpringDocApp69Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app69/SpringDocApp69Test.java index d7fb9ed82..5e2d3632c 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app69/SpringDocApp69Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app69/SpringDocApp69Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 69 test. */ -public class SpringDocApp69Test extends AbstractSpringDocTest { +class SpringDocApp69Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app7/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app7/HelloController.java index d8b7aeac9..926ba4511 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app7/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app7/HelloController.java @@ -30,7 +30,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Search employee. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app7/SpringDocApp7Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app7/SpringDocApp7Test.java index 4f50512d9..a6fee1e8d 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app7/SpringDocApp7Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app7/SpringDocApp7Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 7 test. */ -public class SpringDocApp7Test extends AbstractSpringDocTest { +class SpringDocApp7Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app70/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app70/HelloController.java index 398ecb807..99bb18f19 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app70/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app70/HelloController.java @@ -32,7 +32,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Test api type. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app70/SpringDocApp70Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app70/SpringDocApp70Test.java index ffdf546d0..1b400bae2 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app70/SpringDocApp70Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app70/SpringDocApp70Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 70 test. */ -public class SpringDocApp70Test extends AbstractSpringDocTest { +class SpringDocApp70Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app70/customizer/OperationCustomizer.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app70/customizer/OperationCustomizer.java index 0073afeac..ed8d5cf2f 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app70/customizer/OperationCustomizer.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app70/customizer/OperationCustomizer.java @@ -27,7 +27,7 @@ * The type Operation customizer. */ @Component -public class OperationCustomizer implements org.springdoc.core.customizers.OperationCustomizer { +class OperationCustomizer implements org.springdoc.core.customizers.OperationCustomizer { /** * Customize operation. * diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app70/customizer/ParameterCustomizer.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app70/customizer/ParameterCustomizer.java index 674f8e815..8611b8c12 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app70/customizer/ParameterCustomizer.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app70/customizer/ParameterCustomizer.java @@ -27,7 +27,7 @@ * The type Parameter customizer. */ @Component -public class ParameterCustomizer implements org.springdoc.core.customizers.ParameterCustomizer { +class ParameterCustomizer implements org.springdoc.core.customizers.ParameterCustomizer { /** * Customize parameter. * diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app70/customizer/PropertyCustomizer.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app70/customizer/PropertyCustomizer.java index edf6543d2..3a71c3dbc 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app70/customizer/PropertyCustomizer.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app70/customizer/PropertyCustomizer.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. @@ -43,7 +43,7 @@ * The type Property customizer. */ @Component -public class PropertyCustomizer implements org.springdoc.core.customizers.PropertyCustomizer { +class PropertyCustomizer implements org.springdoc.core.customizers.PropertyCustomizer { @Autowired ObjectMapperProvider objectMapperProvider; diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app71/Dog.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app71/Dog.java index b42159153..edcf892b4 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app71/Dog.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app71/Dog.java @@ -26,7 +26,7 @@ * The type Dog. */ @Schema(name = "Dog") -public class Dog { +class Dog { /** * The Display name. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app71/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app71/HelloController.java index 1d98e5358..4d1e0c56b 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app71/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app71/HelloController.java @@ -25,7 +25,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Persons string. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app71/SpringDocApp71Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app71/SpringDocApp71Test.java index cc3683621..051921c85 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app71/SpringDocApp71Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app71/SpringDocApp71Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 71 test. */ -public class SpringDocApp71Test extends AbstractSpringDocTest { +class SpringDocApp71Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app72/BlockingAutoConfigurationTest.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app72/BlockingAutoConfigurationTest.java index b39b6bc3f..c553ef06b 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app72/BlockingAutoConfigurationTest.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app72/BlockingAutoConfigurationTest.java @@ -32,7 +32,7 @@ /** * The type Blocking auto configuration test. */ -public class BlockingAutoConfigurationTest { +class BlockingAutoConfigurationTest { /** * The Context runner. @@ -45,7 +45,7 @@ public class BlockingAutoConfigurationTest { * Configurations not loaded when application is not web. */ @Test - public void configurations_not_loaded_when_application_is_not_web() { + void configurations_not_loaded_when_application_is_not_web() { new ApplicationContextRunner() .withUserConfiguration(TestApp.class) .run(context -> assertThat(context) @@ -60,7 +60,7 @@ public void configurations_not_loaded_when_application_is_not_web() { * Actuator configuration not loaded when not enabled explicitly. */ @Test - public void actuator_configuration_not_loaded_when_not_enabled_explicitly() { + void actuator_configuration_not_loaded_when_not_enabled_explicitly() { contextRunner .run(context -> assertThat(context) .hasNotFailed() @@ -74,7 +74,7 @@ public void actuator_configuration_not_loaded_when_not_enabled_explicitly() { * Configurations not loaded when disabled. */ @Test - public void configurations_not_loaded_when_disabled() { + void configurations_not_loaded_when_disabled() { contextRunner .withPropertyValues("springdoc.api-docs.enabled=false") .run(context -> assertThat(context) @@ -89,7 +89,7 @@ public void configurations_not_loaded_when_disabled() { * Configurations not loaded when mvc is not on class path. */ @Test - public void configurations_not_loaded_when_mvc_is_not_on_class_path() { + void configurations_not_loaded_when_mvc_is_not_on_class_path() { contextRunner .withClassLoader(new FilteredClassLoader("org.springframework.web.context.support.GenericWebApplicationContext")) .run(context -> assertThat(context) diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app72/CacheAutoConfigurationTest1.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app72/CacheAutoConfigurationTest1.java index 6ce16aaba..01a1c1945 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app72/CacheAutoConfigurationTest1.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app72/CacheAutoConfigurationTest1.java @@ -28,7 +28,7 @@ /** * The type Cache auto configuration test 1. */ -public class CacheAutoConfigurationTest1 { +class CacheAutoConfigurationTest1 { /** * The Context runner. @@ -40,7 +40,7 @@ public class CacheAutoConfigurationTest1 { * Cache configuration loaded when not disabled explicitly. */ @Test - public void cache_configuration_loaded_when_not_disabled_explicitly() { + void cache_configuration_loaded_when_not_disabled_explicitly() { contextRunner .run(context -> assertThat(context) .hasNotFailed() @@ -54,7 +54,7 @@ public void cache_configuration_loaded_when_not_disabled_explicitly() { * Cache configuration loaded when disabled explicitly. */ @Test - public void cache_configuration_loaded_when_disabled_explicitly() { + void cache_configuration_loaded_when_disabled_explicitly() { contextRunner .withPropertyValues("springdoc.cache.disabled=false") .run(context -> assertThat(context) @@ -69,7 +69,7 @@ public void cache_configuration_loaded_when_disabled_explicitly() { * Cache configurations successfully disabled. */ @Test - public void cache_configurations_successfully_disabled() { + void cache_configurations_successfully_disabled() { contextRunner .withPropertyValues("springdoc.cache.disabled=true") .run(context -> assertThat(context) @@ -84,7 +84,7 @@ public void cache_configurations_successfully_disabled() { * Group configuration loaded. */ @Test - public void group_configuration_loaded() { + void group_configuration_loaded() { contextRunner .withPropertyValues("springdoc.group-configs[0].group=stores", "springdoc.group-configs[0].paths-to-match=/store/**") .run(context -> assertThat(context) diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app72/GroupAutoConfigurationTest.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app72/GroupAutoConfigurationTest.java index e611a4567..ae17c3212 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app72/GroupAutoConfigurationTest.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app72/GroupAutoConfigurationTest.java @@ -30,7 +30,7 @@ /** * The type Group auto configuration test. */ -public class GroupAutoConfigurationTest { +class GroupAutoConfigurationTest { /** * The Context runner. @@ -42,7 +42,7 @@ public class GroupAutoConfigurationTest { * Group configuration loaded. */ @Test - public void group_configuration_loaded() { + void group_configuration_loaded() { contextRunner .run(context -> assertThat(context) .hasNotFailed() diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app73/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app73/HelloController.java index 4c6d4f92a..66b2debc0 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app73/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app73/HelloController.java @@ -35,7 +35,7 @@ */ @RestController @RequestMapping({ "/{country_code}/persons/", "/persons" }) -public class HelloController { +class HelloController { /** * Delete. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app73/SpringDocApp73Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app73/SpringDocApp73Test.java index e15babaf9..330a6ffdf 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app73/SpringDocApp73Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app73/SpringDocApp73Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 73 test. */ -public class SpringDocApp73Test extends AbstractSpringDocTest { +class SpringDocApp73Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app74/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app74/HelloController.java index e6dcbf6c9..aab5ab2c0 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app74/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app74/HelloController.java @@ -30,7 +30,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Post my request body string. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app74/SpringDocApp74Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app74/SpringDocApp74Test.java index 72fd0c9bd..3006d60e5 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app74/SpringDocApp74Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app74/SpringDocApp74Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 74 test. */ -public class SpringDocApp74Test extends AbstractSpringDocTest { +class SpringDocApp74Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app75/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app75/HelloController.java index 9f0cd5342..5cd7892de 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app75/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app75/HelloController.java @@ -33,7 +33,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Post my request body 1 string. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app75/PersonDTO.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app75/PersonDTO.java index bc2b3bd83..e07dbfcea 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app75/PersonDTO.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app75/PersonDTO.java @@ -21,7 +21,7 @@ /** * The type Person dto. */ -public class PersonDTO { +class PersonDTO { /** * The Email. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app75/RestResponseEntityExceptionHandler.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app75/RestResponseEntityExceptionHandler.java index 3756a5cb2..4d0feeddb 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app75/RestResponseEntityExceptionHandler.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app75/RestResponseEntityExceptionHandler.java @@ -33,7 +33,7 @@ * The type Rest response entity exception handler. */ @ControllerAdvice -public class RestResponseEntityExceptionHandler +class RestResponseEntityExceptionHandler extends ResponseEntityExceptionHandler { /** * Bad request response entity. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app75/SpringDocApp75Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app75/SpringDocApp75Test.java index f64fd7141..5dbd1acc9 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app75/SpringDocApp75Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app75/SpringDocApp75Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 75 test. */ -public class SpringDocApp75Test extends AbstractSpringDocTest { +class SpringDocApp75Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app76/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app76/HelloController.java index 47090323d..fb8df1e31 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app76/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app76/HelloController.java @@ -29,7 +29,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Secured string. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app76/SpringDocApp76Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app76/SpringDocApp76Test.java index 0e39d6492..422cb11fb 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app76/SpringDocApp76Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app76/SpringDocApp76Test.java @@ -32,7 +32,7 @@ /** * The type Spring doc app 76 test. */ -public class SpringDocApp76Test extends AbstractSpringDocTest { +class SpringDocApp76Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app77/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app77/HelloController.java index 9252bdd9d..6eb96004e 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app77/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app77/HelloController.java @@ -35,7 +35,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Persons. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app77/SpringDocApp77Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app77/SpringDocApp77Test.java index 55940c939..af48953bf 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app77/SpringDocApp77Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app77/SpringDocApp77Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 77 test. */ -public class SpringDocApp77Test extends AbstractSpringDocTest { +class SpringDocApp77Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app78/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app78/HelloController.java index 7d76440c1..a7099fc40 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app78/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app78/HelloController.java @@ -30,7 +30,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Gets person 1. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app78/PersonDTO.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app78/PersonDTO.java index 6784f8c69..ab764145b 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app78/PersonDTO.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app78/PersonDTO.java @@ -21,7 +21,7 @@ /** * The type Person dto. */ -public class PersonDTO { +class PersonDTO { /** * The Email. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app78/SpringDocApp78Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app78/SpringDocApp78Test.java index 0cb2d5250..e16cd0967 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app78/SpringDocApp78Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app78/SpringDocApp78Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 78 test. */ -public class SpringDocApp78Test extends AbstractSpringDocTest { +class SpringDocApp78Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app79/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app79/HelloController.java index 80e009851..fb6f299bd 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app79/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app79/HelloController.java @@ -29,7 +29,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Echo string. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app79/SpringDocApp79Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app79/SpringDocApp79Test.java index 85aa5c8f2..131461c13 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app79/SpringDocApp79Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app79/SpringDocApp79Test.java @@ -26,7 +26,7 @@ /** * The type Spring doc app 79 test. */ -public class SpringDocApp79Test extends AbstractSpringDocTest { +class SpringDocApp79Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app8/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app8/HelloController.java index 13a1e7dc3..bcb51786d 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app8/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app8/HelloController.java @@ -25,7 +25,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Test. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app8/SpringDocApp8Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app8/SpringDocApp8Test.java index 7ef7a1c84..9b42f39b0 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app8/SpringDocApp8Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app8/SpringDocApp8Test.java @@ -31,7 +31,7 @@ /** * The type Spring doc app 8 test. */ -public class SpringDocApp8Test extends AbstractSpringDocTest { +class SpringDocApp8Test extends AbstractSpringDocTest { /** * Test app. @@ -39,7 +39,7 @@ public class SpringDocApp8Test extends AbstractSpringDocTest { * @throws Exception the exception */ @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { mockMvc.perform(get("/myapp" + Constants.DEFAULT_API_DOCS_URL).contextPath("/myapp")) .andExpect(status().isOk()); } diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app80/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app80/HelloController.java index 4ca3a21f8..d7f13a317 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app80/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app80/HelloController.java @@ -32,7 +32,7 @@ */ @RestController @RequestMapping("/api") -public class HelloController { +class HelloController { /** diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app80/SpringDocApp80Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app80/SpringDocApp80Test.java index baf25afe5..dcb068d88 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app80/SpringDocApp80Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app80/SpringDocApp80Test.java @@ -27,7 +27,7 @@ * The type Spring doc app 80 test. */ @ActiveProfiles("80") -public class SpringDocApp80Test extends AbstractSpringDocTest { +class SpringDocApp80Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app80/TestObject.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app80/TestObject.java index 545cdb94e..cc6a2182b 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app80/TestObject.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app80/TestObject.java @@ -5,7 +5,7 @@ /** * The type Test object. */ -public class TestObject { +class TestObject { /** * The String value. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app81/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app81/HelloController.java index b8747fee7..ddd00b1ac 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app81/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app81/HelloController.java @@ -26,7 +26,7 @@ */ @RestController @RequestMapping("/api") -public class HelloController { +class HelloController { /** * Test string. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app81/SpringDocApp81Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app81/SpringDocApp81Test.java index f5dd82923..ac273d741 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app81/SpringDocApp81Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app81/SpringDocApp81Test.java @@ -34,7 +34,7 @@ /** * The type Spring doc app 81 test. */ -public class SpringDocApp81Test extends AbstractSpringDocTest { +class SpringDocApp81Test extends AbstractSpringDocTest { /** * Test app. @@ -42,7 +42,7 @@ public class SpringDocApp81Test extends AbstractSpringDocTest { * @throws Exception the exception */ @Test - public void testApp() throws Exception { + protected void testApp() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)).andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) .andExpect(jsonPath("$.paths./api.get.tags[0]", containsString("hello-controller"))) diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app82/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app82/HelloController.java index cc76a0729..9e1496699 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app82/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app82/HelloController.java @@ -26,7 +26,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app82/PersonDTO.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app82/PersonDTO.java index e682fd745..5cdfbce51 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app82/PersonDTO.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app82/PersonDTO.java @@ -21,7 +21,7 @@ /** * The type Person dto. */ -public class PersonDTO { +class PersonDTO { /** * The Email. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app82/SpringDocApp82Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app82/SpringDocApp82Test.java index acb24ee7d..ce42a3b2a 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app82/SpringDocApp82Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app82/SpringDocApp82Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 82 test. */ -public class SpringDocApp82Test extends AbstractSpringDocTest { +class SpringDocApp82Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app83/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app83/HelloController.java index 6490f6f8d..df5fd5935 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app83/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app83/HelloController.java @@ -34,7 +34,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app83/PersonDTO.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app83/PersonDTO.java index 9404626b9..82b3d6afc 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app83/PersonDTO.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app83/PersonDTO.java @@ -21,7 +21,7 @@ /** * The type Person dto. */ -public class PersonDTO { +class PersonDTO { /** * The Email. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app83/SpringDocApp83Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app83/SpringDocApp83Test.java index 0e5c1eac0..8088cb240 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app83/SpringDocApp83Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app83/SpringDocApp83Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 83 test. */ -public class SpringDocApp83Test extends AbstractSpringDocTest { +class SpringDocApp83Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app84/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app84/HelloController.java index 50abec6f5..1e7476764 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app84/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app84/HelloController.java @@ -27,7 +27,7 @@ */ @RestController @RequestMapping("/api") -public class HelloController { +class HelloController { /** * Persons string. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app84/SpringDocApp84Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app84/SpringDocApp84Test.java index 34dbcb75b..c48dcf3df 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app84/SpringDocApp84Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app84/SpringDocApp84Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 84 test. */ -public class SpringDocApp84Test extends AbstractSpringDocTest { +class SpringDocApp84Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app85/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app85/HelloController.java index 7c87c87d8..8579bcf0a 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app85/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app85/HelloController.java @@ -31,7 +31,7 @@ */ @RestController @RequestMapping("/api") -public class HelloController { +class HelloController { /** * Testme. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app85/SpringDocApp85Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app85/SpringDocApp85Test.java index fd073aaf0..7ec0b689b 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app85/SpringDocApp85Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app85/SpringDocApp85Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 85 test. */ -public class SpringDocApp85Test extends AbstractSpringDocTest { +class SpringDocApp85Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app86/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app86/HelloController.java index e4749c624..0a4158c98 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app86/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app86/HelloController.java @@ -31,7 +31,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Test. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app86/SpringDocApp86Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app86/SpringDocApp86Test.java index 68f89bd2e..a9ab50eb9 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app86/SpringDocApp86Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app86/SpringDocApp86Test.java @@ -29,7 +29,7 @@ @TestPropertySource(properties = { "springdoc.packagesToScan=test.org.springdoc.api.app86", "springdoc.packagesToExclude=test.org.springdoc.api.app86.test" }) -public class SpringDocApp86Test extends AbstractSpringDocTest { +class SpringDocApp86Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app86/test/HelloController2.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app86/test/HelloController2.java index 6104e5e34..d90c176c3 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app86/test/HelloController2.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app86/test/HelloController2.java @@ -31,7 +31,7 @@ * The type Hello controller 2. */ @RestController -public class HelloController2 { +class HelloController2 { /** * Test. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app87/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app87/HelloController.java index 2cd68d9af..54f05e75a 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app87/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app87/HelloController.java @@ -34,7 +34,7 @@ * The type Hello controller. */ @RestController("cookie") -public class HelloController { +class HelloController { /** * Put item response entity. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app87/SpringDocApp87Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app87/SpringDocApp87Test.java index cff90bd03..4e42c27a7 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app87/SpringDocApp87Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app87/SpringDocApp87Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 87 test. */ -public class SpringDocApp87Test extends AbstractSpringDocTest { +class SpringDocApp87Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app88/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app88/HelloController.java index d685409e6..7f0d0755a 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app88/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app88/HelloController.java @@ -25,7 +25,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Persons string. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app88/SpringDocApp88Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app88/SpringDocApp88Test.java index 0199bd7e2..a9a47dc5c 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app88/SpringDocApp88Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app88/SpringDocApp88Test.java @@ -27,7 +27,7 @@ * The type Spring doc app 88 test. */ @TestPropertySource(properties = "springdoc.auto-tag-classes=false") -public class SpringDocApp88Test extends AbstractSpringDocTest { +class SpringDocApp88Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app89/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app89/HelloController.java index 4632ccc8e..4f882cc2d 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app89/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app89/HelloController.java @@ -30,7 +30,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Gets address. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app89/SpringDocApp89Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app89/SpringDocApp89Test.java index 5d9db76b3..cc124b074 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app89/SpringDocApp89Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app89/SpringDocApp89Test.java @@ -32,7 +32,7 @@ * The type Spring doc app 89 test. */ @TestPropertySource(properties = "springdoc.model-and-view-allowed=true") -public class SpringDocApp89Test extends AbstractSpringDocTest { +class SpringDocApp89Test extends AbstractSpringDocTest { static { getConfig().replaceWithSchema(ModelAndView.class, new ObjectSchema()); diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app9/MyApiController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app9/MyApiController.java index b8e4ead91..304ec0fbb 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app9/MyApiController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app9/MyApiController.java @@ -28,7 +28,7 @@ * The type My api controller. */ @RestController -public class MyApiController implements MyApi { +class MyApiController implements MyApi { /** * Get string. * diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app9/SpringDocApp9Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app9/SpringDocApp9Test.java index 2e089f609..743b3482a 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app9/SpringDocApp9Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app9/SpringDocApp9Test.java @@ -25,7 +25,7 @@ /** * The type Spring doc app 9 test. */ -public class SpringDocApp9Test extends AbstractSpringDocTest { +class SpringDocApp9Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app90/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app90/HelloController.java index 315138062..ee39766e1 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app90/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app90/HelloController.java @@ -34,7 +34,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Test 1. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app90/SpringDocApp90Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app90/SpringDocApp90Test.java index 74a048dbf..08ea75648 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app90/SpringDocApp90Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app90/SpringDocApp90Test.java @@ -24,6 +24,6 @@ /** * The type Spring doc app 90 test. */ -public class SpringDocApp90Test extends AbstractSpringDocTest { +class SpringDocApp90Test extends AbstractSpringDocTest { } \ No newline at end of file diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app90/User.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app90/User.java index adf7f1368..49a51389f 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app90/User.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app90/User.java @@ -29,7 +29,7 @@ @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2019-11-30T09:49:26.034469-01:00[Atlantic/Azores]") -public class User { +class User { /** * The Id. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app91/Advice.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app91/Advice.java index dcffbe6c7..fb5baf5cc 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app91/Advice.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app91/Advice.java @@ -18,7 +18,7 @@ * The type Advice. */ @RestControllerAdvice -public class Advice { +class Advice { /** * Bad request response entity. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app91/ApiError.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app91/ApiError.java index 70a1ce2ec..4cf6bdcb3 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app91/ApiError.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app91/ApiError.java @@ -11,7 +11,7 @@ name = "ApiError", title = "ApiError", description = "A consistent response object for sending errors over the wire.") -public class ApiError { +class ApiError { /** * The Status. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app91/Greeting.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app91/Greeting.java index 3603b8d86..fb37663f6 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app91/Greeting.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app91/Greeting.java @@ -11,7 +11,7 @@ name = "Greeting", title = "Greeting", description = "An object containing a greeting message") -public class Greeting { +class Greeting { /** diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app91/GreetingController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app91/GreetingController.java index c19321462..edb144c15 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app91/GreetingController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app91/GreetingController.java @@ -17,7 +17,7 @@ */ @RestController @Tag(name = "Demo", description = "The Demo API") -public class GreetingController { +class GreetingController { /** * Say hello response entity. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app91/SpringDocApp91Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app91/SpringDocApp91Test.java index 6261c8529..23a390257 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app91/SpringDocApp91Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app91/SpringDocApp91Test.java @@ -28,7 +28,7 @@ * The type Spring doc app 91 test. */ @TestPropertySource(properties = "springdoc.override-with-generic-response=false") -public class SpringDocApp91Test extends AbstractSpringDocTest { +class SpringDocApp91Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app92/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app92/HelloController.java index 3690867ac..5c9ce3272 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app92/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app92/HelloController.java @@ -29,7 +29,7 @@ */ @RestController @RequestMapping("/test") -public class HelloController { +class HelloController { /** * Index string. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app92/ParameterCustomizer.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app92/ParameterCustomizer.java index 095af2529..351251c49 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app92/ParameterCustomizer.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app92/ParameterCustomizer.java @@ -28,7 +28,7 @@ * The type Parameter customizer. */ @Component -public class ParameterCustomizer implements org.springdoc.core.customizers.ParameterCustomizer { +class ParameterCustomizer implements org.springdoc.core.customizers.ParameterCustomizer { /** * Customize parameter. * diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app92/SpringDocApp92Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app92/SpringDocApp92Test.java index f8790ce84..dbfbf1657 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app92/SpringDocApp92Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app92/SpringDocApp92Test.java @@ -26,7 +26,7 @@ /** * The type Spring doc app 92 test. */ -public class SpringDocApp92Test extends AbstractSpringDocTest { +class SpringDocApp92Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app93/SpecificClientModel.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app93/SpecificClientModel.java index 1b6aa1476..591bc5804 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app93/SpecificClientModel.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app93/SpecificClientModel.java @@ -5,7 +5,7 @@ /** * The type Specific client model. */ -public class SpecificClientModel extends BaseClientModel { +class SpecificClientModel extends BaseClientModel { /** * The Name. */ diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app93/SpecificController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app93/SpecificController.java index a5dad2a2e..8c45f0910 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app93/SpecificController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app93/SpecificController.java @@ -6,4 +6,4 @@ * The type Specific controller. */ @RestController -public class SpecificController extends BaseController {} \ No newline at end of file +class SpecificController extends BaseController {} \ No newline at end of file diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app93/SpringDocApp93Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app93/SpringDocApp93Test.java index 75baedad0..40f48fb16 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app93/SpringDocApp93Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app93/SpringDocApp93Test.java @@ -26,7 +26,7 @@ /** * The type Spring doc app 93 test. */ -public class SpringDocApp93Test extends AbstractSpringDocTest { +class SpringDocApp93Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app94/Greeting.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app94/Greeting.java new file mode 100644 index 000000000..1cfca3a7a --- /dev/null +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app94/Greeting.java @@ -0,0 +1,37 @@ +package test.org.springdoc.api.app94; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * The type Greeting. + */ +@Schema( + type = "object", + name = "Greeting", + title = "Greeting", + description = "An object containing a greeting message") +class Greeting { + + + /** + * The Payload. + */ + @Schema( + name = "payload", + description = "The greeting value", + type = "string", + nullable = false, + example = "sdfsdfs") + @JsonProperty("payload") + private String payload; + + /** + * Instantiates a new Greeting. + * + * @param payload the payload + */ + public Greeting(String payload) { + this.payload = payload; + } +} diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app94/SpringDocApp94Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app94/SpringDocApp94Test.java index bf6d349cb..dad845771 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app94/SpringDocApp94Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app94/SpringDocApp94Test.java @@ -35,7 +35,6 @@ import org.springdoc.core.service.OperationService; import org.springdoc.webmvc.api.OpenApiWebMvcResource; import test.org.springdoc.api.AbstractSpringDocTest; -import test.org.springdoc.api.app91.Greeting; import org.springframework.beans.BeansException; import org.springframework.beans.factory.ObjectFactory; @@ -59,7 +58,7 @@ * The type Spring doc app 94 test. */ @TestPropertySource(properties = "springdoc.default-produces-media-type=application/json") -public class SpringDocApp94Test extends AbstractSpringDocTest { +class SpringDocApp94Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app95/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app95/HelloController.java index f91b2be8e..9e6bc3a9b 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app95/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app95/HelloController.java @@ -12,7 +12,7 @@ */ @RestController @RequestMapping("/persons") -public class HelloController { +class HelloController { /** * Persons. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app95/SpringDocApp95Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app95/SpringDocApp95Test.java index 179c81ea8..8f197c9c9 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app95/SpringDocApp95Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app95/SpringDocApp95Test.java @@ -28,7 +28,7 @@ * The type Spring doc app 95 test. */ @ActiveProfiles("95") -public class SpringDocApp95Test extends AbstractSpringDocTest { +class SpringDocApp95Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app96/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app96/HelloController.java index f2dac3d0a..25c658079 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app96/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app96/HelloController.java @@ -29,7 +29,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app96/SpringDocApp96Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app96/SpringDocApp96Test.java index 3906f97e2..eb13e5e75 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app96/SpringDocApp96Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app96/SpringDocApp96Test.java @@ -26,7 +26,7 @@ /** * The type Spring doc app 96 test. */ -public class SpringDocApp96Test extends AbstractSpringDocTest { +class SpringDocApp96Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app97/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app97/HelloController.java index 6bed1304e..65986b5e0 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app97/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app97/HelloController.java @@ -27,7 +27,7 @@ */ @RestController @RequestMapping("/api") -public class HelloController { +class HelloController { /** * Header v 1 student v 1. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app97/SpringDocApp97Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app97/SpringDocApp97Test.java index 28254d179..1340c442d 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app97/SpringDocApp97Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app97/SpringDocApp97Test.java @@ -26,7 +26,7 @@ /** * The type Spring doc app 97 test. */ -public class SpringDocApp97Test extends AbstractSpringDocTest { +class SpringDocApp97Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app97/StudentV1.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app97/StudentV1.java index 76eccbbcb..5a6a5ae2d 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app97/StudentV1.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app97/StudentV1.java @@ -5,7 +5,7 @@ /** * The type Student v 1. */ -public class StudentV1 { +class StudentV1 { /** * The Name. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app97/StudentV2.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app97/StudentV2.java index be99618e6..e76f0cb46 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app97/StudentV2.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app97/StudentV2.java @@ -5,7 +5,7 @@ /** * The type Student v 2. */ -public class StudentV2 { +class StudentV2 { /** * The Name. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app97/StudentV3.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app97/StudentV3.java index 41016cb35..9907b8544 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app97/StudentV3.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app97/StudentV3.java @@ -5,7 +5,7 @@ /** * The type Student v 3. */ -public class StudentV3 { +class StudentV3 { /** * The Name. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app98/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app98/HelloController.java index e8f9add1d..b5becd942 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app98/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app98/HelloController.java @@ -7,7 +7,7 @@ * The type Hello controller. */ @RestController -public class HelloController { +class HelloController { /** * Persons. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app98/SpringDocApp98Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app98/SpringDocApp98Test.java index e0f2ef18c..cacfce2ac 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app98/SpringDocApp98Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app98/SpringDocApp98Test.java @@ -27,7 +27,7 @@ /** * The type Spring doc app 98 test. */ -public class SpringDocApp98Test extends AbstractSpringDocTest { +class SpringDocApp98Test extends AbstractSpringDocTest { static { SpringDocUtils.getConfig().addAnnotationsToIgnore(IgnoredAnnotationParameter.class); diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app99/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app99/HelloController.java index 29dbf07f3..5980368b2 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app99/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app99/HelloController.java @@ -12,7 +12,7 @@ */ @RestController @RequestMapping("/persons") -public class HelloController { +class HelloController { /** * Persons. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app99/SpringDocApp99Test.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app99/SpringDocApp99Test.java index 7b5477c8f..f7639bf8a 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app99/SpringDocApp99Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/app99/SpringDocApp99Test.java @@ -28,7 +28,7 @@ * The type Spring doc app 99 test. */ @ActiveProfiles("99") -public class SpringDocApp99Test extends AbstractSpringDocTest { +class SpringDocApp99Test extends AbstractSpringDocTest { /** * The type Spring doc test app. diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app102.json b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app102.json index 7dbbdae94..83c8687ea 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app102.json +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app102.json @@ -103,7 +103,7 @@ { "name": "nested.param1", "in": "query", - "description": "The Param 1.", + "description": "nested string parameter", "required": false, "schema": { "type": "string" @@ -112,7 +112,7 @@ { "name": "nested.param2", "in": "query", - "description": "The Param 2.", + "description": "nested BigInteger parameter", "required": false, "schema": { "type": "integer" @@ -157,4 +157,4 @@ } } } -} \ No newline at end of file +} 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/app106.json b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app106.json index 2b4c457c9..f3c9e7ee7 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app106.json +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app106.json @@ -24,7 +24,7 @@ ], "summary": "find-articles", "description": "Find articles response entity.", - "operationId": "findArticles_1", + "operationId": "findArticles", "parameters": [ { "name": "If-Modified-Since", diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app108.json b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app108.json index f6ae41597..ea930f5db 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app108.json +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app108.json @@ -24,7 +24,7 @@ ], "summary": "Update action result.", "description": "Update action result.", - "operationId": "update_1", + "operationId": "update", "parameters": [ { "name": "toto", diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app118.json b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app118.json index 7e9c83e20..4a5c62739 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app118.json +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app118.json @@ -17,14 +17,14 @@ } ], "paths": { - "/class-hierarchy/abstract-parent": { + "/class-hierarchy/concrete-parent": { "post": { "tags": [ "controller" ], - "summary": "Abstract parent response.", - "description": "Abstract parent response.", - "operationId": "abstractParent", + "summary": "Concrete parent response.", + "description": "Concrete parent response.", + "operationId": "concreteParent", "requestBody": { "description": "the payload", "content": { @@ -32,10 +32,13 @@ "schema": { "oneOf": [ { - "$ref": "#/components/schemas/ChildOfAbstract1" + "$ref": "#/components/schemas/ConcreteParent" }, { - "$ref": "#/components/schemas/ChildOfAbstract2" + "$ref": "#/components/schemas/ChildOfConcrete1" + }, + { + "$ref": "#/components/schemas/ChildOfConcrete2" } ] } @@ -57,14 +60,14 @@ } } }, - "/class-hierarchy/concrete-parent": { + "/class-hierarchy/abstract-parent": { "post": { "tags": [ "controller" ], - "summary": "Concrete parent response.", - "description": "Concrete parent response.", - "operationId": "concreteParent", + "summary": "Abstract parent response.", + "description": "Abstract parent response.", + "operationId": "abstractParent", "requestBody": { "description": "the payload", "content": { @@ -72,13 +75,10 @@ "schema": { "oneOf": [ { - "$ref": "#/components/schemas/ConcreteParent" - }, - { - "$ref": "#/components/schemas/ChildOfConcrete1" + "$ref": "#/components/schemas/ChildOfAbstract1" }, { - "$ref": "#/components/schemas/ChildOfConcrete2" + "$ref": "#/components/schemas/ChildOfAbstract2" } ] } @@ -103,136 +103,138 @@ }, "components": { "schemas": { - "AbstractParent": { - "required": [ - "type" - ], - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "type": { - "type": "string" - } - }, - "discriminator": { - "propertyName": "type" - } - }, - "ChildOfAbstract1": { + "ChildOfConcrete1": { "type": "object", - "description": "The type Child of abstract 1.", + "description": "The type Child of concrete 1.", "allOf": [ { - "$ref": "#/components/schemas/AbstractParent" + "$ref": "#/components/schemas/ConcreteParent" }, { "type": "object", "properties": { - "abstrachChild1Param": { - "type": "string", - "description": "The Abstrach child 1 param." - }, "id": { "type": "integer", "description": "The Id.", "format": "int32" + }, + "concreteChild1Param": { + "type": "string", + "description": "The Concrete child 1 param." } } } ] }, - "ChildOfAbstract2": { + "ChildOfConcrete2": { "type": "object", - "description": "The type Child of abstract 2.", + "description": "The type Child of concrete 2.", "allOf": [ { - "$ref": "#/components/schemas/AbstractParent" + "$ref": "#/components/schemas/ConcreteParent" }, { "type": "object", "properties": { - "abstractChild2Param": { - "type": "string", - "description": "The Abstract child 2 param." - }, "id": { "type": "integer", "description": "The Id.", "format": "int32" + }, + "concreteChild2Param": { + "type": "string", + "description": "The Concrete child 2 param." } } } ] }, - "ChildOfConcrete1": { + "ConcreteParent": { + "required": [ + "type" + ], "type": "object", - "description": "The type Child of concrete 1.", + "properties": { + "id": { + "type": "integer", + "description": "The Id.", + "format": "int32" + }, + "type": { + "type": "string" + } + }, + "description": "The type Concrete parent.", + "discriminator": { + "propertyName": "type" + } + }, + "AbstractParent": { + "required": [ + "type" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The Id.", + "format": "int32" + }, + "type": { + "type": "string" + } + }, + "description": "The type Abstract parent.", + "discriminator": { + "propertyName": "type" + } + }, + "ChildOfAbstract1": { + "type": "object", + "description": "The type Child of abstract 1.", "allOf": [ { - "$ref": "#/components/schemas/ConcreteParent" + "$ref": "#/components/schemas/AbstractParent" }, { "type": "object", "properties": { - "concreteChild1Param": { - "type": "string", - "description": "The Concrete child 1 param." - }, "id": { "type": "integer", "description": "The Id.", "format": "int32" + }, + "abstrachChild1Param": { + "type": "string", + "description": "The Abstrach child 1 param." } } } ] }, - "ChildOfConcrete2": { + "ChildOfAbstract2": { "type": "object", - "description": "The type Child of concrete 2.", + "description": "The type Child of abstract 2.", "allOf": [ { - "$ref": "#/components/schemas/ConcreteParent" + "$ref": "#/components/schemas/AbstractParent" }, { "type": "object", "properties": { - "concreteChild2Param": { - "type": "string", - "description": "The Concrete child 2 param." - }, "id": { "type": "integer", "description": "The Id.", "format": "int32" + }, + "abstractChild2Param": { + "type": "string", + "description": "The Abstract child 2 param." } } } ] }, - "ConcreteParent": { - "required": [ - "type" - ], - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "The Id.", - "format": "int32" - }, - "type": { - "type": "string" - } - }, - "description": "The type Concrete parent.", - "discriminator": { - "propertyName": "type" - } - }, "Response": { "type": "object", "properties": { @@ -269,4 +271,4 @@ } } } -} \ No newline at end of file +} diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app121.json b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app121.json index 5af5df52e..c315da65e 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app121.json +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app121.json @@ -103,7 +103,7 @@ { "name": "nested.param1", "in": "query", - "description": "The Param 1.", + "description": "nested string parameter", "required": false, "schema": { "type": "string" @@ -112,7 +112,7 @@ { "name": "nested.param2", "in": "query", - "description": "The Param 2.", + "description": "nested BigInteger parameter", "required": false, "schema": { "type": "integer" @@ -213,4 +213,4 @@ } } } -} \ No newline at end of file +} diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app122.json b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app122.json index 809a45a51..a8e654275 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app122.json +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app122.json @@ -18,7 +18,7 @@ ], "summary": "create", "description": "Create response entity.", - "operationId": "create_1", + "operationId": "create", "requestBody": { "description": "the payload", "content": { diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app126.json b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app126.json index 60da48d1f..47ce6c5a7 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app126.json +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app126.json @@ -24,7 +24,7 @@ ], "summary": "getAllCurrencies", "description": "Get all currencies", - "operationId": "getAllCurrencies_1", + "operationId": "getAllCurrencies", "responses": { "401": { "$ref": "#/components/responses/http401NoToken" @@ -56,8 +56,8 @@ "properties": { "instance": { "type": "string", - "format": "uri", - "description": "An absolute URI that identifies the specific occurrence of the problem.\n It may or may not yield further information if dereferenced." + "description": "An absolute URI that identifies the specific occurrence of the problem.\n It may or may not yield further information if dereferenced.", + "format": "uri" }, "type": { "type": "string", @@ -75,14 +75,14 @@ "type": "string", "description": "A short, human-readable summary of the problem type. It SHOULD NOT\n change from occurrence to occurrence of the problem, except for\n purposes of localisation." }, + "detail": { + "type": "string", + "description": "A human readable explanation specific to this occurrence of the problem." + }, "status": { "type": "integer", "description": "The HTTP status code generated by the origin server for this\n occurrence of the problem.", "format": "int32" - }, - "detail": { - "type": "string", - "description": "A human readable explanation specific to this occurrence of the problem." } }, "description": "The interface Problem." @@ -121,4 +121,4 @@ } } } -} \ No newline at end of file +} diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app135.json b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app135.json index 64630fa3d..18ae19ca2 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app135.json +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app135.json @@ -101,7 +101,7 @@ ], "summary": "Find all list.", "description": "Find all list.", - "operationId": "findAll_1_3", + "operationId": "findAll_3", "responses": { "200": { "description": "the list", @@ -178,7 +178,7 @@ ], "summary": "Find all list.", "description": "Find all list.", - "operationId": "findAll_1_1", + "operationId": "findAll_1", "responses": { "200": { "description": "the list", @@ -255,7 +255,7 @@ ], "summary": "Find all list.", "description": "Find all list.", - "operationId": "findAll_1_4", + "operationId": "findAll_4", "responses": { "200": { "description": "the list", @@ -332,7 +332,7 @@ ], "summary": "Find all list.", "description": "Find all list.", - "operationId": "findAll_1_2", + "operationId": "findAll_2", "responses": { "200": { "description": "the list", @@ -425,4 +425,4 @@ } } } -} \ No newline at end of file +} diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app141.json b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app141.json index 0e3a6746a..8bacc7c24 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app141.json +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app141.json @@ -29,7 +29,7 @@ "200": { "description": "the list", "content": { - "application/xml": { + "application/json": { "schema": { "type": "array", "items": { @@ -37,7 +37,7 @@ } } }, - "application/json": { + "application/xml": { "schema": { "type": "array", "items": { @@ -73,7 +73,7 @@ "200": { "description": "the list", "content": { - "application/xml": { + "application/json": { "schema": { "type": "array", "items": { @@ -81,7 +81,7 @@ } } }, - "application/json": { + "application/xml": { "schema": { "type": "array", "items": { @@ -101,12 +101,12 @@ ], "summary": "Find all list.", "description": "Find all list.", - "operationId": "findAll_1_1", + "operationId": "findAll_1", "responses": { "200": { "description": "the list", "content": { - "application/xml": { + "application/json": { "schema": { "type": "array", "items": { @@ -114,7 +114,7 @@ } } }, - "application/json": { + "application/xml": { "schema": { "type": "array", "items": { @@ -178,12 +178,12 @@ ], "summary": "Find all list.", "description": "Find all list.", - "operationId": "findAll_1_2", + "operationId": "findAll_2", "responses": { "200": { "description": "the list", "content": { - "application/xml": { + "application/json": { "schema": { "type": "array", "items": { @@ -191,7 +191,7 @@ } } }, - "application/json": { + "application/xml": { "schema": { "type": "array", "items": { @@ -255,12 +255,12 @@ ], "summary": "Find all list.", "description": "Find all list.", - "operationId": "findAll_1_3", + "operationId": "findAll_3", "responses": { "200": { "description": "the list", "content": { - "application/xml": { + "application/json": { "schema": { "type": "array", "items": { @@ -268,7 +268,7 @@ } } }, - "application/json": { + "application/xml": { "schema": { "type": "array", "items": { @@ -332,12 +332,12 @@ ], "summary": "Find all list.", "description": "Find all list.", - "operationId": "findAll_1_4", + "operationId": "findAll_4", "responses": { "200": { "description": "the list", "content": { - "application/xml": { + "application/json": { "schema": { "type": "array", "items": { @@ -345,7 +345,7 @@ } } }, - "application/json": { + "application/xml": { "schema": { "type": "array", "items": { @@ -425,4 +425,4 @@ } } } -} \ No newline at end of file +} diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app161.json b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app161.json index 9c53f3193..9fcfff1a5 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app161.json +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app161.json @@ -95,7 +95,7 @@ ], "summary": "test", "description": "Test.", - "operationId": "test_1", + "operationId": "test", "requestBody": { "content": { "multipart/form-data": { diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app167.json b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app167.json index eeb1c3815..801fc0e3e 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app167.json +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app167.json @@ -33,7 +33,7 @@ "tags": [ "hello-controller" ], - "operationId": "process_3", + "operationId": "process_2", "responses": { "200": { "description": "OK" @@ -44,7 +44,7 @@ "tags": [ "hello-controller" ], - "operationId": "process_2", + "operationId": "process_1", "responses": { "200": { "description": "OK" @@ -55,7 +55,7 @@ "tags": [ "hello-controller" ], - "operationId": "process_5", + "operationId": "process_3", "responses": { "200": { "description": "OK" @@ -77,7 +77,7 @@ "tags": [ "hello-controller" ], - "operationId": "process_1", + "operationId": "process_5", "responses": { "200": { "description": "OK" @@ -98,4 +98,4 @@ } }, "components": {} -} \ No newline at end of file +} diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app174.json b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app174.json new file mode 100644 index 000000000..5347f1a59 --- /dev/null +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app174.json @@ -0,0 +1,122 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "OpenAPI definition", + "version": "v0" + }, + "servers": [ + { + "url": "http://localhost", + "description": "Generated server url" + } + ], + "tags": [ + { + "name": "example-controller", + "description": "The Example Controller" + } + ], + "paths": { + "/": { + "post": { + "tags": [ + "example-controller" + ], + "operationId": "post", + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Test" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "Question": { + "type": "object", + "properties": { + "question": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "description": "The type Question.", + "discriminator": { + "propertyName": "type" + } + }, + "Test": { + "type": "object", + "properties": { + "questions": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/TestQuestion" + }, + { + "$ref": "#/components/schemas/TextQuestion" + } + ] + } + } + }, + "description": "The type Test." + }, + "TestQuestion": { + "type": "object", + "description": "The type Test question.", + "allOf": [ + { + "$ref": "#/components/schemas/Question" + }, + { + "type": "object", + "properties": { + "variants": { + "type": "array", + "description": "list of variants", + "items": { + "type": "string" + } + }, + "answer": { + "type": "integer", + "description": "correct answer", + "format": "int32" + } + } + } + ] + }, + "TextQuestion": { + "type": "object", + "description": "The type Text question.", + "allOf": [ + { + "$ref": "#/components/schemas/Question" + }, + { + "type": "object", + "properties": { + "answer": { + "type": "string" + } + } + } + ] + } + } + } +} 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/app3.json b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app3.json index 4f219bdc2..1eaccb8db 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app3.json +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app3.json @@ -24,7 +24,7 @@ ], "summary": "Echo playing card.", "description": "Echo playing card.", - "operationId": "echo_1", + "operationId": "echo", "parameters": [ { "name": "toto", diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app37.json b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app37.json index 29db92173..81aaff378 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app37.json +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app37.json @@ -24,7 +24,7 @@ ], "summary": "Process car.", "description": "Process car.", - "operationId": "process_1_1", + "operationId": "process", "requestBody": { "description": "the c", "content": { @@ -166,4 +166,4 @@ } } } -} \ No newline at end of file +} 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-javadoc-tests/src/test/resources/results/app51.json b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app51.json index 038c2a74b..a48152f4d 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app51.json +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app51.json @@ -24,7 +24,7 @@ ], "summary": "Hello response entity.", "description": "Hello response entity.", - "operationId": "hello_1", + "operationId": "hello", "requestBody": { "description": "the map", "content": { diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app91.json b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app91.json index f3d2f44a4..107be9680 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app91.json +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app91.json @@ -24,7 +24,7 @@ ], "summary": "This API will return a random greeting.", "description": "Say hello response entity.", - "operationId": "sayHello_1", + "operationId": "sayHello", "responses": { "200": { "description": "the response entity", diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app93.json b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app93.json index 5509594a8..2634085eb 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app93.json +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/app93.json @@ -24,7 +24,7 @@ ], "summary": "Get t client model.", "description": "Get t client model.", - "operationId": "get_1", + "operationId": "get", "parameters": [ { "name": "param", 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..b00a52bb8 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.7.0 4.0.0 springdoc-openapi-kotlin-webflux-tests diff --git a/springdoc-openapi-tests/springdoc-openapi-kotlin-webflux-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java b/springdoc-openapi-tests/springdoc-openapi-kotlin-webflux-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java index cdbfd68fd..010552690 100644 --- a/springdoc-openapi-tests/springdoc-openapi-kotlin-webflux-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java +++ b/springdoc-openapi-tests/springdoc-openapi-kotlin-webflux-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java @@ -57,7 +57,7 @@ public static String getContent(String fileName) { } @Test - public void testApp() throws Exception { + void testApp() throws Exception { String result = null; try { EntityExchangeResult getResult = webTestClient.get().uri(Constants.DEFAULT_API_DOCS_URL).exchange() diff --git a/springdoc-openapi-tests/springdoc-openapi-kotlin-webflux-tests/src/test/java/test/org/springdoc/api/app21/SpringDocApp21Test.java b/springdoc-openapi-tests/springdoc-openapi-kotlin-webflux-tests/src/test/java/test/org/springdoc/api/app21/SpringDocApp21Test.java index 4340e6ee1..b5e473e96 100644 --- a/springdoc-openapi-tests/springdoc-openapi-kotlin-webflux-tests/src/test/java/test/org/springdoc/api/app21/SpringDocApp21Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-kotlin-webflux-tests/src/test/java/test/org/springdoc/api/app21/SpringDocApp21Test.java @@ -3,7 +3,7 @@ * * * * * * * * * - * * * * * Copyright 2019-2022 the original author or authors. + * * * * * 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. diff --git a/springdoc-openapi-tests/springdoc-openapi-kotlin-webflux-tests/src/test/kotlin/test/org/springdoc/api/app6/ByteArrayController.kt b/springdoc-openapi-tests/springdoc-openapi-kotlin-webflux-tests/src/test/kotlin/test/org/springdoc/api/app6/ByteArrayController.kt index f3de98487..584d2f3ed 100644 --- a/springdoc-openapi-tests/springdoc-openapi-kotlin-webflux-tests/src/test/kotlin/test/org/springdoc/api/app6/ByteArrayController.kt +++ b/springdoc-openapi-tests/springdoc-openapi-kotlin-webflux-tests/src/test/kotlin/test/org/springdoc/api/app6/ByteArrayController.kt @@ -1,6 +1,6 @@ /* * - * * Copyright 2019-2022 the original author or authors. + * * 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. @@ -18,11 +18,15 @@ package test.org.springdoc.api.app6 +import io.swagger.v3.oas.annotations.media.Schema import org.springframework.web.bind.annotation.GetMapping import org.springframework.web.bind.annotation.RequestMapping import org.springframework.web.bind.annotation.RestController -data class Foo(val data: ByteArray) +data class Foo( + @Schema(description = "Some description about a byte array.") + val data: ByteArray +) @RestController @RequestMapping("/bytearray") diff --git a/springdoc-openapi-tests/springdoc-openapi-kotlin-webflux-tests/src/test/resources/results/app6.json b/springdoc-openapi-tests/springdoc-openapi-kotlin-webflux-tests/src/test/resources/results/app6.json index 907da4426..dd4d0a41c 100644 --- a/springdoc-openapi-tests/springdoc-openapi-kotlin-webflux-tests/src/test/resources/results/app6.json +++ b/springdoc-openapi-tests/springdoc-openapi-kotlin-webflux-tests/src/test/resources/results/app6.json @@ -42,6 +42,7 @@ "properties": { "data": { "type": "string", + "description":"Some description about a byte array.", "format": "byte" } } 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..8e4d8077e 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.7.0 4.0.0 springdoc-openapi-kotlin-webmvc-tests @@ -78,6 +78,36 @@ + + org.apache.maven.plugins + maven-compiler-plugin + + + + default-compile + none + + + + default-testCompile + none + + + java-compile + compile + + compile + + + + java-test-compile + test-compile + + testCompile + + + + \ No newline at end of file diff --git a/springdoc-openapi-tests/springdoc-openapi-kotlin-webmvc-tests/src/test/java/test/org/springdoc/api/app12/EnumController.java b/springdoc-openapi-tests/springdoc-openapi-kotlin-webmvc-tests/src/test/java/test/org/springdoc/api/app12/EnumController.java new file mode 100644 index 000000000..7bdd2ffe2 --- /dev/null +++ b/springdoc-openapi-tests/springdoc-openapi-kotlin-webmvc-tests/src/test/java/test/org/springdoc/api/app12/EnumController.java @@ -0,0 +1,18 @@ +package test.org.springdoc.api.app12; + +import jakarta.annotation.Nullable; +import test.org.springdoc.api.app12.SpringDocApp12Test.MyEnum; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author bnasslahsen + */ +@RestController +public class EnumController { + @GetMapping("/test-enum-2") + String testEnum2(@Nullable MyEnum e) { + return ""; + } +} \ No newline at end of file diff --git a/springdoc-openapi-tests/springdoc-openapi-kotlin-webmvc-tests/src/test/kotlin/test/org/springdoc/api/app11/ExampleController.kt b/springdoc-openapi-tests/springdoc-openapi-kotlin-webmvc-tests/src/test/kotlin/test/org/springdoc/api/app11/ExampleController.kt index c6cc0a45d..79116e0b4 100644 --- a/springdoc-openapi-tests/springdoc-openapi-kotlin-webmvc-tests/src/test/kotlin/test/org/springdoc/api/app11/ExampleController.kt +++ b/springdoc-openapi-tests/springdoc-openapi-kotlin-webmvc-tests/src/test/kotlin/test/org/springdoc/api/app11/ExampleController.kt @@ -1,7 +1,9 @@ package test.org.springdoc.api.app11 import io.swagger.v3.oas.annotations.Operation +import io.swagger.v3.oas.annotations.media.Schema import org.springframework.web.bind.annotation.GetMapping +import org.springframework.web.bind.annotation.RequestBody import org.springframework.web.bind.annotation.RequestParam import org.springframework.web.bind.annotation.RestController @@ -20,11 +22,75 @@ class ExampleController { | 400 | STORE_NOT_FOUND |Store not found. | | | """ ) - @GetMapping("/foo/remove-kotlin-indent") + @GetMapping("/foo/trim-kotlin-indent") fun readFoo(@RequestParam name: String?) = FooResponse("Hello ${name ?: "world"}") } data class FooResponse( - private val name: String, -) \ No newline at end of file + val name: String, +) + +@RestController +class ExampleController2 { + + @GetMapping("/foo/trim-kotlin-indent/schema") + fun readFoo( + @RequestBody request: FooRequestWithSchema, + ) = FooResponseWithSchema( + name = "Hello ${request.age ?: "world"}", + subFoo = SubFooResponseWithSchema(subName = "sub foo name"), + ) +} + +@Schema( + name = "foo request", + description = """ + foo request class description + with kotlin indent + """ +) +data class FooRequestWithSchema( + @Schema( + name = "age", + description = """ + foo request field with kotlin indent + """ + ) + val age: Int, +) + +@Schema( + name = "foo response", + description = """ + foo response class description + with kotlin indent + """ +) +data class FooResponseWithSchema( + @Schema( + name = "name", + description = """ + foo response fields with kotlin indent + """ + ) + val name: String, + val subFoo: SubFooResponseWithSchema +) + +@Schema( + name = "sub foo response", + description = """ + sub foo response class description + with kotlin indent + """ +) +data class SubFooResponseWithSchema( + @Schema( + name = "subName", + description = """ + sub foo response fields with kotlin indent + """ + ) + val subName: String, +) diff --git a/springdoc-openapi-tests/springdoc-openapi-kotlin-webmvc-tests/src/test/kotlin/test/org/springdoc/api/app12/SpringDocApp12Test.kt b/springdoc-openapi-tests/springdoc-openapi-kotlin-webmvc-tests/src/test/kotlin/test/org/springdoc/api/app12/SpringDocApp12Test.kt new file mode 100644 index 000000000..f522f7de3 --- /dev/null +++ b/springdoc-openapi-tests/springdoc-openapi-kotlin-webmvc-tests/src/test/kotlin/test/org/springdoc/api/app12/SpringDocApp12Test.kt @@ -0,0 +1,35 @@ +/* + * + * * Copyright 2019-2023 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.app12 + +import org.springframework.boot.autoconfigure.SpringBootApplication +import org.springframework.context.annotation.ComponentScan +import test.org.springdoc.api.AbstractKotlinSpringDocMVCTest + +class SpringDocApp12Test : AbstractKotlinSpringDocMVCTest() { + + @SpringBootApplication + @ComponentScan(basePackages = ["org.springdoc", "test.org.springdoc.api.app12"]) + class DemoApplication + + enum class MyEnum { + A, B; + } + +} diff --git a/springdoc-openapi-tests/springdoc-openapi-kotlin-webmvc-tests/src/test/kotlin/test/org/springdoc/api/app6/ByteArrayController.kt b/springdoc-openapi-tests/springdoc-openapi-kotlin-webmvc-tests/src/test/kotlin/test/org/springdoc/api/app6/ByteArrayController.kt index f3de98487..78fda637e 100644 --- a/springdoc-openapi-tests/springdoc-openapi-kotlin-webmvc-tests/src/test/kotlin/test/org/springdoc/api/app6/ByteArrayController.kt +++ b/springdoc-openapi-tests/springdoc-openapi-kotlin-webmvc-tests/src/test/kotlin/test/org/springdoc/api/app6/ByteArrayController.kt @@ -1,6 +1,6 @@ /* * - * * Copyright 2019-2022 the original author or authors. + * * 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. diff --git a/springdoc-openapi-tests/springdoc-openapi-kotlin-webmvc-tests/src/test/resources/results/app11.json b/springdoc-openapi-tests/springdoc-openapi-kotlin-webmvc-tests/src/test/resources/results/app11.json index 13425c05a..a19d2fca6 100644 --- a/springdoc-openapi-tests/springdoc-openapi-kotlin-webmvc-tests/src/test/resources/results/app11.json +++ b/springdoc-openapi-tests/springdoc-openapi-kotlin-webmvc-tests/src/test/resources/results/app11.json @@ -11,7 +11,7 @@ } ], "paths": { - "/foo/remove-kotlin-indent": { + "/foo/trim-kotlin-indent": { "get": { "tags": [ "example-controller" @@ -42,18 +42,94 @@ } } } + }, + "/foo/trim-kotlin-indent/schema": { + "get": { + "tags": [ + "example-controller-2" + ], + "operationId": "readFoo_1", + "parameters": [ + { + "name": "request", + "in": "query", + "required": true, + "schema": { + "$ref": "#/components/schemas/foo request" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/foo response" + } + } + } + } + } + } } }, "components": { "schemas": { "FooResponse": { + "required": [ + "name" + ], "type": "object", "properties": { "name": { - "type": "string", - "writeOnly": true + "type": "string" } } + }, + "foo request": { + "required": [ + "age" + ], + "type": "object", + "properties": { + "age": { + "type": "integer", + "description": "\nfoo request field with kotlin indent\n", + "format": "int32" + } + }, + "description": "\nfoo request class description\nwith kotlin indent\n" + }, + "foo response": { + "required": [ + "name", + "subFoo" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "\nfoo response fields with kotlin indent\n" + }, + "subFoo": { + "$ref": "#/components/schemas/sub foo response" + } + }, + "description": "\nfoo response class description\nwith kotlin indent\n" + }, + "sub foo response": { + "required": [ + "subName" + ], + "type": "object", + "properties": { + "subName": { + "type": "string", + "description": "\nsub foo response fields with kotlin indent\n" + } + }, + "description": "\nsub foo response class description\nwith kotlin indent\n" } } } diff --git a/springdoc-openapi-tests/springdoc-openapi-kotlin-webmvc-tests/src/test/resources/results/app12.json b/springdoc-openapi-tests/springdoc-openapi-kotlin-webmvc-tests/src/test/resources/results/app12.json new file mode 100644 index 000000000..407e5620a --- /dev/null +++ b/springdoc-openapi-tests/springdoc-openapi-kotlin-webmvc-tests/src/test/resources/results/app12.json @@ -0,0 +1,50 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "OpenAPI definition", + "version": "v0" + }, + "servers": [ + { + "url": "http://localhost", + "description": "Generated server url" + } + ], + "paths": { + "/test-enum-2": { + "get": { + "tags": [ + "enum-controller" + ], + "operationId": "testEnum2", + "parameters": [ + { + "name": "e", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "A", + "B" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "string" + } + } + } + } + } + } + } + }, + "components": {} +} diff --git a/springdoc-openapi-tests/springdoc-openapi-security-tests/pom.xml b/springdoc-openapi-tests/springdoc-openapi-security-tests/pom.xml index 9beae556a..38d1a47eb 100644 --- a/springdoc-openapi-tests/springdoc-openapi-security-tests/pom.xml +++ b/springdoc-openapi-tests/springdoc-openapi-security-tests/pom.xml @@ -3,7 +3,7 @@ org.springdoc springdoc-openapi-tests - 2.5.0 + 2.7.0 springdoc-openapi-security-tests @@ -20,6 +20,11 @@ spring-security-config test + + org.springframework.security + spring-security-oauth2-client + test + jakarta.servlet jakarta.servlet-api @@ -31,16 +36,6 @@ ${project.version} test - - javax.xml - jaxb-impl - test - - - javax.jws - javax.jws-api - test - io.jsonwebtoken jjwt diff --git a/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java b/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java index e7101fdaf..ca3eec8b9 100644 --- a/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java +++ b/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java @@ -64,7 +64,7 @@ public static String getContent(String fileName) { } @Test - public void testApp() throws Exception { + void testApp() throws Exception { className = getClass().getSimpleName(); String testNumber = className.replaceAll("[^0-9]", ""); MvcResult mockMvcResult = mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)).andExpect(status().isOk()) diff --git a/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/java/test/org/springdoc/api/app1/HelloController.java b/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/java/test/org/springdoc/api/app1/HelloController.java index 8dbff03ac..063133377 100644 --- a/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/java/test/org/springdoc/api/app1/HelloController.java +++ b/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/java/test/org/springdoc/api/app1/HelloController.java @@ -20,6 +20,8 @@ import org.springframework.security.core.annotation.AuthenticationPrincipal; import org.springframework.security.core.userdetails.User; +import org.springframework.security.oauth2.client.OAuth2AuthorizedClient; +import org.springframework.security.oauth2.client.annotation.RegisteredOAuth2AuthorizedClient; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; @@ -38,4 +40,11 @@ public String personsWithUser(@RequestBody() Person person, return "OK"; } + @PostMapping(value = "/persons-with-oauth2-user") + public String personsWithUser(@RequestBody() Person person, + @RegisteredOAuth2AuthorizedClient OAuth2AuthorizedClient authorizedClient, + @AuthenticationPrincipal User user) { + return "OK"; + } + } \ No newline at end of file diff --git a/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/java/test/org/springdoc/api/app3/SpringOauth2Test.java b/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/java/test/org/springdoc/api/app3/SpringOauth2Test.java index 04d08e95a..210c3f908 100644 --- a/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/java/test/org/springdoc/api/app3/SpringOauth2Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/java/test/org/springdoc/api/app3/SpringOauth2Test.java @@ -31,7 +31,7 @@ public class SpringOauth2Test { .withUserConfiguration(TestApp.class); @Test - public void configurations_successfully_loaded() { + void configurations_successfully_loaded() { contextRunner .run(context -> assertThat(context) .hasNotFailed() diff --git a/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/java/test/org/springdoc/api/app7/AnotherPerson.java b/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/java/test/org/springdoc/api/app7/AnotherPerson.java index 160873143..c70e2a495 100644 --- a/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/java/test/org/springdoc/api/app7/AnotherPerson.java +++ b/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/java/test/org/springdoc/api/app7/AnotherPerson.java @@ -25,9 +25,6 @@ public class AnotherPerson { @Hidden private String name; - public AnotherPerson() { - } - public String getName() { return name; } diff --git a/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/java/test/org/springdoc/api/app9/SpringDocApp9Test.java b/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/java/test/org/springdoc/api/app9/SpringDocApp9Test.java index 608157ccf..bc0071734 100644 --- a/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/java/test/org/springdoc/api/app9/SpringDocApp9Test.java +++ b/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/java/test/org/springdoc/api/app9/SpringDocApp9Test.java @@ -30,7 +30,7 @@ @TestPropertySource(properties = { "springdoc.show-login-endpoint=true", "springdoc.enable-spring-security=false" }) public class SpringDocApp9Test extends AbstractSpringDocTest { - @SpringBootApplication(scanBasePackages = { "test.org.springdoc.api.configuration,test.org.springdoc.api.app9" }) + @SpringBootApplication(scanBasePackages = { "test.org.springdoc.api.configuration","test.org.springdoc.api.app9" }) static class SpringDocTestApp { @Bean public OpenAPI customOpenAPI() { diff --git a/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/java/test/org/springdoc/api/configuration/SecurityConfiguration.java b/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/java/test/org/springdoc/api/configuration/SecurityConfiguration.java index f2cf3d86e..6ffda6210 100644 --- a/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/java/test/org/springdoc/api/configuration/SecurityConfiguration.java +++ b/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/java/test/org/springdoc/api/configuration/SecurityConfiguration.java @@ -18,8 +18,10 @@ package test.org.springdoc.api.configuration; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Lazy; import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.config.annotation.authentication.configuration.AuthenticationConfiguration; import org.springframework.security.config.annotation.web.builders.HttpSecurity; @@ -27,9 +29,13 @@ @Configuration class SecurityConfiguration { + @Bean + @ConditionalOnMissingBean + @Lazy(false) public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { - http.authorizeRequests((requests) -> requests.requestMatchers("/").permitAll()); + http.securityMatcher("/**") + .authorizeHttpRequests((requests) -> requests.requestMatchers("/**").permitAll()); return http.build(); } diff --git a/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/resources/results/app1.json b/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/resources/results/app1.json index 0b91f6ec3..0260adb6d 100644 --- a/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/resources/results/app1.json +++ b/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/resources/results/app1.json @@ -74,6 +74,36 @@ } } } + }, + "/persons-with-oauth2-user": { + "post": { + "tags": [ + "hello-controller" + ], + "operationId": "personsWithUser_1", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Person" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "string" + } + } + } + } + } + } } }, "components": { diff --git a/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/resources/results/app10.json b/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/resources/results/app10.json index c53212833..c06487ef1 100644 --- a/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/resources/results/app10.json +++ b/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/resources/results/app10.json @@ -56,6 +56,9 @@ } } }, + "500": { + "description": "Internal Server Error" + }, "400": { "description": "Bad Request", "content": { @@ -65,6 +68,25 @@ } } } + } + } + } + }, + "/.well-known/oauth-authorization-server": { + "get": { + "tags": [ + "authorization-server-endpoints" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OAuth2AuthorizationServerMetadata" + } + } + } }, "500": { "description": "Internal Server Error" @@ -72,11 +94,22 @@ } } }, - "/.well-known/oauth-authorization-server": { + "/.well-known/oauth-authorization-server/{subpath}": { "get": { "tags": [ "authorization-server-endpoints" ], + "summary": "Valid when multiple issuers are allowed", + "parameters": [ + { + "name": "subpath", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", @@ -101,8 +134,11 @@ ], "parameters": [ { + "name": "Authorization", "in": "header", - "name": "Authorization" + "schema": { + "type": "string" + } } ], "requestBody": { @@ -165,6 +201,9 @@ } } }, + "500": { + "description": "Internal Server Error" + }, "400": { "description": "Bad Request", "content": { @@ -184,9 +223,6 @@ } } } - }, - "500": { - "description": "Internal Server Error" } } } @@ -215,15 +251,8 @@ "text/html": {} } }, - "302": { - "description": "Moved Temporarily", - "headers": { - "Location": { - "schema": { - "type": "string" - } - } - } + "500": { + "description": "Internal Server Error" }, "400": { "description": "Bad Request", @@ -235,8 +264,15 @@ } } }, - "500": { - "description": "Internal Server Error" + "302": { + "description": "Found", + "headers": { + "Location": { + "schema": { + "type": "string" + } + } + } } } } @@ -280,6 +316,9 @@ } } }, + "500": { + "description": "Internal Server Error" + }, "400": { "description": "Bad Request", "content": { @@ -289,9 +328,6 @@ } } } - }, - "500": { - "description": "Internal Server Error" } } } @@ -322,6 +358,9 @@ "200": { "description": "OK" }, + "500": { + "description": "Internal Server Error" + }, "400": { "description": "Bad Request", "content": { @@ -331,9 +370,6 @@ } } } - }, - "500": { - "description": "Internal Server Error" } } } @@ -358,21 +394,36 @@ "OAuth2AuthorizationServerMetadata": { "type": "object", "properties": { - "issuer": { - "type": "string" - }, - "token_endpoint_auth_methods_supported": { + "response_types_supported": { "type": "array", "items": { "type": "string" } }, - "revocation_endpoint_auth_methods_supported": { + "grant_types_supported": { "type": "array", "items": { "type": "string" } }, + "revocation_endpoint": { + "type": "string" + }, + "introspection_endpoint": { + "type": "string" + }, + "authorization_endpoint": { + "type": "string" + }, + "jwks_uri": { + "type": "string" + }, + "token_endpoint": { + "type": "string" + }, + "issuer": { + "type": "string" + }, "introspection_endpoint_auth_methods_supported": { "type": "array", "items": { @@ -385,32 +436,17 @@ "type": "string" } }, - "authorization_endpoint": { - "type": "string" - }, - "token_endpoint": { - "type": "string" - }, - "response_types_supported": { + "token_endpoint_auth_methods_supported": { "type": "array", "items": { "type": "string" } }, - "grant_types_supported": { + "revocation_endpoint_auth_methods_supported": { "type": "array", "items": { "type": "string" } - }, - "revocation_endpoint": { - "type": "string" - }, - "introspection_endpoint": { - "type": "string" - }, - "jwks_uri": { - "type": "string" } } }, @@ -420,17 +456,17 @@ "scope": { "type": "string" }, + "refresh_token": { + "type": "string" + }, "expires_in": { "type": "integer", "format": "int64" }, - "access_token": { - "type": "string" - }, - "refresh_token": { + "token_type": { "type": "string" }, - "token_type": { + "access_token": { "type": "string" } } @@ -438,26 +474,17 @@ "OAuth2TokenIntrospection": { "type": "object", "properties": { - "nbf": { - "type": "integer", - "format": "int64" - }, - "scope": { - "type": "string" - }, "jti": { "type": "string" }, - "client_id": { - "type": "string" - }, - "username": { + "scope": { "type": "string" }, - "active": { - "type": "boolean" + "iat": { + "type": "integer", + "format": "int64" }, - "iss": { + "token_type": { "type": "string" }, "aud": { @@ -466,19 +493,28 @@ "type": "string" } }, - "token_type": { + "client_id": { "type": "string" }, "exp": { "type": "integer", "format": "int64" }, + "iss": { + "type": "string" + }, + "username": { + "type": "string" + }, "sub": { "type": "string" }, - "iat": { + "nbf": { "type": "integer", "format": "int64" + }, + "active": { + "type": "boolean" } } } diff --git a/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/resources/results/app11.json b/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/resources/results/app11.json index 1f8119986..9e089d0ab 100644 --- a/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/resources/results/app11.json +++ b/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/resources/results/app11.json @@ -56,6 +56,9 @@ } } }, + "500": { + "description": "Internal Server Error" + }, "400": { "description": "Bad Request", "content": { @@ -65,6 +68,25 @@ } } } + } + } + } + }, + "/.well-known/oauth-authorization-server": { + "get": { + "tags": [ + "authorization-server-endpoints" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OAuth2AuthorizationServerMetadata" + } + } + } }, "500": { "description": "Internal Server Error" @@ -72,11 +94,22 @@ } } }, - "/.well-known/oauth-authorization-server": { + "/.well-known/oauth-authorization-server/{subpath}": { "get": { "tags": [ "authorization-server-endpoints" ], + "summary": "Valid when multiple issuers are allowed", + "parameters": [ + { + "name": "subpath", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", @@ -101,8 +134,11 @@ ], "parameters": [ { + "name": "Authorization", "in": "header", - "name": "Authorization" + "schema": { + "type": "string" + } } ], "requestBody": { @@ -165,6 +201,9 @@ } } }, + "500": { + "description": "Internal Server Error" + }, "400": { "description": "Bad Request", "content": { @@ -184,9 +223,6 @@ } } } - }, - "500": { - "description": "Internal Server Error" } } } @@ -215,15 +251,8 @@ "text/html": {} } }, - "302": { - "description": "Moved Temporarily", - "headers": { - "Location": { - "schema": { - "type": "string" - } - } - } + "500": { + "description": "Internal Server Error" }, "400": { "description": "Bad Request", @@ -235,8 +264,15 @@ } } }, - "500": { - "description": "Internal Server Error" + "302": { + "description": "Found", + "headers": { + "Location": { + "schema": { + "type": "string" + } + } + } } } } @@ -280,6 +316,9 @@ } } }, + "500": { + "description": "Internal Server Error" + }, "400": { "description": "Bad Request", "content": { @@ -289,9 +328,6 @@ } } } - }, - "500": { - "description": "Internal Server Error" } } } @@ -322,6 +358,9 @@ "200": { "description": "OK" }, + "500": { + "description": "Internal Server Error" + }, "400": { "description": "Bad Request", "content": { @@ -331,6 +370,25 @@ } } } + } + } + } + }, + "/.well-known/openid-configuration": { + "get": { + "tags": [ + "authorization-server-endpoints" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OidcProviderConfiguration" + } + } + } }, "500": { "description": "Internal Server Error" @@ -338,11 +396,22 @@ } } }, - "/.well-known/openid-configuration": { + "/{subpath}/.well-known/openid-configuration": { "get": { "tags": [ "authorization-server-endpoints" ], + "summary": "Valid when multiple issuers are allowed", + "parameters": [ + { + "name": "subpath", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", @@ -405,21 +474,36 @@ "OAuth2AuthorizationServerMetadata": { "type": "object", "properties": { - "issuer": { - "type": "string" - }, - "token_endpoint_auth_methods_supported": { + "response_types_supported": { "type": "array", "items": { "type": "string" } }, - "revocation_endpoint_auth_methods_supported": { + "grant_types_supported": { "type": "array", "items": { "type": "string" } }, + "revocation_endpoint": { + "type": "string" + }, + "introspection_endpoint": { + "type": "string" + }, + "authorization_endpoint": { + "type": "string" + }, + "jwks_uri": { + "type": "string" + }, + "token_endpoint": { + "type": "string" + }, + "issuer": { + "type": "string" + }, "introspection_endpoint_auth_methods_supported": { "type": "array", "items": { @@ -432,32 +516,17 @@ "type": "string" } }, - "authorization_endpoint": { - "type": "string" - }, - "token_endpoint": { - "type": "string" - }, - "response_types_supported": { + "token_endpoint_auth_methods_supported": { "type": "array", "items": { "type": "string" } }, - "grant_types_supported": { + "revocation_endpoint_auth_methods_supported": { "type": "array", "items": { "type": "string" } - }, - "revocation_endpoint": { - "type": "string" - }, - "introspection_endpoint": { - "type": "string" - }, - "jwks_uri": { - "type": "string" } } }, @@ -467,17 +536,17 @@ "scope": { "type": "string" }, + "refresh_token": { + "type": "string" + }, "expires_in": { "type": "integer", "format": "int64" }, - "access_token": { - "type": "string" - }, - "refresh_token": { + "token_type": { "type": "string" }, - "token_type": { + "access_token": { "type": "string" } } @@ -485,26 +554,17 @@ "OAuth2TokenIntrospection": { "type": "object", "properties": { - "nbf": { - "type": "integer", - "format": "int64" - }, - "scope": { - "type": "string" - }, "jti": { "type": "string" }, - "client_id": { - "type": "string" - }, - "username": { + "scope": { "type": "string" }, - "active": { - "type": "boolean" + "iat": { + "type": "integer", + "format": "int64" }, - "iss": { + "token_type": { "type": "string" }, "aud": { @@ -513,89 +573,98 @@ "type": "string" } }, - "token_type": { + "client_id": { "type": "string" }, "exp": { "type": "integer", "format": "int64" }, + "iss": { + "type": "string" + }, + "username": { + "type": "string" + }, "sub": { "type": "string" }, - "iat": { + "nbf": { "type": "integer", "format": "int64" + }, + "active": { + "type": "boolean" } } }, "OidcProviderConfiguration": { "type": "object", "properties": { - "token_endpoint_auth_methods_supported": { - "type": "array", - "items": { - "type": "string" - } - }, - "revocation_endpoint_auth_methods_supported": { - "type": "array", - "items": { - "type": "string" - } + "subject_types_supported": { + "type": "string" }, - "introspection_endpoint_auth_methods_supported": { + "response_types_supported": { "type": "array", "items": { "type": "string" } }, - "code_challenge_methods_supported": { + "grant_types_supported": { "type": "array", "items": { "type": "string" } }, - "id_token_signing_alg_values_supported": { + "revocation_endpoint": { "type": "string" }, - "authorization_endpoint": { + "introspection_endpoint": { "type": "string" }, - "token_endpoint": { + "authorization_endpoint": { "type": "string" }, "userinfo_endpoint": { "type": "string" }, - "subject_types_supported": { + "jwks_uri": { "type": "string" }, "scopes_supported": { "type": "string" }, - "response_types_supported": { + "token_endpoint": { + "type": "string" + }, + "issuer": { + "type": "string" + }, + "introspection_endpoint_auth_methods_supported": { "type": "array", "items": { "type": "string" } }, - "grant_types_supported": { + "code_challenge_methods_supported": { "type": "array", "items": { "type": "string" } }, - "revocation_endpoint": { - "type": "string" - }, - "introspection_endpoint": { - "type": "string" + "token_endpoint_auth_methods_supported": { + "type": "array", + "items": { + "type": "string" + } }, - "issuer": { - "type": "string" + "revocation_endpoint_auth_methods_supported": { + "type": "array", + "items": { + "type": "string" + } }, - "jwks_uri": { + "id_token_signing_alg_values_supported": { "type": "string" } } diff --git a/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/resources/results/app12.json b/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/resources/results/app12.json index 8925e7038..2acc281c9 100644 --- a/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/resources/results/app12.json +++ b/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/resources/results/app12.json @@ -56,6 +56,9 @@ } } }, + "500": { + "description": "Internal Server Error" + }, "400": { "description": "Bad Request", "content": { @@ -65,6 +68,25 @@ } } } + } + } + } + }, + "/.well-known/oauth-authorization-server": { + "get": { + "tags": [ + "authorization-server-endpoints" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OAuth2AuthorizationServerMetadata" + } + } + } }, "500": { "description": "Internal Server Error" @@ -72,11 +94,22 @@ } } }, - "/.well-known/oauth-authorization-server": { + "/.well-known/oauth-authorization-server/{subpath}": { "get": { "tags": [ "authorization-server-endpoints" ], + "summary": "Valid when multiple issuers are allowed", + "parameters": [ + { + "name": "subpath", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", @@ -101,8 +134,11 @@ ], "parameters": [ { + "name": "Authorization", "in": "header", - "name": "Authorization" + "schema": { + "type": "string" + } } ], "requestBody": { @@ -165,6 +201,9 @@ } } }, + "500": { + "description": "Internal Server Error" + }, "400": { "description": "Bad Request", "content": { @@ -184,9 +223,6 @@ } } } - }, - "500": { - "description": "Internal Server Error" } } } @@ -215,15 +251,8 @@ "text/html": {} } }, - "302": { - "description": "Moved Temporarily", - "headers": { - "Location": { - "schema": { - "type": "string" - } - } - } + "500": { + "description": "Internal Server Error" }, "400": { "description": "Bad Request", @@ -235,8 +264,15 @@ } } }, - "500": { - "description": "Internal Server Error" + "302": { + "description": "Found", + "headers": { + "Location": { + "schema": { + "type": "string" + } + } + } } } } @@ -280,6 +316,9 @@ } } }, + "500": { + "description": "Internal Server Error" + }, "400": { "description": "Bad Request", "content": { @@ -289,9 +328,6 @@ } } } - }, - "500": { - "description": "Internal Server Error" } } } @@ -322,6 +358,9 @@ "200": { "description": "OK" }, + "500": { + "description": "Internal Server Error" + }, "400": { "description": "Bad Request", "content": { @@ -331,6 +370,25 @@ } } } + } + } + } + }, + "/.well-known/openid-configuration": { + "get": { + "tags": [ + "authorization-server-endpoints" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OidcProviderConfiguration" + } + } + } }, "500": { "description": "Internal Server Error" @@ -338,11 +396,22 @@ } } }, - "/.well-known/openid-configuration": { + "/{subpath}/.well-known/openid-configuration": { "get": { "tags": [ "authorization-server-endpoints" ], + "summary": "Valid when multiple issuers are allowed", + "parameters": [ + { + "name": "subpath", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", @@ -393,7 +462,10 @@ "parameters": [ { "name": "Authorization", - "in": "header" + "in": "header", + "schema": { + "type": "string" + } } ], "requestBody": { @@ -416,6 +488,9 @@ } } }, + "500": { + "description": "Internal Server Error" + }, "400": { "description": "Bad Request", "content": { @@ -445,9 +520,6 @@ } } } - }, - "500": { - "description": "Internal Server Error" } } } @@ -472,21 +544,36 @@ "OAuth2AuthorizationServerMetadata": { "type": "object", "properties": { - "issuer": { - "type": "string" - }, - "token_endpoint_auth_methods_supported": { + "response_types_supported": { "type": "array", "items": { "type": "string" } }, - "revocation_endpoint_auth_methods_supported": { + "grant_types_supported": { "type": "array", "items": { "type": "string" } }, + "revocation_endpoint": { + "type": "string" + }, + "introspection_endpoint": { + "type": "string" + }, + "authorization_endpoint": { + "type": "string" + }, + "jwks_uri": { + "type": "string" + }, + "token_endpoint": { + "type": "string" + }, + "issuer": { + "type": "string" + }, "introspection_endpoint_auth_methods_supported": { "type": "array", "items": { @@ -499,32 +586,17 @@ "type": "string" } }, - "authorization_endpoint": { - "type": "string" - }, - "token_endpoint": { - "type": "string" - }, - "response_types_supported": { + "token_endpoint_auth_methods_supported": { "type": "array", "items": { "type": "string" } }, - "grant_types_supported": { + "revocation_endpoint_auth_methods_supported": { "type": "array", "items": { "type": "string" } - }, - "revocation_endpoint": { - "type": "string" - }, - "introspection_endpoint": { - "type": "string" - }, - "jwks_uri": { - "type": "string" } } }, @@ -534,17 +606,17 @@ "scope": { "type": "string" }, + "refresh_token": { + "type": "string" + }, "expires_in": { "type": "integer", "format": "int64" }, - "access_token": { - "type": "string" - }, - "refresh_token": { + "token_type": { "type": "string" }, - "token_type": { + "access_token": { "type": "string" } } @@ -552,26 +624,17 @@ "OAuth2TokenIntrospection": { "type": "object", "properties": { - "nbf": { - "type": "integer", - "format": "int64" - }, - "scope": { - "type": "string" - }, "jti": { "type": "string" }, - "client_id": { - "type": "string" - }, - "username": { + "scope": { "type": "string" }, - "active": { - "type": "boolean" + "iat": { + "type": "integer", + "format": "int64" }, - "iss": { + "token_type": { "type": "string" }, "aud": { @@ -580,89 +643,98 @@ "type": "string" } }, - "token_type": { + "client_id": { "type": "string" }, "exp": { "type": "integer", "format": "int64" }, + "iss": { + "type": "string" + }, + "username": { + "type": "string" + }, "sub": { "type": "string" }, - "iat": { + "nbf": { "type": "integer", "format": "int64" + }, + "active": { + "type": "boolean" } } }, "OidcProviderConfiguration": { "type": "object", "properties": { - "token_endpoint_auth_methods_supported": { - "type": "array", - "items": { - "type": "string" - } - }, - "revocation_endpoint_auth_methods_supported": { - "type": "array", - "items": { - "type": "string" - } + "subject_types_supported": { + "type": "string" }, - "introspection_endpoint_auth_methods_supported": { + "response_types_supported": { "type": "array", "items": { "type": "string" } }, - "code_challenge_methods_supported": { + "grant_types_supported": { "type": "array", "items": { "type": "string" } }, - "id_token_signing_alg_values_supported": { + "revocation_endpoint": { "type": "string" }, - "authorization_endpoint": { + "introspection_endpoint": { "type": "string" }, - "token_endpoint": { + "authorization_endpoint": { "type": "string" }, "userinfo_endpoint": { "type": "string" }, - "subject_types_supported": { + "jwks_uri": { "type": "string" }, "scopes_supported": { "type": "string" }, - "response_types_supported": { + "token_endpoint": { + "type": "string" + }, + "issuer": { + "type": "string" + }, + "introspection_endpoint_auth_methods_supported": { "type": "array", "items": { "type": "string" } }, - "grant_types_supported": { + "code_challenge_methods_supported": { "type": "array", "items": { "type": "string" } }, - "revocation_endpoint": { - "type": "string" - }, - "introspection_endpoint": { - "type": "string" + "token_endpoint_auth_methods_supported": { + "type": "array", + "items": { + "type": "string" + } }, - "issuer": { - "type": "string" + "revocation_endpoint_auth_methods_supported": { + "type": "array", + "items": { + "type": "string" + } }, - "jwks_uri": { + "id_token_signing_alg_values_supported": { "type": "string" } } @@ -670,60 +742,60 @@ "ClientRegistrationResponse": { "type": "object", "properties": { - "token_endpoint_auth_method": { + "registration_client_uri": { "type": "string" }, - "id_token_signed_response_alg": { - "type": "string" + "client_id_issued_at": { + "type": "integer", + "format": "int64" }, - "response_types": { + "redirect_uris": { "type": "array", "items": { "type": "string" } }, - "client_secret": { - "type": "string" - }, - "client_secret_expires_at": { - "type": "integer", - "format": "int64" - }, - "registration_access_token": { - "type": "string" - }, - "registration_client_uri": { - "type": "string" - }, - "client_id_issued_at": { - "type": "integer", - "format": "int64" + "grant_types": { + "type": "array", + "items": { + "type": "string" + } }, - "redirect_uris": { + "response_types": { "type": "array", "items": { "type": "string" } }, - "scope": { + "client_name": { + "type": "string" + }, + "jwks_uri": { "type": "string" }, "client_id": { "type": "string" }, + "client_secret": { + "type": "string" + }, + "scope": { + "type": "string" + }, "token_endpoint_auth_signing_alg": { "type": "string" }, - "grant_types": { - "type": "array", - "items": { - "type": "string" - } + "client_secret_expires_at": { + "type": "integer", + "format": "int64" }, - "jwks_uri": { + "registration_access_token": { "type": "string" }, - "client_name": { + "id_token_signed_response_alg": { + "type": "string" + }, + "token_endpoint_auth_method": { "type": "string" } } @@ -731,54 +803,54 @@ "ClientRegistrationRequest": { "type": "object", "properties": { - "token_endpoint_auth_method": { - "type": "string" - }, - "id_token_signed_response_alg": { - "type": "string" + "client_id_issued_at": { + "type": "string", + "format": "date-time" }, - "response_types": { + "redirect_uris": { "type": "array", "items": { "type": "string" } }, - "client_secret": { - "type": "string" - }, - "client_secret_expires_at": { - "type": "string", - "format": "date-time" - }, - "client_id_issued_at": { - "type": "string", - "format": "date-time" + "grant_types": { + "type": "array", + "items": { + "type": "string" + } }, - "redirect_uris": { + "response_types": { "type": "array", "items": { "type": "string" } }, - "scope": { + "client_name": { + "type": "string" + }, + "jwks_uri": { "type": "string" }, "client_id": { "type": "string" }, + "client_secret": { + "type": "string" + }, + "scope": { + "type": "string" + }, "token_endpoint_auth_signing_alg": { "type": "string" }, - "grant_types": { - "type": "array", - "items": { - "type": "string" - } + "client_secret_expires_at": { + "type": "string", + "format": "date-time" }, - "jwks_uri": { + "id_token_signed_response_alg": { "type": "string" }, - "client_name": { + "token_endpoint_auth_method": { "type": "string" } } diff --git a/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/resources/results/app5.json b/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/resources/results/app5.json index 50d96838a..13d4b5812 100644 --- a/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/resources/results/app5.json +++ b/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/resources/results/app5.json @@ -16,7 +16,7 @@ "tags": [ "hello-controller" ], - "operationId": "doGet_1", + "operationId": "doGet", "responses": { "200": { "description": "OK" @@ -27,7 +27,7 @@ "tags": [ "hello-controller" ], - "operationId": "doPost_1", + "operationId": "doPost", "responses": { "200": { "description": "OK", @@ -56,4 +56,3 @@ } } } - \ No newline at end of file diff --git a/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/resources/results/app6.json b/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/resources/results/app6.json index cc5cb4e77..458b70331 100644 --- a/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/resources/results/app6.json +++ b/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/resources/results/app6.json @@ -84,8 +84,8 @@ "200": { "description": "OK" }, - "403": { - "description": "Forbidden" + "401": { + "description": "Unauthorized" } } } diff --git a/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/resources/results/app8.json b/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/resources/results/app8.json index fa75f84cf..aac20cc7f 100644 --- a/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/resources/results/app8.json +++ b/springdoc-openapi-tests/springdoc-openapi-security-tests/src/test/resources/results/app8.json @@ -41,13 +41,12 @@ "200": { "description": "OK" }, - "403": { - "description": "Forbidden" + "401": { + "description": "Unauthorized" } } } } }, - "components": { - } -} + "components": {} +} \ No newline at end of file