类的使用
springfox.documentation.spring.web.plugins.Docket
使用Docket的程序包
-
springfox.documentation.spring.web.plugins中Docket的使用
修饰符和类型方法说明Docket.additionalModels(com.fasterxml.classmate.ResolvedType first, com.fasterxml.classmate.ResolvedType... remaining) Method to add additional models that are not part of any annotation or are perhaps implicitDocket.alternateTypeRules(AlternateTypeRule... alternateTypeRules) Adds model substitution rules (alternateTypeRules)Docket.apiDescriptionOrdering(com.google.common.collect.Ordering<ApiDescription> apiDescriptionOrdering) Controls howio.swagger.model.ApiDescription's are ordered.Sets the api's meta information as included in the json ResourceListing response.Docket.apiListingReferenceOrdering(com.google.common.collect.Ordering<ApiListingReference> apiListingReferenceOrdering) Controls how ApiListingReference's are sorted.ApiSelectorBuilder.build()Docket.directModelSubstitute(Class clazz, Class with) Directly substitutes a model class with the supplied substitute e.gdirectModelSubstitute(LocalDate.class, Date.class)would substitute LocalDate with DateDocket.enable(boolean externallyConfiguredFlag) Hook to externally control auto initialization of this swagger plugin instance.Docket.enableUrlTemplating(boolean enabled) Decides whether to use url templating for paths.Docket.extensions(List<VendorExtension> vendorExtensions) Add to the api's vendor extensionsDocket.forCodeGeneration(boolean forCodeGen) Set this to true in order to make the documentation code generation friendlyDocket.genericModelSubstitutes(Class... genericClasses) Substitutes each generic class with it's direct parameterized type.Docket.globalOperationParameters(List<Parameter> operationParameters) Adds default parameters which will be applied to all operations.Docket.globalResponseMessage(org.springframework.web.bind.annotation.RequestMethod requestMethod, List<ResponseMessage> responseMessages) Overrides the default http response messages at the http request method level.If more than one instance of Docket exists, each one must have a unique groupName as supplied by this method.Docket.ignoredParameterTypes(Class... classes) Adds ignored controller method parameter types so that the framework does not generate swagger model or parameter information for these specific types.Docket.operationOrdering(com.google.common.collect.Ordering<Operation> operationOrdering) Provide an ordering schema for operations NOTE: @see #732 in case you're wondering why specifying position might not work.Docket.pathMapping(String path) Extensibility mechanism to add a servlet path mapping, if there is one, to the apis base path.Docket.pathProvider(springfox.documentation.PathProvider pathProvider) Determines the generated, swagger specific, urls.Docket.securityContexts(List<SecurityContext> securityContexts) Configures which api operations (via regex patterns) and HTTP methods to apply security contexts to apis.Docket.securitySchemes(List<? extends SecurityScheme> securitySchemes) Configures the global io.swagger.model.SecurityScheme's applicable to all or some of the api operations.Method to add global tags to the docketDocket.useDefaultResponseMessages(boolean apply) Allows ignoring predefined response message defaults