openapi2typescript
openapi2typescript copied to clipboard
建议类型解析能支持openapi 3.1协议
目前发现 openapi 3.1 协议下,errorMessage字段类型定义会被解析成any
3.0 json片段
"components": {
"schemas": {
"PageResponseResult": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "是否成功"
},
"errorMessage": {
"type": "string",
"description": "错误信息",
"nullable": true
}
}
}
}
}
3.1 json片段
"components": {
"schemas": {
"PageResponseResult": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "是否成功"
},
"errorMessage": {
"type": ["string", "null"],
"description": "错误信息"
}
}
}
}
}