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

Schema-first API Development with OpenAPI and Committee

Shohei Umemoto
March 28, 2023
54

Schema-first API Development with OpenAPI and Committee

Shohei Umemoto

March 28, 2023
Tweet

Transcript

  1. NOT Schema-first (Schema-last?) Web API Development Backend 1. Design 2.

    Develop 3. Verify 4. Release Frontend 1. Wait 2. Wait 3. Wait 4. Develop 5. Uh-oh
  2. Schema-first Web API Development Backend 1. Schema 🤝 2. Develop

    3. Verify 4. Release Frontend 1. Schema 🤝 2. Develop 3. Verify 4. Release
  3. OpenAPI Specification (OAS) Web API specification written in YAML or

    JSON Useful tools for OAS, like Swagger Editor, Swagger UI, Swagger Codgen
  4. Committee and Committee::Rails Committee: Rack middleware to validate requests and

    responses along with OAS Committee::Rails: Rails integration to utilize assertions like - assert_request_schema_confirm - assert_response_schema_confirm
  5. Pros and Cons Pros: No outdated specification and documentation Pros:

    Promote collaborating and reduce reworking Cons: Learn about OpenAPI Specification Cons: Committee doesn't always cover every cases