Forum Discussion

martin_tuma's avatar
martin_tuma
Occasional Visitor
4 years ago

enum of objects

Hi all,

I have following definition:

"CmDocumentDTO": {
"type": "object",
"required": [
"docKey",
"document"
],
"properties": {
"docKey": {
"type": "integer",
"format": "int32",
"description": "ID of doc"
},
"document": {
"type": "string",
"description": "document name"
},
"typDok": {
"$ref": "#/definitions/CmDocumentTypeEnum",
"enum": [
{
"code":"W",
"description":"MS Word"
},
{
"code":"E",
"description":"MS Excel"
}
],
"description": "doc type"
}
},
"CmDocumentTypeEnum":{
"type": "object",
"properties": {
"code": {
"type": "string"
},
"description": {
"type": "string"
}
}
},

And I want to generate source code via:

swagger-codegen-maven-plugin version 2.3.1

and I'm not able generate proper enum type, codegene create

public class CmDokumentTypdokEnum

instead java enum.

Can you help me please?

 

 

No RepliesBe the first to reply