cancel
Showing results for 
Search instead for 
Did you mean: 

enum of objects

martin_tuma
New Member

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?

 

 

New Here?
Join us and watch the welcome video:
Announcements