Added ModelInterface for PHP Models (#6331)

All Model classes include a set of methods - it makes sense to align them to a concrete interface to improve strict typing when referencing these models.
This commit is contained in:
Alex
2017-09-05 17:22:18 +03:00
committed by wing328
parent 84bb749cc3
commit 4eab5406c5
41 changed files with 1612 additions and 145 deletions

View File

@@ -303,6 +303,7 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig {
supportingFiles.add(new SupportingFile("ApiException.mustache", toPackagePath(invokerPackage, srcBasePath), "ApiException.php"));
supportingFiles.add(new SupportingFile("Configuration.mustache", toPackagePath(invokerPackage, srcBasePath), "Configuration.php"));
supportingFiles.add(new SupportingFile("ObjectSerializer.mustache", toPackagePath(invokerPackage, srcBasePath), "ObjectSerializer.php"));
supportingFiles.add(new SupportingFile("ModelInterface.mustache", toPackagePath(modelPackage, srcBasePath), "ModelInterface.php"));
supportingFiles.add(new SupportingFile("HeaderSelector.mustache", toPackagePath(invokerPackage, srcBasePath), "HeaderSelector.php"));
supportingFiles.add(new SupportingFile("composer.mustache", getPackagePath(), "composer.json"));
supportingFiles.add(new SupportingFile("README.mustache", getPackagePath(), "README.md"));