-
-
Couldn't load subscription status.
- 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
guidlisted in the fixtures spec as it will be generated randomly by the ORM code on DB insert of the POST. -
Are
contributorsCB members that are known to contribute to the project? If so, suggest the field be renamedcontributing cb membersor something similar for clarity. -
Are
contributorsintended to be FK links to the users_user table? -
Will we be tagging
projectsin a similar fashion to the way we've taggedresources, should we be adding atagsfield?? -
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
resourcese.g. POSTed as a list, GET as a list ofname:slugpairs? - Will we want to expand the c**
contributors** UID list on GET to be theusernamesof the users referenced? - Will we want to expand the
useron 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