@@ -18,16 +18,16 @@ public class OpenAPIConfiguration {
1818
1919 private static final String SCHEME = "Bearer" ;
2020
21- private final ConfigProperties configProperties ;
21+ private final ServiceConfig . Docs docs ;
2222
23- public OpenAPIConfiguration (ConfigProperties configProperties ) {
24- this .configProperties = configProperties ;
23+ public OpenAPIConfiguration (ServiceConfig serviceConfig ) {
24+ this .docs = serviceConfig . docs () ;
2525 }
2626
2727 @ Bean
2828 public OpenAPI customOpenAPI () {
2929 var openApi = new OpenAPI ()
30- .addServersItem (new Server ().url (configProperties . getUrl ()))
30+ .addServersItem (new Server ().url (docs . url ()))
3131 .info (getInfo ());
3232
3333 addSecurity (openApi );
@@ -36,23 +36,23 @@ public OpenAPI customOpenAPI() {
3636
3737 private Info getInfo () {
3838 return new Info ()
39- .title (configProperties . getTitle ())
40- .description (configProperties . getDescription ())
41- .version (configProperties . getVersion ())
39+ .title (docs . title ())
40+ .description (docs . description ())
41+ .version (docs . version ())
4242 .contact (getContact ())
4343 .license (getLicense ());
4444 }
4545
4646 private License getLicense () {
4747 return new License ()
48- .name (configProperties . getLicense ().getType ())
49- .url (configProperties . getLicense ().getUrl ());
48+ .name (docs . license ().type ())
49+ .url (docs . license ().url ());
5050 }
51-
51+
5252 private Contact getContact () {
5353 return new Contact ()
54- .name (configProperties . getContact ().getAuthor ())
55- .email (configProperties . getContact ().getEmail ());
54+ .name (docs . contact ().author ())
55+ .email (docs . contact ().email ());
5656 }
5757
5858 private void addSecurity (OpenAPI openApi ) {
0 commit comments