forked from loafle/openapi-generator-original
[Java][Client] Support annotationLibrary=none to remove swagger annotations (#13869)
* Support annotationLibrary=none in JavaClientCodegen
* Add example using annotationLibrary=swagger1
* Support annotationLibrary=none in libraries
* Fix missing curly brace.
* fix if statement condition
* Support {{#swagger1AnnotationLibrary}} in java/rest-assured
* Adopt JavaModelTest
* Generate docs
* Generate samples
* clean up java feign files
* clean up feign samples
* fix resttemplate, native
* fix resttemplate withXml
* fix webclient
* fix java-jersey2, vertix
* fix googleapi client
* fix rest assured
* fix rest assured
* update apache-httpclient
* fix jersey2 special character
* fix resteasy
* fix jersey2
* update samples
* fix jersey2, okhttp streaming
* update okhttp-gson
* update samples
Co-authored-by: William Cheng <wing328hk@gmail.com>
This commit is contained in:
@@ -20,8 +20,6 @@ import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
@@ -48,7 +46,6 @@ import org.openapitools.client.JSON;
|
||||
/**
|
||||
* A category for a pet
|
||||
*/
|
||||
@ApiModel(description = "A category for a pet")
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
public class Category {
|
||||
public static final String SERIALIZED_NAME_ID = "id";
|
||||
@@ -73,7 +70,6 @@ public class Category {
|
||||
* @return id
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
@@ -96,7 +92,6 @@ public class Category {
|
||||
* @return name
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
|
||||
@@ -20,8 +20,6 @@ import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
@@ -48,7 +46,6 @@ import org.openapitools.client.JSON;
|
||||
/**
|
||||
* Describes the result of uploading an image resource
|
||||
*/
|
||||
@ApiModel(description = "Describes the result of uploading an image resource")
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
public class ModelApiResponse {
|
||||
public static final String SERIALIZED_NAME_CODE = "code";
|
||||
@@ -77,7 +74,6 @@ public class ModelApiResponse {
|
||||
* @return code
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
@@ -100,7 +96,6 @@ public class ModelApiResponse {
|
||||
* @return type
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
@@ -123,7 +118,6 @@ public class ModelApiResponse {
|
||||
* @return message
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
|
||||
@@ -20,8 +20,6 @@ import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.IOException;
|
||||
import java.time.OffsetDateTime;
|
||||
|
||||
@@ -49,7 +47,6 @@ import org.openapitools.client.JSON;
|
||||
/**
|
||||
* An order for a pets from the pet store
|
||||
*/
|
||||
@ApiModel(description = "An order for a pets from the pet store")
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
public class Order {
|
||||
public static final String SERIALIZED_NAME_ID = "id";
|
||||
@@ -139,7 +136,6 @@ public class Order {
|
||||
* @return id
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
@@ -162,7 +158,6 @@ public class Order {
|
||||
* @return petId
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
public Long getPetId() {
|
||||
return petId;
|
||||
@@ -185,7 +180,6 @@ public class Order {
|
||||
* @return quantity
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
public Integer getQuantity() {
|
||||
return quantity;
|
||||
@@ -208,7 +202,6 @@ public class Order {
|
||||
* @return shipDate
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
public OffsetDateTime getShipDate() {
|
||||
return shipDate;
|
||||
@@ -231,7 +224,6 @@ public class Order {
|
||||
* @return status
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "Order Status")
|
||||
|
||||
public StatusEnum getStatus() {
|
||||
return status;
|
||||
@@ -254,7 +246,6 @@ public class Order {
|
||||
* @return complete
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
public Boolean getComplete() {
|
||||
return complete;
|
||||
|
||||
@@ -20,8 +20,6 @@ import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -52,7 +50,6 @@ import org.openapitools.client.JSON;
|
||||
/**
|
||||
* A pet for sale in the pet store
|
||||
*/
|
||||
@ApiModel(description = "A pet for sale in the pet store")
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
public class Pet {
|
||||
public static final String SERIALIZED_NAME_ID = "id";
|
||||
@@ -142,7 +139,6 @@ public class Pet {
|
||||
* @return id
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
@@ -165,7 +161,6 @@ public class Pet {
|
||||
* @return category
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
public Category getCategory() {
|
||||
return category;
|
||||
@@ -188,7 +183,6 @@ public class Pet {
|
||||
* @return name
|
||||
**/
|
||||
@javax.annotation.Nonnull
|
||||
@ApiModelProperty(example = "doggie", required = true, value = "")
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
@@ -216,7 +210,6 @@ public class Pet {
|
||||
* @return photoUrls
|
||||
**/
|
||||
@javax.annotation.Nonnull
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
|
||||
public List<String> getPhotoUrls() {
|
||||
return photoUrls;
|
||||
@@ -247,7 +240,6 @@ public class Pet {
|
||||
* @return tags
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
public List<Tag> getTags() {
|
||||
return tags;
|
||||
@@ -272,7 +264,6 @@ public class Pet {
|
||||
**/
|
||||
@Deprecated
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "pet status in the store")
|
||||
|
||||
public StatusEnum getStatus() {
|
||||
return status;
|
||||
|
||||
@@ -20,8 +20,6 @@ import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
@@ -48,7 +46,6 @@ import org.openapitools.client.JSON;
|
||||
/**
|
||||
* A tag for a pet
|
||||
*/
|
||||
@ApiModel(description = "A tag for a pet")
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
public class Tag {
|
||||
public static final String SERIALIZED_NAME_ID = "id";
|
||||
@@ -73,7 +70,6 @@ public class Tag {
|
||||
* @return id
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
@@ -96,7 +92,6 @@ public class Tag {
|
||||
* @return name
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
|
||||
@@ -20,8 +20,6 @@ import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
@@ -48,7 +46,6 @@ import org.openapitools.client.JSON;
|
||||
/**
|
||||
* A User who is purchasing from the pet store
|
||||
*/
|
||||
@ApiModel(description = "A User who is purchasing from the pet store")
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
public class User {
|
||||
public static final String SERIALIZED_NAME_ID = "id";
|
||||
@@ -97,7 +94,6 @@ public class User {
|
||||
* @return id
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
@@ -120,7 +116,6 @@ public class User {
|
||||
* @return username
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
@@ -143,7 +138,6 @@ public class User {
|
||||
* @return firstName
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
public String getFirstName() {
|
||||
return firstName;
|
||||
@@ -166,7 +160,6 @@ public class User {
|
||||
* @return lastName
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
public String getLastName() {
|
||||
return lastName;
|
||||
@@ -189,7 +182,6 @@ public class User {
|
||||
* @return email
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
@@ -212,7 +204,6 @@ public class User {
|
||||
* @return password
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
@@ -235,7 +226,6 @@ public class User {
|
||||
* @return phone
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
@@ -258,7 +248,6 @@ public class User {
|
||||
* @return userStatus
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "User Status")
|
||||
|
||||
public Integer getUserStatus() {
|
||||
return userStatus;
|
||||
|
||||
Reference in New Issue
Block a user