Skip to content
This repository was archived by the owner on Mar 14, 2021. It is now read-only.

Commit d51984c

Browse files
committed
antora docs
1 parent a9294d8 commit d51984c

File tree

4 files changed

+54
-0
lines changed

4 files changed

+54
-0
lines changed

build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ openapiProcessor {
5555
// with either {@code .yaml} or {@code .yml}.
5656
mapping "${projectDir}/src/api/mapping.yaml"
5757

58+
// sets the parser to SWAGGER or OPENAPI4J. if not set SWAGGER is used.
59+
// OPENAPI4J provides better validation.
60+
parser 'OPENAPI4J'
61+
5862
// show warnings from the open api parser.
5963
showWarnings true
6064
}

docs/antora.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name: openapi-processor-spring-mvc-sample
2+
title: openapi-processor-spring-mvc-sample
3+
version: master
4+
nav:
5+
- modules/ROOT/nav.adoc

docs/modules/ROOT/nav.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* xref:index.adoc[Documentation]

docs/modules/ROOT/pages/index.adoc

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

0 commit comments

Comments
 (0)