Skip to content

Conversation

@dgliwa
Copy link

@dgliwa dgliwa commented Feb 25, 2016

Hey! This would be my first contribution. I was able to modify how the response is serialized to be formatted as follows:

{
"name": "Luke Skywalker",
"height": "172",
"mass": "77",
"hair_color": "blond",
"skin_color": "fair",
"eye_color": "blue",
"birth_year": "19BBY",
"gender": "male",
"homeworld": "http://localhost:8000/api/planets/1/",
"films": [
"http://localhost:8000/api/films/1/",
"http://localhost:8000/api/films/2/",
"http://localhost:8000/api/films/3/",
"http://localhost:8000/api/films/6/"
],
"species": [],
"vehicles": [
"http://localhost:8000/api/vehicles/14/",
"http://localhost:8000/api/vehicles/30/"
],
"starships": [
"http://localhost:8000/api/starships/12/",
"http://localhost:8000/api/starships/22/"
],
"url": "http://localhost:8000/api/people/1/",
"meta": {
"edited": "2014-12-20T21:17:56.891Z",
"created": "2014-12-09T13:50:51.644Z"
}

Please let me know if there is anything more/less I should do. Look forward to helping more if possible.

@phalt
Copy link
Owner

phalt commented Feb 25, 2016

@dgliwa Hey! Thank you so much for your first contribution :)

As this is changing how the API response format is, this could potentially break every integration that is looking for created and updated values in the responses. A general rule of thumb with API responses is "Never remove anything once it is live". Unfortunately I can't allow us to remove values, so could you please keep the created and updated values? We can add the Meta and use it for future, but we need to support legacy integrations.

@dgliwa
Copy link
Author

dgliwa commented Feb 25, 2016

Ah that makes sense. I added them back in. Thanks for the quick response.

@phalt
Copy link
Owner

phalt commented Feb 25, 2016

@dgliwa 💃 no problem!

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

Successfully merging this pull request may close these issues.

2 participants