hexagontk / hexagon

Hexagon is a microservices toolkit written in Kotlin. Its purpose is to ease the building of services (Web applications or APIs) that run inside a cloud platform.
https://hexagontk.com
Other
578 stars 98 forks source link

Convert HTTP calls to an OpenAPI spec #653

Open jaguililla opened 1 year ago

jaguililla commented 1 year ago

Code a function to convert a list of requests/responses into an OpenAPI spec.

The calls will be grouped by path/method. All requests and responses bodies of the calls must be added as examples.

Another function will allow to merge YAML/JSON files to the previously generated spec to complete the final spec. The com.hexagonkt.core.merge method can be helpful for this (along with the serialization modules).

Call bodies (from request and response) can be of any class, that type can be used to create the schema of the bodies in the spec. For that purpose, the hexagon_extra/processor module output can be used.

These methods should be placed on the http/rest_tools module (on the com.hexagonkt.http.test.openapi package).

For information on how to build the project and pass the tests please refer to the contributing guide.

If you have any question or suggestion, please feel free to use this issue's comments to discuss them :wink: