Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use JSON-AD parser for deserializing Commits #100

Closed
joepio opened this issue Feb 13, 2021 · 1 comment
Closed

Use JSON-AD parser for deserializing Commits #100

joepio opened this issue Feb 13, 2021 · 1 comment

Comments

@joepio
Copy link
Member

joepio commented Feb 13, 2021

Currently uses serde, and has nonsensical behavior (only accepts strings, no support for nested resources or arrays).

@joepio
Copy link
Member Author

joepio commented Feb 13, 2021

If I use the JSON-AD parser, I know it will throw because Commits don't have an @id by default. I guess it might be a good idea to give commits identifiers.

I've used the signature of commits + some base URL in identifiers in the past, e.g. https://example.com/commits/YTIfURstCKlYfibyuYUfFyu. If I require this, the one creating the commit needs to know which URL is acceptable - and that means that a client making a change needs to know which route is used for commits. That seems like it could bite me in the future.

I can also just use the signature as the identifier, but that means that they cannot be resolved, because there is no schema. In a way, this is true - a commit doesn't live anywhere yet (until it is validated).

I can also add some conditional to the JSON_AD parser, or create a new function for parsing commits which uses the same logic. That way, Commits still won't have an ID.

I think that feels like the most sensible thing to do. So no new IDs for commits, yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant