xiaodongw / swagger-finatra

Finatra Swagger Support
Apache License 2.0
46 stars 45 forks source link

Ability to specify JSON mapper #7

Closed thepratt closed 8 years ago

thepratt commented 8 years ago

Currently you use the swagger json mapper, wouldn't it be better to use the included finatra mapper (with the option to use @CamelCaseMapper)? I use the default finatra functionality when it comes to mapping values, so my requests look like:

{
    "a_very_important": "value"
}

instead of

{
    "aVeryImportant": "value"
}

And I don't see a way currently to support the first without writing name annotations on every request case class. if you don't have time, are you open to a PR surrounding this?

xiaodongw commented 8 years ago

I tried to use Finatra's mapper without success, it still generated the camel cased property name. Please feel free to open a PR for it, thanks.

xiaodongw commented 8 years ago

Updated API, now you can config the swagger JSON.

Please see the sample application for more information.

thepratt commented 8 years ago

Thanks for that Xiaodong. I'll update, and test it out later next week.