18
18
@ Configuration
19
19
@ ConfigurationProperties (prefix = "springdoc.swagger-ui" )
20
20
public class SwaggerUiConfigProperties {
21
+
22
+ public static final String CONFIG_URL_PROPERTY = "configUrl" ;
23
+ public static final String VALIDATOR_URL_PROPERTY = "validatorUrl" ;
24
+ public static final String URL_PROPERTY = "url" ;
25
+
21
26
/**
22
27
* The path for the Swagger UI pages to load. Will redirect to the springdoc.webjars.prefix property.
23
28
*/
@@ -31,6 +36,11 @@ public class SwaggerUiConfigProperties {
31
36
* URL to fetch external configuration document from.
32
37
*/
33
38
private String configUrl ;
39
+
40
+ /**
41
+ * URL to validate specs against.
42
+ */
43
+ private String validatorUrl ;
34
44
/**
35
45
* If set, enables filtering. The top bar will show an edit box that
36
46
* could be used to filter the tagged operations that are shown.
@@ -104,7 +114,8 @@ public class SwaggerUiConfigProperties {
104
114
public Map <String , String > getConfigParameters () {
105
115
final Map <String , String > params = new TreeMap <>();
106
116
put ("layout" , layout , params );
107
- put ("configUrl" , configUrl , params );
117
+ put (CONFIG_URL_PROPERTY , configUrl , params );
118
+ put (VALIDATOR_URL_PROPERTY , validatorUrl , params );
108
119
put ("filter" , filter , params );
109
120
put ("deepLinking" , this .deepLinking , params );
110
121
put ("displayOperationId" , displayOperationId , params );
@@ -142,6 +153,14 @@ protected void put(final String name, final String value, final Map<String, Stri
142
153
}
143
154
}
144
155
156
+ public String getValidatorUrl () {
157
+ return validatorUrl ;
158
+ }
159
+
160
+ public void setValidatorUrl (String validatorUrl ) {
161
+ this .validatorUrl = validatorUrl ;
162
+ }
163
+
145
164
public String getPath () {
146
165
return path ;
147
166
}
0 commit comments