Skip to content

Commit f767c7b

Browse files
committed
updated samples and docs as required by PR checklist
1 parent 65703ff commit f767c7b

File tree

321 files changed

+74
-379
lines changed

Some content is hidden

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

321 files changed

+74
-379
lines changed

samples/server/petstore/jaxrs-spec-interface-response/.openapi-generator/FILES

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ src/gen/java/org/openapitools/api/AnotherFakeApi.java
44
src/gen/java/org/openapitools/api/FakeApi.java
55
src/gen/java/org/openapitools/api/FakeClassnameTestApi.java
66
src/gen/java/org/openapitools/api/PetApi.java
7-
src/gen/java/org/openapitools/api/RestApplication.java
8-
src/gen/java/org/openapitools/api/RestResourceRoot.java
97
src/gen/java/org/openapitools/api/StoreApi.java
108
src/gen/java/org/openapitools/api/UserApi.java
119
src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java

samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/AnotherFakeApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
/**
1818
* Represents a collection of functions to interact with the API endpoints.
1919
*/
20-
@Path("/another-fake/dummy")
2120
@Api(description = "the another-fake API")
2221
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.17.0-SNAPSHOT")
2322
public interface AnotherFakeApi {
@@ -30,6 +29,7 @@ public interface AnotherFakeApi {
3029
* @return successful operation
3130
*/
3231
@PATCH
32+
@Path("/another-fake/dummy")
3333
@Consumes({ "application/json" })
3434
@Produces({ "application/json" })
3535
@ApiOperation(value = "To test special tags", notes = "To test special tags and operation ID starting with number", tags={ "$another-fake?" })

samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/FakeApi.java

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
/**
2727
* Represents a collection of functions to interact with the API endpoints.
2828
*/
29-
@Path("/fake")
3029
@Api(description = "the fake API")
3130
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.17.0-SNAPSHOT")
3231
public interface FakeApi {
@@ -38,7 +37,7 @@ public interface FakeApi {
3837
* @return successful operation
3938
*/
4039
@POST
41-
@Path("/create_xml_item")
40+
@Path("/fake/create_xml_item")
4241
@Consumes({ "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" })
4342
@ApiOperation(value = "creates an XmlItem", notes = "this route creates an XmlItem", tags={ "fake" })
4443
@ApiResponses(value = {
@@ -53,7 +52,7 @@ public interface FakeApi {
5352
* @return Output boolean
5453
*/
5554
@POST
56-
@Path("/outer/boolean")
55+
@Path("/fake/outer/boolean")
5756
@Produces({ "*/*" })
5857
@ApiOperation(value = "", notes = "Test serialization of outer boolean types", tags={ "fake" })
5958
@ApiResponses(value = {
@@ -68,7 +67,7 @@ public interface FakeApi {
6867
* @return Output composite
6968
*/
7069
@POST
71-
@Path("/outer/composite")
70+
@Path("/fake/outer/composite")
7271
@Produces({ "*/*" })
7372
@ApiOperation(value = "", notes = "Test serialization of object with outer number type", tags={ "fake" })
7473
@ApiResponses(value = {
@@ -83,7 +82,7 @@ public interface FakeApi {
8382
* @return Output number
8483
*/
8584
@POST
86-
@Path("/outer/number")
85+
@Path("/fake/outer/number")
8786
@Produces({ "*/*" })
8887
@ApiOperation(value = "", notes = "Test serialization of outer number types", tags={ "fake" })
8988
@ApiResponses(value = {
@@ -98,7 +97,7 @@ public interface FakeApi {
9897
* @return Output string
9998
*/
10099
@POST
101-
@Path("/outer/string")
100+
@Path("/fake/outer/string")
102101
@Produces({ "*/*" })
103102
@ApiOperation(value = "", notes = "Test serialization of outer string types", tags={ "fake" })
104103
@ApiResponses(value = {
@@ -113,7 +112,7 @@ public interface FakeApi {
113112
* @return Success
114113
*/
115114
@PUT
116-
@Path("/body-with-file-schema")
115+
@Path("/fake/body-with-file-schema")
117116
@Consumes({ "application/json" })
118117
@ApiOperation(value = "", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake" })
119118
@ApiResponses(value = {
@@ -129,7 +128,7 @@ public interface FakeApi {
129128
* @return Success
130129
*/
131130
@PUT
132-
@Path("/body-with-query-params")
131+
@Path("/fake/body-with-query-params")
133132
@Consumes({ "application/json" })
134133
@ApiOperation(value = "", notes = "", tags={ "fake" })
135134
@ApiResponses(value = {
@@ -144,6 +143,7 @@ public interface FakeApi {
144143
* @return successful operation
145144
*/
146145
@PATCH
146+
@Path("/fake")
147147
@Consumes({ "application/json" })
148148
@Produces({ "application/json" })
149149
@ApiOperation(value = "To test \"client\" model", notes = "To test \"client\" model", tags={ "fake" })
@@ -173,6 +173,7 @@ public interface FakeApi {
173173
* @return User not found
174174
*/
175175
@POST
176+
@Path("/fake")
176177
@Consumes({ "application/x-www-form-urlencoded" })
177178
@ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = {
178179

@@ -199,6 +200,7 @@ public interface FakeApi {
199200
* @return Not found
200201
*/
201202
@GET
203+
@Path("/fake")
202204
@Consumes({ "application/x-www-form-urlencoded" })
203205
@ApiOperation(value = "To test enum parameters", notes = "To test enum parameters", tags={ "fake" })
204206
@ApiResponses(value = {
@@ -219,6 +221,7 @@ public interface FakeApi {
219221
* @return Something wrong
220222
*/
221223
@DELETE
224+
@Path("/fake")
222225
@ApiOperation(value = "Fake endpoint to test group parameters (optional)", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake" })
223226
@ApiResponses(value = {
224227
@ApiResponse(code = 400, message = "Something wrong", response = Void.class) })
@@ -232,7 +235,7 @@ public interface FakeApi {
232235
* @return successful operation
233236
*/
234237
@POST
235-
@Path("/inline-additionalProperties")
238+
@Path("/fake/inline-additionalProperties")
236239
@Consumes({ "application/json" })
237240
@ApiOperation(value = "test inline additionalProperties", notes = "", tags={ "fake" })
238241
@ApiResponses(value = {
@@ -248,7 +251,7 @@ public interface FakeApi {
248251
* @return successful operation
249252
*/
250253
@GET
251-
@Path("/jsonFormData")
254+
@Path("/fake/jsonFormData")
252255
@Consumes({ "application/x-www-form-urlencoded" })
253256
@ApiOperation(value = "test json serialization of form data", notes = "", tags={ "fake" })
254257
@ApiResponses(value = {
@@ -267,7 +270,7 @@ public interface FakeApi {
267270
* @return Success
268271
*/
269272
@PUT
270-
@Path("/test-query-parameters")
273+
@Path("/fake/test-query-parameters")
271274
@ApiOperation(value = "", notes = "To test the collection format in query parameters", tags={ "fake" })
272275
@ApiResponses(value = {
273276
@ApiResponse(code = 200, message = "Success", response = Void.class) })
@@ -283,7 +286,7 @@ public interface FakeApi {
283286
* @return successful operation
284287
*/
285288
@POST
286-
@Path("/{petId}/uploadImageWithRequiredFile")
289+
@Path("/fake/{petId}/uploadImageWithRequiredFile")
287290
@Consumes({ "multipart/form-data" })
288291
@Produces({ "application/json" })
289292
@ApiOperation(value = "uploads an image (required)", notes = "", authorizations = {

samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
/**
1717
* Represents a collection of functions to interact with the API endpoints.
1818
*/
19-
@Path("/fake_classname_test")
2019
@Api(description = "the fake_classname_test API")
2120
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.17.0-SNAPSHOT")
2221
public interface FakeClassnameTestApi {
@@ -28,6 +27,7 @@ public interface FakeClassnameTestApi {
2827
* @return successful operation
2928
*/
3029
@PATCH
30+
@Path("/fake_classname_test")
3131
@Consumes({ "application/json" })
3232
@Produces({ "application/json" })
3333
@ApiOperation(value = "To test class name in snake case", notes = "To test class name in snake case", authorizations = {

samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/PetApi.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
/**
2020
* Represents a collection of functions to interact with the API endpoints.
2121
*/
22-
@Path("/pet")
2322
@Api(description = "the pet API")
2423
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.17.0-SNAPSHOT")
2524
public interface PetApi {
@@ -32,6 +31,7 @@ public interface PetApi {
3231
* @return Invalid input
3332
*/
3433
@POST
34+
@Path("/pet")
3535
@Consumes({ "application/json", "application/xml" })
3636
@ApiOperation(value = "Add a new pet to the store", notes = "", authorizations = {
3737
@Authorization(value = "petstore_auth", scopes = {
@@ -53,7 +53,7 @@ public interface PetApi {
5353
* @return Invalid pet value
5454
*/
5555
@DELETE
56-
@Path("/{petId}")
56+
@Path("/pet/{petId}")
5757
@ApiOperation(value = "Deletes a pet", notes = "", authorizations = {
5858
@Authorization(value = "petstore_auth", scopes = {
5959
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -73,7 +73,7 @@ public interface PetApi {
7373
* @return Invalid status value
7474
*/
7575
@GET
76-
@Path("/findByStatus")
76+
@Path("/pet/findByStatus")
7777
@Produces({ "application/xml", "application/json" })
7878
@ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", authorizations = {
7979
@Authorization(value = "petstore_auth", scopes = {
@@ -94,7 +94,7 @@ public interface PetApi {
9494
* @return Invalid tag value
9595
*/
9696
@GET
97-
@Path("/findByTags")
97+
@Path("/pet/findByTags")
9898
@Produces({ "application/xml", "application/json" })
9999
@ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", authorizations = {
100100
@Authorization(value = "petstore_auth", scopes = {
@@ -116,7 +116,7 @@ public interface PetApi {
116116
* @return Pet not found
117117
*/
118118
@GET
119-
@Path("/{petId}")
119+
@Path("/pet/{petId}")
120120
@Produces({ "application/xml", "application/json" })
121121
@ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", authorizations = {
122122

@@ -139,6 +139,7 @@ public interface PetApi {
139139
* @return Validation exception
140140
*/
141141
@PUT
142+
@Path("/pet")
142143
@Consumes({ "application/json", "application/xml" })
143144
@ApiOperation(value = "Update an existing pet", notes = "", authorizations = {
144145
@Authorization(value = "petstore_auth", scopes = {
@@ -162,7 +163,7 @@ public interface PetApi {
162163
* @return Invalid input
163164
*/
164165
@POST
165-
@Path("/{petId}")
166+
@Path("/pet/{petId}")
166167
@Consumes({ "application/x-www-form-urlencoded" })
167168
@ApiOperation(value = "Updates a pet in the store with form data", notes = "", authorizations = {
168169
@Authorization(value = "petstore_auth", scopes = {
@@ -183,7 +184,7 @@ public interface PetApi {
183184
* @return successful operation
184185
*/
185186
@POST
186-
@Path("/{petId}/uploadImage")
187+
@Path("/pet/{petId}/uploadImage")
187188
@Consumes({ "multipart/form-data" })
188189
@Produces({ "application/json" })
189190
@ApiOperation(value = "uploads an image", notes = "", authorizations = {

samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/StoreApi.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
/**
1818
* Represents a collection of functions to interact with the API endpoints.
1919
*/
20-
@Path("/store")
2120
@Api(description = "the store API")
2221
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.17.0-SNAPSHOT")
2322
public interface StoreApi {
@@ -30,7 +29,7 @@ public interface StoreApi {
3029
* @return Order not found
3130
*/
3231
@DELETE
33-
@Path("/order/{order_id}")
32+
@Path("/store/order/{order_id}")
3433
@ApiOperation(value = "Delete purchase order by ID", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store" })
3534
@ApiResponses(value = {
3635
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@@ -44,7 +43,7 @@ public interface StoreApi {
4443
* @return successful operation
4544
*/
4645
@GET
47-
@Path("/inventory")
46+
@Path("/store/inventory")
4847
@Produces({ "application/json" })
4948
@ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", authorizations = {
5049

@@ -64,7 +63,7 @@ public interface StoreApi {
6463
* @return Order not found
6564
*/
6665
@GET
67-
@Path("/order/{order_id}")
66+
@Path("/store/order/{order_id}")
6867
@Produces({ "application/xml", "application/json" })
6968
@ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", tags={ "store" })
7069
@ApiResponses(value = {
@@ -82,7 +81,7 @@ public interface StoreApi {
8281
* @return Invalid Order
8382
*/
8483
@POST
85-
@Path("/order")
84+
@Path("/store/order")
8685
@Produces({ "application/xml", "application/json" })
8786
@ApiOperation(value = "Place an order for a pet", notes = "", tags={ "store" })
8887
@ApiResponses(value = {

samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/UserApi.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
/**
1818
* Represents a collection of functions to interact with the API endpoints.
1919
*/
20-
@Path("/user")
2120
@Api(description = "the user API")
2221
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.17.0-SNAPSHOT")
2322
public interface UserApi {
@@ -29,6 +28,7 @@ public interface UserApi {
2928
* @return successful operation
3029
*/
3130
@POST
31+
@Path("/user")
3232
@ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", tags={ "user" })
3333
@ApiResponses(value = {
3434
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
@@ -42,7 +42,7 @@ public interface UserApi {
4242
* @return successful operation
4343
*/
4444
@POST
45-
@Path("/createWithArray")
45+
@Path("/user/createWithArray")
4646
@ApiOperation(value = "Creates list of users with given input array", notes = "", tags={ "user" })
4747
@ApiResponses(value = {
4848
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
@@ -56,7 +56,7 @@ public interface UserApi {
5656
* @return successful operation
5757
*/
5858
@POST
59-
@Path("/createWithList")
59+
@Path("/user/createWithList")
6060
@ApiOperation(value = "Creates list of users with given input array", notes = "", tags={ "user" })
6161
@ApiResponses(value = {
6262
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
@@ -71,7 +71,7 @@ public interface UserApi {
7171
* @return User not found
7272
*/
7373
@DELETE
74-
@Path("/{username}")
74+
@Path("/user/{username}")
7575
@ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", tags={ "user" })
7676
@ApiResponses(value = {
7777
@ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
@@ -88,7 +88,7 @@ public interface UserApi {
8888
* @return User not found
8989
*/
9090
@GET
91-
@Path("/{username}")
91+
@Path("/user/{username}")
9292
@Produces({ "application/xml", "application/json" })
9393
@ApiOperation(value = "Get user by user name", notes = "", tags={ "user" })
9494
@ApiResponses(value = {
@@ -107,7 +107,7 @@ public interface UserApi {
107107
* @return Invalid username/password supplied
108108
*/
109109
@GET
110-
@Path("/login")
110+
@Path("/user/login")
111111
@Produces({ "application/xml", "application/json" })
112112
@ApiOperation(value = "Logs user into the system", notes = "", tags={ "user" })
113113
@ApiResponses(value = {
@@ -122,7 +122,7 @@ public interface UserApi {
122122
* @return successful operation
123123
*/
124124
@GET
125-
@Path("/logout")
125+
@Path("/user/logout")
126126
@ApiOperation(value = "Logs out current logged in user session", notes = "", tags={ "user" })
127127
@ApiResponses(value = {
128128
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
@@ -138,7 +138,7 @@ public interface UserApi {
138138
* @return User not found
139139
*/
140140
@PUT
141-
@Path("/{username}")
141+
@Path("/user/{username}")
142142
@ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", tags={ "user" })
143143
@ApiResponses(value = {
144144
@ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class),

samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818

1919

20-
2120
@JsonTypeName("AdditionalPropertiesAnyType")
2221
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.17.0-SNAPSHOT")
2322
public class AdditionalPropertiesAnyType extends HashMap<String, Object> implements Serializable {

samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919

2020

21-
2221
@JsonTypeName("AdditionalPropertiesArray")
2322
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.17.0-SNAPSHOT")
2423
public class AdditionalPropertiesArray extends HashMap<String, List> implements Serializable {

0 commit comments

Comments
 (0)