forked from loafle/openapi-generator-original
[M][REQ][JAVA]: Add option to generate arrays with "uniqueItems" true as Sets rather than Lists (#5466)
* [REQ][JAVA]: Add option to generate arrays with "uniqueItems" true as Sets rather than Lists - Update Java code generation to use sets instead of lists when uniqueItems is set to true - Add import resolution for sets - Add tests and fix broke tests resolve #5254 * Update Javascript, Perl, Python and Ruby to preserve current functionality. * Switch set implementation to LinkedHashSet * Fix missing import for uniqueItems used on param. * Fix missing import and return type for responses with uniqueItems * Fix default values for array of enum * Update generated samples * fix merge issue * Update generated samples Co-authored-by: William Cheng <wing328hk@gmail.com>
This commit is contained in:
parent
dec1365619
commit
c49d8fda8e
@ -26,8 +26,10 @@ import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
@ -324,7 +326,7 @@ public class PetApiTest {
|
||||
|
||||
api.updatePet(pet);
|
||||
|
||||
List<Pet> pets = api.findPetsByTags(Arrays.asList("friendly"));
|
||||
Set<Pet> pets = api.findPetsByTags(new HashSet<>(Arrays.asList("friendly")));
|
||||
assertNotNull(pets);
|
||||
|
||||
boolean found = false;
|
||||
@ -396,7 +398,7 @@ public class PetApiTest {
|
||||
assertTrue(pet1.hashCode() == pet1.hashCode());
|
||||
|
||||
pet2.setName("really-happy");
|
||||
pet2.setPhotoUrls(Arrays.asList("http://foo.bar.com/1", "http://foo.bar.com/2"));
|
||||
pet2.setPhotoUrls(new HashSet<>(Arrays.asList("http://foo.bar.com/1", "http://foo.bar.com/2")));
|
||||
assertFalse(pet1.equals(pet2));
|
||||
assertFalse(pet2.equals(pet1));
|
||||
assertFalse(pet1.hashCode() == (pet2.hashCode()));
|
||||
@ -404,7 +406,7 @@ public class PetApiTest {
|
||||
assertTrue(pet2.hashCode() == pet2.hashCode());
|
||||
|
||||
pet1.setName("really-happy");
|
||||
pet1.setPhotoUrls(Arrays.asList("http://foo.bar.com/1", "http://foo.bar.com/2"));
|
||||
pet1.setPhotoUrls(new HashSet<>(Arrays.asList("http://foo.bar.com/1", "http://foo.bar.com/2")));
|
||||
assertTrue(pet1.equals(pet2));
|
||||
assertTrue(pet2.equals(pet1));
|
||||
assertTrue(pet1.hashCode() == pet2.hashCode());
|
||||
@ -423,7 +425,7 @@ public class PetApiTest {
|
||||
|
||||
pet.setCategory(category);
|
||||
pet.setStatus(Pet.StatusEnum.AVAILABLE);
|
||||
List<String> photos = Arrays.asList("http://foo.bar.com/1", "http://foo.bar.com/2");
|
||||
Set<String> photos = new HashSet<>(Arrays.asList("http://foo.bar.com/1", "http://foo.bar.com/2"));
|
||||
pet.setPhotoUrls(photos);
|
||||
|
||||
return pet;
|
||||
|
@ -36,6 +36,7 @@ sidebar_label: android
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|
@ -24,6 +24,7 @@ sidebar_label: apache2
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|
@ -31,6 +31,7 @@ sidebar_label: bash
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|
@ -30,6 +30,7 @@ sidebar_label: clojure
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|
@ -20,6 +20,7 @@ sidebar_label: eiffel
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|
@ -26,6 +26,7 @@ sidebar_label: elixir
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|
@ -19,6 +19,7 @@ sidebar_label: erlang-client
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|
@ -19,6 +19,7 @@ sidebar_label: erlang-proper
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|
@ -19,6 +19,7 @@ sidebar_label: erlang-server
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|
@ -20,6 +20,7 @@ sidebar_label: graphql-nodejs-express-server
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|
@ -20,6 +20,7 @@ sidebar_label: graphql-schema
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|
@ -54,6 +54,7 @@ sidebar_label: groovy
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
@ -71,6 +72,7 @@ sidebar_label: groovy
|
||||
| ---------- | --------------- |
|
||||
|array|ArrayList|
|
||||
|map|HashMap|
|
||||
|set|LinkedHashSet|
|
||||
|
||||
|
||||
## LANGUAGE PRIMITIVES
|
||||
|
@ -56,6 +56,7 @@ sidebar_label: java-inflector
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
@ -73,6 +74,7 @@ sidebar_label: java-inflector
|
||||
| ---------- | --------------- |
|
||||
|array|ArrayList|
|
||||
|map|HashMap|
|
||||
|set|LinkedHashSet|
|
||||
|
||||
|
||||
## LANGUAGE PRIMITIVES
|
||||
|
@ -61,6 +61,7 @@ sidebar_label: java-msf4j
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
@ -78,6 +79,7 @@ sidebar_label: java-msf4j
|
||||
| ---------- | --------------- |
|
||||
|array|ArrayList|
|
||||
|map|HashMap|
|
||||
|set|LinkedHashSet|
|
||||
|
||||
|
||||
## LANGUAGE PRIMITIVES
|
||||
|
@ -63,6 +63,7 @@ sidebar_label: java-pkmst
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
@ -80,6 +81,7 @@ sidebar_label: java-pkmst
|
||||
| ---------- | --------------- |
|
||||
|array|ArrayList|
|
||||
|map|HashMap|
|
||||
|set|LinkedHashSet|
|
||||
|
||||
|
||||
## LANGUAGE PRIMITIVES
|
||||
|
@ -65,6 +65,7 @@ sidebar_label: java-play-framework
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
@ -82,6 +83,7 @@ sidebar_label: java-play-framework
|
||||
| ---------- | --------------- |
|
||||
|array|ArrayList|
|
||||
|map|HashMap|
|
||||
|set|LinkedHashSet|
|
||||
|
||||
|
||||
## LANGUAGE PRIMITIVES
|
||||
|
@ -56,6 +56,7 @@ sidebar_label: java-undertow-server
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
@ -73,6 +74,7 @@ sidebar_label: java-undertow-server
|
||||
| ---------- | --------------- |
|
||||
|array|ArrayList|
|
||||
|map|HashMap|
|
||||
|set|LinkedHashSet|
|
||||
|
||||
|
||||
## LANGUAGE PRIMITIVES
|
||||
|
@ -56,6 +56,7 @@ sidebar_label: java-vertx-web
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
@ -73,6 +74,7 @@ sidebar_label: java-vertx-web
|
||||
| ---------- | --------------- |
|
||||
|array|ArrayList|
|
||||
|map|HashMap|
|
||||
|set|LinkedHashSet|
|
||||
|
||||
|
||||
## LANGUAGE PRIMITIVES
|
||||
|
@ -59,6 +59,7 @@ sidebar_label: java-vertx
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
@ -76,6 +77,7 @@ sidebar_label: java-vertx
|
||||
| ---------- | --------------- |
|
||||
|array|ArrayList|
|
||||
|map|HashMap|
|
||||
|set|LinkedHashSet|
|
||||
|
||||
|
||||
## LANGUAGE PRIMITIVES
|
||||
|
@ -72,6 +72,7 @@ sidebar_label: java
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
@ -89,6 +90,7 @@ sidebar_label: java
|
||||
| ---------- | --------------- |
|
||||
|array|ArrayList|
|
||||
|map|HashMap|
|
||||
|set|LinkedHashSet|
|
||||
|
||||
|
||||
## LANGUAGE PRIMITIVES
|
||||
|
@ -42,6 +42,7 @@ sidebar_label: javascript
|
||||
|array|Array|
|
||||
|list|Array|
|
||||
|map|Object|
|
||||
|set|Array|
|
||||
|
||||
|
||||
## LANGUAGE PRIMITIVES
|
||||
|
@ -67,6 +67,7 @@ sidebar_label: jaxrs-cxf-cdi
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.LocalDate|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
@ -84,6 +85,7 @@ sidebar_label: jaxrs-cxf-cdi
|
||||
| ---------- | --------------- |
|
||||
|array|ArrayList|
|
||||
|map|HashMap|
|
||||
|set|LinkedHashSet|
|
||||
|
||||
|
||||
## LANGUAGE PRIMITIVES
|
||||
|
@ -60,6 +60,7 @@ sidebar_label: jaxrs-cxf-client
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.LocalDate|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
@ -77,6 +78,7 @@ sidebar_label: jaxrs-cxf-client
|
||||
| ---------- | --------------- |
|
||||
|array|ArrayList|
|
||||
|map|HashMap|
|
||||
|set|LinkedHashSet|
|
||||
|
||||
|
||||
## LANGUAGE PRIMITIVES
|
||||
|
@ -82,6 +82,7 @@ sidebar_label: jaxrs-cxf-extended
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.LocalDate|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
@ -99,6 +100,7 @@ sidebar_label: jaxrs-cxf-extended
|
||||
| ---------- | --------------- |
|
||||
|array|ArrayList|
|
||||
|map|HashMap|
|
||||
|set|LinkedHashSet|
|
||||
|
||||
|
||||
## LANGUAGE PRIMITIVES
|
||||
|
@ -77,6 +77,7 @@ sidebar_label: jaxrs-cxf
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.LocalDate|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
@ -94,6 +95,7 @@ sidebar_label: jaxrs-cxf
|
||||
| ---------- | --------------- |
|
||||
|array|ArrayList|
|
||||
|map|HashMap|
|
||||
|set|LinkedHashSet|
|
||||
|
||||
|
||||
## LANGUAGE PRIMITIVES
|
||||
|
@ -63,6 +63,7 @@ sidebar_label: jaxrs-jersey
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
@ -80,6 +81,7 @@ sidebar_label: jaxrs-jersey
|
||||
| ---------- | --------------- |
|
||||
|array|ArrayList|
|
||||
|map|HashMap|
|
||||
|set|LinkedHashSet|
|
||||
|
||||
|
||||
## LANGUAGE PRIMITIVES
|
||||
|
@ -62,6 +62,7 @@ sidebar_label: jaxrs-resteasy-eap
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
@ -79,6 +80,7 @@ sidebar_label: jaxrs-resteasy-eap
|
||||
| ---------- | --------------- |
|
||||
|array|ArrayList|
|
||||
|map|HashMap|
|
||||
|set|LinkedHashSet|
|
||||
|
||||
|
||||
## LANGUAGE PRIMITIVES
|
||||
|
@ -61,6 +61,7 @@ sidebar_label: jaxrs-resteasy
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
@ -78,6 +79,7 @@ sidebar_label: jaxrs-resteasy
|
||||
| ---------- | --------------- |
|
||||
|array|ArrayList|
|
||||
|map|HashMap|
|
||||
|set|LinkedHashSet|
|
||||
|
||||
|
||||
## LANGUAGE PRIMITIVES
|
||||
|
@ -67,6 +67,7 @@ sidebar_label: jaxrs-spec
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.LocalDate|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
@ -84,6 +85,7 @@ sidebar_label: jaxrs-spec
|
||||
| ---------- | --------------- |
|
||||
|array|ArrayList|
|
||||
|map|HashMap|
|
||||
|set|LinkedHashSet|
|
||||
|
||||
|
||||
## LANGUAGE PRIMITIVES
|
||||
|
@ -23,6 +23,7 @@ sidebar_label: jmeter
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|
@ -23,6 +23,7 @@ sidebar_label: k6
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|
@ -23,6 +23,7 @@ sidebar_label: markdown
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|
@ -23,6 +23,7 @@ sidebar_label: nim
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|
@ -24,6 +24,7 @@ sidebar_label: nodejs-express-server
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|
@ -26,6 +26,7 @@ sidebar_label: nodejs-server-deprecated
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|
@ -22,6 +22,7 @@ sidebar_label: ocaml
|
||||
|Date|java.util.Date|
|
||||
|DateTime|org.joda.time.*|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|
@ -24,6 +24,7 @@ sidebar_label: openapi-yaml
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|
@ -23,6 +23,7 @@ sidebar_label: openapi
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|
@ -30,6 +30,7 @@ sidebar_label: php-laravel
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|
@ -30,6 +30,7 @@ sidebar_label: php-lumen
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|
@ -23,6 +23,7 @@ sidebar_label: php-silex-deprecated
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|
@ -30,6 +30,7 @@ sidebar_label: php-ze-ph
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|
@ -23,6 +23,7 @@ sidebar_label: plantuml
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|
@ -23,6 +23,7 @@ sidebar_label: powershell-experimental
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|
@ -23,6 +23,7 @@ sidebar_label: powershell
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|
@ -31,6 +31,7 @@ sidebar_label: python-aiohttp
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|
@ -31,6 +31,7 @@ sidebar_label: python-blueplanet
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|
@ -31,6 +31,7 @@ sidebar_label: python-flask
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|
@ -18,6 +18,7 @@ sidebar_label: ruby-on-rails
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|
@ -17,6 +17,7 @@ sidebar_label: ruby-sinatra
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|
@ -22,6 +22,7 @@ sidebar_label: rust
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|
@ -78,6 +78,7 @@ sidebar_label: spring
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
@ -95,6 +96,7 @@ sidebar_label: spring
|
||||
| ---------- | --------------- |
|
||||
|array|ArrayList|
|
||||
|map|HashMap|
|
||||
|set|LinkedHashSet|
|
||||
|
||||
|
||||
## LANGUAGE PRIMITIVES
|
||||
|
@ -29,7 +29,7 @@ public class CodegenOperation {
|
||||
isListContainer, isMultipart, hasMore = true,
|
||||
isResponseBinary = false, isResponseFile = false, hasReference = false,
|
||||
isRestfulIndex, isRestfulShow, isRestfulCreate, isRestfulUpdate, isRestfulDestroy,
|
||||
isRestful, isDeprecated, isCallbackRequest;
|
||||
isRestful, isDeprecated, isCallbackRequest, uniqueItems;
|
||||
public String path, operationId, returnType, httpMethod, returnBaseType,
|
||||
returnContainer, summary, unescapedNotes, notes, baseName, defaultResponse;
|
||||
public CodegenDiscriminator discriminator;
|
||||
@ -270,6 +270,7 @@ public class CodegenOperation {
|
||||
sb.append(", isRestful=").append(isRestful);
|
||||
sb.append(", isDeprecated=").append(isDeprecated);
|
||||
sb.append(", isCallbackRequest=").append(isCallbackRequest);
|
||||
sb.append(", uniqueItems='").append(uniqueItems);
|
||||
sb.append(", path='").append(path).append('\'');
|
||||
sb.append(", operationId='").append(operationId).append('\'');
|
||||
sb.append(", returnType='").append(returnType).append('\'');
|
||||
@ -343,6 +344,7 @@ public class CodegenOperation {
|
||||
isRestful == that.isRestful &&
|
||||
isDeprecated == that.isDeprecated &&
|
||||
isCallbackRequest == that.isCallbackRequest &&
|
||||
uniqueItems == that.uniqueItems &&
|
||||
Objects.equals(responseHeaders, that.responseHeaders) &&
|
||||
Objects.equals(path, that.path) &&
|
||||
Objects.equals(operationId, that.operationId) &&
|
||||
@ -393,9 +395,9 @@ public class CodegenOperation {
|
||||
hasRequiredParams, returnTypeIsPrimitive, returnSimpleType, subresourceOperation, isMapContainer,
|
||||
isListContainer, isMultipart, hasMore, isResponseBinary, isResponseFile, hasReference, isRestfulIndex,
|
||||
isRestfulShow, isRestfulCreate, isRestfulUpdate, isRestfulDestroy, isRestful, isDeprecated,
|
||||
isCallbackRequest, path, operationId, returnType, httpMethod, returnBaseType, returnContainer,
|
||||
summary, unescapedNotes, notes, baseName, defaultResponse, discriminator, consumes, produces,
|
||||
prioritizedContentTypes, servers, bodyParam, allParams, bodyParams, pathParams, queryParams,
|
||||
isCallbackRequest, uniqueItems, path, operationId, returnType, httpMethod, returnBaseType,
|
||||
returnContainer, summary, unescapedNotes, notes, baseName, defaultResponse, discriminator, consumes,
|
||||
produces, prioritizedContentTypes, servers, bodyParam, allParams, bodyParams, pathParams, queryParams,
|
||||
headerParams, formParams, cookieParams, requiredParams, optionalParams, authMethods, tags,
|
||||
responses, callbacks, imports, examples, requestBodyExamples, externalDocs, vendorExtensions,
|
||||
nickname, operationIdOriginal, operationIdLowerCase, operationIdCamelCase, operationIdSnakeCase);
|
||||
|
@ -1378,8 +1378,10 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
|
||||
typeMapping = new HashMap<String, String>();
|
||||
typeMapping.put("array", "List");
|
||||
typeMapping.put("set", "Set");
|
||||
typeMapping.put("map", "Map");
|
||||
typeMapping.put("List", "List");
|
||||
typeMapping.put("Set", "Set");
|
||||
typeMapping.put("boolean", "Boolean");
|
||||
typeMapping.put("string", "String");
|
||||
typeMapping.put("int", "Integer");
|
||||
@ -1418,6 +1420,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
importMapping.put("ArrayList", "java.util.ArrayList");
|
||||
importMapping.put("List", "java.util.*");
|
||||
importMapping.put("Set", "java.util.*");
|
||||
importMapping.put("LinkedHashSet", "java.util.LinkedHashSet");
|
||||
importMapping.put("DateTime", "org.joda.time.*");
|
||||
importMapping.put("LocalDateTime", "org.joda.time.*");
|
||||
importMapping.put("LocalDate", "org.joda.time.*");
|
||||
@ -1588,7 +1591,13 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
} else if (ModelUtils.isArraySchema(schema)) {
|
||||
ArraySchema arraySchema = (ArraySchema) schema;
|
||||
String inner = getSchemaType(getSchemaItems(arraySchema));
|
||||
return instantiationTypes.get("array") + "<" + inner + ">";
|
||||
String parentType;
|
||||
if (ModelUtils.isSet(schema)) {
|
||||
parentType = "set";
|
||||
} else {
|
||||
parentType = "array";
|
||||
}
|
||||
return instantiationTypes.get(parentType) + "<" + inner + ">";
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
@ -1979,7 +1988,11 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
} else if (ModelUtils.isMapSchema(schema)) {
|
||||
return "map";
|
||||
} else if (ModelUtils.isArraySchema(schema)) {
|
||||
return "array";
|
||||
if (ModelUtils.isSet(schema)) {
|
||||
return "set";
|
||||
} else {
|
||||
return "array";
|
||||
}
|
||||
} else if (ModelUtils.isUUIDSchema(schema)) {
|
||||
return "UUID";
|
||||
} else if (ModelUtils.isURISchema(schema)) {
|
||||
@ -3110,7 +3123,11 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
if (ModelUtils.isArraySchema(p)) {
|
||||
property.isContainer = true;
|
||||
property.isListContainer = true;
|
||||
property.containerType = "array";
|
||||
if (ModelUtils.isSet(p)) {
|
||||
property.containerType = "set";
|
||||
} else {
|
||||
property.containerType = "array";
|
||||
}
|
||||
property.baseType = getSchemaType(p);
|
||||
if (p.getXml() != null) {
|
||||
property.isXmlWrapped = p.getXml().getWrapped() == null ? false : p.getXml().getWrapped();
|
||||
@ -3430,6 +3447,8 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
op.isListContainer = true;
|
||||
} else if ("array".equalsIgnoreCase(cm.containerType)) {
|
||||
op.isListContainer = true;
|
||||
} else if ("set".equalsIgnoreCase(cm.containerType)) {
|
||||
op.isListContainer = true;
|
||||
}
|
||||
} else {
|
||||
op.returnSimpleType = true;
|
||||
@ -3521,6 +3540,10 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
!languageSpecificPrimitives.contains(r.baseType)) {
|
||||
imports.add(r.baseType);
|
||||
}
|
||||
if ("set".equals(r.containerType) && typeMapping.containsKey(r.containerType)) {
|
||||
op.uniqueItems = true;
|
||||
imports.add(typeMapping.get(r.containerType));
|
||||
}
|
||||
r.isDefault = response == methodResponse;
|
||||
op.responses.add(r);
|
||||
if (Boolean.TRUE.equals(r.isBinary) && Boolean.TRUE.equals(r.isDefault)) {
|
||||
@ -3868,7 +3891,9 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
r.simpleType = false;
|
||||
r.containerType = cp.containerType;
|
||||
r.isMapContainer = "map".equals(cp.containerType);
|
||||
r.isListContainer = "list".equalsIgnoreCase(cp.containerType) || "array".equalsIgnoreCase(cp.containerType);
|
||||
r.isListContainer = "list".equalsIgnoreCase(cp.containerType) ||
|
||||
"array".equalsIgnoreCase(cp.containerType) ||
|
||||
"set".equalsIgnoreCase(cp.containerType);
|
||||
} else {
|
||||
r.simpleType = true;
|
||||
}
|
||||
@ -4099,6 +4124,9 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
if (ModelUtils.isObjectSchema(parameterSchema)) {
|
||||
codegenProperty.complexType = codegenParameter.dataType;
|
||||
}
|
||||
if (ModelUtils.isSet(parameterSchema)) {
|
||||
imports.add(codegenProperty.baseType);
|
||||
}
|
||||
codegenParameter.dataFormat = codegenProperty.dataFormat;
|
||||
codegenParameter.required = codegenProperty.required;
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
package org.openapitools.codegen.languages;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
|
||||
import io.swagger.v3.oas.models.OpenAPI;
|
||||
import io.swagger.v3.oas.models.Operation;
|
||||
import io.swagger.v3.oas.models.PathItem;
|
||||
@ -166,6 +167,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
"byte[]")
|
||||
);
|
||||
instantiationTypes.put("array", "ArrayList");
|
||||
instantiationTypes.put("set", "LinkedHashSet");
|
||||
instantiationTypes.put("map", "HashMap");
|
||||
typeMapping.put("date", "Date");
|
||||
typeMapping.put("file", "File");
|
||||
@ -431,9 +433,11 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
additionalProperties.put("modelDocPath", modelDocPath);
|
||||
|
||||
importMapping.put("List", "java.util.List");
|
||||
importMapping.put("Set", "java.util.Set");
|
||||
|
||||
if (fullJavaUtil) {
|
||||
typeMapping.put("array", "java.util.List");
|
||||
typeMapping.put("set", "java.util.Set");
|
||||
typeMapping.put("map", "java.util.Map");
|
||||
typeMapping.put("DateTime", "java.util.Date");
|
||||
typeMapping.put("UUID", "java.util.UUID");
|
||||
@ -448,6 +452,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
importMapping.remove("DateTime");
|
||||
importMapping.remove("UUID");
|
||||
instantiationTypes.put("array", "java.util.ArrayList");
|
||||
instantiationTypes.put("set", "java.util.LinkedHashSet");
|
||||
instantiationTypes.put("map", "java.util.HashMap");
|
||||
}
|
||||
|
||||
@ -779,10 +784,18 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
schema = ModelUtils.getReferencedSchema(this.openAPI, schema);
|
||||
if (ModelUtils.isArraySchema(schema)) {
|
||||
final String pattern;
|
||||
if (fullJavaUtil) {
|
||||
pattern = "new java.util.ArrayList<%s>()";
|
||||
if (ModelUtils.isSet(schema)) {
|
||||
if (fullJavaUtil) {
|
||||
pattern = "new java.util.LinkedHashSet<%s>()";
|
||||
} else {
|
||||
pattern = "new LinkedHashSet<%s>()";
|
||||
}
|
||||
} else {
|
||||
pattern = "new ArrayList<%s>()";
|
||||
if (fullJavaUtil) {
|
||||
pattern = "new java.util.ArrayList<%s>()";
|
||||
} else {
|
||||
pattern = "new ArrayList<%s>()";
|
||||
}
|
||||
}
|
||||
|
||||
Schema<?> items = getSchemaItems((ArraySchema) schema);
|
||||
@ -1041,6 +1054,8 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
if (!fullJavaUtil) {
|
||||
if ("array".equals(property.containerType)) {
|
||||
model.imports.add("ArrayList");
|
||||
} else if ("set".equals(property.containerType)) {
|
||||
model.imports.add("LinkedHashSet");
|
||||
} else if ("map".equals(property.containerType)) {
|
||||
model.imports.add("HashMap");
|
||||
}
|
||||
|
@ -201,6 +201,8 @@ public abstract class AbstractJavaJAXRSServerCodegen extends AbstractJavaCodegen
|
||||
|
||||
if ("array".equals(resp.containerType)) {
|
||||
resp.containerType = "List";
|
||||
} else if ("set".equals(resp.containerType)) {
|
||||
resp.containerType = "Set";
|
||||
} else if ("map".equals(resp.containerType)) {
|
||||
resp.containerType = "Map";
|
||||
}
|
||||
@ -216,6 +218,8 @@ public abstract class AbstractJavaJAXRSServerCodegen extends AbstractJavaCodegen
|
||||
|
||||
if ("array".equals(operation.returnContainer)) {
|
||||
operation.returnContainer = "List";
|
||||
} else if ("set".equals(operation.returnContainer)) {
|
||||
operation.returnContainer = "Set";
|
||||
} else if ("map".equals(operation.returnContainer)) {
|
||||
operation.returnContainer = "Map";
|
||||
}
|
||||
|
@ -77,6 +77,7 @@ abstract public class AbstractRubyCodegen extends DefaultCodegen implements Code
|
||||
typeMapping.put("date", "Date");
|
||||
typeMapping.put("DateTime", "DateTime");
|
||||
typeMapping.put("array", "Array");
|
||||
typeMapping.put("set", "Array");
|
||||
typeMapping.put("List", "Array");
|
||||
typeMapping.put("map", "Hash");
|
||||
typeMapping.put("object", "Object");
|
||||
|
@ -741,7 +741,8 @@ public class ElixirClientCodegen extends DefaultCodegen implements CodegenConfig
|
||||
sb.append(returnBaseType);
|
||||
sb.append(".t");
|
||||
} else {
|
||||
if (returnContainer.equals("array")) {
|
||||
if (returnContainer.equals("array") ||
|
||||
returnContainer.equals("set")) {
|
||||
sb.append("list(");
|
||||
if (!returnTypeIsPrimitive) {
|
||||
sb.append(moduleName);
|
||||
|
@ -139,10 +139,12 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo
|
||||
defaultIncludes = new HashSet<String>(languageSpecificPrimitives);
|
||||
|
||||
instantiationTypes.put("array", "Array");
|
||||
instantiationTypes.put("set", "Array");
|
||||
instantiationTypes.put("list", "Array");
|
||||
instantiationTypes.put("map", "Object");
|
||||
typeMapping.clear();
|
||||
typeMapping.put("array", "Array");
|
||||
typeMapping.put("set", "Array");
|
||||
typeMapping.put("map", "Object");
|
||||
typeMapping.put("List", "Array");
|
||||
typeMapping.put("boolean", "Boolean");
|
||||
@ -923,7 +925,7 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo
|
||||
|
||||
private String getJSDocType(CodegenModel cm, CodegenProperty cp) {
|
||||
if (Boolean.TRUE.equals(cp.isContainer)) {
|
||||
if (cp.containerType.equals("array"))
|
||||
if (cp.containerType.equals("array") || cp.containerType.equals("set"))
|
||||
return "Array.<" + getJSDocType(cm, cp.items) + ">";
|
||||
else if (cp.containerType.equals("map"))
|
||||
return "Object.<String, " + getJSDocType(cm, cp.items) + ">";
|
||||
|
@ -155,6 +155,7 @@ public class MysqlSchemaCodegen extends DefaultCodegen implements CodegenConfig
|
||||
|
||||
// https://dev.mysql.com/doc/refman/8.0/en/data-types.html
|
||||
typeMapping.put("array", "JSON");
|
||||
typeMapping.put("set", "JSON");
|
||||
typeMapping.put("map", "JSON");
|
||||
typeMapping.put("List", "JSON");
|
||||
typeMapping.put("boolean", "BOOL");
|
||||
|
@ -131,6 +131,7 @@ public class PerlClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
typeMapping.put("DateTime", "DateTime");
|
||||
typeMapping.put("password", "string");
|
||||
typeMapping.put("array", "ARRAY");
|
||||
typeMapping.put("set", "ARRAY");
|
||||
typeMapping.put("map", "HASH");
|
||||
typeMapping.put("object", "object");
|
||||
typeMapping.put("binary", "string");
|
||||
|
@ -128,6 +128,7 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
|
||||
typeMapping.put("long", "int");
|
||||
typeMapping.put("double", "float");
|
||||
typeMapping.put("array", "list");
|
||||
typeMapping.put("set", "list");
|
||||
typeMapping.put("map", "dict");
|
||||
typeMapping.put("boolean", "bool");
|
||||
typeMapping.put("string", "str");
|
||||
|
@ -1 +1 @@
|
||||
{{#returnContainer}}{{#isMapContainer}}Map<String, {{{returnType}}}>{{/isMapContainer}}{{#isListContainer}}List<{{{returnType}}}>{{/isListContainer}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}
|
||||
{{#returnContainer}}{{#isMapContainer}}Map<String, {{{returnType}}}>{{/isMapContainer}}{{#isListContainer}}{{{returnContainer}}}<{{{returnType}}}>{{/isListContainer}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}
|
@ -1 +1 @@
|
||||
{{#returnContainer}}{{#isMapContainer}}Map<String, {{{returnType}}}>{{/isMapContainer}}{{#isListContainer}}List<{{{returnType}}}>{{/isListContainer}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}
|
||||
{{#returnContainer}}{{#isMapContainer}}Map<String, {{{returnType}}}>{{/isMapContainer}}{{#isListContainer}}{{{returnContainer}}}<{{{returnType}}}>{{/isListContainer}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}
|
@ -1 +1 @@
|
||||
{{#returnContainer}}{{#isMapContainer}}Map{{/isMapContainer}}{{#isListContainer}}List{{/isListContainer}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}
|
||||
{{#returnContainer}}{{#isMapContainer}}Map{{/isMapContainer}}{{#isListContainer}}{{{returnContainer}}}{{/isListContainer}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}
|
@ -7,6 +7,7 @@ import play.mvc.Http;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.io.FileInputStream;
|
||||
{{#useBeanValidation}}
|
||||
import javax.validation.constraints.*;
|
||||
|
@ -9,6 +9,7 @@ import play.mvc.Http;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashSet;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.google.inject.Inject;
|
||||
@ -102,7 +103,7 @@ public class {{classname}}Controller extends Controller {
|
||||
}
|
||||
{{/required}}
|
||||
List<String> {{paramName}}List = OpenAPIUtils.parametersToList("{{collectionFormat}}", {{paramName}}Array);
|
||||
{{{dataType}}} {{paramName}} = new Array{{{dataType}}}();
|
||||
{{{dataType}}} {{paramName}} = new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>();
|
||||
for (String curParam : {{paramName}}List) {
|
||||
if (!curParam.isEmpty()) {
|
||||
//noinspection UseBulkOperation
|
||||
@ -143,7 +144,7 @@ public class {{classname}}Controller extends Controller {
|
||||
}
|
||||
{{/required}}
|
||||
List<String> {{paramName}}List = OpenAPIUtils.parametersToList("{{collectionFormat}}", {{paramName}}Array);
|
||||
{{{dataType}}} {{paramName}} = new Array{{{dataType}}}();
|
||||
{{{dataType}}} {{paramName}} = new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>();
|
||||
for (String curParam : {{paramName}}List) {
|
||||
if (!curParam.isEmpty()) {
|
||||
//noinspection UseBulkOperation
|
||||
@ -176,7 +177,7 @@ public class {{classname}}Controller extends Controller {
|
||||
}
|
||||
{{/required}}
|
||||
List<String> {{paramName}}List = OpenAPIUtils.parametersToList("{{collectionFormat}}", {{paramName}}Array);
|
||||
{{{dataType}}} {{paramName}} = new Array{{{dataType}}}();
|
||||
{{{dataType}}} {{paramName}} = new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>();
|
||||
for (String curParam : {{paramName}}List) {
|
||||
if (!curParam.isEmpty()) {
|
||||
//noinspection UseBulkOperation
|
||||
|
@ -1 +1 @@
|
||||
{{#returnType}}{{#returnContainer}}{{#isMapContainer}}Map<String, {{{returnType}}}>{{/isMapContainer}}{{#isListContainer}}List<{{{returnType}}}>{{/isListContainer}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}{{/returnType}}{{^returnType}}void{{/returnType}}
|
||||
{{#returnType}}{{#returnContainer}}{{#isMapContainer}}Map<String, {{{returnType}}}>{{/isMapContainer}}{{#isListContainer}}{{{returnContainer}}}<{{{returnType}}}>{{/isListContainer}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}{{/returnType}}{{^returnType}}void{{/returnType}}
|
@ -1 +1 @@
|
||||
{{#returnType}}{{#returnContainer}}{{#isMapContainer}}Map<String, {{{returnType}}}>{{/isMapContainer}}{{#isListContainer}}List<{{{returnType}}}>{{/isListContainer}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}{{/returnType}}
|
||||
{{#returnType}}{{#returnContainer}}{{#isMapContainer}}Map<String, {{{returnType}}}>{{/isMapContainer}}{{#isListContainer}}{{{returnContainer}}}<{{{returnType}}}>{{/isListContainer}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}{{/returnType}}
|
@ -1 +1 @@
|
||||
{{#returnType}}{{#returnContainer}}{{#isMapContainer}}HashMap<String, {{{returnType}}}>{{/isMapContainer}}{{#isListContainer}}ArrayList<{{{returnType}}}>{{/isListContainer}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}{{/returnType}}
|
||||
{{#returnType}}{{#returnContainer}}{{#isMapContainer}}HashMap<String, {{{returnType}}}>{{/isMapContainer}}{{#isListContainer}}{{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<{{{returnType}}}>{{/isListContainer}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}{{/returnType}}
|
@ -1 +1 @@
|
||||
{{#returnContainer}}{{#isMapContainer}}Map<String, {{/isMapContainer}}{{#isListContainer}}List<{{/isListContainer}}{{{returnType}}}>{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}
|
||||
{{#returnContainer}}{{#isMapContainer}}Map<String, {{/isMapContainer}}{{#isListContainer}}{{{returnContainer}}}<{{/isListContainer}}{{{returnType}}}>{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}
|
@ -1 +1 @@
|
||||
{{#isMapContainer}}Map<String, {{{returnType}}}>{{/isMapContainer}}{{#isListContainer}}{{#reactive}}Flux{{/reactive}}{{^reactive}}List{{/reactive}}<{{{returnType}}}>{{/isListContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}
|
||||
{{#isMapContainer}}Map<String, {{{returnType}}}>{{/isMapContainer}}{{#isListContainer}}{{#reactive}}Flux{{/reactive}}{{^reactive}}{{{returnContainer}}}{{/reactive}}<{{{returnType}}}>{{/isListContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}
|
@ -1 +1 @@
|
||||
{{#returnContainer}}{{#isMapContainer}}Map<String, {{{returnType}}}>{{/isMapContainer}}{{#isListContainer}}List<{{{returnType}}}>{{/isListContainer}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}
|
||||
{{#returnContainer}}{{#isMapContainer}}Map<String, {{{returnType}}}>{{/isMapContainer}}{{#isListContainer}}{{{returnContainer}}}<{{{returnType}}}>{{/isListContainer}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}
|
@ -1 +1 @@
|
||||
{{#returnContainer}}{{#isMapContainer}}Map{{/isMapContainer}}{{#isListContainer}}List{{/isListContainer}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}
|
||||
{{#returnContainer}}{{#isMapContainer}}Map{{/isMapContainer}}{{#isListContainer}}{{{returnContainer}}}{{/isListContainer}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}
|
@ -1 +1 @@
|
||||
{{#returnContainer}}{{#isMapContainer}}Map<String, {{{returnType}}}>{{/isMapContainer}}{{#isListContainer}}List<{{{returnType}}}>{{/isListContainer}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}
|
||||
{{#returnContainer}}{{#isMapContainer}}Map<String, {{{returnType}}}>{{/isMapContainer}}{{#isListContainer}}{{{returnContainer}}}<{{{returnType}}}>{{/isListContainer}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}
|
@ -1 +1 @@
|
||||
{{#isMapContainer}}Map<String, {{{returnType}}}>{{/isMapContainer}}{{#isListContainer}}{{#reactive}}Flow{{/reactive}}{{^reactive}}List{{/reactive}}<{{{returnType}}}>{{/isListContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}
|
||||
{{#isMapContainer}}Map<String, {{{returnType}}}>{{/isMapContainer}}{{#isListContainer}}{{#reactive}}Flow{{/reactive}}{{^reactive}}{{{returnContainer}}}{{/reactive}}<{{{returnType}}}>{{/isListContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}
|
@ -446,6 +446,18 @@ public class AbstractJavaCodegenTest {
|
||||
defaultValue = codegen.getTypeDeclaration(schema);
|
||||
Assert.assertEquals(defaultValue, "List<NestedArray>");
|
||||
|
||||
// Create an array schema with item type set to the array alias
|
||||
schema = new ArraySchema().items(new Schema().$ref("#/components/schemas/NestedArray"));
|
||||
schema.setUniqueItems(true);
|
||||
|
||||
ModelUtils.setGenerateAliasAsModel(false);
|
||||
defaultValue = codegen.getTypeDeclaration(schema);
|
||||
Assert.assertEquals(defaultValue, "Set<List<Integer>>");
|
||||
|
||||
ModelUtils.setGenerateAliasAsModel(true);
|
||||
defaultValue = codegen.getTypeDeclaration(schema);
|
||||
Assert.assertEquals(defaultValue, "Set<NestedArray>");
|
||||
|
||||
// Create a map schema with additionalProperties type set to array alias
|
||||
schema = new MapSchema().additionalProperties(new Schema().$ref("#/components/schemas/NestedArray"));
|
||||
|
||||
|
@ -110,11 +110,11 @@ public class JavaModelTest {
|
||||
@Test(description = "convert a model with list property")
|
||||
public void listPropertyTest() {
|
||||
final Schema schema = new Schema()
|
||||
.description("a sample model")
|
||||
.addProperties("id", new IntegerSchema().format(SchemaTypeUtil.INTEGER64_FORMAT))
|
||||
.addProperties("urls", new ArraySchema()
|
||||
.items(new StringSchema()))
|
||||
.addRequiredItem("id");
|
||||
.description("a sample model")
|
||||
.addProperties("id", new IntegerSchema().format(SchemaTypeUtil.INTEGER64_FORMAT))
|
||||
.addProperties("urls", new ArraySchema()
|
||||
.items(new StringSchema()))
|
||||
.addRequiredItem("id");
|
||||
final DefaultCodegen codegen = new JavaClientCodegen();
|
||||
OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", schema);
|
||||
codegen.setOpenAPI(openAPI);
|
||||
@ -138,6 +138,38 @@ public class JavaModelTest {
|
||||
Assert.assertTrue(property.isContainer);
|
||||
}
|
||||
|
||||
@Test(description = "convert a model with set property")
|
||||
public void setPropertyTest() {
|
||||
final Schema schema = new Schema()
|
||||
.description("a sample model")
|
||||
.addProperties("id", new IntegerSchema().format(SchemaTypeUtil.INTEGER64_FORMAT))
|
||||
.addProperties("urls", new ArraySchema()
|
||||
.items(new StringSchema())
|
||||
.uniqueItems(true))
|
||||
.addRequiredItem("id");
|
||||
final DefaultCodegen codegen = new JavaClientCodegen();
|
||||
OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", schema);
|
||||
codegen.setOpenAPI(openAPI);
|
||||
final CodegenModel cm = codegen.fromModel("sample", schema);
|
||||
|
||||
Assert.assertEquals(cm.name, "sample");
|
||||
Assert.assertEquals(cm.classname, "Sample");
|
||||
Assert.assertEquals(cm.description, "a sample model");
|
||||
Assert.assertEquals(cm.vars.size(), 2);
|
||||
|
||||
final CodegenProperty property = cm.vars.get(1);
|
||||
Assert.assertEquals(property.baseName, "urls");
|
||||
Assert.assertEquals(property.getter, "getUrls");
|
||||
Assert.assertEquals(property.setter, "setUrls");
|
||||
Assert.assertEquals(property.dataType, "Set<String>");
|
||||
Assert.assertEquals(property.name, "urls");
|
||||
Assert.assertEquals(property.defaultValue, "new LinkedHashSet<String>()");
|
||||
Assert.assertEquals(property.baseType, "Set");
|
||||
Assert.assertEquals(property.containerType, "set");
|
||||
Assert.assertFalse(property.required);
|
||||
Assert.assertTrue(property.isContainer);
|
||||
}
|
||||
|
||||
@Test(description = "convert a model with a map property")
|
||||
public void mapPropertyTest() {
|
||||
final Schema schema = new Schema()
|
||||
@ -401,6 +433,27 @@ public class JavaModelTest {
|
||||
Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("ApiModel", "List", "ArrayList", "Children")).size(), 4);
|
||||
}
|
||||
|
||||
@Test(description = "convert a set model")
|
||||
public void setModelTest() {
|
||||
final Schema schema = new ArraySchema()
|
||||
.items(new Schema().name("elobjeto").$ref("#/components/schemas/Children"))
|
||||
.uniqueItems(true)
|
||||
.name("arraySchema")
|
||||
.description("an array model");
|
||||
final DefaultCodegen codegen = new JavaClientCodegen();
|
||||
OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", schema);
|
||||
codegen.setOpenAPI(openAPI);
|
||||
final CodegenModel cm = codegen.fromModel("sample", schema);
|
||||
|
||||
Assert.assertEquals(cm.name, "sample");
|
||||
Assert.assertEquals(cm.classname, "Sample");
|
||||
Assert.assertEquals(cm.description, "an array model");
|
||||
Assert.assertEquals(cm.vars.size(), 0);
|
||||
Assert.assertEquals(cm.parent, "LinkedHashSet<Children>");
|
||||
Assert.assertEquals(cm.imports.size(), 4);
|
||||
Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("ApiModel", "Set", "LinkedHashSet", "Children")).size(), 4);
|
||||
}
|
||||
|
||||
@Test(description = "convert a map model")
|
||||
public void mapModelTest() {
|
||||
final Schema schema = new Schema()
|
||||
|
@ -1,8 +1,14 @@
|
||||
package org.openapitools.codegen.java.jaxrs;
|
||||
|
||||
import io.swagger.parser.OpenAPIParser;
|
||||
import io.swagger.v3.oas.models.OpenAPI;
|
||||
import io.swagger.v3.oas.models.Operation;
|
||||
import io.swagger.v3.oas.models.media.ArraySchema;
|
||||
import io.swagger.v3.oas.models.media.Content;
|
||||
import io.swagger.v3.oas.models.media.MediaType;
|
||||
import io.swagger.v3.oas.models.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.models.servers.Server;
|
||||
import io.swagger.v3.parser.core.models.ParseOptions;
|
||||
|
||||
import org.openapitools.codegen.ClientOptInput;
|
||||
import org.openapitools.codegen.CodegenConstants;
|
||||
@ -13,17 +19,21 @@ import org.openapitools.codegen.config.CodegenConfigurator;
|
||||
import org.openapitools.codegen.languages.AbstractJavaJAXRSServerCodegen;
|
||||
import org.openapitools.codegen.languages.JavaClientCodegen;
|
||||
import org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen;
|
||||
import org.openapitools.codegen.languages.features.CXFServerFeatures;
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.BeforeMethod;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.openapitools.codegen.TestUtils.assertFileContains;
|
||||
import static org.openapitools.codegen.TestUtils.validateJavaSourceFiles;
|
||||
import static org.testng.Assert.assertTrue;
|
||||
|
||||
/**
|
||||
* Unit-Test for {@link org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen}.
|
||||
@ -123,7 +133,7 @@ public class JavaJAXRSSpecServerCodegenTest extends JavaJaxrsBaseTest {
|
||||
codegen.addOperationToGroup("Primaryresource", "/", operation, codegenOperation, operationList);
|
||||
|
||||
Assert.assertEquals(operationList.size(), 1);
|
||||
Assert.assertTrue(operationList.containsKey(""));
|
||||
assertTrue(operationList.containsKey(""));
|
||||
Assert.assertEquals(codegenOperation.baseName, "Primaryresource");
|
||||
}
|
||||
|
||||
@ -141,7 +151,7 @@ public class JavaJAXRSSpecServerCodegenTest extends JavaJaxrsBaseTest {
|
||||
codegen.addOperationToGroup("Primaryresource", "/{uuid}", operation, codegenOperation, operationList);
|
||||
|
||||
Assert.assertEquals(operationList.size(), 1);
|
||||
Assert.assertTrue(operationList.containsKey(""));
|
||||
assertTrue(operationList.containsKey(""));
|
||||
Assert.assertEquals(codegenOperation.baseName, "Primaryresource");
|
||||
}
|
||||
|
||||
@ -161,7 +171,7 @@ public class JavaJAXRSSpecServerCodegenTest extends JavaJaxrsBaseTest {
|
||||
|
||||
Assert.assertEquals(codegenOperation.baseName, "subresource");
|
||||
Assert.assertEquals(operationList.size(), 1);
|
||||
Assert.assertTrue(operationList.containsKey("subresource"));
|
||||
assertTrue(operationList.containsKey("subresource"));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -312,4 +322,55 @@ public class JavaJAXRSSpecServerCodegenTest extends JavaJaxrsBaseTest {
|
||||
|
||||
output.deleteOnExit();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void addsImportForSetArgument() throws IOException {
|
||||
File output = Files.createTempDirectory("test").toFile().getCanonicalFile();
|
||||
output.deleteOnExit();
|
||||
String outputPath = output.getAbsolutePath().replace('\\', '/');
|
||||
|
||||
OpenAPI openAPI = new OpenAPIParser()
|
||||
.readLocation("src/test/resources/3_0/arrayParameter.yaml", null, new ParseOptions()).getOpenAPI();
|
||||
|
||||
openAPI.getComponents().getParameters().get("operationsQueryParam").setSchema(new ArraySchema().uniqueItems(true));
|
||||
codegen.setOutputDir(output.getAbsolutePath());
|
||||
|
||||
codegen.additionalProperties().put(CXFServerFeatures.LOAD_TEST_DATA_FROM_FILE, "true");
|
||||
|
||||
ClientOptInput input = new ClientOptInput()
|
||||
.openAPI(openAPI)
|
||||
.config(codegen);
|
||||
|
||||
MockDefaultGenerator generator = new MockDefaultGenerator();
|
||||
generator.opts(input).generate();
|
||||
|
||||
String path = outputPath + "/src/gen/java/org/openapitools/api/ExamplesApi.java";
|
||||
|
||||
assertFileContains(generator, path, "\nimport java.util.Set;\n");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void addsImportForSetResponse() throws IOException {
|
||||
File output = Files.createTempDirectory("test").toFile().getCanonicalFile();
|
||||
output.deleteOnExit();
|
||||
String outputPath = output.getAbsolutePath().replace('\\', '/');
|
||||
|
||||
OpenAPI openAPI = new OpenAPIParser()
|
||||
.readLocation("src/test/resources/3_0/setResponse.yaml", null, new ParseOptions()).getOpenAPI();
|
||||
|
||||
codegen.setOutputDir(output.getAbsolutePath());
|
||||
|
||||
codegen.additionalProperties().put(CXFServerFeatures.LOAD_TEST_DATA_FROM_FILE, "true");
|
||||
|
||||
ClientOptInput input = new ClientOptInput()
|
||||
.openAPI(openAPI)
|
||||
.config(codegen);
|
||||
|
||||
MockDefaultGenerator generator = new MockDefaultGenerator();
|
||||
generator.opts(input).generate();
|
||||
|
||||
String path = outputPath + "/src/gen/java/org/openapitools/api/ExamplesApi.java";
|
||||
|
||||
assertFileContains(generator, path, "\nimport java.util.Set;\n");
|
||||
}
|
||||
}
|
||||
|
@ -132,6 +132,7 @@ paths:
|
||||
description: Tags to filter by
|
||||
required: true
|
||||
type: array
|
||||
uniqueItems: true
|
||||
items:
|
||||
type: string
|
||||
collectionFormat: csv
|
||||
@ -140,6 +141,7 @@ paths:
|
||||
description: successful operation
|
||||
schema:
|
||||
type: array
|
||||
uniqueItems: true
|
||||
items:
|
||||
$ref: '#/definitions/Pet'
|
||||
'400':
|
||||
@ -1234,6 +1236,7 @@ definitions:
|
||||
example: doggie
|
||||
photoUrls:
|
||||
type: array
|
||||
uniqueItems: true
|
||||
xml:
|
||||
name: photoUrl
|
||||
wrapped: true
|
||||
|
@ -0,0 +1,32 @@
|
||||
openapi: 3.0.0
|
||||
paths:
|
||||
/examples:
|
||||
get:
|
||||
tags:
|
||||
- Examples
|
||||
summary: Get a list of transactions
|
||||
operationId: getFilteredTransactions
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/operationsQueryParam'
|
||||
responses:
|
||||
200:
|
||||
description: A list of deleted consumers
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
uniqueItems: true
|
||||
items:
|
||||
type: string
|
||||
|
||||
components:
|
||||
parameters:
|
||||
operationsQueryParam:
|
||||
name: operations
|
||||
description: Operations list
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
@ -139,6 +139,7 @@ paths:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
uniqueItems: true
|
||||
style: form
|
||||
responses:
|
||||
"200":
|
||||
@ -148,11 +149,13 @@ paths:
|
||||
items:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
type: array
|
||||
uniqueItems: true
|
||||
application/json:
|
||||
schema:
|
||||
items:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
type: array
|
||||
uniqueItems: true
|
||||
description: successful operation
|
||||
"400":
|
||||
content: {}
|
||||
@ -1323,6 +1326,7 @@ components:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
uniqueItems: true
|
||||
xml:
|
||||
name: photoUrl
|
||||
wrapped: true
|
||||
|
@ -139,6 +139,7 @@ paths:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
uniqueItems: true
|
||||
style: form
|
||||
responses:
|
||||
"200":
|
||||
@ -148,11 +149,13 @@ paths:
|
||||
items:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
type: array
|
||||
uniqueItems: true
|
||||
application/json:
|
||||
schema:
|
||||
items:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
type: array
|
||||
uniqueItems: true
|
||||
description: successful operation
|
||||
"400":
|
||||
content: {}
|
||||
@ -1323,6 +1326,7 @@ components:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
uniqueItems: true
|
||||
xml:
|
||||
name: photoUrl
|
||||
wrapped: true
|
||||
|
@ -139,6 +139,7 @@ paths:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
uniqueItems: true
|
||||
style: form
|
||||
responses:
|
||||
"200":
|
||||
@ -148,11 +149,13 @@ paths:
|
||||
items:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
type: array
|
||||
uniqueItems: true
|
||||
application/json:
|
||||
schema:
|
||||
items:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
type: array
|
||||
uniqueItems: true
|
||||
description: successful operation
|
||||
"400":
|
||||
content: {}
|
||||
@ -1323,6 +1326,7 @@ components:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
uniqueItems: true
|
||||
xml:
|
||||
name: photoUrl
|
||||
wrapped: true
|
||||
|
@ -139,6 +139,7 @@ paths:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
uniqueItems: true
|
||||
style: form
|
||||
responses:
|
||||
"200":
|
||||
@ -148,11 +149,13 @@ paths:
|
||||
items:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
type: array
|
||||
uniqueItems: true
|
||||
application/json:
|
||||
schema:
|
||||
items:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
type: array
|
||||
uniqueItems: true
|
||||
description: successful operation
|
||||
"400":
|
||||
content: {}
|
||||
@ -1323,6 +1326,7 @@ components:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
uniqueItems: true
|
||||
xml:
|
||||
name: photoUrl
|
||||
wrapped: true
|
||||
|
@ -144,6 +144,7 @@ paths:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
uniqueItems: true
|
||||
style: form
|
||||
responses:
|
||||
"200":
|
||||
@ -153,11 +154,13 @@ paths:
|
||||
items:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
type: array
|
||||
uniqueItems: true
|
||||
application/json:
|
||||
schema:
|
||||
items:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
type: array
|
||||
uniqueItems: true
|
||||
description: successful operation
|
||||
"400":
|
||||
content: {}
|
||||
@ -1384,6 +1387,7 @@ components:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
uniqueItems: true
|
||||
xml:
|
||||
name: photoUrl
|
||||
wrapped: true
|
||||
|
@ -6,6 +6,7 @@ import org.openapitools.client.EncodingUtils;
|
||||
import java.io.File;
|
||||
import org.openapitools.client.model.ModelApiResponse;
|
||||
import org.openapitools.client.model.Pet;
|
||||
import java.util.Set;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@ -90,13 +91,13 @@ public interface PetApi extends ApiClient.Api {
|
||||
* Finds Pets by tags
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* @param tags Tags to filter by (required)
|
||||
* @return List<Pet>
|
||||
* @return Set<Pet>
|
||||
*/
|
||||
@RequestLine("GET /pet/findByTags?tags={tags}")
|
||||
@Headers({
|
||||
"Accept: application/json",
|
||||
})
|
||||
List<Pet> findPetsByTags(@Param("tags") List<String> tags);
|
||||
Set<Pet> findPetsByTags(@Param("tags") Set<String> tags);
|
||||
|
||||
/**
|
||||
* Finds Pets by tags
|
||||
@ -111,20 +112,20 @@ public interface PetApi extends ApiClient.Api {
|
||||
* <ul>
|
||||
* <li>tags - Tags to filter by (required)</li>
|
||||
* </ul>
|
||||
* @return List<Pet>
|
||||
* @return Set<Pet>
|
||||
*/
|
||||
@RequestLine("GET /pet/findByTags?tags={tags}")
|
||||
@Headers({
|
||||
"Accept: application/json",
|
||||
})
|
||||
List<Pet> findPetsByTags(@QueryMap(encoded=true) Map<String, Object> queryParams);
|
||||
Set<Pet> findPetsByTags(@QueryMap(encoded=true) Map<String, Object> queryParams);
|
||||
|
||||
/**
|
||||
* A convenience class for generating query parameters for the
|
||||
* <code>findPetsByTags</code> method in a fluent style.
|
||||
*/
|
||||
public static class FindPetsByTagsQueryParams extends HashMap<String, Object> {
|
||||
public FindPetsByTagsQueryParams tags(final List<String> value) {
|
||||
public FindPetsByTagsQueryParams tags(final Set<String> value) {
|
||||
put("tags", EncodingUtils.encodeCollection(value, "csv"));
|
||||
return this;
|
||||
}
|
||||
|
@ -22,7 +22,9 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import org.openapitools.client.model.Category;
|
||||
import org.openapitools.client.model.Tag;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
@ -51,7 +53,7 @@ public class Pet {
|
||||
private String name;
|
||||
|
||||
public static final String JSON_PROPERTY_PHOTO_URLS = "photoUrls";
|
||||
private List<String> photoUrls = new ArrayList<String>();
|
||||
private Set<String> photoUrls = new LinkedHashSet<String>();
|
||||
|
||||
public static final String JSON_PROPERTY_TAGS = "tags";
|
||||
private List<Tag> tags = null;
|
||||
@ -171,7 +173,7 @@ public class Pet {
|
||||
}
|
||||
|
||||
|
||||
public Pet photoUrls(List<String> photoUrls) {
|
||||
public Pet photoUrls(Set<String> photoUrls) {
|
||||
|
||||
this.photoUrls = photoUrls;
|
||||
return this;
|
||||
@ -190,12 +192,12 @@ public class Pet {
|
||||
@JsonProperty(JSON_PROPERTY_PHOTO_URLS)
|
||||
@JsonInclude(value = JsonInclude.Include.ALWAYS)
|
||||
|
||||
public List<String> getPhotoUrls() {
|
||||
public Set<String> getPhotoUrls() {
|
||||
return photoUrls;
|
||||
}
|
||||
|
||||
|
||||
public void setPhotoUrls(List<String> photoUrls) {
|
||||
public void setPhotoUrls(Set<String> photoUrls) {
|
||||
this.photoUrls = photoUrls;
|
||||
}
|
||||
|
||||
|
@ -144,6 +144,7 @@ paths:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
uniqueItems: true
|
||||
style: form
|
||||
responses:
|
||||
"200":
|
||||
@ -153,11 +154,13 @@ paths:
|
||||
items:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
type: array
|
||||
uniqueItems: true
|
||||
application/json:
|
||||
schema:
|
||||
items:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
type: array
|
||||
uniqueItems: true
|
||||
description: successful operation
|
||||
"400":
|
||||
content: {}
|
||||
@ -1384,6 +1387,7 @@ components:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
uniqueItems: true
|
||||
xml:
|
||||
name: photoUrl
|
||||
wrapped: true
|
||||
|
@ -6,6 +6,7 @@ import org.openapitools.client.EncodingUtils;
|
||||
import java.io.File;
|
||||
import org.openapitools.client.model.ModelApiResponse;
|
||||
import org.openapitools.client.model.Pet;
|
||||
import java.util.Set;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@ -90,13 +91,13 @@ public interface PetApi extends ApiClient.Api {
|
||||
* Finds Pets by tags
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* @param tags Tags to filter by (required)
|
||||
* @return List<Pet>
|
||||
* @return Set<Pet>
|
||||
*/
|
||||
@RequestLine("GET /pet/findByTags?tags={tags}")
|
||||
@Headers({
|
||||
"Accept: application/json",
|
||||
})
|
||||
List<Pet> findPetsByTags(@Param("tags") List<String> tags);
|
||||
Set<Pet> findPetsByTags(@Param("tags") Set<String> tags);
|
||||
|
||||
/**
|
||||
* Finds Pets by tags
|
||||
@ -111,20 +112,20 @@ public interface PetApi extends ApiClient.Api {
|
||||
* <ul>
|
||||
* <li>tags - Tags to filter by (required)</li>
|
||||
* </ul>
|
||||
* @return List<Pet>
|
||||
* @return Set<Pet>
|
||||
*/
|
||||
@RequestLine("GET /pet/findByTags?tags={tags}")
|
||||
@Headers({
|
||||
"Accept: application/json",
|
||||
})
|
||||
List<Pet> findPetsByTags(@QueryMap(encoded=true) Map<String, Object> queryParams);
|
||||
Set<Pet> findPetsByTags(@QueryMap(encoded=true) Map<String, Object> queryParams);
|
||||
|
||||
/**
|
||||
* A convenience class for generating query parameters for the
|
||||
* <code>findPetsByTags</code> method in a fluent style.
|
||||
*/
|
||||
public static class FindPetsByTagsQueryParams extends HashMap<String, Object> {
|
||||
public FindPetsByTagsQueryParams tags(final List<String> value) {
|
||||
public FindPetsByTagsQueryParams tags(final Set<String> value) {
|
||||
put("tags", EncodingUtils.encodeCollection(value, "csv"));
|
||||
return this;
|
||||
}
|
||||
|
@ -22,7 +22,9 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import org.openapitools.client.model.Category;
|
||||
import org.openapitools.client.model.Tag;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
@ -50,7 +52,7 @@ public class Pet {
|
||||
private String name;
|
||||
|
||||
public static final String JSON_PROPERTY_PHOTO_URLS = "photoUrls";
|
||||
private List<String> photoUrls = new ArrayList<String>();
|
||||
private Set<String> photoUrls = new LinkedHashSet<String>();
|
||||
|
||||
public static final String JSON_PROPERTY_TAGS = "tags";
|
||||
private List<Tag> tags = null;
|
||||
@ -170,7 +172,7 @@ public class Pet {
|
||||
}
|
||||
|
||||
|
||||
public Pet photoUrls(List<String> photoUrls) {
|
||||
public Pet photoUrls(Set<String> photoUrls) {
|
||||
|
||||
this.photoUrls = photoUrls;
|
||||
return this;
|
||||
@ -189,12 +191,12 @@ public class Pet {
|
||||
@JsonProperty(JSON_PROPERTY_PHOTO_URLS)
|
||||
@JsonInclude(value = JsonInclude.Include.ALWAYS)
|
||||
|
||||
public List<String> getPhotoUrls() {
|
||||
public Set<String> getPhotoUrls() {
|
||||
return photoUrls;
|
||||
}
|
||||
|
||||
|
||||
public void setPhotoUrls(List<String> photoUrls) {
|
||||
public void setPhotoUrls(Set<String> photoUrls) {
|
||||
this.photoUrls = photoUrls;
|
||||
}
|
||||
|
||||
|
@ -144,6 +144,7 @@ paths:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
uniqueItems: true
|
||||
style: form
|
||||
responses:
|
||||
"200":
|
||||
@ -153,11 +154,13 @@ paths:
|
||||
items:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
type: array
|
||||
uniqueItems: true
|
||||
application/json:
|
||||
schema:
|
||||
items:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
type: array
|
||||
uniqueItems: true
|
||||
description: successful operation
|
||||
"400":
|
||||
content: {}
|
||||
@ -1384,6 +1387,7 @@ components:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
uniqueItems: true
|
||||
xml:
|
||||
name: photoUrl
|
||||
wrapped: true
|
||||
|
@ -9,7 +9,7 @@ Name | Type | Description | Notes
|
||||
**id** | **Long** | | [optional]
|
||||
**category** | [**Category**](Category.md) | | [optional]
|
||||
**name** | **String** | |
|
||||
**photoUrls** | **List<String>** | |
|
||||
**photoUrls** | **Set<String>** | |
|
||||
**tags** | [**List<Tag>**](Tag.md) | | [optional]
|
||||
**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional]
|
||||
|
||||
|
@ -227,7 +227,7 @@ Name | Type | Description | Notes
|
||||
|
||||
## findPetsByTags
|
||||
|
||||
> List<Pet> findPetsByTags(tags)
|
||||
> Set<Pet> findPetsByTags(tags)
|
||||
|
||||
Finds Pets by tags
|
||||
|
||||
@ -254,9 +254,9 @@ public class Example {
|
||||
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||
|
||||
PetApi apiInstance = new PetApi(defaultClient);
|
||||
List<String> tags = Arrays.asList(); // List<String> | Tags to filter by
|
||||
Set<String> tags = Arrays.asList(); // Set<String> | Tags to filter by
|
||||
try {
|
||||
List<Pet> result = apiInstance.findPetsByTags(tags);
|
||||
Set<Pet> result = apiInstance.findPetsByTags(tags);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#findPetsByTags");
|
||||
@ -274,11 +274,11 @@ public class Example {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**tags** | [**List<String>**](String.md)| Tags to filter by |
|
||||
**tags** | [**Set<String>**](String.md)| Tags to filter by |
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<Pet>**](Pet.md)
|
||||
[**Set<Pet>**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
@ -5,6 +5,7 @@ import org.openapitools.client.ApiClient;
|
||||
import java.io.File;
|
||||
import org.openapitools.client.model.ModelApiResponse;
|
||||
import org.openapitools.client.model.Pet;
|
||||
import java.util.Set;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.google.api.client.http.EmptyContent;
|
||||
@ -303,12 +304,12 @@ public class PetApi {
|
||||
* <p><b>200</b> - successful operation
|
||||
* <p><b>400</b> - Invalid tag value
|
||||
* @param tags Tags to filter by
|
||||
* @return List<Pet>
|
||||
* @return Set<Pet>
|
||||
* @throws IOException if an error occurs while attempting to invoke the API
|
||||
**/
|
||||
public List<Pet> findPetsByTags(List<String> tags) throws IOException {
|
||||
public Set<Pet> findPetsByTags(Set<String> tags) throws IOException {
|
||||
HttpResponse response = findPetsByTagsForHttpResponse(tags);
|
||||
TypeReference<List<Pet>> typeRef = new TypeReference<List<Pet>>() {};
|
||||
TypeReference<Set<Pet>> typeRef = new TypeReference<Set<Pet>>() {};
|
||||
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
|
||||
}
|
||||
|
||||
@ -319,16 +320,16 @@ public class PetApi {
|
||||
* <p><b>400</b> - Invalid tag value
|
||||
* @param tags Tags to filter by
|
||||
* @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param.
|
||||
* @return List<Pet>
|
||||
* @return Set<Pet>
|
||||
* @throws IOException if an error occurs while attempting to invoke the API
|
||||
**/
|
||||
public List<Pet> findPetsByTags(List<String> tags, Map<String, Object> params) throws IOException {
|
||||
public Set<Pet> findPetsByTags(Set<String> tags, Map<String, Object> params) throws IOException {
|
||||
HttpResponse response = findPetsByTagsForHttpResponse(tags, params);
|
||||
TypeReference<List<Pet>> typeRef = new TypeReference<List<Pet>>() {};
|
||||
TypeReference<Set<Pet>> typeRef = new TypeReference<Set<Pet>>() {};
|
||||
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
|
||||
}
|
||||
|
||||
public HttpResponse findPetsByTagsForHttpResponse(List<String> tags) throws IOException {
|
||||
public HttpResponse findPetsByTagsForHttpResponse(Set<String> tags) throws IOException {
|
||||
// verify the required parameter 'tags' is set
|
||||
if (tags == null) {
|
||||
throw new IllegalArgumentException("Missing the required parameter 'tags' when calling findPetsByTags");
|
||||
@ -353,7 +354,7 @@ public class PetApi {
|
||||
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content).execute();
|
||||
}
|
||||
|
||||
public HttpResponse findPetsByTagsForHttpResponse(List<String> tags, Map<String, Object> params) throws IOException {
|
||||
public HttpResponse findPetsByTagsForHttpResponse(Set<String> tags, Map<String, Object> params) throws IOException {
|
||||
// verify the required parameter 'tags' is set
|
||||
if (tags == null) {
|
||||
throw new IllegalArgumentException("Missing the required parameter 'tags' when calling findPetsByTags");
|
||||
|
@ -22,7 +22,9 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import org.openapitools.client.model.Category;
|
||||
import org.openapitools.client.model.Tag;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
@ -50,7 +52,7 @@ public class Pet {
|
||||
private String name;
|
||||
|
||||
public static final String JSON_PROPERTY_PHOTO_URLS = "photoUrls";
|
||||
private List<String> photoUrls = new ArrayList<String>();
|
||||
private Set<String> photoUrls = new LinkedHashSet<String>();
|
||||
|
||||
public static final String JSON_PROPERTY_TAGS = "tags";
|
||||
private List<Tag> tags = null;
|
||||
@ -170,7 +172,7 @@ public class Pet {
|
||||
}
|
||||
|
||||
|
||||
public Pet photoUrls(List<String> photoUrls) {
|
||||
public Pet photoUrls(Set<String> photoUrls) {
|
||||
|
||||
this.photoUrls = photoUrls;
|
||||
return this;
|
||||
@ -189,12 +191,12 @@ public class Pet {
|
||||
@JsonProperty(JSON_PROPERTY_PHOTO_URLS)
|
||||
@JsonInclude(value = JsonInclude.Include.ALWAYS)
|
||||
|
||||
public List<String> getPhotoUrls() {
|
||||
public Set<String> getPhotoUrls() {
|
||||
return photoUrls;
|
||||
}
|
||||
|
||||
|
||||
public void setPhotoUrls(List<String> photoUrls) {
|
||||
public void setPhotoUrls(Set<String> photoUrls) {
|
||||
this.photoUrls = photoUrls;
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* API tests for PetApi
|
||||
@ -93,8 +94,8 @@ public class PetApiTest {
|
||||
*/
|
||||
@Test
|
||||
public void findPetsByTagsTest() throws IOException {
|
||||
List<String> tags = null;
|
||||
List<Pet> response = api.findPetsByTags(tags);
|
||||
Set<String> tags = null;
|
||||
Set<Pet> response = api.findPetsByTags(tags);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
|
@ -144,6 +144,7 @@ paths:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
uniqueItems: true
|
||||
style: form
|
||||
responses:
|
||||
"200":
|
||||
@ -153,11 +154,13 @@ paths:
|
||||
items:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
type: array
|
||||
uniqueItems: true
|
||||
application/json:
|
||||
schema:
|
||||
items:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
type: array
|
||||
uniqueItems: true
|
||||
description: successful operation
|
||||
"400":
|
||||
content: {}
|
||||
@ -1384,6 +1387,7 @@ components:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
uniqueItems: true
|
||||
xml:
|
||||
name: photoUrl
|
||||
wrapped: true
|
||||
|
@ -9,7 +9,7 @@ Name | Type | Description | Notes
|
||||
**id** | **Long** | | [optional]
|
||||
**category** | [**Category**](Category.md) | | [optional]
|
||||
**name** | **String** | |
|
||||
**photoUrls** | **List<String>** | |
|
||||
**photoUrls** | **Set<String>** | |
|
||||
**tags** | [**List<Tag>**](Tag.md) | | [optional]
|
||||
**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional]
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user