Skip to content

Commit 4974932

Browse files
committed
test map default to empty container
1 parent d63759c commit 4974932

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

bin/configs/java-okhttp-gson.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ parameterNameMappings:
1010
_type: underscoreType
1111
type_: typeWithUnderscore
1212
additionalProperties:
13-
defaultToEmptyContainer: "array?"
13+
defaultToEmptyContainer: "array?|map?"
1414
artifactId: petstore-okhttp-gson
1515
hideGenerationTimestamp: true
1616
useOneOfDiscriminatorLookup: true

samples/client/petstore/java/okhttp-gson/api/openapi.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ paths:
348348
additionalProperties:
349349
format: int32
350350
type: integer
351+
default: []
351352
type: object
352353
description: successful operation
353354
security:
@@ -1062,6 +1063,7 @@ paths:
10621063
schema:
10631064
additionalProperties:
10641065
type: string
1066+
default: []
10651067
type: object
10661068
description: request body
10671069
required: true
@@ -1856,6 +1858,7 @@ components:
18561858
Address:
18571859
additionalProperties:
18581860
type: integer
1861+
default: []
18591862
type: object
18601863
Animal:
18611864
discriminator:
@@ -2005,12 +2008,15 @@ components:
20052008
map_property:
20062009
additionalProperties:
20072010
type: string
2011+
default: []
20082012
type: object
20092013
map_of_map_property:
20102014
additionalProperties:
20112015
additionalProperties:
20122016
type: string
2017+
default: []
20132018
type: object
2019+
default: []
20142020
type: object
20152021
anytype_1: {}
20162022
map_with_undeclared_properties_anytype_1:
@@ -2020,6 +2026,7 @@ components:
20202026
type: object
20212027
map_with_undeclared_properties_anytype_3:
20222028
additionalProperties: true
2029+
default: []
20232030
type: object
20242031
empty_map:
20252032
additionalProperties: false
@@ -2029,6 +2036,7 @@ components:
20292036
map_with_undeclared_properties_string:
20302037
additionalProperties:
20312038
type: string
2039+
default: []
20322040
type: object
20332041
type: object
20342042
MixedPropertiesAndAdditionalPropertiesClass:
@@ -2042,6 +2050,7 @@ components:
20422050
map:
20432051
additionalProperties:
20442052
$ref: '#/components/schemas/Animal'
2053+
default: []
20452054
type: object
20462055
type: object
20472056
List:
@@ -2096,22 +2105,27 @@ components:
20962105
additionalProperties:
20972106
additionalProperties:
20982107
type: string
2108+
default: []
20992109
type: object
2110+
default: []
21002111
type: object
21012112
map_of_enum_string:
21022113
additionalProperties:
21032114
enum:
21042115
- UPPER
21052116
- lower
21062117
type: string
2118+
default: []
21072119
type: object
21082120
direct_map:
21092121
additionalProperties:
21102122
type: boolean
2123+
default: []
21112124
type: object
21122125
indirect_map:
21132126
additionalProperties:
21142127
type: boolean
2128+
default: []
21152129
type: object
21162130
type: object
21172131
ArrayTest:
@@ -2181,11 +2195,13 @@ components:
21812195
type: object
21822196
FreeFormObject:
21832197
additionalProperties: true
2198+
default: []
21842199
description: A schema consisting only of additional properties
21852200
type: object
21862201
MapOfString:
21872202
additionalProperties:
21882203
type: string
2204+
default: []
21892205
description: A schema consisting only of additional properties of type string
21902206
type: object
21912207
OuterEnum:
@@ -2241,6 +2257,7 @@ components:
22412257
StringBooleanMap:
22422258
additionalProperties:
22432259
type: boolean
2260+
default: []
22442261
type: object
22452262
FileSchemaTestClass:
22462263
example:
@@ -2353,6 +2370,7 @@ components:
23532370
additionalProperties:
23542371
nullable: true
23552372
type: object
2373+
default: []
23562374
type: object
23572375
type: object
23582376
fruit:
@@ -3073,6 +3091,7 @@ components:
30733091
oneOf:
30743092
- type: string
30753093
- additionalProperties: true
3094+
default: []
30763095
type: object
30773096
ArrayOfInlineAllOf_array_allof_dog_property_inner:
30783097
allOf:

0 commit comments

Comments
 (0)