Medium badge Swagger Blocks


Only editable by group admins

  • Last updated November 17, 2018 at 10:24 AM by hankish
  • Evidence only visible to badge awarders
Solve this learning challenge by posting code snippets.
First, go back to the challenge you did for the Open API badge ( and grab the JSON that you made there. Go ahead and post that JSON as an entry to this requirement too.

Then code out a Swagger::Blocks implementation which would generate the same file. You'll need a few files:
  • VotersController >> Contains the path and operation
  • Voter >> Defines the voter schema
  • ApiDocsController >> Contains the controller code which actually generates the API's Swagger JSON