forked from loafle/openapi-generator-original
		
	[java resteasy] fix string comparison (#134)
* Fix StringUtils.isEmpty(..) * Update all JaxRS samples
This commit is contained in:
		
							parent
							
								
									27426f7b52
								
							
						
					
					
						commit
						3f81378d72
					
				@ -17,20 +17,21 @@
 | 
			
		||||
 | 
			
		||||
package org.openapitools.codegen.languages;
 | 
			
		||||
 | 
			
		||||
import io.swagger.v3.oas.models.Operation;
 | 
			
		||||
 | 
			
		||||
import org.apache.commons.lang3.BooleanUtils;
 | 
			
		||||
import org.apache.commons.lang3.StringUtils;
 | 
			
		||||
import org.openapitools.codegen.*;
 | 
			
		||||
import org.openapitools.codegen.languages.features.BeanValidationFeatures;
 | 
			
		||||
import org.openapitools.codegen.languages.features.JbossFeature;
 | 
			
		||||
import org.openapitools.codegen.languages.features.SwaggerFeatures;
 | 
			
		||||
 | 
			
		||||
import java.io.File;
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.HashMap;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
 | 
			
		||||
import org.openapitools.codegen.*;
 | 
			
		||||
import org.openapitools.codegen.languages.features.BeanValidationFeatures;
 | 
			
		||||
import org.openapitools.codegen.languages.features.JbossFeature;
 | 
			
		||||
import org.openapitools.codegen.languages.features.SwaggerFeatures;
 | 
			
		||||
import io.swagger.v3.oas.models.*;
 | 
			
		||||
import org.apache.commons.lang3.BooleanUtils;
 | 
			
		||||
import org.apache.commons.lang3.StringUtils;
 | 
			
		||||
 | 
			
		||||
public class JavaResteasyEapServerCodegen extends AbstractJavaJAXRSServerCodegen
 | 
			
		||||
        implements JbossFeature, BeanValidationFeatures, SwaggerFeatures {
 | 
			
		||||
 | 
			
		||||
@ -126,7 +127,7 @@ public class JavaResteasyEapServerCodegen extends AbstractJavaJAXRSServerCodegen
 | 
			
		||||
            basePath = basePath.substring(0, pos);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (StringUtils.isEmpty("")) {
 | 
			
		||||
        if (StringUtils.isEmpty(basePath)) {
 | 
			
		||||
            basePath = "default";
 | 
			
		||||
        } else {
 | 
			
		||||
            if (co.path.startsWith("/" + basePath)) {
 | 
			
		||||
 | 
			
		||||
@ -12,7 +12,9 @@ import io.swagger.annotations.*;
 | 
			
		||||
 | 
			
		||||
public class Category   {
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
  private Long id = null;
 | 
			
		||||
 | 
			
		||||
  private String name = null;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
 | 
			
		||||
@ -12,8 +12,11 @@ import io.swagger.annotations.*;
 | 
			
		||||
 | 
			
		||||
public class ModelApiResponse   {
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
  private Integer code = null;
 | 
			
		||||
 | 
			
		||||
  private String type = null;
 | 
			
		||||
 | 
			
		||||
  private String message = null;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
 | 
			
		||||
@ -14,9 +14,13 @@ import io.swagger.annotations.*;
 | 
			
		||||
 | 
			
		||||
public class Order   {
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
  private Long id = null;
 | 
			
		||||
 | 
			
		||||
  private Long petId = null;
 | 
			
		||||
 | 
			
		||||
  private Integer quantity = null;
 | 
			
		||||
 | 
			
		||||
  private OffsetDateTime shipDate = null;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
@ -41,7 +45,9 @@ public class Order   {
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  private StatusEnum status = null;
 | 
			
		||||
 | 
			
		||||
  private Boolean complete = false;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
 | 
			
		||||
@ -16,10 +16,15 @@ import io.swagger.annotations.*;
 | 
			
		||||
 | 
			
		||||
public class Pet   {
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
  private Long id = null;
 | 
			
		||||
 | 
			
		||||
  private Category category = null;
 | 
			
		||||
 | 
			
		||||
  private String name = null;
 | 
			
		||||
 | 
			
		||||
  private List<String> photoUrls = new ArrayList<>();
 | 
			
		||||
 | 
			
		||||
  private List<Tag> tags = new ArrayList<>();
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
@ -44,6 +49,7 @@ public class Pet   {
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  private StatusEnum status = null;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
 | 
			
		||||
@ -12,7 +12,9 @@ import io.swagger.annotations.*;
 | 
			
		||||
 | 
			
		||||
public class Tag   {
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
  private Long id = null;
 | 
			
		||||
 | 
			
		||||
  private String name = null;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
 | 
			
		||||
@ -12,13 +12,21 @@ import io.swagger.annotations.*;
 | 
			
		||||
 | 
			
		||||
public class User   {
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
  private Long id = null;
 | 
			
		||||
 | 
			
		||||
  private String username = null;
 | 
			
		||||
 | 
			
		||||
  private String firstName = null;
 | 
			
		||||
 | 
			
		||||
  private String lastName = null;
 | 
			
		||||
 | 
			
		||||
  private String email = null;
 | 
			
		||||
 | 
			
		||||
  private String password = null;
 | 
			
		||||
 | 
			
		||||
  private String phone = null;
 | 
			
		||||
 | 
			
		||||
  private Integer userStatus = null;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
 | 
			
		||||
@ -12,7 +12,9 @@ import io.swagger.annotations.*;
 | 
			
		||||
 | 
			
		||||
public class Category   {
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
  private Long id = null;
 | 
			
		||||
 | 
			
		||||
  private String name = null;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
 | 
			
		||||
@ -12,8 +12,11 @@ import io.swagger.annotations.*;
 | 
			
		||||
 | 
			
		||||
public class ModelApiResponse   {
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
  private Integer code = null;
 | 
			
		||||
 | 
			
		||||
  private String type = null;
 | 
			
		||||
 | 
			
		||||
  private String message = null;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
 | 
			
		||||
@ -14,9 +14,13 @@ import io.swagger.annotations.*;
 | 
			
		||||
 | 
			
		||||
public class Order   {
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
  private Long id = null;
 | 
			
		||||
 | 
			
		||||
  private Long petId = null;
 | 
			
		||||
 | 
			
		||||
  private Integer quantity = null;
 | 
			
		||||
 | 
			
		||||
  private DateTime shipDate = null;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
@ -41,7 +45,9 @@ public class Order   {
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  private StatusEnum status = null;
 | 
			
		||||
 | 
			
		||||
  private Boolean complete = false;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
 | 
			
		||||
@ -16,10 +16,15 @@ import io.swagger.annotations.*;
 | 
			
		||||
 | 
			
		||||
public class Pet   {
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
  private Long id = null;
 | 
			
		||||
 | 
			
		||||
  private Category category = null;
 | 
			
		||||
 | 
			
		||||
  private String name = null;
 | 
			
		||||
 | 
			
		||||
  private List<String> photoUrls = new ArrayList<String>();
 | 
			
		||||
 | 
			
		||||
  private List<Tag> tags = new ArrayList<Tag>();
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
@ -44,6 +49,7 @@ public class Pet   {
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  private StatusEnum status = null;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
 | 
			
		||||
@ -12,7 +12,9 @@ import io.swagger.annotations.*;
 | 
			
		||||
 | 
			
		||||
public class Tag   {
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
  private Long id = null;
 | 
			
		||||
 | 
			
		||||
  private String name = null;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
 | 
			
		||||
@ -12,13 +12,21 @@ import io.swagger.annotations.*;
 | 
			
		||||
 | 
			
		||||
public class User   {
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
  private Long id = null;
 | 
			
		||||
 | 
			
		||||
  private String username = null;
 | 
			
		||||
 | 
			
		||||
  private String firstName = null;
 | 
			
		||||
 | 
			
		||||
  private String lastName = null;
 | 
			
		||||
 | 
			
		||||
  private String email = null;
 | 
			
		||||
 | 
			
		||||
  private String password = null;
 | 
			
		||||
 | 
			
		||||
  private String phone = null;
 | 
			
		||||
 | 
			
		||||
  private Integer userStatus = null;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
 | 
			
		||||
@ -12,7 +12,9 @@ import io.swagger.annotations.*;
 | 
			
		||||
 | 
			
		||||
public class Category   {
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
  private Long id = null;
 | 
			
		||||
 | 
			
		||||
  private String name = null;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
 | 
			
		||||
@ -12,8 +12,11 @@ import io.swagger.annotations.*;
 | 
			
		||||
 | 
			
		||||
public class ModelApiResponse   {
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
  private Integer code = null;
 | 
			
		||||
 | 
			
		||||
  private String type = null;
 | 
			
		||||
 | 
			
		||||
  private String message = null;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
 | 
			
		||||
@ -14,9 +14,13 @@ import io.swagger.annotations.*;
 | 
			
		||||
 | 
			
		||||
public class Order   {
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
  private Long id = null;
 | 
			
		||||
 | 
			
		||||
  private Long petId = null;
 | 
			
		||||
 | 
			
		||||
  private Integer quantity = null;
 | 
			
		||||
 | 
			
		||||
  private Date shipDate = null;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
@ -41,7 +45,9 @@ public class Order   {
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  private StatusEnum status = null;
 | 
			
		||||
 | 
			
		||||
  private Boolean complete = false;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
 | 
			
		||||
@ -16,10 +16,15 @@ import io.swagger.annotations.*;
 | 
			
		||||
 | 
			
		||||
public class Pet   {
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
  private Long id = null;
 | 
			
		||||
 | 
			
		||||
  private Category category = null;
 | 
			
		||||
 | 
			
		||||
  private String name = null;
 | 
			
		||||
 | 
			
		||||
  private List<String> photoUrls = new ArrayList<String>();
 | 
			
		||||
 | 
			
		||||
  private List<Tag> tags = new ArrayList<Tag>();
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
@ -44,6 +49,7 @@ public class Pet   {
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  private StatusEnum status = null;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
 | 
			
		||||
@ -12,7 +12,9 @@ import io.swagger.annotations.*;
 | 
			
		||||
 | 
			
		||||
public class Tag   {
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
  private Long id = null;
 | 
			
		||||
 | 
			
		||||
  private String name = null;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
 | 
			
		||||
@ -12,13 +12,21 @@ import io.swagger.annotations.*;
 | 
			
		||||
 | 
			
		||||
public class User   {
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
  private Long id = null;
 | 
			
		||||
 | 
			
		||||
  private String username = null;
 | 
			
		||||
 | 
			
		||||
  private String firstName = null;
 | 
			
		||||
 | 
			
		||||
  private String lastName = null;
 | 
			
		||||
 | 
			
		||||
  private String email = null;
 | 
			
		||||
 | 
			
		||||
  private String password = null;
 | 
			
		||||
 | 
			
		||||
  private String phone = null;
 | 
			
		||||
 | 
			
		||||
  private Integer userStatus = null;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user