Forum Discussion

zse101100's avatar
zse101100
New Member
3 years ago

about swagger.json, how to not use $ref generate

"IApplication": {
"type": "object",
"properties": {
"general": {
"$ref": "#/definitions/IApplicationGeneral",
"description": "general info detail"
}
}
},
"IApplicationGeneral": {
"type": "object",
"properties": {
"applicationNumber": {
"description": "application number",
"type": "string"
},
"dateSent": {
"description": "date sent this application (dd/MM/yyyy)",
"type": "string"
},
"licenceName": {
"description": "license name",
"type": "string"
},
"transactionType": {
"description": "transaction Type: new, amend, renew, cancel",
"type": "string"
}
}
}

to this

"IApplication": {
"type": "object",
"properties": {
"general": {
"description": "general info detail",
"type": "object",
"properties": {
"applicationNumber": {
"description": "application number",
"type": "string"
},
"dateSent": {
"description": "date sent this application (dd/MM/yyyy)",
"type": "string"
},
"licenceName": {
"description": "license name",
"type": "string"
},
"transactionType": {
"description": "transaction Type: new, amend, renew, cancel",
"type": "string"
}
}
}
}
}

No RepliesBe the first to reply