Skip to content

Commit c2caddf

Browse files
committed
cleanup
1 parent 0b12324 commit c2caddf

4 files changed

Lines changed: 20 additions & 18 deletions

File tree

docs/modules/ROOT/pages/mapping/basic.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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`

docs/modules/ROOT/pages/mapping/endpoint.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ map:
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
@@ -61,7 +61,7 @@ map:
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

docs/modules/ROOT/pages/mapping/parameter.adoc

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
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

917
A single global parameter mapping can have the following properties:
1018

@@ -28,12 +36,6 @@ endpoint content types **{parameter name}**.
2836
java 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

3941
Given the following (global) parameter mapping

docs/modules/ROOT/pages/mapping/structure.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ map:
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
@@ -93,11 +93,11 @@ map:
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

0 commit comments

Comments
 (0)