Skip to content

[API][WIP] Expected JSON Spec for Projects Endpoint  #77

@BethanyG

Description

@BethanyG

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

  1. Omitted the guid listed in the fixtures spec as it will be generated randomly by the ORM code on DB insert of the POST.

  2. Are contributors CB members that are known to contribute to the project? If so, suggest the field be renamed contributing cb members or something similar for clarity.

  3. Are contributors intended to be FK links to the users_user table?

  4. Will we be tagging projects in a similar fashion to the way we've tagged resources, should we be adding a tags field??

  5. 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 of name:slug pairs?
    • Will we want to expand the c**contributors** UID list on GET to be the usernames of the users referenced?
    • Will we want to expand the user on GET to return the username of the "owner" of the project listing??

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions