API Development with Swagger and OpenAPI
Design an API on paper before you build it. Learn the API lifecycle and REST design habits, read and write YAML, and describe endpoints, parameters, schemas, examples and security in an OpenAPI document, then lint it and use Swagger Editor, Swagger UI and Swagger Codegen, with one running example: the Wrenchwell Cycle Co-op repair desk.
- Intermediate level
- 5 modules
- 11 lessons
- 61 quiz questions
Syllabus
01API Lifecycle and DesignWhat an API contract is, how an API lives through five stages, and how to pick resource names, HTTP methods, status codes and error bodies that other developers can guess.3 lessons
02YAML for API DescriptionsRead and write the YAML that most OpenAPI documents use: mappings, lists, quoting, long text, and the handful of traps that turn a valid-looking file into a broken one.1 lesson
03Reading an OpenAPI DocumentWalk through a real OpenAPI 3.1 document for the Wrenchwell repair desk: the top-level fields, operations and responses, parameters and request bodies, and how components and references remove repetition.3 lessons
04Design First with Swagger ToolsChoose between design first and code first, lint a contract before anyone builds on it, and see what Swagger Editor, Swagger UI and Swagger Codegen each do, including which OpenAPI versions they understand.2 lessons
05Documenting and Securing an APITurn a valid contract into documentation people use: descriptions, examples, tags and deprecation, including the 3.2 tag features. Then describe how callers authenticate with security schemes, scopes and per-operation rules.2 lessons