added useFqn parameter to generate fully qualified model class names (Java)
This resolves #1001 by adding an additional property useFqn that will take the assigned schema name as the basis for the generated package namespace of the model files. Any modelPackage already set (or default io.swagger.model) will be prepended to the package namespace.
This currently only supports the generated Java code, but could relatively easily be extended to the other language templates.
As an asside, a couple of refactorings ought be done to swagger-codegen to improve this. If this seems a viable PR then I'd be happy to submit a PR for that too:
- DefaultGenerator#processModels only processes one model at a time atm. The templates are complicated to support multiple models when only one is present at a time. Propose simplifying this method signature to only take one definition at a time if possible
- I've reused CodegenModel#xmlNamespace field for this case to better support generated import statement. This should be generalized in swagger-codegen to a namespace field or similar
@frantuma @HugoMario would it be possible to get feedback on this PR? This would be very helpful for generating code from larger OpenAPI specs.