-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How Can i User Swagger docs for devise sessions controller #163
Comments
Found Solution Yet? |
Not yet |
I managed to fix this issue and successfully generated swagger docs for devise controllers. (Actually, I used devise_token_auth but the solution is the same)
|
Hi sergeymell How did you manage to implement swagger with devise? I couldn't, the message tells me that I am not authorized. Thanks for your answer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I used rails swagger gem for documenting my rails api. it is working fine for all controller . but it is not working for devise::sessionsController.
Here is my code ,
I added 2 controller as base in my api
swagger_docs.rb
def self.base_api_controller [ActionController::API,ActionController::Base] end
In sessions_controller.rb
` include Swagger::Docs::Methods
swagger_controller :sessions, "Login"
swagger_api :create do
summary "Generate Access Token"
param :form, 'user[email]', :string, :required, "Email of user"
param :form, 'user[password]', :string ,:required, "Password of user"
response :unauthorized
response :not_acceptable
response :not_acceptable
response :not_found
end`
There is no any error. so my code is not effecting in sessions controller . what is the solution ? Thank you in advance .
The text was updated successfully, but these errors were encountered: