I’m trying to set a post as featured using the Admin API.
I’m receiving the following error:
error: [{
"message"=>"Validation error, cannot save post.",
"context"=>"Validation failed for featured.",
"type"=>"ValidationError",
"details"=>[{"keyword"=>"type", "dataPath"=>".posts[0].featured", "schemaPath"=>"#/properties/featured/type", "params"=>{"type"=>"boolean"}, "message"=>"should be boolean"}],
"property"=>"featured",
"help"=>nil,
"code"=>nil,
"id"=>"4ee89090-63c7-11ee-9c2c-733547fae603",
"ghostErrorCode"=>nil
}]
I’ve tried various formats of the featured value (true, 1, yes), but the error is the same. I tried ‘false’, too, just to check if this was a problem with setting a post to featured on creation.
All attempts resulted in the same error.
If I remove the featured field completely, the post is created without error.
Is setting a post as featured this not something you can do with the Admin API?
Thanks,
Paul