forked from loafle/openapi-generator-original
fix python flask controller without tag (default_controller)
This commit is contained in:
parent
40a1879797
commit
4a74e788ec
@ -145,10 +145,6 @@ public class FlaskConnexionCodegen extends DefaultCodegen implements CodegenConf
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!new java.io.File(controllerPackage + File.separator + defaultController + ".py").exists()) {
|
if(!new java.io.File(controllerPackage + File.separator + defaultController + ".py").exists()) {
|
||||||
//supportingFiles.add(new SupportingFile("controller.mustache",
|
|
||||||
// controllerPackage,
|
|
||||||
// defaultController + ".py")
|
|
||||||
//);
|
|
||||||
supportingFiles.add(new SupportingFile("__init__.mustache",
|
supportingFiles.add(new SupportingFile("__init__.mustache",
|
||||||
controllerPackage,
|
controllerPackage,
|
||||||
"__init__.py")
|
"__init__.py")
|
||||||
@ -269,7 +265,7 @@ public class FlaskConnexionCodegen extends DefaultCodegen implements CodegenConf
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// no tag found, use "default_controller" as the default
|
// no tag found, use "default_controller" as the default
|
||||||
String tag = "default_controller";
|
String tag = "default";
|
||||||
operation.setTags(Arrays.asList(tag));
|
operation.setTags(Arrays.asList(tag));
|
||||||
controllerName = tag + "_controller";
|
controllerName = tag + "_controller";
|
||||||
}
|
}
|
||||||
|
@ -644,6 +644,8 @@ definitions:
|
|||||||
complete:
|
complete:
|
||||||
type: "boolean"
|
type: "boolean"
|
||||||
default: false
|
default: false
|
||||||
|
title: "Pet Order"
|
||||||
|
description: "An order for a pets from the pet store"
|
||||||
xml:
|
xml:
|
||||||
name: "Order"
|
name: "Order"
|
||||||
Category:
|
Category:
|
||||||
@ -654,6 +656,8 @@ definitions:
|
|||||||
format: "int64"
|
format: "int64"
|
||||||
name:
|
name:
|
||||||
type: "string"
|
type: "string"
|
||||||
|
title: "Pet catehgry"
|
||||||
|
description: "A category for a pet"
|
||||||
xml:
|
xml:
|
||||||
name: "Category"
|
name: "Category"
|
||||||
User:
|
User:
|
||||||
@ -678,6 +682,8 @@ definitions:
|
|||||||
type: "integer"
|
type: "integer"
|
||||||
format: "int32"
|
format: "int32"
|
||||||
description: "User Status"
|
description: "User Status"
|
||||||
|
title: "a User"
|
||||||
|
description: "A User who is purchasing from the pet store"
|
||||||
xml:
|
xml:
|
||||||
name: "User"
|
name: "User"
|
||||||
Tag:
|
Tag:
|
||||||
@ -688,6 +694,8 @@ definitions:
|
|||||||
format: "int64"
|
format: "int64"
|
||||||
name:
|
name:
|
||||||
type: "string"
|
type: "string"
|
||||||
|
title: "Pet Tag"
|
||||||
|
description: "A tag for a pet"
|
||||||
xml:
|
xml:
|
||||||
name: "Tag"
|
name: "Tag"
|
||||||
Pet:
|
Pet:
|
||||||
@ -725,6 +733,8 @@ definitions:
|
|||||||
- "available"
|
- "available"
|
||||||
- "pending"
|
- "pending"
|
||||||
- "sold"
|
- "sold"
|
||||||
|
title: "a Pet"
|
||||||
|
description: "A pet for sale in the pet store"
|
||||||
xml:
|
xml:
|
||||||
name: "Pet"
|
name: "Pet"
|
||||||
ApiResponse:
|
ApiResponse:
|
||||||
@ -737,6 +747,8 @@ definitions:
|
|||||||
type: "string"
|
type: "string"
|
||||||
message:
|
message:
|
||||||
type: "string"
|
type: "string"
|
||||||
|
title: "An uploaded response"
|
||||||
|
description: "Describes the result of uploading an image resource"
|
||||||
externalDocs:
|
externalDocs:
|
||||||
description: "Find out more about Swagger"
|
description: "Find out more about Swagger"
|
||||||
url: "http://swagger.io"
|
url: "http://swagger.io"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user