[wp-trac] [WordPress Trac] #54386: SSR blocks with enum attribute thows notice

WordPress Trac noreply at wordpress.org
Sun Nov 7 13:26:09 UTC 2021


#54386: SSR blocks with enum attribute thows notice
----------------------------------------------+----------------------------
 Reporter:  walbo                             |       Owner:  (none)
     Type:  defect (bug)                      |      Status:  new
 Priority:  normal                            |   Milestone:  Awaiting
                                              |  Review
Component:  REST API                          |     Version:
 Severity:  normal                            |  Resolution:
 Keywords:  has-unit-tests reporter-feedback  |     Focuses:
----------------------------------------------+----------------------------

Comment (by walbo):

 Yes, that will solve it.

 The [https://developer.wordpress.org/block-editor/reference-guides/block-
 api/block-attributes/, block attributes documentation] clearly states
 either a `type` or an `enum` is required:

 > The attribute definition will contain, at a minimum, either a type or an
 enum. There may be additional fields.

 So the question is: Should the REST API support having `enum` without a
 required `type`?

 If not I quess this ticket can be closed and I'll create an issue in the
 Gutenberg repo to update the docs and examples.

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


More information about the wp-trac mailing list