Solve this learning challenge by posting code snippets.
First, go back to the challenge you did for the Open API badge (https://www.badgelist.com/team/open-api-v2/Challenge
) 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