You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
Goa provides a holistic approach for developing remote APIs and microservices in Go. Code GenerationGoa relies on code generation to alleviate the need for reflection or repetitive coding. The goa tool generates various artifacts including code, documentation, clients and even custom outputs via plugins. The end result is application code that is clean and terse. Design BasedThe Goa design languag
JSON SchemaでAPI開発を自動化する Tweet このエントリは弊社の英語ブログのAutomating your API with JSON Schema — Commerce Hack の翻訳です。 APIのドキュメントとクライアントライブラリの保守には苦労します。時間もかかるし、ドキュメントの更新をついつい忘れてしまうこともよくあります。私たちは、こういう作業をするのにいいツールはないものか、ずっと探していました。 そして見つけたのが JSON Schema です。これは本当にクールな技術で、私たちはこれを、APIのドキュメント生成、クライアントライブラリ内のロジック、そして自動化テストの中で活用しています。ここではその活用法を紹介したいと思います。 JSON Schema とは何か? JSON Schema とは、JSON object の記述と検証のための標準で、概略はこ
2023 追記 2023 年現在では、以下の文章では採用を見送っている OpenAPI を使えば OK という雰囲気です。 Web APIの設計 作者:Arnaud Lauret翔泳社Amazon TL; DR ドキュメント生成にはkevinrenskers/raml2htmlを使った ドキュメントはRAML - RESTful API modeling languageで書いた RAMLにはJSON SchemaとJSONを記載できる APIで返ってくるJSONはRailsアプリのrequest specでJSON Schemaを使ってテストした JSON Schemaはr7kamura/json_worldで生成した ドキュメントに載せる例示のJSONもJSON Schemaからgin0606/screijiを使って生成した 上記の方法だとリクエストパラメタとドキュメントの整合性を担保
JSON Schemas are available for the following {0} files: Auto completion In supported JSON editors like Visual Studio and Visual Studio Code, schema files can offer auto-completion and validation to make sure your JSON document is correct. See a list of editors, validators and other software supporting JSON schemas. Tooltips When a JSON editor supports schemas, tooltips can help inform the user abo
TL;DR JSON Schemaを使ってこういうことが実現可能になった。 ダミーAPIサーバの提供 ドキュメントの自動生成 APIクライアントの動的定義 APIサーバのバリデータの動的定義 APIサーバのレスポンスの自動テスト JSON Schemaとは JSON SchemaというのはあるJSONのデータ構造を記述するための方法および書式の仕様で、 JSON SchemaもJSONで記述される。 これを利用すれば、リソースベースの(=RESTfulライクな)APIの仕様が簡便に記述できる。 例えば、我々のAPIはレシピとユーザというリソースを扱っていて、 それぞれCRUDのAPIを備えており、レシピはidとtitleとdescriptionという属性を持つ、 という旨をJSON Schemaで表現できる。 なんで最近ちょっと流行ってんの Mobile First、 Service Or
Herokuが自ら実践しているAPIデザインガイドをGithubに公開した. “HTTP API Design Guide” このガイドは些細なデザイン上の議論を避けて,ビジネスロジックに集中すること目的としている.Heroku特有なものではなく,一般にも十分適用できる知見となっている. 最近は,モバイル向けにAPIをつくることも多いため,勉強もかねて抄訳した.なお内容は,HTTP+JSONのAPIについて基本的な知識があることが前提となっている. 適切なステータスコードを返す それぞれのレスポンスは適切なHTTPステータスコード返すこと.例えば,“成功"を示すステータスコードは以下に従う. 200: GETやDELETE,PATCHリクエストが成功し,同時に処理が完了した場合 201: POSTリクエストが成功し,同時に処理が完了した場合 202: POSTやDELETE,PATCHリク
JSON Hyper-Schema: A Vocabulary for Hypermedia Annotation of JSON draft-handrews-json-schema-hyperschema-02 Abstract JSON Schema is a JSON-based format for describing JSON data using various vocabularies. This document specifies a vocabulary for annotating JSON documents with hyperlinks. These hyperlinks include attributes describing how to manipulate and interact with remote resources through hyp
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く