Skip to content

Commit 3a91875

Browse files
committed
"type mapping" renamed to "mapping"
1 parent 3e621c3 commit 3a91875

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/main/groovy/com/github/hauner/openapi/spring/generatr/SpringGeneratr.groovy

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,15 @@ class SpringGeneratr implements OpenApiGeneratr {
8989
private ApiOptions convertOptions (Map<String, ?> generatrOptions) {
9090
def reader = new MappingReader ()
9191
def converter = new MappingConverter ()
92-
def mapping = reader.read (generatrOptions.typeMappings as String)
92+
def mapping
93+
94+
if (generatrOptions.containsKey ('mapping')) {
95+
mapping = reader.read (generatrOptions.mapping as String)
96+
97+
} else if (generatrOptions.containsKey ('typeMappings')) {
98+
mapping = reader.read (generatrOptions.typeMappings as String)
99+
println "warning: 'typeMappings' option is deprecated, use 'mapping'!"
100+
}
93101

94102
def options = new ApiOptions ()
95103
options.apiPath = generatrOptions.apiPath

0 commit comments

Comments
 (0)