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