[WIP]: Add responses to documentation #25

Merged
merged 2 commits into from Apr 15, 2013

Projects

None yet

3 participants

@henrikhodne
Owner

I started adding JSON responses to the documentation strings.

Do we want to do it this way, or do you think I should change something?

If you think this is a good way to do it, keep the pull request open and I'll add responses to the other endpoints too.

Owner
joshk commented Mar 11, 2013

@rkh your thoughts on this? we really need to improve the docs, I point people to the docs only to have little to show them.

Owner
rkh commented Mar 11, 2013

Seems good. Maybe we should send actual models through the API serializers?

Owner
joshk commented Mar 22, 2013

@henrikhodne can you rebase, and comment on this, and feel free to merge as well, we need to make some movement on this.

henrikhodne added some commits Dec 4, 2012
@henrikhodne henrikhodne Add a way to add responses to documentation
You can add a predefined JSON response by entering
"json(:resource_name)" in the docstring. This will then be replaced
with the resource with the same name, found in
lib/travis/api/app/endpoint/documentation/resources.rb.
c1aaeee
@henrikhodne henrikhodne Add responses to repository endpoints 6f5f7d0
Owner

Rebased. I think I like the idea of running models through the API serializers, I'll look into doing that.

@henrikhodne henrikhodne merged commit a18f211 into travis-ci:master Apr 15, 2013

1 check passed

default The Travis build passed
Details
@henrikhodne henrikhodne deleted the henrikhodne:add-responses-to-documentation branch Apr 15, 2013
Owner

After trying a few things, I decided not to use actual models. Since it'll run on production servers there were all kinds of issues with conflicting with actual entries in the database. This is a good start IMO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment