Skip to content

Commit f2e1cc4

Browse files
committed
docs cleanup
1 parent cd84bb8 commit f2e1cc4

File tree

12 files changed

+40
-41
lines changed

12 files changed

+40
-41
lines changed

docs/index.md

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Home
44
nav_order: 1
55
description: "Home Description"
66
permalink: /
7-
date: 2020-02-16
7+
date: 2020-03-01
88
---
99

1010
<div style="display: flex; justify-content: flex-end; position: relative; top: 1.5em">
@@ -27,8 +27,9 @@ It is useful in an API first approach where you API is explicitly defined and do
2727
before it gets implemented.
2828

2929
The processor generates java interfaces based on the endpoint description of the API and simple POJO
30-
classes for parameter or response objects defined in th API. It is **your** task to create the controller
31-
classes that implement the interfaces.
30+
classes for parameter or response objects defined in th API. The processor adds all the required
31+
spring & jackson annotations to the interface and all that is left to **you** is the implementation
32+
of the generated interfaces.
3233

3334
The interfaces will help to keep the implementation in sync with the API. If anything relevant changes
3435
in the API the interface changes and the compiler will warn that the interface is not implemented
@@ -37,10 +38,6 @@ correctly.
3738
See the [processor intro][docs-processor]{:target="_blank"} for a short example.
3839
{: .mb-6 }
3940

40-
February 2020: The processor is ready to try but note that the it is still in an early state of
41-
development and may not generate the correct code yet in all cases. See [feedback](#feedback).
42-
{: .note .info .mb-6}
43-
4441

4542
## table of contents
4643
{: .no_toc .text-delta }
@@ -72,22 +69,22 @@ See the [release notes][oaps-releases]{:target="_blank"}.
7269
- generates human readable code.
7370

7471
- gradle support via [openapi-processor-gradle][oap-gradle] plugin (the plugin is currently the only option
75-
to run the generatr).
72+
to run the processor).
7673

7774
- add additional parameters to an endpoint which are not defined in the OpenAPI description. For example to pass
7875
a `HttpServletRequest` to the endpoint implementation. <span class="label label-green">since 1.0.0.M6</span>
7976

8077
- supports bean validations. The constraints of the openapi description are mapped to java bean validation
8178
annotations. <span class="label label-green">since 1.0.0.M6</span>
8279

83-
- allows to exclude endpoints from generation. This is useful if the generatr does not create the correct code for
84-
an endpoint. That way the generatr can still be used for all the other endpoints.
80+
- allows to exclude endpoints from generation. This is useful if the processor does not create the correct code for
81+
an endpoint. That way the processor can still be used for all the other endpoints.
8582
<span class="label label-green">since 1.0.0.M6</span>
8683

8784
- handle multiple responses by generating one endpoint method for each response content type.
88-
<span class="label label-green">since 1.0.0.M8</span>
85+
<span class="label label-green">since 1.0.0.M11</span>
8986

90-
- <span class="label label-yellow">planned</span> WebFlux support, may need its own generatr.
87+
- <span class="label label-yellow">planned</span> WebFlux support, may need its own processor.
9188

9289
- the generated code does not use swagger annotations. There is no need to generate the documentation from the code
9390
when the code is generated from the documentation (i.e. an openapi.yaml).
@@ -99,10 +96,10 @@ with the [openapi-processor-gradle][oap-gradle] plugin. See [Using Gradle][docs-
9996

10097
## Feedback
10198

102-
In case some feature is missing or the generated code is not 100% what you would expect create an [issue][oap-spring-issues]
99+
In case some feature is missing or the generated code is not 100% what you would expect create an [issue][oaps-issues]
103100
preferably with a test case. Providing a test case will help significantly :-)
104101

105-
A test case is a single folder with an openapi.yaml file and the expected Java files the generatr should create.
102+
A test case is a single folder with an openapi.yaml file and the expected Java files the processor should create.
106103
The structure looks like this:
107104

108105
my-new-test-case/
@@ -136,12 +133,12 @@ openapi-processor-spring is distributed by [Apache License 2.0][license].
136133
</ul>
137134

138135
[badge-license]: https://img.shields.io/badge/License-Apache%202.0-blue.svg?labelColor=313A42
139-
[badge-ci]: https://github.com/hauner/openapi-generatr-spring/workflows/ci/badge.svg
136+
[badge-ci]: https://github.com/hauner/openapi-processor-spring/workflows/ci/badge.svg
140137

141-
[workflow-ci]: https://github.com/hauner/openapi-generatr-spring/actions?query=workflow%3Aci
138+
[workflow-ci]: https://github.com/hauner/openapi-processor-spring/actions?query=workflow%3Aci
142139

143140
[docs-gradle]: /openapi-processor-spring/gradle.html
144-
[docs-processor]: /openapi-processor-spring/generatr/
141+
[docs-processor]: /openapi-processor-spring/processor/
145142
[docs-mapping]: /openapi-gprocessor-spring/mapping/
146143

147144
[bintray]: https://bintray.com/hauner/openapi-processor

docs/links.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ nav_order: 30
1111
- [OpenAPI tools][openapi-tools]{:target="_blank"}. List of OpenAPI tools.
1212
- "the" [OpenAPI generator][openapi-generator]{:target="_blank"}. Generate clients, servers and documentation from OpenAPI 2.0/3.x documents.
1313
- [Swagger OpenAPI parser][swagger-parser]. Java parser for OpenAPI specs.
14+
- [openapi4j OpenAPI parser][openapi4j]. Alternative Java parser for OpenAPI specs.
1415

1516
[openapi]: https://www.openapis.org/
1617
[openapi-spec]: https://github.com/OAI/OpenAPI-Specification
1718
[openapi-generator]: https://openapi-generator.tech/
1819
[openapi-tools]: https://openapi.tools/
1920
[swagger-parser]: https://github.com/swagger-api/swagger-parser
21+
[openapi4j]: https://github.com/openapi4j/openapi4j

docs/mapping/basic.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ nav_order: 1
88
# Basic (primitive) Mappings
99

1010
The OpenAPI specification defines a couple of basic [data types][openapi-spec-types]{:target="_blank"}.
11-
The basic data types are built-in into the generatr. That means the generatr will map the basic types
12-
automatically to a corresponding java type. There is no explicit type mapping required.
11+
The basic data types are built-in into the processor. That means it will map the basic types automatically
12+
to a corresponding java type. There is no explicit type mapping required.
1313

1414
## OpenAPI to Java type mapping
1515

1616
The following table shows the automatic mapping of OpenAPIs primitive types to Java.
1717

18-
`type` | `format` | generatr Java type
18+
`type` | `format` | processor Java type
1919
------ | -------- | ------------------
2020
`integer` | | `java.lang.Integer`
2121
`integer` | `int32` | `java.lang.Integer`
@@ -28,7 +28,7 @@ The following table shows the automatic mapping of OpenAPIs primitive types to J
2828
`string` | `binary` | not (yet) implemented
2929
`boolean` | | `java.lang.Boolean`
3030
`string` | `date` | `java.time.LocalDate`
31-
`string` | `date-time` | `java.time.OffsetDataTime` (since 1.0.0.A2)
31+
`string` | `date-time` | `java.time.OffsetDataTime`
3232
`string` | `password` | ignored
3333

3434
[openapi-spec-types]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#dataTypes

docs/mapping/global.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ can be mapped to an existing `Book` java type/class by the following mapping:
5353

5454
```yaml
5555
- from: Book
56-
to: com.github.hauner.openapi.generatr.Book
56+
to: com.github.hauner.openapi.oap.Book
5757
```
5858

5959
It is also possible to use a predefined OpenAPI type as the `from` type of a type mapping:
@@ -63,17 +63,17 @@ It is also possible to use a predefined OpenAPI type as the `from` type of a typ
6363
to: java.util.List
6464
```
6565

66-
This tells the generatr to us a `java.util.List` instead of the OpenAPI type `array`.
66+
This tells the processor to us a `java.util.List` instead of the OpenAPI type `array`.
6767

68-
The **generics** parameter is not required in this special case. The generatr knows `java.util.List`
68+
The **generics** parameter is not required in this special case. The processor knows `java.util.List`
6969
and will automatically use the `items` property of the `array` as the generic type.
7070

7171
<div markdown="1">
7272
**Important:**
73-
- OpenAPIs `object` type has no special handling if given as the `from` type. The generatr assumes
73+
- OpenAPIs `object` type has no special handling if given as the `from` type. The processor assumes
7474
that it is just a schema name and it will only match if there is schema with the name "object".
7575
- global type mappings do not work on OpenAPI inline schemas. Inline schemas do not have a name so
76-
there is no way for the generatr to recognize it.
76+
there is no way for the processor to recognize it.
7777
</div>{: .note .important .mb-6}
7878

7979
## mapping basic (primitive) types with format
@@ -109,16 +109,16 @@ For example if a `StringPage` schema is defined in the OpenAPI that corresponds
109109
- java.lang.String
110110
```
111111

112-
The generatr will replace any use of `StringPage` with the **to** type and add the generic types
112+
The processor will replace any use of `StringPage` with the **to** type and add the generic types
113113
(in the given order) to the **to** type.
114114

115-
In case of the example above the generatr will create `Page<String>` instead of `StringPage` with an
115+
In case of the example above the processor will create `Page<String>` instead of `StringPage` with an
116116
additional `import` for the generic type (.. ignoring imports on `java.lang`).
117117

118118
<div markdown="1">
119119
**Important:**
120120

121-
The generatr does support only one level of generics. It is not possible to provide generic parameters
121+
The processor does support only one level of generics. It is not possible to provide generic parameters
122122
to generic parameters.
123123
</div>{: .note .important .mb-6}
124124

docs/mapping/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ has_children: true
77

88
# Type Mapping
99

10-
Using type mapping we can tell the generatr to map types (schemas) from an openapi.yaml description to
10+
Using type mapping we can tell the processor to map types (schemas) from an openapi.yaml description to
1111
a specific existing java type instead of generating a model class from the source OpenAPI type.
1212

1313
This can be a type created by us or a type from a framework. For example to map paging parameters and

docs/mapping/parameter.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ java type given by **to**.
3737
<div markdown="1">
3838
**Important:**
3939
40-
Since the generatr will simply match the parameters by their name take care that all parameters of
40+
Since the processor will simply match the parameters by their name take care that all parameters of
4141
that name should really use the same type!
4242
</div>{: .note .important .mb-6}
4343
@@ -100,7 +100,7 @@ and an openapi.yaml with multiple endpoints having a parameter named "date"
100100
type: string
101101
```
102102
103-
the generatr will use `java.time.ZonedDateTime` as java type for **all** parameters named "date" in
103+
the processor will use `java.time.ZonedDateTime` as java type for **all** parameters named "date" in
104104
**all** endpoints that have a "date" parameter.
105105

106106
In the example both endpoints would use `java.time.ZonedDateTime` as java type for the "date" parameter.

docs/mapping/response.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ java type given by **to**.
3737
<div markdown="1">
3838
**Important:**
3939
40-
Since the generatr will simply match the content type string take care that all responses of this
40+
Since the processor will simply match the content type string take care that all responses of this
4141
content type should really use the same type!
4242
4343
This is probably only useful for vendor content types. Globally mapping the content type for example
@@ -89,5 +89,5 @@ and an openapi.yaml with multiple endpoints returning their result as content ty
8989
```
9090
9191
92-
the generatr will use `com.github.hauner.openapi.Something` as java type for **all** responses with
92+
the processor will use `com.github.hauner.openapi.Something` as java type for **all** responses with
9393
the content type `application/vnd.something`.

docs/mapping/structure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ the `map` key. The `map` key contains multiple sections to define the different
5252

5353
```
5454

55-
[docs-configuration]: /openapi-generatr-spring/generatr/configuration.html
55+
[docs-configuration]: /openapi-processor-spring/processor/configuration.html

docs/processor/endpoints.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ A client request uses the request `Accept` header to tell the api which result c
6060
handle.
6161

6262
Using a single endpoint method it has to decide which response to create. This leads to some boring
63-
`if/else` code. To avoid this the generatr creates one endpoint method for each possible response.
63+
`if/else` code. To avoid this the processor creates one endpoint method for each possible response.
6464

6565
For the example above it creates the following interface:
6666

docs/processor/interfaces.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ The interface name used for this api will be `PingApi`. `Ping` because `ping` is
3737

3838
In case no tags are given, all endpoints will be added to an `Api` interface.
3939

40-
The package name gets created from the configurable `packageName` parameter of the generatr and a
40+
The package name gets created from the configurable `packageName` parameter of the processor and a
4141
sub package named `api`.
4242

4343
If the `packageName` is configured as `com.github.hauner.openapi` the final package name for the

0 commit comments

Comments
 (0)