Often developers will implement APIs and then only after they’re released think about things like specifications and documentation. Instead we can make the design of the API contract an explicit part of our development process using The OpenAPI Specification (Swagger) and open source tools.
In this workshop we will:
- Discuss the contract-first approach
- Build and validate a simple OpenAPI Specification
- Generate reference documentation and show how you can incorporate it with other docs
- Run a mock server so clients can test using the API
- Generate stub code based on the specification
- Implement a basic working API using Flask
- Show how you can iteratively add features and make changes
- Discuss generating specifications for existing APIs
Participants will leave with:
- An understanding of how to incorporate a contract-first process into their API development workflow
- An example specification that can be used as reference for their own API design
- Working code for a basic API that can be used as a basis for their own development
Participants are expected to have a basic familiarity with HTTP / RESTful APIs, understanding of simple git operations, and some development experience.