This repository was archived by the owner on Sep 10, 2019. It is now read-only.
File tree Expand file tree Collapse file tree
src/main/java/com/wordnik/swagger/codegen/plugin Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -90,6 +90,8 @@ public class CodeGenMojo extends AbstractMojo {
9090 public void execute () throws MojoExecutionException {
9191 Swagger swagger = new SwaggerParser ().read (inputSpec );
9292
93+ swagger .getDefinitions ().remove ("Filter" );
94+
9395 CodegenConfig config = forName (language );
9496 config .setOutputDir (output .getAbsolutePath ());
9597
@@ -122,17 +124,21 @@ private void applyConfigFileSettings(final CodegenConfig config) {
122124 }
123125
124126 private CodegenConfig forName (String name ) {
127+ System .out .println ("0=====search config:" + name );
125128 ServiceLoader <CodegenConfig > loader = ServiceLoader .load (CodegenConfig .class );
126129 for (CodegenConfig config : loader ) {
127130 if (config .getName ().equals (name )) {
131+ System .out .println ("1=====found config:" + config );
128132 return config ;
129133 }
130134 }
131135
132136 // else try to load directly
133137 try {
138+ System .out .println ("2=====search config by class:" + name );
134139 return (CodegenConfig ) Class .forName (name ).newInstance ();
135140 } catch (Exception e ) {
141+ System .out .println ("3=====config not found:" + name );
136142 throw new RuntimeException ("Can't load config class with name " .concat (name ), e );
137143 }
138144 }
You can’t perform that action at this time.
0 commit comments