[PHP] Map number without format to float

Previously if you specified a property to be of type `number` and didn't
explicitly specify a format Codegen would map it into an (unknown) PHP
class `Number`.

We add a mapping from Swaggers `number` to PHPs `float`.
This commit is contained in:
Arne Jørgensen 2016-03-23 13:24:12 +01:00
parent 327315e9ea
commit 194e80ddab

View File

@ -96,6 +96,7 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig {
typeMapping = new HashMap<String, String>();
typeMapping.put("integer", "int");
typeMapping.put("long", "int");
typeMapping.put("number", "float");
typeMapping.put("float", "float");
typeMapping.put("double", "double");
typeMapping.put("string", "string");