package Ġcom . ton y . swagger . config Ċ Ċ import Ġcom . github . xiao ymin . knife 4 j . spring . annotations . Enable Kn ife 4 j Ċ import Ġcom . github . xiao ymin . knife 4 j . spring . extension . Open Api Extension Resolver Ċ import Ġorg . springframework . boot . context . properties . Configuration Properties Ċ import Ġorg . springframework . boot . context . properties . Constructor Binding Ċ import Ġorg . springframework . boot . context . properties . Enable Configuration Properties Ċ import Ġorg . springframework . context . annotation . Bean Ċ import Ġorg . springframework . context . annotation . Configuration Ċ import Ġorg . springframework . context . annotation . Import Ċ import Ġspring fox . bean . validators . configuration . Bean Validator Plugins Configuration Ċ import Ġspring fox . documentation . RequestHandler Ċ import Ġspring fox . documentation . builders . Api Info Builder Ċ import Ġspring fox . documentation . builders . Path Selectors Ċ import Ġspring fox . documentation . service . Contact Ċ import Ġspring fox . documentation . spi . Documentation Type Ċ import Ġspring fox . documentation . spring . web . plugins . D ocket Ċ import Ġspring fox . documentation . swagger 2 . annotations . Enable Swagger 2 Web Mvc Ċ import Ġjava . util . function . Predicate Ċ Ċ @ Configuration Ċ @ Enable Swagger 2 Web Mvc Ċ @ Enable Kn ife 4 j Ċ @ Import ( Bean Validator Plugins Configuration :: class ) Ċ @ Enable Configuration Properties ( Swagger Properties :: class ) Ċ internal Ġclass ĠSwagger Config ( ĊĠĠĠ Ġprivate Ġval Ġswagger Properties : ĠSwagger Properties , ĊĠĠĠ Ġprivate Ġval Ġopen Api Extension Resolver : ĠOpen Api Extension Resolver Ċ ) Ġ{ ĊĊĠĠĠ Ġprivate Ġfun Ġapi Info () Ġ= ĠApi Info Builder () ĊĠĠĠĠĠĠĠ Ġ. contact ( swagger Properties . contact ) ĊĠĠĠĠĠĠĠ Ġ. title ( swagger Properties . title ) ĊĠĠĠĠĠĠĠ Ġ. version ( swagger Properties . version ) ĊĠĠĠĠĠĠĠ Ġ. description ( swagger Properties . description ) ĊĠĠĠĠĠĠĠ Ġ. build () ĊĊĠĠĠ Ġ@ Bean ĊĠĠĠ Ġfun Ġdo cket (): ĠD ocket Ġ= ĠD ocket ( Documentation Type . SW AG GER _ 2 ) ĊĠĠĠĠĠĠĠ Ġ. use Default Response Messages ( false ) ĊĠĠĠĠĠĠĠ Ġ. api Info ( api Info ()) ĊĠĠĠĠĠĠĠ Ġ. select () ĊĠĠĠĠĠĠĠ Ġ. apis ( base Packages ( swagger Properties . base Packages )) ĊĠĠĠĠĠĠĠ Ġ. paths ( Path Selectors . any ()) ĊĠĠĠĠĠĠĠ Ġ. build () ĊĠĠĠĠĠĠĠ Ġ. extensions ( open Api Extension Resolver . build Extensions ( null )) ĊĊĠĠĠ Ġprivate Ġfun Ġbase Packages ( base Packages : ĠArray < String >): ĠPredicate < RequestHandler > Ġ= ĠPredicate Ġ{ Ġinput Ġ-> ĊĠĠĠĠĠĠĠ Ġbase Packages . any Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Suppress (" DE PREC ATION ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġinput . decl aring Class (). packageName . startsWith ( it ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ } Ċ Ċ @ Suppress (" Array In Data Class ") Ċ @ Constructor Binding Ċ @ Configuration Properties ( prefix Ġ= Ġ" swagger ") Ċ internal Ġdata Ġclass ĠSwagger Properties ( ĊĠĠĠ Ġval Ġtitle : ĠString Ġ= Ġ" T ony - Api ", ĊĠĠĠ Ġval Ġversion : ĠString Ġ= Ġ" 1 . 0 ", ĊĠĠĠ Ġval Ġdescription : ĠString Ġ= Ġ"", ĊĠĠĠ Ġval Ġcontact : ĠContact Ġ= ĠContact ("", Ġ"", Ġ""), ĊĠĠĠ Ġval Ġbase Packages : ĠArray < String > Ġ= ĠarrayOf () Ċ ) Ċ