Closed david4096 closed 7 years ago
I have gone through the steps in the documentation and was able to use the swagger-codegen tool successfully. +1
@bwalsh can you give this a review please, especially the steps to create the swagger docs
+1 I was able to follow the instructions for linux and generate target/swagger/ga4gh
There has been an effort to standardize the methods for generating HTTP API descriptions that allow developers to rapidly develop gateways into their data. Since the GA4GH schemas are defined using Google Protocol Buffers IDL, it is possible to use this definition to generate documentation and code.
This PR adds this functionality to the GA4GH schemas by defining specially formatted options. These options allow one to specify the exact endpoint a message will be received at, as well as which fields to gather from the URL path. With these options in place, it is possible to inspect the compiled protobuf to generate service descriptions that include HTTP endpoints.
The plugin for
protoc
used is written in Go, and so this PR includes some cursory documentation for getting started with Go on Mac.With these annotations in place, one can use tools like swagger-codegen to generate server stubs, clients, and generated documentation. This will make integrating GA4GH APIs into existing data stores much easier.
Close #696