Questions tagged [jsonapi-resources]

JSONAPI-Resources is a Ruby library to write clients and servers for the JSONAPI standard.

JSONAPI-Resources is a Ruby library to write clients and servers for the JSON API standard.

JSONAPI may be regarded as a set of best practices for writing JSON-based APIs, or as an actual standard. JR's github page serves as its home page and the author's blog contains some introductory postings.

111 questions
0
votes
1 answer

ember/rails - Strange behavior in rails route containing an underscore

I'm playing around with a tester app using an ember frontend and using jsonapi-resources to build the rails api. My routes in the rails app are defined as follows Rails.application.routes.draw do # For details on the DSL available within this…
PCR
  • 265
  • 1
  • 5
  • 14
0
votes
1 answer

jsonapi-resources: Key is not included in URL

When testing my controllers (that use jsonapi-resources), on update I have been bumping into this error. {\"errors\":[{\"title\":\"Key is not included in URL\",\"detail\":\"The URL does not support the key…
0
votes
2 answers

Change or add attributes to model on create/edit with JSONAPI Rails gem

I'm trying to figure out how to use this jsonapi-resources gem but I'm finding it quite difficult. Let's say I just submitted an object like: {"name":"My product","price":"15.00"} But what I want to be saved in the database is something…
Victor Ferreira
  • 6,151
  • 13
  • 64
  • 120
0
votes
1 answer

JSONAPI Resources, need a filter for the last record

so I'm looking at creating a filter for a JSONAPI resource where I'll grab anything created within the last 10 minutes and return only one result if something's there. Problem, when I call .last(1) on the returned records I get an…
0
votes
1 answer

How can I use Ember Data custom api with json-api?

Before I use json-api, I custom ember data api like this: import DS from 'ember-data'; import config from './../config/environment'; export default DS.Model.extend({ ... useRepairPackage(repairPackageId) { Ember.$.ajax({url:…
JeskTop
  • 481
  • 1
  • 4
  • 20
-1
votes
1 answer

Laravel the new attributes not exists in the returned API resource when it called inside the controller

The resource collection: public function toArray($request) { return [ 'test' => 55, 'id' => $this->id, 'name_en' => $this->name_en, 'name_ar' => $this->name_ar, 'slug' =>…
Alaa Hameed
  • 13
  • 1
  • 5
1 2 3 4 5 6 7
8