docfx
docfx copied to clipboard
Internal swagger structures doesn't support recursive schema definitions
Generating RestApi documentation in docfx 1.6.1 results in
Error:System.AggregateException: One or more errors occurred. ---> Newtonsoft.Json.JsonSerializationException: Self referencing loop detected with type 'Microsoft.DocAsCode.EntityModel.Swagger.Internal.SwaggerObject'. Path ''.
for the following type in definitions because of self-referencing field InnerException
"ApiExceptionError": {
"description": "Ошибка времени выполнения (run-time exception)",
"type": "object",
"properties": {
"ExceptionMessage": {
"description": "Сообщение",
"type": "string"
},
"StackTrace": {
"description": "StackTrace",
"type": "string"
},
"ExceptionType": {
"description": "Тип исключения",
"type": "string"
},
"InnerException": {
"$ref": "#/definitions/ApiExceptionError",
"description": "InnerException"
},
"Message": {
"description": "Сообщение",
"type": "string"
},
"ReasonCode": {
"description": "Код ошибки",
"type": "string"
},
"UserMessage": {
"description": "Пользовательское сообщение",
"type": "string"
}
}
}
@sashaozz we fixed via #453 #464 , DocFX supports swagger recursive reference now.
The code is already in dev branch, will release at July 18th.