mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-05-16 00:21:19 +00:00
[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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user