I\'m working on an API where we define the API definition in the swagger.yaml file. The API which I am working on returns an output object which contains a map.
Your map definition is correct. There's an open issue with Swagger Codegen about the way it translates OpenAPI maps to Java code: https://github.com/swagger-api/swagger-codegen/issues/5187