Upgrade to Pro — share decks privately, control downloads, hide ads and more …

APIドキュメントの光と闇

 APIドキュメントの光と闇

APIStudy #11での登壇資料です。

https://apistudy.connpass.com/event/62970/

Atsushi Nakatsugawa

August 29, 2017
Tweet

More Decks by Atsushi Nakatsugawa

Other Decks in Technology

Transcript

  1. class PetsController < ActionController::Base include Swagger::Blocks swagger_path '/pets/{id}' do operation

    :get do key :summary, 'Find Pet by ID' key :description, 'Returns a single pet if the user key :operationId, 'findPetById' key :tags, [ 'pet' ] parameter do key :name, :id key :in, :path key :description, 'ID of pet to fetch' key :required, true key :type, :integer key :format, :int64 end response 200 do
  2. Squareの場合 社内サービスはProtocol Bufferで実装 Protocol Bufferの定義 → Java → Swagger.json Swagger.jsonをHTMLドキュメント化

    現在英語版のみ さらにSwagger.json → Swagger Codegen → SDK生成 https://www.slideshare.net/tristansokol/sdks-the-good-the-bad-the-ugly-japan