@@ -28,8 +28,8 @@ correctly.
2828See the [ generatr intro] [ docs-generatr ] {: target ="_ blank"} for a short example.
2929{: .mb-6 }
3030
31- Note that the generatr is still in an early state of development and not all features are completely implemented.
32- (December 2019)
31+ January 2020: The generatr is ready to try but note that the generatr is still in an early state of
32+ development and may not generate the correct code yet in all cases. See [ feedback ] ( #feedback ) .
3333{: .note .info .mb-6}
3434
3535
@@ -49,41 +49,19 @@ See the [release notes][generatr-releases]{:target="_blank"}.
4949
5050## Features
5151
52- - <span class =" label label-green " >partially implemented</span > generates only java interfaces and java model classes
53- (get/set pojos) for all defined endpoints and schemas to allow (nearly) full control of the endpoint
54- implementation. It does not generate any other file.
55-
56- - <span class =" label label-green " >done (since 1.0.0.A2)</span > The generatr does now generate model classes
57- with ` @JsonProperty ` annotated properties, i.e. the schema property names in the OpenAPI description are not limited
58- to valid java identifiers anymore.
59-
60- - <span class =" label label-green " >done (since 1.0.0.A2)</span > support for the OpenAPI ` requestBody: ` block.
61-
62- - <span class =" label label-green " >done</span > full parameter support:
63- - <span class =" label label-green " >done</span > query parameters, i.e. ` in: query `
64- - <span class =" label label-green " >done (since 1.0.0.A2)</span > path parameters, i.e. ` in: path `
65- - <span class =" label label-green " >done (since 1.0.0.A2)</span > header parameters, i.e. ` in: header `
66- - <span class =" label label-green " >done (since 1.0.0.A2)</span > cookie parameters, i.e. ` in: cookie `
67- {: .mb-5 }
68-
69- - <span class =" label label-green " >partially implemented</span > simple & flexible type mappings with generic support
70- (one level) to map schemas defined in the openapi.yaml to existing java types. For example to map the openapi
71- ` array ` type to different java collections or to map paging parameters and results to Spring types like ` Page<> `
72- & ` Pageable ` .
52+ - generates only java interfaces and java model classes (get/set POJOs) for all defined endpoints and schemas to
53+ allow (nearly) full control of the endpoint implementation. It does not generate any other file. See
54+ [ generatr] [ docs-generatr ] .
55+
56+ - powerful type mappings with generic support (one level) to map schemas defined in the openapi.yaml to
57+ existing java types. For example to map the openapi ` array ` type to different java collections or to
58+ map paging parameters and results to Spring types like ` Page<> ` & ` Pageable ` . See [ type mapping] [ docs-mapping ] .
7359
7460 it is possible to define the mapping globally or for a specific response or parameter or even only for a specific
7561 endpoint.
76-
77- - <span class =" label label-red " >caveat</span > the mapping can be defined at all levels but is not yet honored
78- at all places.
79- {: .mb-5 }
8062
81- - <span class =" label label-green " >implemented</span > gradle support via [ openapi-generatr-gradle] [ generatr-gradle ] plugin.
82-
83- - <span class =" label label-red " >caveat</span > the gradle plugin is currently the only option to run the
84- generatr.
85- {: .mb-5 }
86-
63+ - gradle support via [ openapi-generatr-gradle] [ generatr-gradle ] plugin (the plugin is currently the only option
64+ to run the generatr).
8765
8866- <span class =" label label-yellow " >planned</span > add additional parameters to an endpoint which are not defined in
8967 the openapi description. For example to pass a ` HttpServletRequest ` to the endpoint implementation.
@@ -103,6 +81,30 @@ The generated source code has to be included in a project to compile it. This is
10381with the [ openapi-generatr-gradle] [ generatr-gradle ] plugin. See [ Using Gradle] [ docs-gradle ] .
10482{: .note .info .mb-6}
10583
84+ ## Feedback
85+
86+ In case some feature is missing or the generated code is not 100% what you would expect create an [ issue] [ generatr-issues ]
87+ preferably with a test case. Providing a test case will help significantly :-)
88+
89+ A test case is a single folder with an openapi.yaml file and the expected Java files the generatr should create.
90+ The structure looks like this:
91+
92+ my-new-test-case/
93+ openapi.yaml
94+ mapping.yaml
95+ generated/
96+ api/
97+ AnEndpointInterface.java
98+ .. more api interfaces ..
99+ model/
100+ AModelClass.java
101+ AnotherModelClass.java
102+ .. more model files ..
103+
104+ The ` mapping.yaml ` contains the type mapping information and is an optional file.
105+
106+ See the [ existing integration tests] [ generatr-int-resources ] for a couple of examples.
107+
106108## License
107109
108110openapi-generatr-spring is distributed by [ Apache License 2.0] [ license ] .
@@ -124,11 +126,14 @@ openapi-generatr-spring is distributed by [Apache License 2.0][license].
124126
125127[ docs-gradle ] : /openapi-generatr-spring/gradle.html
126128[ docs-generatr ] : /openapi-generatr-spring/generatr/
129+ [ docs-mapping ] : /openapi-generatr-spring/mapping/
127130
128131[ bintray ] : https://bintray.com/hauner/openapi-generatr
129132[ generatr-gradle ] : https://github.com/hauner/openapi-generatr-gradle
130133[ generatr-releases ] : https://github.com/hauner/openapi-generatr-spring/releases
131134[ generatr-license ] : https://github.com/hauner/openapi-generatr-spring/blob/master/LICENSE
135+ [ generatr-int-resources ] : https://github.com/hauner/openapi-generatr-spring/tree/master/src/testInt/resources
136+ [ generatr-issues ] : https://github.com/hauner/openapi-generatr-spring/issues
132137
133138[ openapi ] : https://www.openapis.org/
134139[ springboot ] : https://spring.io/projects/spring-boot
0 commit comments