This repository was archived by the owner on Mar 14, 2021. It is now read-only.
File tree 4 files changed +54
-0
lines changed
4 files changed +54
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,10 @@ openapiProcessor {
55
55
// with either {@code .yaml} or {@code .yml}.
56
56
mapping " ${ projectDir} /src/api/mapping.yaml"
57
57
58
+ // sets the parser to SWAGGER or OPENAPI4J. if not set SWAGGER is used.
59
+ // OPENAPI4J provides better validation.
60
+ parser ' OPENAPI4J'
61
+
58
62
// show warnings from the open api parser.
59
63
showWarnings true
60
64
}
Original file line number Diff line number Diff line change
1
+ name : openapi-processor-spring-mvc-sample
2
+ title : openapi-processor-spring-mvc-sample
3
+ version : master
4
+ nav :
5
+ - modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
1
+ * xref:index.adoc[Documentation]
Original file line number Diff line number Diff line change
1
+ = OpenAPI Spring MVC Sample
2
+ :page-layout: default
3
+ :oap-spring: https://hauner.github.io/openapi-processor-spring
4
+ :oap-spring-mvc-sample: https://hauner.github.io/openapi-processor-spring-mvc-sample
5
+ :oap-json: https://hauner.github.io/openapi-processor-json
6
+ :oap-gradle: https://github.com/hauner/openapi-processor-gradle
7
+
8
+ //
9
+ // content
10
+ //
11
+
12
+ This is a simple Spring Boot (gradle) project that is using
13
+
14
+ * xref:openapi-processor-spring:ROOT:index.adoc[openapi-processor-spring] to
15
+ generate java interfaces for the api defined in an openapi.yaml file
16
+ * link:{oap-json}[openapi-processor-json] to convert the openapi yaml to json format
17
+ * link:{oap-gradle}[openapi-processor-gradle] plugin to run both processors
18
+
19
+ The purpose of the sample is to show the setup of the gradle plugin and the processors.
20
+
21
+ == Running the sample
22
+
23
+ Clone the project from link:{oap-spring-mvc-sample}[GitHub], navigate into the project root folder
24
+ and run
25
+
26
+ ----
27
+ ./gradlew bootRun
28
+ ----
29
+
30
+ to start the sample application.
31
+
32
+
33
+ == Sample Endpoints
34
+
35
+ the sample has a few simple endpoints described with OpenAPI in `src/api`.
36
+
37
+ === ping
38
+
39
+ curl http://localhost:8080/ping
40
+
41
+ === echo
42
+
43
+ curl http://localhost:8080/echo?source=foo
44
+
You can’t perform that action at this time.
0 commit comments