forked from loafle/openapi-generator-original
Merge branch 'tiffanyperumpail-develop_2.0' into develop_2.0
This commit is contained in:
commit
3390fae15b
@ -1,8 +1,11 @@
|
||||
package io.swagger.codegen;
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.capitalize;
|
||||
import static org.apache.commons.lang3.StringUtils.isNotEmpty;
|
||||
|
||||
import com.samskivert.mustache.Mustache;
|
||||
import com.samskivert.mustache.Template;
|
||||
|
||||
import io.swagger.codegen.languages.CodeGenStatus;
|
||||
import io.swagger.models.ComposedModel;
|
||||
import io.swagger.models.Contact;
|
||||
import io.swagger.models.Info;
|
||||
@ -15,7 +18,6 @@ import io.swagger.models.auth.OAuth2Definition;
|
||||
import io.swagger.models.auth.SecuritySchemeDefinition;
|
||||
import io.swagger.models.parameters.Parameter;
|
||||
import io.swagger.util.Json;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
@ -36,14 +38,13 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.capitalize;
|
||||
import static org.apache.commons.lang3.StringUtils.isNotEmpty;
|
||||
|
||||
public class DefaultGenerator extends AbstractGenerator implements Generator {
|
||||
protected CodegenConfig config;
|
||||
protected ClientOptInput opts = null;
|
||||
protected Swagger swagger = null;
|
||||
|
||||
public CodeGenStatus status = CodeGenStatus.UNRUN;
|
||||
|
||||
public Generator opts(ClientOptInput opts) {
|
||||
this.opts = opts;
|
||||
|
||||
@ -315,8 +316,10 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
|
||||
}
|
||||
|
||||
config.processSwagger(swagger);
|
||||
|
||||
status = CodeGenStatus.SUCCESSFUL;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
status = CodeGenStatus.FAILED;
|
||||
}
|
||||
return files;
|
||||
}
|
||||
|
@ -0,0 +1,5 @@
|
||||
package io.swagger.codegen.languages;
|
||||
|
||||
public enum CodeGenStatus {
|
||||
UNRUN, SUCCESSFUL, FAILED
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user