Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overview documentation for the Solidus API #2714

Merged
merged 3 commits into from
May 29, 2018

Conversation

benjaminwil
Copy link
Contributor

These brief articles provide basic information for anyone who wants to use the Solidus API for the first time.

What to expect in future API docs PRs

In the future, I would like to extend and improve the endpoints.md article to list useful information about all of the API endpoints. This might include information about specific or special parameters, common API calls, or particularly unusual requests.

But I would prefer to generate this documentation from existing (or new) tests as much as possible. Updating and maintaining API docs needs to be done explicitly alongside the code.

@benjaminwil
Copy link
Contributor Author

@jhawthorn I have spent some time looking into ways that we can generate REST API documentation from the existing specs, but I haven't come across anything that wouldn't require additional dependencies and DSL-beyond-RSpecland. If you have any recommendations/preferences, I'd be interested to hear about them.

I'm happy to do any of the work that comes along with making this happen.

@matteocellucci
Copy link
Contributor

Hello, I am currently managing an API service in the project in which I am working. I'd like to share our experience. In our case, unlike @benjaminwil , we wanted to automate the generation of the documentation starting right from the tests. We have greatly appreciated how this approach is amalgamated within an agile environment.

Initially we tried to use Dredd. It has a very Rspec-based DSL very intuitive and descriptive, but needs Node for the generation and maintenance of the SwaggerUI.

In the end we used Rswag, also based on Rspec-land, but trying to improve its DSL. It is based on Swagger2.0 and it is limited but it suites our first API version.

We are now thinking again to Dredd, beacuse other gems have necessitated the installation of Node as a dependency.

- Successful `GET` requests always return a status of `200`.
- Successful `CREATE` and `UPDATE` requests result a status of `201` and
`200`.
- Successful `DELETE` requests return a status of `200` and no content.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm not wrong, successful DELETE return a status of 204

benjaminwil and others added 3 commits May 29, 2018 09:27
Ideally, this document will provide a one-page view of the Solidus API
endpoints. At the moment, I am not able to generate a helpful, clean
document with the available endpoints.

For now, this file helps API users find the existing endpoints.
@gmacdougall gmacdougall merged commit f999ac6 into solidusio:master May 29, 2018
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.

4 participants