Invalid Type "ENUM"
danieljoppi opened this issue · comments
I had a enum type in my definitions ... Can I ignore it?
Error: Unrecognized schema type: undefined
at propertyMap (/Users/daniel.joppi/swagger-docs/node_modules/swagger-mongoose/lib/index.js:48:13)
at getSchemaProperty (/Users/daniel.joppi/swagger-docs/node_modules/swagger-mongoose/lib/index.js:231:16)
at /Users/daniel.joppi/swagger-docs/node_modules/swagger-mongoose/lib/index.js:208:26
at /Users/daniel.joppi/swagger-docs/node_modules/swagger-mongoose/node_modules/lodash/lodash.js:4897:15
at baseForOwn (/Users/daniel.joppi/swagger-docs/node_modules/swagger-mongoose/node_modules/lodash/lodash.js:2973:24)
at /Users/daniel.joppi/swagger-docs/node_modules/swagger-mongoose/node_modules/lodash/lodash.js:4866:18
at Function.forEach (/Users/daniel.joppi/swagger-docs/node_modules/swagger-mongoose/node_modules/lodash/lodash.js:9269:14)
at getSchema (/Users/daniel.joppi/swagger-docs/node_modules/swagger-mongoose/lib/index.js:207:5)
at /Users/daniel.joppi/swagger-docs/node_modules/swagger-mongoose/lib/index.js:307:14
at /Users/daniel.joppi/swagger-docs/node_modules/swagger-mongoose/node_modules/lodash/lodash.js:4897:15
at baseForOwn (/Users/daniel.joppi/swagger-docs/node_modules/swagger-mongoose/node_modules/lodash/lodash.js:2973:24)
at /Users/daniel.joppi/swagger-docs/node_modules/swagger-mongoose/node_modules/lodash/lodash.js:4866:18
at Function.forEach (/Users/daniel.joppi/swagger-docs/node_modules/swagger-mongoose/node_modules/lodash/lodash.js:9269:14)
at Object.module.exports.compile (/Users/daniel.joppi/swagger-docs/node_modules/swagger-mongoose/lib/index.js:298:5)
at Object.<anonymous> (/Users/daniel.joppi/swagger-docs/test.js:21:30)
at Module._compile (module.js:556:32)
Swagger Object
{
"definitions": {
"Address": {
"title": "Address",
"type": "object",
"properties": {
"street": {
"type": "string",
"maxLength": 60,
"description": "Street name"
},
"neighborhood": {
"type": "string",
"maxLength": 60,
"description": "neighborhood"
},
"zip": {
"type": "string",
"pattern": "[0-9]{8}",
"description": "zip code"
},
"cityCode": {
"type": "string",
"pattern": "[0-9]{7}",
"description": "IBGE city code"
},
"cityName": {
"type": "string",
"pattern": "[0-9]{8}",
"description": "city name"
},
"state": {
"$ref": "#/definitions/State"
}
}
},
"State": {
"type": "string",
"description": "State Code",
"maxLength": 2,
"enum": [
"AC",
"AL",
"AP",
"AM",
"BA",
"CE",
"DF",
"ES",
"GO",
"MA",
"MT",
"MS",
"MG",
"PA",
"PB",
"PR",
"PE",
"PI",
"RJ",
"RN",
"RS",
"RO",
"RR",
"SC",
"SP",
"SE",
"TO"
]
}
}
}
Let me know if this issue persists after a new version has been published