wordnik/swagger-codegen — pull request #215 by JDiPierro (2014-07-03 17:42:14+00:00)
Title: Use config.processResponseClass to determine type of returnContainer

Hey,

This change fixes the issue I reported in #214, which was also reported in #164. When using the Java generator for an endpoint with a `responseContainer` of `"List"` the `returnContainer` that's passed to the template was improperly being filled in with "Array".

In theory this may have been an issue in more than just the Java generator since the base Codegen was where the issue resides. When populating the `returnContainer` the raw substring from `operation.responseClass` was being used rather than running that substring through `config.processResponseClass(...)`.

I added a `CodegenTest` class with a single test that uses the `BasicJavaGenerator` and checks the `returnContainer` outputted from `apiToMap`. The test failed in the initial commit since "Array" was being returned and passes after the second commit. The change broke 2 tests that I fixed in the final commit.

This is my first time working with Scala so please make sure that my change to the failing tests was correct. The tests were expecting the raw string `"List"` but after my change an `Option` of `Some("List")` is returned instead.

Thank you!
JD