Skip to content

Commit 30af811

Browse files
Add swagger2 update samples
1 parent eac4ed2 commit 30af811

File tree

11 files changed

+110
-25
lines changed

11 files changed

+110
-25
lines changed

samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/model/Pet.java

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,30 @@
1414
import com.fasterxml.jackson.annotation.JsonProperty;
1515

1616
/**
17-
* A pet for sale in the pet store
18-
**/
17+
* A pet for sale in the pet store
18+
*/
1919
@ApiModel(description="A pet for sale in the pet store")
2020

2121
public class Pet {
2222

2323
@ApiModelProperty(value = "")
24+
2425
private Long id;
2526

2627
@ApiModelProperty(value = "")
28+
2729
private Category category;
2830

2931
@ApiModelProperty(example = "doggie", required = true, value = "")
32+
3033
private String name;
3134

3235
@ApiModelProperty(required = true, value = "")
36+
3337
private List<String> photoUrls = new ArrayList<>();
3438

3539
@ApiModelProperty(value = "")
40+
3641
private List<Tag> tags = new ArrayList<>();
3742

3843
public enum StatusEnum {
@@ -67,10 +72,11 @@ public static StatusEnum fromValue(String value) {
6772
}
6873
}
6974

70-
@ApiModelProperty(value = "pet status in the store")
7175
/**
72-
* pet status in the store
73-
**/
76+
* pet status in the store
77+
*/
78+
@ApiModelProperty(value = "pet status in the store")
79+
7480
private StatusEnum status;
7581
/**
7682
* Get id

samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Pet.java

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,41 @@
11
package org.openapitools.model;
22

3-
import io.swagger.annotations.ApiModel;
43
import java.util.ArrayList;
54
import java.util.Arrays;
65
import java.util.List;
76
import org.openapitools.model.Category;
87
import org.openapitools.model.Tag;
98

9+
import io.swagger.annotations.ApiModel;
1010
import io.swagger.annotations.ApiModelProperty;
1111
import java.util.Objects;
1212
import com.fasterxml.jackson.annotation.JsonProperty;
1313

1414
/**
15-
* A pet for sale in the pet store
16-
**/
15+
* A pet for sale in the pet store
16+
*/
1717
@ApiModel(description="A pet for sale in the pet store")
1818

1919
public class Pet {
2020

2121
@ApiModelProperty(value = "")
22+
2223
private Long id;
2324

2425
@ApiModelProperty(value = "")
26+
2527
private Category category;
2628

2729
@ApiModelProperty(example = "doggie", required = true, value = "")
30+
2831
private String name;
2932

3033
@ApiModelProperty(required = true, value = "")
34+
3135
private List<String> photoUrls = new ArrayList<>();
3236

3337
@ApiModelProperty(value = "")
38+
3439
private List<Tag> tags = new ArrayList<>();
3540

3641
public enum StatusEnum {
@@ -63,10 +68,11 @@ public static StatusEnum fromValue(String value) {
6368
}
6469
}
6570

66-
@ApiModelProperty(value = "pet status in the store")
6771
/**
68-
* pet status in the store
69-
**/
72+
* pet status in the store
73+
*/
74+
@ApiModelProperty(value = "pet status in the store")
75+
7076
private StatusEnum status;
7177
/**
7278
* Get id

samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/Pet.java

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,34 @@
1616
import com.fasterxml.jackson.annotation.JsonProperty;
1717

1818
/**
19-
* A pet for sale in the pet store
20-
**/
19+
* A pet for sale in the pet store
20+
*/
2121
@ApiModel(description="A pet for sale in the pet store")
2222

2323
public class Pet {
2424

2525
@ApiModelProperty(value = "")
26+
2627
private Long id;
2728

2829
@ApiModelProperty(value = "")
30+
2931
@Valid
32+
3033
private Category category;
3134

3235
@ApiModelProperty(example = "doggie", required = true, value = "")
36+
3337
private String name;
3438

3539
@ApiModelProperty(required = true, value = "")
40+
3641
private List<String> photoUrls = new ArrayList<>();
3742

3843
@ApiModelProperty(value = "")
44+
3945
@Valid
46+
4047
private List<@Valid Tag> tags = new ArrayList<>();
4148

4249
public enum StatusEnum {
@@ -71,10 +78,11 @@ public static StatusEnum fromValue(String value) {
7178
}
7279
}
7380

74-
@ApiModelProperty(value = "pet status in the store")
7581
/**
76-
* pet status in the store
77-
**/
82+
* pet status in the store
83+
*/
84+
@ApiModelProperty(value = "pet status in the store")
85+
7886
private StatusEnum status;
7987
/**
8088
* Get id

samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/Pet.java

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import com.fasterxml.jackson.annotation.JsonCreator;
44
import com.fasterxml.jackson.annotation.JsonValue;
5-
import io.swagger.annotations.ApiModel;
65
import java.util.ArrayList;
76
import java.util.Arrays;
87
import java.util.List;
@@ -11,32 +10,40 @@
1110
import javax.validation.constraints.*;
1211
import javax.validation.Valid;
1312

13+
import io.swagger.annotations.ApiModel;
1414
import io.swagger.annotations.ApiModelProperty;
1515
import java.util.Objects;
1616
import com.fasterxml.jackson.annotation.JsonProperty;
1717

1818
/**
19-
* A pet for sale in the pet store
20-
**/
19+
* A pet for sale in the pet store
20+
*/
2121
@ApiModel(description="A pet for sale in the pet store")
2222

2323
public class Pet {
2424

2525
@ApiModelProperty(value = "")
26+
2627
private Long id;
2728

2829
@ApiModelProperty(value = "")
30+
2931
@Valid
32+
3033
private Category category;
3134

3235
@ApiModelProperty(example = "doggie", required = true, value = "")
36+
3337
private String name;
3438

3539
@ApiModelProperty(required = true, value = "")
40+
3641
private List<String> photoUrls = new ArrayList<>();
3742

3843
@ApiModelProperty(value = "")
44+
3945
@Valid
46+
4047
private List<@Valid Tag> tags = new ArrayList<>();
4148

4249
public enum StatusEnum {
@@ -71,10 +78,11 @@ public static StatusEnum fromValue(String value) {
7178
}
7279
}
7380

74-
@ApiModelProperty(value = "pet status in the store")
7581
/**
76-
* pet status in the store
77-
**/
82+
* pet status in the store
83+
*/
84+
@ApiModelProperty(value = "pet status in the store")
85+
7886
private StatusEnum status;
7987
/**
8088
* Get id

samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
public class ArrayOfArrayOfNumberOnly {
1616

1717
@ApiModelProperty(value = "")
18+
1819
@Valid
20+
1921
private List<List<BigDecimal>> arrayArrayNumber = new ArrayList<>();
2022
/**
2123
* Get arrayArrayNumber

samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
public class ArrayOfNumberOnly {
1616

1717
@ApiModelProperty(value = "")
18+
1819
@Valid
20+
1921
private List<BigDecimal> arrayNumber = new ArrayList<>();
2022
/**
2123
* Get arrayNumber

samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ArrayTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,19 @@
1515
public class ArrayTest {
1616

1717
@ApiModelProperty(value = "")
18+
1819
private List<String> arrayOfString = new ArrayList<>();
1920

2021
@ApiModelProperty(value = "")
22+
2123
@Valid
24+
2225
private List<List<Long>> arrayArrayOfInteger = new ArrayList<>();
2326

2427
@ApiModelProperty(value = "")
28+
2529
@Valid
30+
2631
private List<List<@Valid ReadOnlyFirst>> arrayArrayOfModel = new ArrayList<>();
2732
/**
2833
* Get arrayOfString

samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/EnumArrays.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public static JustSymbolEnum fromValue(String value) {
4848
}
4949

5050
@ApiModelProperty(value = "")
51+
5152
private JustSymbolEnum justSymbol;
5253

5354
public enum ArrayEnumEnum {
@@ -83,6 +84,7 @@ public static ArrayEnumEnum fromValue(String value) {
8384
}
8485

8586
@ApiModelProperty(value = "")
87+
8688
private List<ArrayEnumEnum> arrayEnum = new ArrayList<>();
8789
/**
8890
* Get justSymbol

samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/FileSchemaTestClass.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,15 @@
1515
public class FileSchemaTestClass {
1616

1717
@ApiModelProperty(value = "")
18+
1819
@Valid
20+
1921
private ModelFile _file;
2022

2123
@ApiModelProperty(value = "")
24+
2225
@Valid
26+
2327
private List<@Valid ModelFile> files = new ArrayList<>();
2428
/**
2529
* Get _file

samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Pet.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,27 @@
2121
public class Pet {
2222

2323
@ApiModelProperty(value = "")
24+
2425
private Long id;
2526

2627
@ApiModelProperty(value = "")
28+
2729
@Valid
30+
2831
private Category category;
2932

3033
@ApiModelProperty(example = "doggie", required = true, value = "")
34+
3135
private String name;
3236

3337
@ApiModelProperty(required = true, value = "")
38+
3439
private Set<String> photoUrls = new LinkedHashSet<>();
3540

3641
@ApiModelProperty(value = "")
42+
3743
@Valid
44+
3845
private List<@Valid Tag> tags = new ArrayList<>();
3946

4047
public enum StatusEnum {
@@ -69,10 +76,11 @@ public static StatusEnum fromValue(String value) {
6976
}
7077
}
7178

72-
@ApiModelProperty(value = "pet status in the store")
7379
/**
74-
* pet status in the store
75-
**/
80+
* pet status in the store
81+
*/
82+
@ApiModelProperty(value = "pet status in the store")
83+
7684
private StatusEnum status;
7785
/**
7886
* Get id

0 commit comments

Comments
 (0)