|
60 | 60 | import io.swagger.v3.oas.models.security.Scopes; |
61 | 61 | import io.swagger.v3.oas.models.servers.ServerVariables; |
62 | 62 |
|
63 | | -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
| 63 | +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; |
64 | 64 | import org.springframework.context.annotation.Configuration; |
65 | 65 | import org.springframework.context.annotation.PropertySource; |
66 | 66 | import org.springframework.nativex.hint.AccessBits; |
67 | 67 | import org.springframework.nativex.hint.ProxyHint; |
68 | 68 | import org.springframework.nativex.hint.ResourceHint; |
69 | 69 | import org.springframework.nativex.hint.TypeHint; |
70 | 70 |
|
71 | | -import static org.springdoc.core.Constants.SPRINGDOC_ENABLE_NATIVE_IMAGE_SUPPORT; |
| 71 | +import static org.springdoc.core.Constants.SPRING_NATIVE_LISTENER; |
72 | 72 |
|
73 | 73 | @ProxyHint(typeNames = "javax.servlet.http.HttpServletRequest") |
74 | | - |
75 | 74 | @ProxyHint(typeNames = { "org.springframework.web.bind.annotation.RestController", "org.springframework.core.annotation.SynthesizedAnnotation" }) |
76 | 75 | @ProxyHint(typeNames = { "org.springframework.stereotype.Controller", "org.springframework.core.annotation.SynthesizedAnnotation" }) |
77 | 76 | @ProxyHint(typeNames = { "org.springframework.web.bind.annotation.SessionAttribute", "org.springframework.core.annotation.SynthesizedAnnotation" }) |
|
87 | 86 | @ProxyHint(typeNames = { "org.springframework.web.bind.annotation.PatchMapping", "org.springframework.core.annotation.SynthesizedAnnotation" }) |
88 | 87 | @ProxyHint(typeNames = { "org.springframework.web.bind.annotation.DeleteMapping", "org.springframework.core.annotation.SynthesizedAnnotation" }) |
89 | 88 | @ProxyHint(typeNames = { "org.springframework.web.bind.annotation.ControllerAdvice", "org.springframework.core.annotation.SynthesizedAnnotation" }) |
90 | | -@ProxyHint(typeNames = {"org.springframework.web.bind.annotation.RequestParam", "org.springframework.core.annotation.SynthesizedAnnotation"}) |
91 | | -@ProxyHint(typeNames = {"org.springframework.web.bind.annotation.RequestHeader", "org.springframework.core.annotation.SynthesizedAnnotation"}) |
92 | | -@ProxyHint(typeNames = {"org.springframework.web.bind.annotation.RequestBody", "org.springframework.core.annotation.SynthesizedAnnotation"}) |
93 | | -@ProxyHint(typeNames = {"org.springframework.web.bind.annotation.PathVariable", "org.springframework.core.annotation.SynthesizedAnnotation"}) |
94 | | -@ProxyHint(typeNames = {"org.springframework.web.bind.annotation.ModelAttribute", "org.springframework.core.annotation.SynthesizedAnnotation"}) |
95 | | -@ProxyHint(typeNames = {"org.springframework.stereotype.Controller", "org.springframework.core.annotation.SynthesizedAnnotation"}) |
96 | | -@ProxyHint(typeNames = {"org.springframework.web.bind.annotation.ControllerAdvice", "org.springframework.core.annotation.SynthesizedAnnotation"}) |
| 89 | +@ProxyHint(typeNames = { "org.springframework.web.bind.annotation.RequestParam", "org.springframework.core.annotation.SynthesizedAnnotation" }) |
| 90 | +@ProxyHint(typeNames = { "org.springframework.web.bind.annotation.RequestHeader", "org.springframework.core.annotation.SynthesizedAnnotation" }) |
| 91 | +@ProxyHint(typeNames = { "org.springframework.web.bind.annotation.RequestBody", "org.springframework.core.annotation.SynthesizedAnnotation" }) |
| 92 | +@ProxyHint(typeNames = { "org.springframework.web.bind.annotation.PathVariable", "org.springframework.core.annotation.SynthesizedAnnotation" }) |
| 93 | +@ProxyHint(typeNames = { "org.springframework.web.bind.annotation.ModelAttribute", "org.springframework.core.annotation.SynthesizedAnnotation" }) |
| 94 | +@ProxyHint(typeNames = { "org.springframework.stereotype.Controller", "org.springframework.core.annotation.SynthesizedAnnotation" }) |
| 95 | +@ProxyHint(typeNames = { "org.springframework.web.bind.annotation.ControllerAdvice", "org.springframework.core.annotation.SynthesizedAnnotation" }) |
97 | 96 |
|
98 | 97 | @TypeHint(typeNames = { "org.springdoc.core.CacheOrGroupedOpenApiCondition$OnCacheDisabled", "io.swagger.v3.oas.models.parameters.Parameter$StyleEnum", |
99 | | - "io.swagger.v3.oas.models.security.SecurityScheme$In" , "io.swagger.v3.oas.models.security.SecurityScheme$Type", |
| 98 | + "io.swagger.v3.oas.models.security.SecurityScheme$In", "io.swagger.v3.oas.models.security.SecurityScheme$Type", |
100 | 99 | "org.springdoc.core.CacheOrGroupedOpenApiCondition$OnMultipleOpenApiSupportCondition" }, access = AccessBits.ALL) |
101 | | - |
102 | | -@TypeHint(types = { Constants.class, ModelConverter.class , ModelConverters.class}) |
| 100 | +@TypeHint(types = { Constants.class, ModelConverter.class, ModelConverters.class }) |
103 | 101 | @TypeHint(types = { SecurityRequirements.class, SecurityRequirement.class, ApiResponses.class, Callbacks.class, PropertySource.class, ExternalDocumentation.class, Hidden.class, |
104 | 102 | Operation.class, Parameter.class, Callbacks.class, Extension.class, ExtensionProperty.class, Header.class, Link.class, LinkParameter.class, |
105 | 103 | ArraySchema.class, Content.class, DiscriminatorMapping.class, Encoding.class, ExampleObject.class, Schema.class, RequestBody.class, ApiResponse.class, |
106 | | - Info.class, Server.class, ServerVariable.class, OpenAPIDefinition.class, Tag.class, SecuritySchemes.class, SecurityScheme.class, SecuritySchemeType.class, |
| 104 | + Info.class, Server.class, ServerVariable.class, OpenAPIDefinition.class, Tag.class, SecuritySchemes.class, SecurityScheme.class, SecuritySchemeType.class, |
107 | 105 | OAuthFlow.class, OAuthFlows.class, OAuthScope.class }) |
108 | | - |
109 | 106 | @TypeHint(types = { |
110 | 107 | SpecFilter.class, |
111 | 108 | MediaType.class, |
|
153 | 150 | }) |
154 | 151 |
|
155 | 152 | @ResourceHint(patterns = "springdoc.swagger-ui.config") |
| 153 | + |
156 | 154 | @Configuration(proxyBeanMethods = false) |
157 | | -@ConditionalOnProperty(name = SPRINGDOC_ENABLE_NATIVE_IMAGE_SUPPORT, havingValue = "true") |
| 155 | +@ConditionalOnClass(name = SPRING_NATIVE_LISTENER) |
158 | 156 | public class SpringDocHints {} |
0 commit comments