Skip to content

Commit d6affde

Browse files
committed
Update samples
1 parent 36a4859 commit d6affde

139 files changed

Lines changed: 4238 additions & 1788 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

samples/client/echo_api/java/apache-httpclient/docs/DataQuery.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,18 @@
1010
|**suffix** | **String** | test suffix | [optional] |
1111
|**text** | **String** | Some text containing white spaces | [optional] |
1212
|**date** | **OffsetDateTime** | A date | [optional] |
13+
|**id** | **Long** | Query | [optional] |
14+
|**outcomes** | [**List<OutcomesEnum>**](#List<OutcomesEnum>) | | [optional] |
15+
16+
17+
18+
## Enum: List<OutcomesEnum>
19+
20+
| Name | Value |
21+
|---- | -----|
22+
| SUCCESS | "SUCCESS" |
23+
| FAILURE | "FAILURE" |
24+
| SKIPPED | "SKIPPED" |
1325

1426

1527

samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/Bird.java

Lines changed: 5 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@
2020
import com.fasterxml.jackson.annotation.JsonCreator;
2121
import com.fasterxml.jackson.annotation.JsonTypeName;
2222
import com.fasterxml.jackson.annotation.JsonValue;
23+
import io.swagger.annotations.ApiModel;
24+
import io.swagger.annotations.ApiModelProperty;
2325
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
2426
import com.fasterxml.jackson.annotation.JsonTypeName;
25-
import java.io.UnsupportedEncodingException;
26-
import java.net.URLEncoder;
27-
import java.util.StringJoiner;
2827

2928
/**
3029
* Bird
@@ -33,7 +32,7 @@
3332
Bird.JSON_PROPERTY_SIZE,
3433
Bird.JSON_PROPERTY_COLOR
3534
})
36-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
35+
@.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
3736
public class Bird {
3837
public static final String JSON_PROPERTY_SIZE = "size";
3938
private String size;
@@ -54,7 +53,7 @@ public Bird size(String size) {
5453
* Get size
5554
* @return size
5655
**/
57-
@javax.annotation.Nullable
56+
@.annotation.Nullable
5857
@JsonProperty(JSON_PROPERTY_SIZE)
5958
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
6059

@@ -80,7 +79,7 @@ public Bird color(String color) {
8079
* Get color
8180
* @return color
8281
**/
83-
@javax.annotation.Nullable
82+
@.annotation.Nullable
8483
@JsonProperty(JSON_PROPERTY_COLOR)
8584
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
8685

@@ -135,60 +134,5 @@ private String toIndentedString(Object o) {
135134
return o.toString().replace("\n", "\n ");
136135
}
137136

138-
/**
139-
* Convert the instance into URL query string.
140-
*
141-
* @return URL query string
142-
*/
143-
public String toUrlQueryString() {
144-
return toUrlQueryString(null);
145-
}
146-
147-
/**
148-
* Convert the instance into URL query string.
149-
*
150-
* @param prefix prefix of the query string
151-
* @return URL query string
152-
*/
153-
public String toUrlQueryString(String prefix) {
154-
String suffix = "";
155-
String containerSuffix = "";
156-
String containerPrefix = "";
157-
if (prefix == null) {
158-
// style=form, explode=true, e.g. /pet?name=cat&type=manx
159-
prefix = "";
160-
} else {
161-
// deepObject style e.g. /pet?id[name]=cat&id[type]=manx
162-
prefix = prefix + "[";
163-
suffix = "]";
164-
containerSuffix = "]";
165-
containerPrefix = "[";
166-
}
167-
168-
StringJoiner joiner = new StringJoiner("&");
169-
170-
// add `size` to the URL query string
171-
if (getSize() != null) {
172-
try {
173-
joiner.add(String.format("%ssize%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSize()), "UTF-8").replaceAll("\\+", "%20")));
174-
} catch (UnsupportedEncodingException e) {
175-
// Should never happen, UTF-8 is always supported
176-
throw new RuntimeException(e);
177-
}
178-
}
179-
180-
// add `color` to the URL query string
181-
if (getColor() != null) {
182-
try {
183-
joiner.add(String.format("%scolor%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getColor()), "UTF-8").replaceAll("\\+", "%20")));
184-
} catch (UnsupportedEncodingException e) {
185-
// Should never happen, UTF-8 is always supported
186-
throw new RuntimeException(e);
187-
}
188-
}
189-
190-
return joiner.toString();
191-
}
192-
193137
}
194138

samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/Category.java

Lines changed: 5 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@
2020
import com.fasterxml.jackson.annotation.JsonCreator;
2121
import com.fasterxml.jackson.annotation.JsonTypeName;
2222
import com.fasterxml.jackson.annotation.JsonValue;
23+
import io.swagger.annotations.ApiModel;
24+
import io.swagger.annotations.ApiModelProperty;
2325
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
2426
import com.fasterxml.jackson.annotation.JsonTypeName;
25-
import java.io.UnsupportedEncodingException;
26-
import java.net.URLEncoder;
27-
import java.util.StringJoiner;
2827

2928
/**
3029
* Category
@@ -33,7 +32,7 @@
3332
Category.JSON_PROPERTY_ID,
3433
Category.JSON_PROPERTY_NAME
3534
})
36-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
35+
@.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
3736
public class Category {
3837
public static final String JSON_PROPERTY_ID = "id";
3938
private Long id;
@@ -54,7 +53,7 @@ public Category id(Long id) {
5453
* Get id
5554
* @return id
5655
**/
57-
@javax.annotation.Nullable
56+
@.annotation.Nullable
5857
@JsonProperty(JSON_PROPERTY_ID)
5958
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
6059

@@ -80,7 +79,7 @@ public Category name(String name) {
8079
* Get name
8180
* @return name
8281
**/
83-
@javax.annotation.Nullable
82+
@.annotation.Nullable
8483
@JsonProperty(JSON_PROPERTY_NAME)
8584
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
8685

@@ -135,60 +134,5 @@ private String toIndentedString(Object o) {
135134
return o.toString().replace("\n", "\n ");
136135
}
137136

138-
/**
139-
* Convert the instance into URL query string.
140-
*
141-
* @return URL query string
142-
*/
143-
public String toUrlQueryString() {
144-
return toUrlQueryString(null);
145-
}
146-
147-
/**
148-
* Convert the instance into URL query string.
149-
*
150-
* @param prefix prefix of the query string
151-
* @return URL query string
152-
*/
153-
public String toUrlQueryString(String prefix) {
154-
String suffix = "";
155-
String containerSuffix = "";
156-
String containerPrefix = "";
157-
if (prefix == null) {
158-
// style=form, explode=true, e.g. /pet?name=cat&type=manx
159-
prefix = "";
160-
} else {
161-
// deepObject style e.g. /pet?id[name]=cat&id[type]=manx
162-
prefix = prefix + "[";
163-
suffix = "]";
164-
containerSuffix = "]";
165-
containerPrefix = "[";
166-
}
167-
168-
StringJoiner joiner = new StringJoiner("&");
169-
170-
// add `id` to the URL query string
171-
if (getId() != null) {
172-
try {
173-
joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), "UTF-8").replaceAll("\\+", "%20")));
174-
} catch (UnsupportedEncodingException e) {
175-
// Should never happen, UTF-8 is always supported
176-
throw new RuntimeException(e);
177-
}
178-
}
179-
180-
// add `name` to the URL query string
181-
if (getName() != null) {
182-
try {
183-
joiner.add(String.format("%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), "UTF-8").replaceAll("\\+", "%20")));
184-
} catch (UnsupportedEncodingException e) {
185-
// Should never happen, UTF-8 is always supported
186-
throw new RuntimeException(e);
187-
}
188-
}
189-
190-
return joiner.toString();
191-
}
192-
193137
}
194138

0 commit comments

Comments
 (0)