-
-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Current thinking on the JSON Spec for the Projects
api endpoint. Opening this as a separate issue from fixtures, as we need to discuss the fields, data types, relations, and formats needed to implement a model for the DB. Current proposed fields and POST format below:
{ "fields":{
"title":"webpack",
"creator":"Tobias Koppers",
"description":"open-source JavaScript module bundler",
"url":"https://github.com/webpack/webpack",
"user":8,
"date_published":"2019-09-19T04:29:04Z",
"created":"2019-09-19T04:29:04.069Z",
"modified":"2019-09-19T04:29:04Z",
"open_to_contributors":true,
"contributors": [1, 9, 3, 8, 23, 19, 23]
}
}
Open Questions/Comments
-
Omitted the
guid
listed in the fixtures spec as it will be generated randomly by the ORM code on DB insert of the POST. -
Are
contributors
CB members that are known to contribute to the project? If so, suggest the field be renamedcontributing cb members
or something similar for clarity. -
Are
contributors
intended to be FK links to the users_user table? -
Will we be tagging
projects
in a similar fashion to the way we've taggedresources
, should we be adding atags
field?? -
Will the JSON returned from a GET look any different from this POST JSON? If so, what would the GET returned JSON look like? Some things to think about:
- If we do include tags, will we want them displayed in the same fashion as
resources
e.g. POSTed as a list, GET as a list ofname:slug
pairs? - Will we want to expand the c**
contributors
** UID list on GET to be theusernames
of the users referenced? - Will we want to expand the
user
on GET to return the username of the "owner" of the project listing??
- If we do include tags, will we want them displayed in the same fashion as