garden-stream / garden

shared resources
0 stars 2 forks source link

Documentation Update #9

Open NathanBland opened 7 years ago

NathanBland commented 7 years ago

The docs currently are pretty awful.

@keawade has started the wiki pages to update this, and it needs done.

Issue for tracking....

keawade commented 7 years ago

Documentation has been updated with all currently existing endpoints.

keawade commented 7 years ago

We need to update the documentation with the changes made to /api/feed.

keawade commented 7 years ago

We also need to add documentation for the /api/auth endpoint.

NathanBland commented 7 years ago

You said you covered existing endpoints! I believed you! :cry:

But the existing feed docs are correct.

NathanBland commented 7 years ago

Done.

keawade commented 7 years ago

The documentation for /api/auth doesn't match the rest of the docs.

NathanBland commented 7 years ago

Nor will it. There is not a resource that is matched for auth, and it was initially classified as a special api.

keawade commented 7 years ago

That's not the issue. The styling doesn't match.

NathanBland commented 7 years ago

In what way? It was copy pasted from lower items :thinking:

keawade commented 7 years ago

Expected (ish)

Actual

username: <String>
token: <String>
NathanBland commented 7 years ago

The primary difference being how return is noted?

keawade commented 7 years ago

I think I'd like to do something like this:

So a generic version would look like this:

keawade commented 7 years ago

I think we may also want to consider documenting possible failures beyond the standard 404s and such. So if we fail due to some business logic on the server, we return a 40x error with a message of You done messed up, etc.

NathanBland commented 7 years ago

All endpoints will return the error that caused the failure if they know what it is. (ie. validation error)

NathanBland commented 7 years ago

Also, if you add what you think each endpoint should follow as a skeleton with some explanation at the top, it could serve as a helpful tool. For both people visiting the api doc so they know what to expect, and for us to add future endpoints.

NathanBland commented 7 years ago

New api means docs need updated. #17