|
2 | 2 |
|
3 | 3 | import java.lang.reflect.Field; |
4 | 4 |
|
| 5 | +import io.swagger.v3.core.util.AnnotationsUtils; |
5 | 6 | import io.swagger.v3.oas.annotations.enums.ParameterIn; |
6 | 7 | import io.swagger.v3.oas.models.OpenAPI; |
7 | 8 | import io.swagger.v3.oas.models.Operation; |
@@ -125,7 +126,7 @@ private void getOAuth2TokenIntrospectionEndpointFilter(OpenAPI openAPI, Security |
125 | 126 | new SpringDocSecurityOAuth2EndpointUtils(OAuth2TokenIntrospectionEndpointFilter.class).findEndpoint(securityFilterChain); |
126 | 127 | if (oAuth2EndpointFilter != null) { |
127 | 128 | ApiResponses apiResponses = new ApiResponses(); |
128 | | - buildApiResponsesOnSuccess(apiResponses, SpringDocAnnotationsUtils.resolveSchemaFromType(SpringDocOAuth2TokenIntrospection.class, openAPI.getComponents(), null)); |
| 129 | + buildApiResponsesOnSuccess(apiResponses, AnnotationsUtils.resolveSchemaFromType(SpringDocOAuth2TokenIntrospection.class, openAPI.getComponents(), null)); |
129 | 130 | buildApiResponsesOnInternalServerError(apiResponses); |
130 | 131 | buildApiResponsesOnBadRequest(apiResponses, openAPI); |
131 | 132 |
|
@@ -153,7 +154,7 @@ private void getOAuth2AuthorizationServerMetadataEndpoint(OpenAPI openAPI, Secur |
153 | 154 | new SpringDocSecurityOAuth2EndpointUtils(OAuth2AuthorizationServerMetadataEndpointFilter.class).findEndpoint(securityFilterChain); |
154 | 155 | if (oAuth2EndpointFilter != null) { |
155 | 156 | ApiResponses apiResponses = new ApiResponses(); |
156 | | - buildApiResponsesOnSuccess(apiResponses, SpringDocAnnotationsUtils.resolveSchemaFromType(SpringDocOAuth2AuthorizationServerMetadata.class, openAPI.getComponents(), null)); |
| 157 | + buildApiResponsesOnSuccess(apiResponses, AnnotationsUtils.resolveSchemaFromType(SpringDocOAuth2AuthorizationServerMetadata.class, openAPI.getComponents(), null)); |
157 | 158 | buildApiResponsesOnInternalServerError(apiResponses); |
158 | 159 | Operation operation = buildOperation(apiResponses); |
159 | 160 | buildPath(oAuth2EndpointFilter, "requestMatcher", openAPI, operation, HttpMethod.GET); |
@@ -199,7 +200,7 @@ private void getOAuth2TokenEndpoint(OpenAPI openAPI, SecurityFilterChain securit |
199 | 200 |
|
200 | 201 | if (oAuth2EndpointFilter != null) { |
201 | 202 | ApiResponses apiResponses = new ApiResponses(); |
202 | | - buildApiResponsesOnSuccess(apiResponses, SpringDocAnnotationsUtils.resolveSchemaFromType(SpringDocOAuth2Token.class, openAPI.getComponents(), null)); |
| 203 | + buildApiResponsesOnSuccess(apiResponses, AnnotationsUtils.resolveSchemaFromType(SpringDocOAuth2Token.class, openAPI.getComponents(), null)); |
203 | 204 | buildApiResponsesOnInternalServerError(apiResponses); |
204 | 205 | buildApiResponsesOnBadRequest(apiResponses, openAPI); |
205 | 206 | buildOAuth2Error(openAPI, apiResponses, HttpStatus.UNAUTHORIZED); |
@@ -317,7 +318,7 @@ private ApiResponses buildApiResponsesOnBadRequest(ApiResponses apiResponses, Op |
317 | 318 | * @param httpStatus the http status |
318 | 319 | */ |
319 | 320 | 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); |
321 | 322 | apiResponses.addApiResponse(String.valueOf(httpStatus.value()), new ApiResponse().description(httpStatus.getReasonPhrase()).content(new Content().addMediaType( |
322 | 323 | APPLICATION_JSON_VALUE, |
323 | 324 | new MediaType().schema(oAuth2ErrorSchema)))); |
|
0 commit comments