swagger-api / swagger-api/swagger-codegen
[Ruby] Described of controller name out of Rails rule
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
The wrong controller name will be described in routes.rb when made tags with snake case.
The controller name generated from the snake case tag is described in camel case into routes.rb.
In that case, Rails showed this error when I try to do db:create.
rails aborted!
ArgumentError: 'adminDesk' is not a supported controller name. This can lead to potential routing problems. See http://guides.rubyonrails.org/routing.html#specifying-a-controller-to-use
Swagger-codegen version
Unknown
I use swagger-hub.
Swagger declaration file content or url
tags:
- name: "client"
- name: "cloud_apps"
- name: "admin_desk"
add_swagger_route 'GET', '/admin/list', controller_name: 'adminDesk', action_name: 'admin_list_get'
Command line used for generation
N/A
Steps to reproduce
Just use tags with snake case.
Related issues/PRs
N/A
Suggest a fix/enhancement
N/A
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the provided snake_case tags and inspect the generated routes.rb entry for admin_desk. No source file or test is identified in the report; done means the generated controller name follows Rails naming rules and db:create no longer raises the unsupported-controller error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- backend, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100