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

Ruby client should use lowercase file names #16

Closed
adelevie opened this issue Oct 3, 2012 · 1 comment
Closed

Ruby client should use lowercase file names #16

adelevie opened this issue Oct 3, 2012 · 1 comment

Comments

@adelevie
Copy link

adelevie commented Oct 3, 2012

Line 39 from BasicRubyGenerator.scala:

  // template used for models
  modelTemplateFiles += "model.mustache" -> ".rb"

EDIT: I guess the change should come from https://github.com/wordnik/swagger-codegen/blob/master/src/main/scala/com/wordnik/swagger/codegen/BasicGenerator.scala

This should ensure the first character is lowercase. I wouldn't mind trying to fix this...it would be a fun bug to squash. I just have to learn some Scala first.

Suggested fix:

  1. Create BasicGenerator#modelFiles that returns an array of the model files (I have no idea what the scala appropriate data structure is here).
  2. In BasicRubyGenerator, override the method, call super on it, whatever way scala lets you do this, call map on the result and lowercase all the filenames.
@fehguy
Copy link
Contributor

fehguy commented Oct 6, 2012

Should be handled now--there is an override now that you can set to manipulate the filenames:

https://github.com/wordnik/swagger-codegen/blob/master/src/main/scala/com/wordnik/swagger/codegen/BasicRubyGenerator.scala#L61

@fehguy fehguy closed this as completed Oct 6, 2012
soggier pushed a commit to abacusresearch/swagger-codegen that referenced this issue Mar 29, 2018
Issue swagger-api#15: fix NullPointerException with ComposedSchema
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

No branches or pull requests

2 participants