-
Notifications
You must be signed in to change notification settings - Fork 933
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
lxddoc: a go-swagger like documentation tool #11652
Conversation
Documentation preview available at: https://linuxcontainers.org/lxd/docs/pr.11652/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just did a quick review as this is still a draft, and I have a few notes:
- Is there any reason we aren't using cobra/cli here? Is it to reduce dependencies?
- Please replace
interface{}
withany
as that's a lot nicer to read
@monstermunchkin cobra seemed like a big dependency for such a simple tool (only one flag for now). Regarding the |
@ru-fu for now, the generated |
@ru-fu shall I introduce an other optional metadata key called |
I don't have too strong of an opinion about this, but I believe we should be consistent. Both |
ok I understand. I'll change that then. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit of nitpicking and a few questions and clarifications.
I have only reviewed the docs though, not the code.
I think we should have one file for all generated output - we can then include the content in different places using "start-after" and "end-before" tags. Having a |
thanks ! |
fe44335
to
0937b61
Compare
@ru-fu usually, in Swagger, there is always a comment at the top of the file like: |
Sure, that makes sense. :) |
2edba1a
to
7f630a4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some first comments before I start testing.
Is there a way to include the tool as a binary? |
Some issues I found:
|
Also, we should add |
1 similar comment
Also, we should add |
It's usually not a good idea to include a binary in the source. The reason being that this project might be built on different system architecture like x86, ARM, etc. If I were to provide a binary, this would only work for my own architecture. If we would still want to do that, we'd need the binary to be sent to a package manager with all the arch we want to support.. Maybe we are not at that stage yet. |
0c17747
to
912aeeb
Compare
@ru-fu now the github build should be fine. But now, as a requirement of building the documentation, one has to also have go installed (we reuse some of the go compiler parsing libs to build lxd-doc). One easy way to install it is with snap : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, Just a few nits.
835ae39
to
d9efc5f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't review the code, but it works as expected now. Thanks!
Still one remaining nitpick. ;)
We should probably move this to Having this be under |
Signed-off-by: Gabriel Mougard <[email protected]>
Signed-off-by: Gabriel Mougard <[email protected]>
Signed-off-by: Gabriel Mougard <[email protected]>
Signed-off-by: Gabriel Mougard <[email protected]>
@gabrielmougard @stgraber @ru-fu is this one ready to be merged? |
jenkins: test this please |
On my side yes |
No description provided.