Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#45014 closed enhancement (fixed)

REST API: Declare unfiltered_html capability using JSON Hyper Schema `targetSchema`

Reported by: danielbachhuber's profile danielbachhuber Owned by: danielbachhuber's profile danielbachhuber
Milestone: 5.0 Priority: normal
Severity: normal Version:
Component: REST API Keywords: has-patch has-unit-tests fixed-5.0
Focuses: rest-api Cc:

Description

Following up on #44287, the REST API also needs to declare unfiltered_html using JSON Hyper Schema targetSchema.

This was originally added to Gutenberg with Add "Convert to blocks" option in HTML block

Attachments (2)

45014.1.diff (3.5 KB) - added by danielbachhuber 6 years ago.
45014.2.diff (3.5 KB) - added by danielbachhuber 6 years ago.
Fix the schema property structure

Download all attachments as: .zip

Change History (7)

This ticket was mentioned in Slack in #core-restapi by danielbachhuber. View the logs.


6 years ago

@danielbachhuber
6 years ago

Fix the schema property structure

#2 @danielbachhuber
6 years ago

  • Owner set to danielbachhuber
  • Resolution set to fixed
  • Status changed from new to closed

In 43682:

REST API: Declare unfiltered_html capability in links.

Because user capabilities can be modified at runtime, the REST API needs to expose them in some evaluated but declarative manner for clients to interpret. JSON Hyper Schema targetSchema provides an appropriate paradigm for doing so.

Props timothyblynjacobs.
Fixes #45014.

This ticket was mentioned in Slack in #core-committers by sergey. View the logs.


6 years ago

#4 @SergeyBiryukov
6 years ago

  • Keywords fixed-5.0 added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for merging to trunk.

#5 @jorbin
6 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 43974:

REST API: Declare unfiltered_html capability in links.

Because user capabilities can be modified at runtime, the REST API needs to expose them in some evaluated but declarative manner for clients to interpret. JSON Hyper Schema targetSchema provides an appropriate paradigm for doing so.

Merges [43682] to trunk.

Props timothyblynjacobs.

Fixes #45014.

Note: See TracTickets for help on using tickets.