I'm trying to use the swagger-codegen-maven-plugin to generate Java code for an OpenAPI specification which contains the following declaration:
type: object
properties:
state:
type: string
enum:
- aborted
- finished
additionalProperties:
type: string
required:
- state
Somehow, the generated class is missing the state property, but is simply derived from HashMap:
public class MyObject extends HashMap<String, String> {
// hasCode(), equals() and toString() methods omitted for brevity
}
Is there any way to make the plugin generate a class that implements both the state property and an additional list of dynamic properties?