ga4gh / ga4gh-schemas

Models and APIs for Genomic data. RETIRED 2018-01-24
http://ga4gh.org
Apache License 2.0
214 stars 114 forks source link

Adding HTTP Annotations #717

Closed david4096 closed 7 years ago

david4096 commented 7 years ago

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

kozbo commented 7 years ago

I have gone through the steps in the documentation and was able to use the swagger-codegen tool successfully. +1

kozbo commented 7 years ago

@bwalsh can you give this a review please, especially the steps to create the swagger docs

bwalsh commented 7 years ago

+1 I was able to follow the instructions for linux and generate target/swagger/ga4gh