mattpolzin / mattpolzin/JSONAPI

JSON::API v1.1 and `lid`

Open
#107 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
81
Forks
21
PR merge metrics
No merged PRs in 30d

Description

Hello,

First, thank you a lot for your amazing library @mattpolzin !

I don't know all the JSON::API v1.1 additions, but the lid member seems very interesting:

The id member is not required when the resource object originates at the client and represents a new resource to be created on the server. In that case, a client MAY include a lid member to uniquely identify the resource by type locally within the document.

Reference: https://jsonapi.org/format/1.1/#document-resource-objects

I often need sync data created on the device in my applications. So I use the type UUID for the id and sometimes it's created on the app side. Until now, the back-ends accept to the id member as the the id to save in the database... but it's not perfect... and I think that the new lid would be a lot better.

Do you have plan to allow to use JSON::API v1.1 with your library? Maybe I could try to implement this lid part, but I need to know your plan about the spec 1.1 before to start on this.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the JSON:API v1.1 resource object specification, especially the lid member, then inspect the Swift library's current JSON:API support. The issue names no files or tests and asks for a plan, so the scope and completion criteria need maintainer clarification before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.