-
Notifications
You must be signed in to change notification settings - Fork 243
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
[WIP] Swagger for the API #180
Conversation
Deals with #150. |
Codecov Report
@@ Coverage Diff @@
## master #180 +/- ##
==========================================
- Coverage 62.27% 61.01% -1.27%
==========================================
Files 47 49 +2
Lines 3828 4266 +438
==========================================
+ Hits 2384 2603 +219
- Misses 1053 1220 +167
- Partials 391 443 +52
Continue to review full report at Codecov.
|
This also needs a docs Pr describing how to update the swagger doc. For now, I'm following the annotation outlined here: https://github.com/swaggo/swag#declarative-comments-format To generate the docs, stand in the root folder and run:
|
Cool. Good job @Skarlso Do you know what the outcome is when you generate the docs? Is it a static HTML website? |
I think I can get Swagger to generate static HTML. At least I know there is an option for that. :D I have no idea how well that works. :) Right now, as you can see, it's a go file actually. :) |
BTW. So right now basically the app is hosting its own documentation. Basically if you have a running Gaia instance you can access the api by going to gaia.org/swagger. Bumm instant living docs. Also useful for development. But I agree that a static generated doc on a hosted site would be also cool. |
@Skarlso Yeah that's cool. But in the end, we need a hosted website where you can check the API from Gaia. 👍 |
Oh Gods. So much conflict on this now. :D |
I'm going to close this one and re-open with the few changes. It's easier than trying to resolve all the conflicts. |
Actually wasn't that hard. The go.mod and go.sum file might be off. |
Alright. Going to continue doing this. |
Hah, made it recognise the auth method.
Swagger generated get there. |
Started working on Swaggering up the API. Also updated to echo v4 for maximum module usage. ( and because the handler is using v4... grump grump )