Skip to content

Commit fc6d124

Browse files
committed
Swagger ui syntax highlighting configuration properties do not autocomplete. Fixes #948
1 parent 656d46d commit fc6d124

File tree

2 files changed

+54
-53
lines changed

2 files changed

+54
-53
lines changed

springdoc-openapi-common/src/main/java/org/springdoc/core/AbstractSwaggerUiConfigProperties.java

Lines changed: 3 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
import java.util.Objects;
2525
import java.util.Set;
2626

27+
import org.springdoc.core.SwaggerUiConfigProperties.SyntaxHighlight;
28+
2729
import static org.springdoc.core.Constants.GROUP_NAME_NOT_NULL;
2830

2931
/**
@@ -155,7 +157,7 @@ public abstract class AbstractSwaggerUiConfigProperties {
155157
/**
156158
* The Syntax highlight.
157159
*/
158-
protected SyntaxHighlight syntaxHighlight;
160+
protected SyntaxHighlight syntaxHighlight = new SyntaxHighlight();
159161

160162
/**
161163
* Gets syntax highlight.
@@ -590,58 +592,6 @@ public void setUrlsPrimaryName(String urlsPrimaryName) {
590592
this.urlsPrimaryName = urlsPrimaryName;
591593
}
592594

593-
/**
594-
* The type Syntax highlight.
595-
*/
596-
public static class SyntaxHighlight{
597-
598-
/**
599-
* The Activated.
600-
*/
601-
private Boolean activated;
602-
603-
/**
604-
* The Theme.
605-
*/
606-
private String theme;
607-
608-
/**
609-
* Gets activated.
610-
*
611-
* @return the activated
612-
*/
613-
public Boolean getActivated() {
614-
return activated;
615-
}
616-
617-
/**
618-
* Sets activated.
619-
*
620-
* @param activated the activated
621-
*/
622-
public void setActivated(Boolean activated) {
623-
this.activated = activated;
624-
}
625-
626-
/**
627-
* Gets theme.
628-
*
629-
* @return the theme
630-
*/
631-
public String getTheme() {
632-
return theme;
633-
}
634-
635-
/**
636-
* Sets theme.
637-
*
638-
* @param theme the theme
639-
*/
640-
public void setTheme(String theme) {
641-
this.theme = theme;
642-
}
643-
}
644-
645595
/**
646596
* The type Swagger url.
647597
*/

springdoc-openapi-common/src/main/java/org/springdoc/core/SwaggerUiConfigProperties.java

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,4 +239,55 @@ public boolean isCsrfEnabled(){
239239
return csrf.isEnabled();
240240
}
241241

242+
/**
243+
* The type Syntax highlight.
244+
*/
245+
public static class SyntaxHighlight{
246+
247+
/**
248+
* The Activated.
249+
*/
250+
private Boolean activated;
251+
252+
/**
253+
* The Theme.
254+
*/
255+
private String theme;
256+
257+
/**
258+
* Gets activated.
259+
*
260+
* @return the activated
261+
*/
262+
public Boolean getActivated() {
263+
return activated;
264+
}
265+
266+
/**
267+
* Sets activated.
268+
*
269+
* @param activated the activated
270+
*/
271+
public void setActivated(Boolean activated) {
272+
this.activated = activated;
273+
}
274+
275+
/**
276+
* Gets theme.
277+
*
278+
* @return the theme
279+
*/
280+
public String getTheme() {
281+
return theme;
282+
}
283+
284+
/**
285+
* Sets theme.
286+
*
287+
* @param theme the theme
288+
*/
289+
public void setTheme(String theme) {
290+
this.theme = theme;
291+
}
292+
}
242293
}

0 commit comments

Comments
 (0)