{"id":16191012,"url":"https://github.com/maxmellon/introduction-agreed","last_synced_at":"2025-10-28T12:07:13.171Z","repository":{"id":86954252,"uuid":"128642864","full_name":"MaxMEllon/introduction-agreed","owner":"MaxMEllon","description":null,"archived":false,"fork":false,"pushed_at":"2018-04-12T12:11:34.000Z","size":16,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T14:43:10.985Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MaxMEllon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-08T13:14:48.000Z","updated_at":"2019-01-22T02:54:21.000Z","dependencies_parsed_at":"2023-05-29T23:15:25.683Z","dependency_job_id":null,"html_url":"https://github.com/MaxMEllon/introduction-agreed","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MaxMEllon/introduction-agreed","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxMEllon%2Fintroduction-agreed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxMEllon%2Fintroduction-agreed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxMEllon%2Fintroduction-agreed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxMEllon%2Fintroduction-agreed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MaxMEllon","download_url":"https://codeload.github.com/MaxMEllon/introduction-agreed/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxMEllon%2Fintroduction-agreed/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264283837,"owners_count":23584619,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T07:44:42.274Z","updated_at":"2025-10-28T12:07:08.138Z","avatar_url":"https://github.com/MaxMEllon.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# agreed を使ってみる\n\n[agreed](https://github.com/recruit-tech/agreed)とは\n---\n\nConsumer Driven Contract をサポートするためのツールです．\n指定された形式(json5, yml など)で API仕様書 を記述すると，それに従った mock server が立ち上がります．\nまた，[agreed-ui](https://github.com/recruit-tech/agreed-ui)(agreed同封) を利用することで，各種仕様をWebで確認できます\n\nConsumer Driven Contractとは\n---\n**Consumer Driven Contract** の説明の前に，サービス開発におけるバックエンドとフロントエンドのロールについて整理します．\nConsumer Driven Contractの文脈では，データや機能を提供する側を，**Provider** とし，\nそれを利用する側を Consumer とします．\n\n一般的なRESTfulなAPIと連携するような開発スタイルの場合，バックエンド開発者が **Provider** となり，\nフロントエンド開発者が **Consumer** となります．\n\n従来は，Provider が APIのリクエストやレスポンスを設計し，それに従って\nConsumerが開発するのが多かったように思えます．\n\nこのような開発スタイルでの問題として大きく挙がるのが以下の2点です．\n\n- Provider の破壊的変更 `*1` に Consumer が気がつけない，対応できない\n- Provider が API を開発するまで，Consumer が開発できない （mockサーバーなどで開発したとしても，Provider と Consumer が想定するAPIが異なる）\n\n`*1` : 破壊的変更というのは，例えばカラム名が変わったりなくなったりするというもの\n\nそこで，Consumerが主導になってAPIを設計仕様を考えようというものが， Consumer Driven Contract です．\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxmellon%2Fintroduction-agreed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxmellon%2Fintroduction-agreed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxmellon%2Fintroduction-agreed/lists"}