gof3 library API
F3API
The format does not yet define how a hierarchy could be inlined. For instance, instead of having a file hierarchy for a project, it could be a single JSON file that includes everything, except for non-json content such as attachements, git repositories or assets that are represented by the URLs where they can be found.
The following could be made into the gof3 api
- objectsJSON(path, verb, json) => json
- objectsBLOB(path, verb, blob) => id
- objectJSON(path, verb, json) => json
- objectBLOB(path, verb, blob)
Implementing a REST API generated from an OpenAPI spec would be a matter of calling one of those four endpoint.
File structure
F3 could define a REST API in addition to a format. Each endpoint would be a file or directory in the hierarchy.
-
/user/{id}/projects
- GET => { ids: [1, 2, 3, etc.]}
- POST => { inline JSON } => { inline JSON with id }
- POST => binary blob => id
-
/user/{id}/project/{id}
- GET => { inline JSON } or binary blob
- DELETE => 200 or 204
- PATCH => { (id: X), inline JSON } => { inline JSON } or binary blob
Repository
Use git
Idempotency
- DELETE can be done twice
- PATCH can be done twice