Skip to content
This repository has been archived by the owner on Oct 28, 2022. It is now read-only.

Adding HTTP Annotations #717

Merged
merged 8 commits into from
Sep 22, 2016
Merged

Adding HTTP Annotations #717

merged 8 commits into from
Sep 22, 2016

Conversation

david4096
Copy link
Member

@david4096 david4096 commented Sep 20, 2016

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.

  • Updated to newer sphinx-maven
  • Added version to URL string
  • Add documentation for use and getting started with swagger-codegen
  • Add proto dependencies
  • Update protobufjsondocs script

Close #696

The protobufjson doc generation process failed when receiving extensions or options in the protobuf descriptors. Added a few comments to make more clear what was happening and allowed for extensions and options to be in the indexed tree.
Roll back reads change
Change protobuf in environment.yml
Documentation fixes
@kozbo
Copy link
Contributor

kozbo commented Sep 21, 2016

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

@kozbo
Copy link
Contributor

kozbo commented Sep 22, 2016

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

@bwalsh
Copy link
Member

bwalsh commented Sep 22, 2016

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

@kozbo kozbo merged commit 93935f1 into ga4gh:master Sep 22, 2016
@kozbo kozbo removed the in progress label Sep 22, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants