jsonapiObject: false throwing error
jamesdixon opened this issue · 3 comments
jamesdixon commented
Hi, I'm attempting to disable the json api version in the payload, but getting an error when trying to do so.
const JSONAPISerializer = require('json-api-serializer');
const Serializer = new JSONAPISerializer({
convertCase: 'camelCase'
});
Serializer.register('campaign', {
jsonapiObject: false
});
Receiving the following error:
Error: ValidationError: "jsonapiObject" is not allowed
at JSONAPISerializer.validateOptions (/Users/jamesdixon/Projects/scout/platform/api/node_modules/json-api-serializer/lib/JSONAPISerializer.js:61:13)
at JSONAPISerializer.register (/Users/jamesdixon/Projects/scout/platform/api/node_modules/json-api-serializer/lib/JSONAPISerializer.js:108:56)
at Object.<anonymous> (/Users/jamesdixon/Projects/scout/platform/api/handlers/campaign.js:10:12)
Am I missing something?
Thanks for the great library!
danivek commented
Hi @jamesdixon,
I have not released this feature yet, it's only on master
branch for the moment.
I will release it.
danivek commented
v1.12.0 released 🎉
jamesdixon commented
@danivek oops! My apologies -- I should have checked! Thanks for the quick turnaround. Cheers