Pre-Requisites & Context
You should definitely complete the Open API/Swagger badge (https://www.badgelist.com/team/open-api-v2
) before starting this one. The Swagger::Blocks gem is essentially the tool which Badge List uses in order to dynamically generate its Swagger JSON.
The big benefit of Swagger::Blocks is that it is built on top of the Rails controller model and allows for live-updating api specs. Because it turns the generation of a Swagger spec into a programmatic exercise, it also provides a framework which allows us to manage the Swagger spec right along with the underlying code and which allows for less repetitive / more maintainable Swagger-generation code.
One thing to note is that we've got a significant amount of custom DSL (domain-specific language) built up on top of
the Swagger::Blocks gem (the default controller structure of Swagger::Blocks is not very DRY). That means that it's especially important to understand the nitty gritty of how Swagger::Blocks works in its vanilla state, otherwise you'll be completely lost when you get to Badge List's implementation of Swagger::Blocks.
How to earn this badge
- Learn about the Swagger::Blocks gem. Refer to #Learning-Resources to get started.
- Solve the #Challenge
- Post the resources which were helpful in your own learning journey back to #Learning-Resources
- Request feedback