mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-08 19:33:55 +00:00
update tests
This commit is contained in:
parent
8e15bd6a85
commit
bd5eb7ace3
@ -41,6 +41,8 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
apiTemplateFiles.put("api.mustache", ".php");
|
||||
templateDir = "php";
|
||||
|
||||
setNamespacesFromPackages();
|
||||
|
||||
reservedWords = new HashSet<String>(
|
||||
Arrays.asList(
|
||||
"__halt_compiler", "abstract", "and", "array", "as", "break", "callable", "case", "catch", "class", "clone", "const", "continue", "declare", "default", "die", "do", "echo", "else", "elseif", "empty", "enddeclare", "endfor", "endforeach", "endif", "endswitch", "endwhile", "eval", "exit", "extends", "final", "for", "foreach", "function", "global", "goto", "if", "implements", "include", "include_once", "instanceof", "insteadof", "interface", "isset", "list", "namespace", "new", "or", "print", "private", "protected", "public", "require", "require_once", "return", "static", "switch", "throw", "trait", "try", "unset", "use", "var", "while", "xor")
|
||||
|
@ -142,7 +142,7 @@ class PhpModelTest extends FlatSpec with Matchers {
|
||||
|
||||
val vars = cm.vars
|
||||
vars.get(0).baseName should be("children")
|
||||
vars.get(0).datatype should be("Children")
|
||||
vars.get(0).datatype should be("\\\\Swagger\\\\Models\\\\Children")
|
||||
vars.get(0).name should be("children")
|
||||
vars.get(0).baseType should be("Children")
|
||||
vars.get(0).required should equal(null)
|
||||
@ -166,7 +166,7 @@ class PhpModelTest extends FlatSpec with Matchers {
|
||||
val vars = cm.vars
|
||||
vars.get(0).baseName should be("children")
|
||||
vars.get(0).complexType should be("Children")
|
||||
vars.get(0).datatype should be("array[Children]")
|
||||
vars.get(0).datatype should be("array[\\\\Swagger\\\\Models\\\\Children]")
|
||||
vars.get(0).name should be("children")
|
||||
vars.get(0).baseType should be("array")
|
||||
vars.get(0).containerType should be("array")
|
||||
@ -192,7 +192,7 @@ class PhpModelTest extends FlatSpec with Matchers {
|
||||
val vars = cm.vars
|
||||
vars.get(0).baseName should be("children")
|
||||
vars.get(0).complexType should be("Children")
|
||||
vars.get(0).datatype should be("map[string,Children]")
|
||||
vars.get(0).datatype should be("map[string,\\\\Swagger\\\\Models\\\\Children]")
|
||||
vars.get(0).name should be("children")
|
||||
vars.get(0).baseType should be("map")
|
||||
vars.get(0).containerType should be("map")
|
||||
|
Loading…
Reference in New Issue
Block a user