WP Manifestindependent plugin directory
manifest / integrations / wp-rest-jsonapi-serializer

WP-REST JSONAPI Serializer

Converts WP REST API Response to JSONAPI spec

by Taras Mankovski · github.com/embersherpa/wp-rest-jsonapi-serializer · website

16stars
1forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/embersherpa/wp-rest-jsonapi-serializer/archive/refs/heads/master.zip

Declares an update source (EmberSherpa/wp-rest-jsonapi-serializer), so updates arrive through the plugin's own updater.

From the readme

JSONAPI Serializer for WP REST API v2 & Pods - WordPress Plugin This is a plugin for WordPress that'll make your site's WP REST API generate JSONAPI payload. This plugin was created to make it easier to use Ember.js and Ember Data as an API client for WordPress. Warning: Pods are probably required at this point Features - Read posts, custom post types, tags and categories via REST API - Supports Pods custom post types & custom fields - Supports Pods image fields - Supports featured image - Makes API consistent to eliminate awkwardness around tags - Each response includes all related data for a payload Not Supported - Writing is not supported yet - Error reporting needs work (primarily converting WP Errors to JSONAPI errors) - Media attachments are not being included other than featured image - No consideration for comments (at the moment) Ember Data setup 1. Configure Adapter Create adapters/application.js and specify your WordPress' host. 2. Create models Post, Tag, Category, Author, Taxonomy // TODO: create an Ember Addon to provide these defaults Using Slugs Configure your route accept a slug: CORS You'll need to let WordPress accept API requests from localhost:4

Read the full README on GitHub →