Skip to content

Commit 8ba057c

Browse files
committed
added schema mappings (#225)
1 parent 8c6c67f commit 8ba057c

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

openapi-processor-core/src/main/resources/mapping/v11/mapping.example.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
##
44

55
# mapping format [required]
6-
openapi-processor-mapping: v10
6+
openapi-processor-mapping: v11
77

88
options: # general processor options [required]
99

@@ -80,7 +80,6 @@ map: # the type mappings
8080
multi: reactor.core.publisher.Flux
8181

8282
types: # global type mappings (optional)
83-
8483
- type: array => java.util.Collection
8584

8685
- type: Schema => java.util.Map
@@ -90,19 +89,19 @@ map: # the type mappings
9089

9190
- type: Schema @ io.openapiprocessor.Annotation()
9291

93-
parameters: # global parameter mappings (optional)
92+
schemas: # global schema mappings (optional)
93+
- type: Schema @ io.openapiprocessor.Annotation()
9494

95+
parameters: # global parameter mappings (optional)
9596
- name: foo => java.util.List
9697
- name: bar => com.github.hauner.openapi.Bar
9798
- name: param @ io.openapiprocessor.Annotation()
9899
- type: Schema @ io.openapiprocessor.Annotation()
99100

100101
responses: # global response mappings (optional)
101-
102102
- content: application/vnd.something => java.util.List
103103
- content: application/json => com.github.hauner.openapi.FooBar
104104

105-
106105
paths: # path/endpoint specific mappings (optional)
107106

108107
/first: # a path/endpoint from the openapi.yaml
@@ -123,6 +122,9 @@ map: # the type mappings
123122
types:
124123
- type: Schema => java.util.Collection
125124

125+
schemas:
126+
- type: Schema @ io.openapiprocessor.Annotation()
127+
126128
parameters:
127129
- name: foo => java.util.List
128130
- add: bar => java.util.Set

openapi-processor-core/src/main/resources/mapping/v11/mapping.yaml.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@
210210
"types": {
211211
"$ref": "#/definitions/TypeMappings"
212212
},
213+
"schemas": {
214+
"$ref": "#/definitions/TypeMappings"
215+
},
213216
"parameters": {
214217
"$ref": "#/definitions/ParameterMappings"
215218
},

0 commit comments

Comments
 (0)