Files
helidon/examples/microprofile/openapi-basic
Tim Quinn 7708105a22 Support for MP Metrics 2.0 (#992)
Add support for Microprofile Metrics 2.0, including a Helidon metrics compatibility layer which allows some existing metrics 1.1 clients to run without change using  this Helidon release (which uses metrics 2.0).
2019-09-10 15:39:19 -05:00
..
2019-09-10 15:39:19 -05:00

Helidon MP Basic OpenAPI Example

This example shows a simple greeting application, similar to the one from the Helidon MP QuickStart, enhanced with OpenAPI support.

Build

mvn package

Run

mvn exec:java

Try the endpoints:

curl -X GET http://localhost:8080/greet
{"message":"Hello World!"}

curl -X GET http://localhost:8080/greet/Joe
{"message":"Hello Joe!"}

curl -X PUT -H "Content-Type: application/json" -d '{"greeting" : "Hola"}' http://localhost:8080/greet/greeting

curl -X GET http://localhost:8080/greet/Jose
{"message":"Hola Jose!"}

curl -X GET http://localhost:8080/openapi
[lengthy OpenAPI document]

The output describes not only then endpoints from GreetResource but also one contributed by the SimpleAPIModelReader.