This is happening as part of #2757967: API-first initiative. It's the successor to #2852860: REST: top priorities for Drupal 8.4.x, which was the successor to #2794263: REST: top priorities for Drupal 8.3.x (and #2721489: REST: top priorities for Drupal 8.2.x before that).

Theme: Make Drupal 8’s REST best-in-class.

Any use case (fully decoupled, progressively decoupled, content sync)

  1. Serialization gap foundational problem: #2871591: Allow ComplexData in TypedData to specify computed properties that should be exposed in normalization and other contexts + #2910211: Allow computed exposed properties in ComplexData to support cacheability.
  2. Discourage @FieldType-level normalizers: #2926507: Discourage @FieldType-level normalizers, encourage @DataType-level normalizers, to strengthen the API-First ecosystem
  3. File uploads: #1927648: Allow creation of file entities from binary data via REST requests
  4. Full config entity support:
    1. Infrastructure: #2300677: [PP-1] POST/PATCH/DELETE config entities via REST for config entity types that support validation
    2. Add validation constraints to all config entity types: #2869792: Add constraints to all config entity types (dozens of child issues there!)
  5. EntityResource: translations support: #2135829: [PP-1] EntityResource: translations support
    1. Blocker: #2904423: Translated field denormalization creates duplicate values
  6. Serialization gap: taxonomy term's parent term: #2543726: Make $term->parent behave like any other entity reference field, to fix REST and Migrate support and de-customize its Views integration
    1. #2846614: Incorrect field name is used in views integration for multi-value base fields
  7. REST export views break the HTML view if they're on the same path: #2449143: REST views specify HTML as a possible request format, so if there is a "regular" HTML view on the same path, it will serve JSON

DX

  1. XML support is unclear: #2800873: Add XML GET REST test coverage, work around XML encoder quirks
  2. #2915414: Omit "_core" key from normalized config entities, which includes the default config hash
  3. Date field & Date Range field normalization: #2867206: [PP-1] API-First DX of "date" and "date range" fields: add 'datetime_iso8601' @DataType (de)normalizer using RFC3339 timestamps with timezones
  4. Make PATCH more liberal in what it accepts: #2824851: EntityResource::patch() makes an incorrect assumption about entity keys, hence results in incorrect behavior
    Was blocked on:
    1. #2909183: Add path alias (PathItem) field PATCH test coverage
    2. #2916967: FieldItemList::equals() is broken for field types without a schema
    3. #2906600: FieldItemList::equals() doesn't work correctly for computed fields with custom storage
    4. #2392845: Add a trait to standardize handling of computed item lists
    5. #2916300: Use ComputedFieldItemListTrait for the path field type
  5. REST views authentication broken: #2825204: REST views: authentication is broken
  6. Validation:
    1. #2820364: Entity + Field validation constraints are processed in the incorrect order
    2. #2821077: PATCHing entities validates the entire entity, also unmodified fields, so unmodified fields can throw validation errors
    3. #2847041: Add a format and start/end constraints to DateRangeItem to provide REST error message
  7. Term WTF: #2824408: To be able to create/update/delete Term entities via REST, one should not have to grant the 'administer taxonomy' permission
  8. Vocabulary WTF: #2808217: To be able to view Vocabulary config entities via REST, one should not have to grant the 'administer taxonomy' permission
  9. 403 instead of 406: #2805279: Routing system + authentication system + format-specific routes (e.g. those in rest.module) = frustrating, unhelpful 403 responses instead of 406 responses
  10. Authentication WTF wrt anon: #2817737: A REST resource's "auth" configuration MUST be non-empty, which prevents configuring it for anon access only
  11. #2856110: [PP-1] Expose entity validation errors in a machine readable REST API:

Fully decoupled

Done!

Velocity+maintainability+reliability+predictability

  1. #2910883: Move all entity type REST tests to the providing modules
    1. #2868035: Test that all core content+config entity types have functional REST test coverage
      1. [#2824572]
  2. Cacheability: #2765959: Make 4xx REST responses cacheable by (Dynamic) Page Cache + comprehensive cacheability test coverage
    1. Cacheability blocker: #2920001: Add cacheable HTTP exceptions: Symfony HTTP exceptions + Drupal cacheability metadata
  3. #2737751: [PP-1] Refactor REST routing to address its brittleness
    1. #2853460: Simplify RequestHandler: make it no longer ContainerAware, split up ::handle()
      1. #2858482: Simplify REST routing: disallow requesting POST/PATCH in any format, make consistent
        1. #2472337: Provide a lazy alternative to service collectors which just detects service IDs
        2. #2883680: Force all route filters and route enhancers to be non-lazy
    2. #2869426: EntityResource should add _entity_access requirement to REST routes
  4. Deprecations in Serialization/REST respected by all of core:
    1. #2922487: Follow-up for #2910211: fix all deprecation warnings
  5. Generic test coverage for multi-value fields: #2905686: Expand EntityResourceTestBase to test PATCHing multi-value fields: both adding and removing items

Comments

Wim Leers created an issue. See original summary.

Wim Leers’s picture

Issue summary: View changes

Forgot to omit one that was fixed in 8.4 :)

Wim Leers’s picture

Issue summary: View changes

Reordered to have more important issues at the top.

Stay tuned for an update to the "Serialization gaps" issues though.

Wim Leers’s picture

Issue summary: View changes
Wim Leers’s picture

Issue summary: View changes

Full config entity support is not what #2300677: [PP-1] POST/PATCH/DELETE config entities via REST for config entity types that support validation gives us — that just gives us the necessary infrastructure. We'll also need to complete #2869792: Add constraints to all config entity types (which has many dozens of child issues) before we can claim full config entity support.

Clarified that in the IS.

Wim Leers’s picture

Wim Leers’s picture

Issue summary: View changes

Important change in wording wrt the XML issue.

Wim Leers’s picture

Issue summary: View changes

#2824572: Write EntityResourceTestBase subclasses for every other entity type. is now down to 6 blockers! Time to think about the next steps. Rerolled #2868035: Test that all core content+config entity types have functional REST test coverage, which is the first next step, and created #2910883: Move all entity type REST tests to the providing modules, which is the very last step! 🎉

Now all those issues are listed here.

Wim Leers’s picture

Issue summary: View changes

I got the indentation wrong in #8 :)

Wim Leers’s picture

Wim Leers’s picture

Issue summary: View changes

I forgot to indicate here that #2543726: Make $term->parent behave like any other entity reference field, to fix REST and Migrate support and de-customize its Views integration was blocked on #2846614: Incorrect field name is used in views integration for multi-value base fields. #2846614 had been RTBC for months, and was finally committed yesterday! So now #2543726 is finally unblocked 🎉

Wim Leers’s picture

Wim Leers’s picture

Issue summary: View changes

Moving the serialization gap foundational problem to the #1 position. It's blocking lots and lots of issues, including #1927648: Allow creation of file entities from binary data via REST requests.

Wim Leers’s picture

Wim Leers’s picture

Issue summary: View changes

I can't believe #2825204: REST views: authentication is broken wasn't in this list of issues yet. A major REST Views bug that was reported almost year ago. It just got committed!

Wim Leers’s picture

Wim Leers’s picture

Wim Leers’s picture

Wim Leers’s picture

Issue summary: View changes

Fixing a mistake I made in #21.

Wim Leers’s picture

Issue summary: View changes

See #2737751-31: [PP-1] Refactor REST routing to address its brittleness: that now has a new child issue, for the last problem that was identified there. That new child issue is #2869426: EntityResource should add _entity_access requirement to REST routes. It didn't have a child issue before, because I thought it to be harmless, but turns out it isn't.

Wim Leers’s picture

Wim Leers’s picture

Issue summary: View changes
Wim Leers’s picture

Wim Leers’s picture

mpdonadio’s picture

Should we add #2847041: Add a format and start/end constraints to DateRangeItem to provide REST error message to the DX list? I think it is nearly done, other that a quirk mentioned in one of the later comments.

Wim Leers’s picture

Wim Leers’s picture

Wim Leers’s picture

Issue summary: View changes

And #2843139: EntityResource: Provide comprehensive test coverage for File entity, and tighten access control handler is in since Friday, which means #2824572: Write EntityResourceTestBase subclasses for every other entity type. is now done as well! It took a year. (More, actually.) Great to have it completed.

#2868035: Test that all core content+config entity types have functional REST test coverage was already committed two weeks ago, but it had a @todo for #2843139, which is now removed. Final step: #2910883: Move all entity type REST tests to the providing modules.

#2843139 also unblocked another chain of issues: #2825487: Fix normalization of File entities: file entities should expose the file URL as a computed property on the 'uri' base field is now moving forward again, and once that is in, we'll finally be able to land #1927648: Allow creation of file entities from binary data via REST requests (which has been ready for months).

🎉

Wim Leers’s picture

Wim Leers’s picture

Issue summary: View changes

Fixed broken HTML I introduced in my last comment 😱

Wim Leers’s picture

Issue summary: View changes

#31: I somehow lost track of that one! Added, of course. Created a Validation subsection of the DX section.

Wim Leers’s picture

Wim Leers’s picture

Issue summary: View changes

#2626924: Include processed text in normalizations: "text" field type's "processed" computed property should be non-internal and carry cacheability metadata also landed! 8.5 is going to be the release that fixes the most serialization gaps yet :) And yet more issues may land!

Wim Leers’s picture

As of #2853460-15: Simplify RequestHandler: make it no longer ContainerAware, split up ::handle(), I realized that that issue was no longer blocked either. Hopefully we can also land that in the next few weeks.

Wim Leers’s picture

Wim Leers’s picture

Wim Leers’s picture

Issue summary: View changes

I forgot to update the IS in #43 :)

Wim Leers’s picture

Status: Active » Fixed

Thanks everybody for helping out here!

We made more progress than I expected based on progress in previous minors. We reached 100% integration test coverage at last! We achieved roughly half of the top priorities!

Note that of the 11 issues that are tagged with 8.5.0 release notes, of which 3 are for the API-First Initiative, and 22 issues are tagged with 8.5.0 highlights, of which 6 are for the API-First Initiative — or 27% of all release notes issues and 27% of highlights!

Now it's time to move on to 8.6.x. I've opened #2941316: REST: top priorities for Drupal 8.6.x for that, which is the continuation of this issue.

Thanks, and see you around!

(Sister posts at #2852860-41: REST: top priorities for Drupal 8.4.x, #2794263-64: REST: top priorities for Drupal 8.3.x and #2721489-48: REST: top priorities for Drupal 8.2.x.)


Let's do a restrospective. We landed:

Any use case
5 issues
DX
11 issues (over half!)
Velocity+maintainability+reliability+predictability
9 issues (two thirds!)

Many of them were very difficult to land, requiring lots of consensus building, or requiring blockers to be solved that aren't listed here, often in other subsystems. Many of the ones that did not land are already well on their way, making it very likely that they will land in 8.6. In fact, one of them already landed in 8.6: #2543726: Make $term->parent behave like any other entity reference field, to fix REST and Migrate support and de-customize its Views integration!

almaudoh’s picture

Just to say kudos to everyone who has contributed to making Drupal 8 truly API-first! It's actually making a difference.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.