Closed
Description
With the swagger spec:
post:
operationId: CommentModerate
summary: Moderate the specified comment
tags:
- ApiGeneral
parameters:
- $ref: "#/parameters/pathUuid"
- in: body
name: body
required: true
schema:
type: object
required:
- pending
- approve
properties:
pending:
description: Whether the comment is pending moderation
type: boolean
approve:
description: Whether to approve the comment
type: boolean
responses:
204:
description: Comment has been updated
It apparently expects a true
for the required fields (not quite sure). With 0.22.1 it would accept this request:
{
"pending": false,
"approve": false
}
With 0.22.2 the validation fails:
{
"code": 602,
"message": "body.approve in body is required"
}
I strongly suspect this change to values.go
/ Required()
is the culprit: 348543c
Metadata
Metadata
Assignees
Labels
No labels