[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:
Januson
2020-05-21 07:27:57 +02:00
committed by GitHub
parent dec1365619
commit c49d8fda8e
348 changed files with 1264 additions and 604 deletions

View File

@@ -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