Skip to content
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

swagger_controller DSL can accept a resource_path which will be used over a generated path #126

Closed
wants to merge 2 commits into from

Conversation

sb8244
Copy link

@sb8244 sb8244 commented Nov 23, 2015

This allows for custom paths to be defined which can then be fed into swagger-ui in a more user friendly way.

…over a generated path

This allows for custom paths to be defined which can then be fed into swagger-ui in a more user friendly way.
class SuperclassController < ApplicationController
end
class CustomResourcePathController < SuperclassController
swagger_controller :custom_resource_path, "User Management", resource_path: "testing"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is the proposed change

@sb8244
Copy link
Author

sb8244 commented Nov 23, 2015

Edit Confirmed this is strictly something swagger-converter does as a convenience.

This may not work like I expected. I put this into my project and swagger 1.2 -> 2.0 replaces nested/testing/resource as resource, returning everything after the final /.

However, swagger 1.2 generates a document with the correct nested/testing/resource, which makes me think the problem is in swagger2 converter and not this change.

richhollis added a commit that referenced this pull request Jan 13, 2016
@richhollis
Copy link
Owner

Thanks for this! I've now manually merged this into the latest version 0.2.6. Cheers.

@richhollis richhollis closed this Jan 13, 2016
@sb8244
Copy link
Author

sb8244 commented Jan 13, 2016

Awesome thank you! Swagger docs has allowed us to have a successful automated doc system! Great stuff

@richhollis
Copy link
Owner

Thank you for the PR! Great to hear it's worked out for you guys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants