I want instrument for automatic generate openapi in my helidon project (Java 1.8, helidon SE 1.3.1)
I read documenttation/example and make:
- add depends in maven
- add openapi.yml in META-INF
- add endpoint for router.
- add apifilter and apimodelreader
pom.xml:
<dependency>
<groupId>io.helidon.openapi</groupId>
<artifactId>helidon-openapi</artifactId>
<version>1.3.1</version>
</dependency>
main.java:
return Routing.builder()
.register(JsonSupport.create())
.register(health) // Health at "/health"
.register(metrics) // Metrics at "/metrics"
.register("/file", fileService)
.register("/card", cardService)
.register(OpenAPISupport.create(config))
.build();
application.yaml
openapi:
filter: ru.ittest.feezio.openapi.SimpleAPIFilter
model:
reader: ru.ittest.feezio.openapi.SimpleAPIModelReader
Now I have openapi document in endpoint: http://127.0.0.1:8456/openapi And it is my openapi.yml. But I don't want write by hand openapi.yml, I want auto generate yml for my classes: fileService and cardService. This classes work and response success (API work, I make documentation now)