-
Notifications
You must be signed in to change notification settings - Fork 17
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
Add REST API reference documentation #7
Comments
Hello @nitishm I've been teaching myself REST API documentation the last 3 months, and would love to contribute if possible? Please direct me to the right files and I'll get started! |
@hazzabee Awesome. You can dive straight into the code. The layout is as follows,
I havent thought of how we should capture the REST APIs (code-gen, using gin-swaggo vs manually documented). But whatever be the case I would love to reduce manual effort, since the API might change, and more endpoints will be added in the near future. Some kind of automation would be good. With that said I am open to ideas !! Let me know what your thoughts are and once we have consensus, you can get started ! Thanks again for picking up this ticket ! Feel free to ask me any question. If communicating via comments is hard, you can pass me your slack handle and I can add you to the (slack)[vegeta-server.slack.com] channel. |
I also want to move all the REST API usage documentation from the README.md to a better place. Would clean out that page a lot and make it more readable. Once we get this doc started, would be nice to create another usage doc as well. |
@nitishm thanks for all the above info, that's really helpful! Re: capturing the APIs, I was going to start documenting in either Swagger Editor or Spotlight (YAML/JSON), as this would make it easier to add new endpoints when they come up. Shall I start with one of those? And just to check, there are 6 current endpoints?
|
@hazzabee Both swagger and spotlight sound ok to provide a static API document. I wanted to ask about your experience level in Go. If you have previously worked with the language, it would be great if you could explore https://github.com/swaggo/gin-swagger. It is a middleware component, that generates the same swagger spec from comments on the endpoint methods. My thought is that, even if you are not that experienced with Go, you could possibly follow the gin-swagger docs, to add
Yes these are the only supported endpoints, at the moment. Let me know what you think. If you feel like you are up for gin-swagger, that would be great. If not we can still create the spec in swagger editor and I can help port the blocks over from the doc to the comments. |
@nitishm Thanks for the info. No, I'm afraid I haven't got experience in Go yet, but it looks interesting! It's probably best I create the documentation in swagger editor first, and then explore gin-swagger and see if I can integrate some of those format comments you talked about. |
@hazzabee Sounds great. Looking forward to the updates ! |
@hazzabee how is the documentation coming along? Let me know if you need any help. |
@nitishm Hey! It's going well, just having a bit of trouble with the Reponses object. I don't have Slack yet, would I be able to drop you an email? |
@hazzabee sure. My email is nitish.malhotra@gmail.com. Feel free to shoot me a message. |
@nitishm Thanks. Did you get my email? It should have come through last week. |
@hazzabee I did get the email. Will try to get back to you by the end of the weekend with my suggestions. Thanks. |
@nitishm Great, thanks Nitish :) |
Meanwhile I have this outdated swagger spec. It does not match the current implementation but it will give you an idea of how to format the request and response objects Hopefully it helps. |
I saw this item was closed - have the documentation needs for this program been satisfied? I am also looking for something to help document. |
@devonapple We did add the API references to the doc directory, but are still lacking a more programmatic/automated way of generating the REST API doc. Would you be willing to try out https://github.com/swaggo/gin-swagger ? |
Thank you for your reply! I had a look at a few video tutorials and some documentation, and I am confident that the gin-swagger interface is just outside of my current abilities: I would definitely need some guidance in order to be productive with it. I may need to level up a few times! |
Hi, @nitishm! I have learned more about Swagger, and I would be happy to give this a try, if it is still open! How much Go would I need to know? |
Create a REST API doc for the backend server built using gin-gonic.
Might consider looking into https://github.com/swaggo/gin-swagger or any other alternatives.
The text was updated successfully, but these errors were encountered: