File tree Expand file tree Collapse file tree
docs/modules/ROOT/pages/mapping Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ The following table shows the automatic mapping of OpenAPIs primitive types to J
6161
6262| `string`
6363| `date-time`
64- | `java.time.OffsetDataTime`
64+ | `java.time.OffsetDataTime` (better would be `java.time.Instant`)
6565
6666| `string`
6767| `password`
Original file line number Diff line number Diff line change 3232 parameters:
3333 - name: {parameter name} => {target type}
3434
35- # the list of parameter mappings can include additional parameters
35+ # add a (usually technical) parameter that is not described in the OpenAPI
3636 - add: {parameter name} => {target type}
3737
3838 # list of path specific content mappings, mapped by content type
3939 responses:
4040 - content: {content type} => {target type}
4141
42- # a path
42+ # another path
4343 /foobar:
4444 # excluding an endpoint
4545 exclude: true
6161 parameters:
6262 - name: {parameter name} => {target type}
6363
64- # the list of parameter mappings can include additional parameters
64+ # add a (usually technical) parameter that is not described in the OpenAPI
6565 - add: {parameter name} => {target type}
6666
6767 # list of path specific content mappings, mapped by content type
Original file line number Diff line number Diff line change 11= (global) Parameter mappings
22
3- Global parameter mapping will replace any usage of an OpenAPI type in the api description based on
4- the parameters **name** to the given java type.
3+ Parameter mappings, as the name suggests, apply to the parameters of an endpoint method.
54
6- It is defined like below, and it should be added to the `map/parameters` section in the mapping.yaml
7- which is a list of global parameter mappings.
5+ == parameter mapping by name
6+
7+ A global parameter mapping will replace any usage of an OpenAPI type in the api description based on the parameters **name** to the given java type.
8+
9+ [CAUTION]
10+ ====
11+ Since the processor will simply match the parameter by its name, take care that all parameters of
12+ that name should really use the same type!
13+ ====
14+
15+ It is defined like below, and it should be added to the `map/parameters` section in the mapping.yaml which is a list of global parameter mappings.
816
917A single global parameter mapping can have the following properties:
1018
@@ -28,12 +36,6 @@ endpoint content types **{parameter name}**.
2836java type given by **{target type}**.
2937
3038
31- [CAUTION]
32- ====
33- Since the processor will simply match the parameters by their name take care that all parameters of
34- that name should really use the same type!
35- ====
36-
3739== Example
3840
3941Given the following (global) parameter mapping
Original file line number Diff line number Diff line change 5858 types:
5959 - type: {source type} => {target type}
6060
61- # list of global parameter mappings, mapped by parameter name
61+ # list of global parameter mappings
6262 parameters:
6363 - name: {parameter name} => {target type}
6464
65- # the list of parameter mappings can include additional parameters
65+ # add a (usually technical) parameter that is not described in the OpenAPI
6666 - add: {parameter name} => {target type}
6767
6868 # list of global content mappings, mapped by content type
9393 types:
9494 - from: {source type} => {target type}
9595
96- # list of path specific parameter mappings, mapped by parameter name
96+ # list of path specific parameter mappings
9797 parameters:
9898 - name: {parameter name} => {target type}
9999
100- # the list of parameter mappings can include additional parameters
100+ # add a (usually technical) parameter that is not described in the OpenAPI
101101 - add: {parameter name} => {target type}
102102
103103 # list of path specific content mappings, mapped by content type
You can’t perform that action at this time.
0 commit comments