Closed imnithin closed 7 years ago
'rails' 5.1.1
Gemfile.
gem 'swagger-docs' gem 'grape-swagger-rails'
Gemlock
swagger-docs (0.2.9) grape-swagger-rails (0.3.0)
in controller
swagger_api :show do summary "Display plan" param :path, :id, :integer, :required, "Plan Id" response :not_found end
.json file
{ "apiVersion": "1.0", "swaggerVersion": "1.2", "basePath": "http://localhost:3000", "resourcePath": "plans", "apis": [ { "path": "/api/v1/plans", "operations": [ { "summary": "Display plan", "parameters": [ ], "responseMessages": [ { "code": 404, "responseModel": null, "message": "Not Found" } ], "nickname": "Api::V1::Plans#show", "method": "get" } ] },
I would be happy to share further details. If needed
I'm sorry , the routes had a issue.
'rails' 5.1.1
Gemfile.
Gemlock
in controller
.json file
I would be happy to share further details. If needed