forked from loafle/openapi-generator-original
		
	[Java Play Framework] Fix to the default values (#5879)
* Fix to the default values. It did not take care of the "default" and also was setting to a bad default when not set. * Just make a difference between string and non string instead of placing all types in the mustache file
This commit is contained in:
		
							parent
							
								
									a2d19a1feb
								
							
						
					
					
						commit
						bf74de3a5a
					
				@ -1 +1 @@
 | 
				
			|||||||
{{#isBoolean}}false{{/isBoolean}}{{#isInteger}}0{{/isInteger}}{{#isDouble}}0.0{{/isDouble}}{{#isLong}}0L{{/isLong}}{{#isFloat}}0.0{{/isFloat}}{{#isString}}""{{/isString}}
 | 
					{{#defaultValue}}{{#isString}}"{{/isString}}{{{defaultValue}}}{{#isString}}"{{/isString}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}
 | 
				
			||||||
@ -53,7 +53,7 @@ public class PetApiController extends Controller {
 | 
				
			|||||||
            apiKey = (String)valueapiKey;
 | 
					            apiKey = (String)valueapiKey;
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            apiKey = "";
 | 
					            apiKey = null;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        imp.deletePet(petId, apiKey);
 | 
					        imp.deletePet(petId, apiKey);
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
@ -116,7 +116,7 @@ public class PetApiController extends Controller {
 | 
				
			|||||||
            name = (String)valuename;
 | 
					            name = (String)valuename;
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            name = "";
 | 
					            name = null;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        String valuestatus = (request().body().asMultipartFormData().asFormUrlEncoded().get("status"))[0];
 | 
					        String valuestatus = (request().body().asMultipartFormData().asFormUrlEncoded().get("status"))[0];
 | 
				
			||||||
        String status;
 | 
					        String status;
 | 
				
			||||||
@ -124,7 +124,7 @@ public class PetApiController extends Controller {
 | 
				
			|||||||
            status = (String)valuestatus;
 | 
					            status = (String)valuestatus;
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            status = "";
 | 
					            status = null;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        imp.updatePetWithForm(petId, name, status);
 | 
					        imp.updatePetWithForm(petId, name, status);
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
@ -139,7 +139,7 @@ public class PetApiController extends Controller {
 | 
				
			|||||||
            additionalMetadata = (String)valueadditionalMetadata;
 | 
					            additionalMetadata = (String)valueadditionalMetadata;
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            additionalMetadata = "";
 | 
					            additionalMetadata = null;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        Http.MultipartFormData.FilePart file = request().body().asMultipartFormData().getFile("file");
 | 
					        Http.MultipartFormData.FilePart file = request().body().asMultipartFormData().getFile("file");
 | 
				
			||||||
                ModelApiResponse obj = imp.uploadFile(petId, additionalMetadata, file);
 | 
					                ModelApiResponse obj = imp.uploadFile(petId, additionalMetadata, file);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user