Skip to content

Commit e7d3a79

Browse files
committed
CHANGELOG.md prepare for version 2.1.0
1 parent 576c00e commit e7d3a79

File tree

4 files changed

+38
-6
lines changed

4 files changed

+38
-6
lines changed

CHANGELOG.md

+32
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,38 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.1.0] - 2023-04-01
9+
10+
### Added
11+
12+
- #2152 - Detect directions in default sort values
13+
- #2167 #2166 - Add request parameter for token endpoint
14+
- #2188 - Support of {*param} path patterns
15+
16+
### Changed
17+
18+
- Upgrade spring-boot to 3.0.5
19+
- Upgrade swagger-core to 2.2.9
20+
- Upgrade swagger-ui to 4.18.2
21+
- Spring Native is now superseded by Spring Boot 3 official
22+
- #2173 - Remove webjars-locator-core
23+
24+
### Fixed
25+
26+
- #2122 - Super tiny fix typo
27+
- #2131 - Fixed a bug that javadoc of record class parameters was not recognized.
28+
- #2140 - Javadoc record class parameters not recognized
29+
- #2123 #2141 - fix spring authorization server response.
30+
- #2148 - Fix properties show-oauth2-endpoints and SpringDocConfigProperties#showOauth2Endpoint properties name mismatch
31+
- #2149 - Request parameters with default values are marked as required.
32+
- #2155 - openApi.getServers() is null in OpenApiCustomiser when using different locales.
33+
- #2152 - Redundant(wrong) direction appended to @PageableDefault.
34+
- #2181 #2183 - Fixed DefaultFlatParamObject to work with annotated parameters.
35+
- #2170 #2187 - All request parameters marked as required for Java controllers in mixed projects in 2.0.3
36+
- #2165 - Custom Converters are not excluded if not registered for Http Message Converter.
37+
- #2185 - Fix behaviour of required flag for schema class fields.
38+
- #2139 - SpringDocSecurityConfiguration class not sufficiently constrained.
39+
- #2142 - SpringDocJacksonModuleConfiguration is loaded even though there is no ObjectMapperProvider when springdoc.api-docs.enabled = false.
840

941
## [2.0.4] - 2023-03-15
1042

springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocSecurityOAuth2Customizer.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import java.lang.reflect.Field;
44

5+
import io.swagger.v3.core.util.AnnotationsUtils;
56
import io.swagger.v3.oas.annotations.enums.ParameterIn;
67
import io.swagger.v3.oas.models.OpenAPI;
78
import io.swagger.v3.oas.models.Operation;
@@ -125,7 +126,7 @@ private void getOAuth2TokenIntrospectionEndpointFilter(OpenAPI openAPI, Security
125126
new SpringDocSecurityOAuth2EndpointUtils(OAuth2TokenIntrospectionEndpointFilter.class).findEndpoint(securityFilterChain);
126127
if (oAuth2EndpointFilter != null) {
127128
ApiResponses apiResponses = new ApiResponses();
128-
buildApiResponsesOnSuccess(apiResponses, SpringDocAnnotationsUtils.resolveSchemaFromType(SpringDocOAuth2TokenIntrospection.class, openAPI.getComponents(), null));
129+
buildApiResponsesOnSuccess(apiResponses, AnnotationsUtils.resolveSchemaFromType(SpringDocOAuth2TokenIntrospection.class, openAPI.getComponents(), null));
129130
buildApiResponsesOnInternalServerError(apiResponses);
130131
buildApiResponsesOnBadRequest(apiResponses, openAPI);
131132

@@ -153,7 +154,7 @@ private void getOAuth2AuthorizationServerMetadataEndpoint(OpenAPI openAPI, Secur
153154
new SpringDocSecurityOAuth2EndpointUtils(OAuth2AuthorizationServerMetadataEndpointFilter.class).findEndpoint(securityFilterChain);
154155
if (oAuth2EndpointFilter != null) {
155156
ApiResponses apiResponses = new ApiResponses();
156-
buildApiResponsesOnSuccess(apiResponses, SpringDocAnnotationsUtils.resolveSchemaFromType(SpringDocOAuth2AuthorizationServerMetadata.class, openAPI.getComponents(), null));
157+
buildApiResponsesOnSuccess(apiResponses, AnnotationsUtils.resolveSchemaFromType(SpringDocOAuth2AuthorizationServerMetadata.class, openAPI.getComponents(), null));
157158
buildApiResponsesOnInternalServerError(apiResponses);
158159
Operation operation = buildOperation(apiResponses);
159160
buildPath(oAuth2EndpointFilter, "requestMatcher", openAPI, operation, HttpMethod.GET);
@@ -199,7 +200,7 @@ private void getOAuth2TokenEndpoint(OpenAPI openAPI, SecurityFilterChain securit
199200

200201
if (oAuth2EndpointFilter != null) {
201202
ApiResponses apiResponses = new ApiResponses();
202-
buildApiResponsesOnSuccess(apiResponses, SpringDocAnnotationsUtils.resolveSchemaFromType(SpringDocOAuth2Token.class, openAPI.getComponents(), null));
203+
buildApiResponsesOnSuccess(apiResponses, AnnotationsUtils.resolveSchemaFromType(SpringDocOAuth2Token.class, openAPI.getComponents(), null));
203204
buildApiResponsesOnInternalServerError(apiResponses);
204205
buildApiResponsesOnBadRequest(apiResponses, openAPI);
205206
buildOAuth2Error(openAPI, apiResponses, HttpStatus.UNAUTHORIZED);
@@ -317,7 +318,7 @@ private ApiResponses buildApiResponsesOnBadRequest(ApiResponses apiResponses, Op
317318
* @param httpStatus the http status
318319
*/
319320
private static void buildOAuth2Error(OpenAPI openAPI, ApiResponses apiResponses, HttpStatus httpStatus) {
320-
Schema oAuth2ErrorSchema = SpringDocAnnotationsUtils.resolveSchemaFromType(OAuth2Error.class, openAPI.getComponents(), null);
321+
Schema oAuth2ErrorSchema = AnnotationsUtils.resolveSchemaFromType(OAuth2Error.class, openAPI.getComponents(), null);
321322
apiResponses.addApiResponse(String.valueOf(httpStatus.value()), new ApiResponse().description(httpStatus.getReasonPhrase()).content(new Content().addMediaType(
322323
APPLICATION_JSON_VALUE,
323324
new MediaType().schema(oAuth2ErrorSchema))));

springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/SpringDocJavadocProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public String getClassJavadoc(Class<?> cl) {
7676
public Map<String, String> getRecordClassParamJavadoc(Class<?> cl) {
7777
ClassJavadoc classJavadoc = RuntimeJavadoc.getJavadoc(cl);
7878
return classJavadoc.getRecordComponents().stream()
79-
.collect(Collectors.toMap(ParamJavadoc::getName, record -> formatter.format(record.getComment())));
79+
.collect(Collectors.toMap(ParamJavadoc::getName, recordClass -> formatter.format(recordClass.getComment())));
8080
}
8181

8282
/**

springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/AbstractRequestService.java

-1
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,6 @@ public Parameter buildParams(ParameterInfo parameterInfo, Components components,
516516
// By default
517517
if (!isRequestBodyParam(requestMethod, parameterInfo, openApiVersion)) {
518518
parameterInfo.setRequired(!((DelegatingMethodParameter) methodParameter).isNotRequired() && !methodParameter.isOptional());
519-
//parameterInfo.setParamType(QUERY_PARAM);
520519
parameterInfo.setDefaultValue(null);
521520
return this.buildParam(parameterInfo, components, jsonView);
522521
}

0 commit comments

Comments
 (0)