gorma icon indicating copy to clipboard operation
gorma copied to clipboard

gorma should handle mixed camel and snake cases

Open bketelsen opened this issue 9 years ago • 1 comments

make gorma smarter about mixing camel & snake case in the 'goa' side of the design.

bketelsen avatar Mar 13 '16 19:03 bketelsen

Little context for those coming to the project "green". If you do have camel casing in your MediaType or Payload, when you generate your models, you will most likely encounter an error when building around a missing method.

Ex. assuming the User media type contains Attribute("realName")

models/user_helper.go:49: tmp1.RealNameToRealName undefined (type *string has no field or method RealNameToRealName)

Currently the only way that I have found to resolve this is to change Attribute("realName") to not use camel casing and instead use Attribute("real_name")

jrnt30 avatar Feb 20 '17 16:02 jrnt30