mirror of
				https://github.com/OpenAPITools/openapi-generator.git
				synced 2025-11-03 18:23:44 +00:00 
			
		
		
		
	fix bigdecimal in default codegen
This commit is contained in:
		
							parent
							
								
									ffa0e115d9
								
							
						
					
					
						commit
						9d1ae0dd29
					
				@ -1139,7 +1139,7 @@ public class DefaultCodegen implements CodegenConfig {
 | 
			
		||||
            } else if (SchemaTypeUtil.DOUBLE_FORMAT.equals(schema.getFormat())) {
 | 
			
		||||
                datatype = SchemaTypeUtil.DOUBLE_FORMAT;
 | 
			
		||||
            } else { // without format
 | 
			
		||||
                datatype = "BigDecimal";
 | 
			
		||||
                datatype = schema.getType(); // number
 | 
			
		||||
            }
 | 
			
		||||
        } else if (schema instanceof IntegerSchema || SchemaTypeUtil.INTEGER_TYPE.equals(schema.getType())) {
 | 
			
		||||
            if (SchemaTypeUtil.INTEGER64_FORMAT.equals(schema.getFormat())) {
 | 
			
		||||
@ -4155,7 +4155,8 @@ public class DefaultCodegen implements CodegenConfig {
 | 
			
		||||
                codegenProperty = codegenProperty.items;
 | 
			
		||||
            }
 | 
			
		||||
        } else {
 | 
			
		||||
            LOGGER.warn("Scheme type " + schema.getType() + "not handled in reqeust body");
 | 
			
		||||
            // TODO need to handle primitive type in this block
 | 
			
		||||
            LOGGER.warn("Scheme type " + schema.getType() + " not handled in reqeust body");
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // set the parameter's example value
 | 
			
		||||
 | 
			
		||||
@ -3,6 +3,6 @@
 | 
			
		||||
## Properties
 | 
			
		||||
Name | Type | Description | Notes
 | 
			
		||||
------------ | ------------- | ------------- | -------------
 | 
			
		||||
**array_array_number** | **Array<Array<BigDecimal>>** |  | [optional] 
 | 
			
		||||
**array_array_number** | **Array<Array<Float>>** |  | [optional] 
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -3,6 +3,6 @@
 | 
			
		||||
## Properties
 | 
			
		||||
Name | Type | Description | Notes
 | 
			
		||||
------------ | ------------- | ------------- | -------------
 | 
			
		||||
**array_number** | [**Array<BigDecimal>**](BigDecimal.md) |  | [optional] 
 | 
			
		||||
**array_number** | **Array<Float>** |  | [optional] 
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -6,7 +6,7 @@ Name | Type | Description | Notes
 | 
			
		||||
**integer** | **Integer** |  | [optional] 
 | 
			
		||||
**int32** | **Integer** |  | [optional] 
 | 
			
		||||
**int64** | **Integer** |  | [optional] 
 | 
			
		||||
**number** | [**BigDecimal**](BigDecimal.md) |  | 
 | 
			
		||||
**number** | **Float** |  | 
 | 
			
		||||
**float** | **Float** |  | [optional] 
 | 
			
		||||
**double** | **Float** |  | [optional] 
 | 
			
		||||
**string** | **String** |  | [optional] 
 | 
			
		||||
 | 
			
		||||
@ -3,6 +3,6 @@
 | 
			
		||||
## Properties
 | 
			
		||||
Name | Type | Description | Notes
 | 
			
		||||
------------ | ------------- | ------------- | -------------
 | 
			
		||||
**just_number** | [**BigDecimal**](BigDecimal.md) |  | [optional] 
 | 
			
		||||
**just_number** | **Float** |  | [optional] 
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -26,7 +26,7 @@ module Petstore
 | 
			
		||||
    # Attribute type mapping.
 | 
			
		||||
    def self.swagger_types
 | 
			
		||||
      {
 | 
			
		||||
        :'array_array_number' => :'Array<Array<BigDecimal>>'
 | 
			
		||||
        :'array_array_number' => :'Array<Array<Float>>'
 | 
			
		||||
      }
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -26,7 +26,7 @@ module Petstore
 | 
			
		||||
    # Attribute type mapping.
 | 
			
		||||
    def self.swagger_types
 | 
			
		||||
      {
 | 
			
		||||
        :'array_number' => :'Array<BigDecimal>'
 | 
			
		||||
        :'array_number' => :'Array<Float>'
 | 
			
		||||
      }
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -65,7 +65,7 @@ module Petstore
 | 
			
		||||
        :'integer' => :'Integer',
 | 
			
		||||
        :'int32' => :'Integer',
 | 
			
		||||
        :'int64' => :'Integer',
 | 
			
		||||
        :'number' => :'BigDecimal',
 | 
			
		||||
        :'number' => :'Float',
 | 
			
		||||
        :'float' => :'Float',
 | 
			
		||||
        :'double' => :'Float',
 | 
			
		||||
        :'string' => :'String',
 | 
			
		||||
 | 
			
		||||
@ -26,7 +26,7 @@ module Petstore
 | 
			
		||||
    # Attribute type mapping.
 | 
			
		||||
    def self.swagger_types
 | 
			
		||||
      {
 | 
			
		||||
        :'just_number' => :'BigDecimal'
 | 
			
		||||
        :'just_number' => :'Float'
 | 
			
		||||
      }
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user