[wp-trac] [WordPress Trac] #52932: Rest Api enum validation does not work correctly WordPress 5.7

WordPress Trac noreply at wordpress.org
Sun Mar 28 16:12:29 UTC 2021


#52932: Rest Api enum validation does not work correctly WordPress 5.7
---------------------------+-----------------------
 Reporter:  stefanjoebstl  |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  5.7.1
Component:  REST API       |     Version:  5.7
 Severity:  normal         |  Resolution:
 Keywords:  needs-patch    |     Focuses:  rest-api
---------------------------+-----------------------

Comment (by yakimun):

 @TimothyBlynJacobs Hi!

 I think that it would be correct to consider such values equal.

 Some test cases from the official "JSON Schema Test Suite" confirm this.
 Example: https://github.com/json-schema-org/JSON-Schema-Test-
 Suite/blob/master/tests/draft2020-12/enum.json#L215

 I can fix it if you don't mind.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52932#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list