|
| 1 | +package org.springdoc.core; |
| 2 | + |
| 3 | +import io.swagger.v3.core.converter.ModelConverter; |
| 4 | +import io.swagger.v3.core.converter.ModelConverters; |
| 5 | +import io.swagger.v3.core.filter.SpecFilter; |
| 6 | +import io.swagger.v3.core.jackson.ApiResponsesSerializer; |
| 7 | +import io.swagger.v3.core.jackson.PathsSerializer; |
| 8 | +import io.swagger.v3.core.jackson.mixin.ComponentsMixin; |
| 9 | +import io.swagger.v3.core.jackson.mixin.ExtensionsMixin; |
| 10 | +import io.swagger.v3.core.jackson.mixin.OpenAPIMixin; |
| 11 | +import io.swagger.v3.core.jackson.mixin.OperationMixin; |
| 12 | +import io.swagger.v3.core.jackson.mixin.SchemaMixin; |
| 13 | +import io.swagger.v3.oas.annotations.ExternalDocumentation; |
| 14 | +import io.swagger.v3.oas.annotations.Hidden; |
| 15 | +import io.swagger.v3.oas.annotations.OpenAPIDefinition; |
| 16 | +import io.swagger.v3.oas.annotations.Operation; |
| 17 | +import io.swagger.v3.oas.annotations.Parameter; |
| 18 | +import io.swagger.v3.oas.annotations.callbacks.Callbacks; |
| 19 | +import io.swagger.v3.oas.annotations.enums.SecuritySchemeType; |
| 20 | +import io.swagger.v3.oas.annotations.extensions.Extension; |
| 21 | +import io.swagger.v3.oas.annotations.extensions.ExtensionProperty; |
| 22 | +import io.swagger.v3.oas.annotations.headers.Header; |
| 23 | +import io.swagger.v3.oas.annotations.info.Info; |
| 24 | +import io.swagger.v3.oas.annotations.links.Link; |
| 25 | +import io.swagger.v3.oas.annotations.links.LinkParameter; |
| 26 | +import io.swagger.v3.oas.annotations.media.ArraySchema; |
| 27 | +import io.swagger.v3.oas.annotations.media.Content; |
| 28 | +import io.swagger.v3.oas.annotations.media.DiscriminatorMapping; |
| 29 | +import io.swagger.v3.oas.annotations.media.Encoding; |
| 30 | +import io.swagger.v3.oas.annotations.media.ExampleObject; |
| 31 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 32 | +import io.swagger.v3.oas.annotations.parameters.RequestBody; |
| 33 | +import io.swagger.v3.oas.annotations.responses.ApiResponse; |
| 34 | +import io.swagger.v3.oas.annotations.responses.ApiResponses; |
| 35 | +import io.swagger.v3.oas.annotations.security.OAuthFlow; |
| 36 | +import io.swagger.v3.oas.annotations.security.OAuthFlows; |
| 37 | +import io.swagger.v3.oas.annotations.security.OAuthScope; |
| 38 | +import io.swagger.v3.oas.annotations.security.SecurityRequirement; |
| 39 | +import io.swagger.v3.oas.annotations.security.SecurityRequirements; |
| 40 | +import io.swagger.v3.oas.annotations.security.SecurityScheme; |
| 41 | +import io.swagger.v3.oas.annotations.security.SecuritySchemes; |
| 42 | +import io.swagger.v3.oas.annotations.servers.Server; |
| 43 | +import io.swagger.v3.oas.annotations.servers.ServerVariable; |
| 44 | +import io.swagger.v3.oas.annotations.tags.Tag; |
| 45 | +import io.swagger.v3.oas.models.Components; |
| 46 | +import io.swagger.v3.oas.models.OpenAPI; |
| 47 | +import io.swagger.v3.oas.models.PathItem; |
| 48 | +import io.swagger.v3.oas.models.Paths; |
| 49 | +import io.swagger.v3.oas.models.media.BooleanSchema; |
| 50 | +import io.swagger.v3.oas.models.media.DateTimeSchema; |
| 51 | +import io.swagger.v3.oas.models.media.Discriminator; |
| 52 | +import io.swagger.v3.oas.models.media.FileSchema; |
| 53 | +import io.swagger.v3.oas.models.media.IntegerSchema; |
| 54 | +import io.swagger.v3.oas.models.media.MapSchema; |
| 55 | +import io.swagger.v3.oas.models.media.MediaType; |
| 56 | +import io.swagger.v3.oas.models.media.ObjectSchema; |
| 57 | +import io.swagger.v3.oas.models.media.StringSchema; |
| 58 | +import io.swagger.v3.oas.models.media.UUIDSchema; |
| 59 | +import io.swagger.v3.oas.models.media.XML; |
| 60 | +import io.swagger.v3.oas.models.security.Scopes; |
| 61 | +import io.swagger.v3.oas.models.servers.ServerVariables; |
| 62 | + |
| 63 | +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
| 64 | +import org.springframework.context.annotation.Configuration; |
| 65 | +import org.springframework.context.annotation.PropertySource; |
| 66 | +import org.springframework.nativex.hint.AccessBits; |
| 67 | +import org.springframework.nativex.hint.ProxyHint; |
| 68 | +import org.springframework.nativex.hint.ResourceHint; |
| 69 | +import org.springframework.nativex.hint.TypeHint; |
| 70 | + |
| 71 | +import static org.springdoc.core.Constants.SPRINGDOC_ENABLE_NATIVE_IMAGE_SUPPORT; |
| 72 | + |
| 73 | +@ProxyHint(typeNames = "javax.servlet.http.HttpServletRequest") |
| 74 | + |
| 75 | +@ProxyHint(typeNames = { "org.springframework.web.bind.annotation.RestController", "org.springframework.core.annotation.SynthesizedAnnotation" }) |
| 76 | +@ProxyHint(typeNames = { "org.springframework.stereotype.Controller", "org.springframework.core.annotation.SynthesizedAnnotation" }) |
| 77 | +@ProxyHint(typeNames = { "org.springframework.web.bind.annotation.SessionAttribute", "org.springframework.core.annotation.SynthesizedAnnotation" }) |
| 78 | +@ProxyHint(typeNames = { "org.springframework.web.bind.annotation.RestControllerAdvice", "org.springframework.core.annotation.SynthesizedAnnotation" }) |
| 79 | +@ProxyHint(typeNames = { "org.springframework.web.bind.annotation.ResponseStatus", "org.springframework.core.annotation.SynthesizedAnnotation" }) |
| 80 | +@ProxyHint(typeNames = { "org.springframework.web.bind.annotation.ResponseBody", "org.springframework.core.annotation.SynthesizedAnnotation" }) |
| 81 | +@ProxyHint(typeNames = { "org.springframework.web.bind.annotation.RequestPart", "org.springframework.core.annotation.SynthesizedAnnotation" }) |
| 82 | +@ProxyHint(typeNames = { "org.springframework.web.bind.annotation.RequestPart", "org.springframework.core.annotation.SynthesizedAnnotation" }) |
| 83 | +@ProxyHint(typeNames = { "org.springframework.web.bind.annotation.RequestMapping", "org.springframework.core.annotation.SynthesizedAnnotation" }) |
| 84 | +@ProxyHint(typeNames = { "org.springframework.web.bind.annotation.GetMapping", "org.springframework.core.annotation.SynthesizedAnnotation" }) |
| 85 | +@ProxyHint(typeNames = { "org.springframework.web.bind.annotation.PostMapping", "org.springframework.core.annotation.SynthesizedAnnotation" }) |
| 86 | +@ProxyHint(typeNames = { "org.springframework.web.bind.annotation.PutMapping", "org.springframework.core.annotation.SynthesizedAnnotation" }) |
| 87 | +@ProxyHint(typeNames = { "org.springframework.web.bind.annotation.PatchMapping", "org.springframework.core.annotation.SynthesizedAnnotation" }) |
| 88 | +@ProxyHint(typeNames = { "org.springframework.web.bind.annotation.DeleteMapping", "org.springframework.core.annotation.SynthesizedAnnotation" }) |
| 89 | +@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"}) |
| 97 | + |
| 98 | +@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", |
| 100 | + "org.springdoc.core.CacheOrGroupedOpenApiCondition$OnMultipleOpenApiSupportCondition" }, access = AccessBits.ALL) |
| 101 | + |
| 102 | +@TypeHint(types = { Constants.class, ModelConverter.class , ModelConverters.class}) |
| 103 | +@TypeHint(types = { SecurityRequirements.class, SecurityRequirement.class, ApiResponses.class, Callbacks.class, PropertySource.class, ExternalDocumentation.class, Hidden.class, |
| 104 | + Operation.class, Parameter.class, Callbacks.class, Extension.class, ExtensionProperty.class, Header.class, Link.class, LinkParameter.class, |
| 105 | + 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, |
| 107 | + OAuthFlow.class, OAuthFlows.class, OAuthScope.class }) |
| 108 | + |
| 109 | +@TypeHint(types = { |
| 110 | + SpecFilter.class, |
| 111 | + MediaType.class, |
| 112 | + ApiResponsesSerializer.class, |
| 113 | + PathsSerializer.class, |
| 114 | + ComponentsMixin.class, |
| 115 | + ExtensionsMixin.class, |
| 116 | + OpenAPIMixin.class, |
| 117 | + OperationMixin.class, |
| 118 | + SchemaMixin.class, |
| 119 | + Paths.class, |
| 120 | + XML.class, |
| 121 | + UUIDSchema.class, |
| 122 | + PathItem.class, |
| 123 | + ServerVariables.class, |
| 124 | + OpenAPI.class, |
| 125 | + Components.class, |
| 126 | + StringSchema.class, |
| 127 | + DateTimeSchema.class, |
| 128 | + Discriminator.class, |
| 129 | + BooleanSchema.class, |
| 130 | + FileSchema.class, |
| 131 | + IntegerSchema.class, |
| 132 | + MapSchema.class, |
| 133 | + ObjectSchema.class, |
| 134 | + Scopes.class, |
| 135 | + io.swagger.v3.oas.models.security.OAuthFlow.class, io.swagger.v3.oas.models.security.OAuthFlows.class, |
| 136 | + io.swagger.v3.oas.models.security.SecurityScheme.class, |
| 137 | + io.swagger.v3.oas.models.tags.Tag.class, |
| 138 | + io.swagger.v3.oas.models.servers.ServerVariable.class, |
| 139 | + io.swagger.v3.oas.models.servers.Server.class, |
| 140 | + io.swagger.v3.oas.models.security.SecurityRequirement.class, |
| 141 | + io.swagger.v3.oas.models.info.Info.class, |
| 142 | + io.swagger.v3.oas.models.parameters.RequestBody.class, |
| 143 | + io.swagger.v3.oas.models.media.Schema.class, |
| 144 | + io.swagger.v3.oas.models.media.Content.class, |
| 145 | + io.swagger.v3.oas.models.media.ArraySchema.class, |
| 146 | + io.swagger.v3.oas.models.responses.ApiResponse.class, |
| 147 | + io.swagger.v3.oas.models.responses.ApiResponses.class, |
| 148 | + io.swagger.v3.oas.models.ExternalDocumentation.class, |
| 149 | + io.swagger.v3.oas.models.links.LinkParameter.class, |
| 150 | + io.swagger.v3.oas.models.links.Link.class, |
| 151 | + io.swagger.v3.oas.models.parameters.Parameter.class, |
| 152 | + io.swagger.v3.oas.models.Operation.class, |
| 153 | +}) |
| 154 | + |
| 155 | +@ResourceHint(patterns = "springdoc.swagger-ui.config") |
| 156 | +@Configuration(proxyBeanMethods = false) |
| 157 | +@ConditionalOnProperty(name = SPRINGDOC_ENABLE_NATIVE_IMAGE_SUPPORT, havingValue = "true") |
| 158 | +public class SpringDocHints {} |
0 commit comments