@@ -83,9 +83,9 @@ public void execute() throws MojoExecutionException, MojoFailureException {
83
83
OpenApiContext context = builder .buildContext (true );
84
84
OpenAPI openAPI = context .read ();
85
85
86
- if (StringUtils .isNotBlank (filterClass )) {
86
+ if (StringUtils .isNotBlank (config . getFilterClass () )) {
87
87
try {
88
- OpenAPISpecFilter filterImpl = (OpenAPISpecFilter ) this .getClass ().getClassLoader ().loadClass (filterClass ).newInstance ();
88
+ OpenAPISpecFilter filterImpl = (OpenAPISpecFilter ) this .getClass ().getClassLoader ().loadClass (config . getFilterClass () ).newInstance ();
89
89
SpecFilter f = new SpecFilter ();
90
90
openAPI = f .filter (openAPI , filterImpl , new HashMap <>(), new HashMap <>(),
91
91
new HashMap <>());
@@ -98,14 +98,14 @@ public void execute() throws MojoExecutionException, MojoFailureException {
98
98
String openapiJson = null ;
99
99
String openapiYaml = null ;
100
100
if (Format .JSON .equals (outputFormat ) || Format .JSONANDYAML .equals (outputFormat )) {
101
- if (prettyPrint != null && prettyPrint ) {
101
+ if (config . isPrettyPrint () != null && config . isPrettyPrint () ) {
102
102
openapiJson = context .getOutputJsonMapper ().writer (new DefaultPrettyPrinter ()).writeValueAsString (openAPI );
103
103
} else {
104
104
openapiJson = context .getOutputJsonMapper ().writeValueAsString (openAPI );
105
105
}
106
106
}
107
107
if (Format .YAML .equals (outputFormat ) || Format .JSONANDYAML .equals (outputFormat )) {
108
- if (prettyPrint != null && prettyPrint ) {
108
+ if (config . isPrettyPrint () != null && config . isPrettyPrint () ) {
109
109
openapiYaml = context .getOutputYamlMapper ().writer (new DefaultPrettyPrinter ()).writeValueAsString (openAPI );
110
110
} else {
111
111
openapiYaml = context .getOutputYamlMapper ().writeValueAsString (openAPI );
0 commit comments