frog-software/frogsoft-cms

[backend] POST v1/articles/{id}/comments 发表评论问题

Nick-bit233 opened this issue · 0 comments

测试结果:Response 数据结构校验失败:
1 $.author.email 应当是 string 类型 :
【返回的author中的email字段丢失】
2 $.content 应当是 string 类型
【返回的content字段丢失】
3 $ 应当有必需属性 publishDate
【“publishDate”属性名称不对,返回的是"localDateTime"】
4 $.parent 应当是 integer 类型
【返回的parent字段丢失】

附:测试数据的返回结果:

{
    "id": 50,
    "author": {
        "email": null,
        "username": "admin",
        "roles": [
            "ROLE_USER",
            "ROLE_ADMIN"
        ]
    },
    "article": {
        "id": 1,
        "author": {
            "email": "admin@frogsoft.com",
            "username": "admin",
            "roles": [
                "ROLE_USER",
                "ROLE_ADMIN"
            ]
        },
        "status": "NORMAL",
        "publishDate": "2021-09-07 11:07:29",
        "updateDate": "2021-09-07 11:07:33",
        "views": 6,
        "likes": 5,
        "favorites": 4,
        "title": "ID1",
        "description": "ID1",
        "content": "这是评论测试文章",
        "cover": "http://dummyimage.com/300x600"
    },
    "status": "NORMAL",
    "content": null,
    "localDateTime": "2021-09-07 16:57:09",
    "likes": 0,
    "parent": null
}