[wp-trac] [WordPress Trac] #51025: Add support for the anyOf and oneOf JSON Schema keywords.

WordPress Trac noreply at wordpress.org
Tue Oct 20 17:49:30 UTC 2020


#51025: Add support for the anyOf and oneOf JSON Schema keywords.
--------------------------------------------------+---------------------
 Reporter:  TimothyBlynJacobs                     |       Owner:  (none)
     Type:  enhancement                           |      Status:  new
 Priority:  normal                                |   Milestone:  5.6
Component:  REST API                              |     Version:
 Severity:  normal                                |  Resolution:
 Keywords:  json-schema has-patch has-unit-tests  |     Focuses:
--------------------------------------------------+---------------------

Comment (by TimothyBlynJacobs):

 Copying over my message from Github:

 Will definitely call it out in the dev note, but I think we're ok. The
 rest_invalid_param error is the most generic error codes that we use. So
 someone wouldn't be able to use the error code alone to tell that it is a
 specific error. They'd have to do analysis on the error message itself.

 We also don't currently expose the error codes to API consumers. It would
 only impact people using the REST validation function directly.

 These are the direct usages:
 https://wpdirectory.net/search/01EN3HSK9PJ34VCY35631DD81T. Looking thru
 those usages, a chunk of them are people polyfilling  the function, and
 the others don't appear to be looking at the specific error code used.
 Just checking whether an error is returned or not.

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


More information about the wp-trac mailing list