-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat: Auto-generate documentation for jaeger-v2 configuration structs via AST #6776
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: AnmolxSingh <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6776 +/- ##
==========================================
- Coverage 96.03% 96.02% -0.02%
==========================================
Files 363 364 +1
Lines 20677 20690 +13
==========================================
+ Hits 19857 19867 +10
- Misses 626 628 +2
- Partials 194 195 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
107268e
to
e5c469a
Compare
Signed-off-by: AnmolxSingh <[email protected]>
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.
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
Co-authored-by: Copilot <[email protected]> Signed-off-by: Anmol <[email protected]>
Co-authored-by: Yuri Shkuro <[email protected]> Signed-off-by: Anmol <[email protected]>
Signed-off-by: AnmolxSingh <[email protected]>
Signed-off-by: AnmolxSingh <[email protected]>
Signed-off-by: AnmolxSingh <[email protected]>
cmd/config-doc-gen/main.go
Outdated
} | ||
|
||
// function to extract default value from struct | ||
func extractDefaultValues(fset *token.FileSet, fn *ast.FuncDecl) (string, map[string]interface{}) { |
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.
we will need unit tests to ensure that this logic does not miss fields (like embedded structs).
Signed-off-by: AnmolxSingh <[email protected]>
Signed-off-by: AnmolxSingh <[email protected]>
Signed-off-by: AnmolxSingh <[email protected]>
Signed-off-by: AnmolxSingh <[email protected]>
Signed-off-by: AnmolxSingh <[email protected]>
did you try to run the output through https://github.com/adobe/jsonschema2md ? Can you upload that the result looks like? |
Signed-off-by: AnmolxSingh <[email protected]>
Hi @yurishkuro. The submitted code generated the following file:- |
Any idea why GRPC is not expanded?
it's actually like that in your JSON "Protocols": {
"description": "Protocols is the configuration for the supported protocols.",
"properties": {
"GRPC": {
"description": "",
"type": "object"
},
"HTTP": {
"$ref": "#/definitions/HTTPConfig",
"description": ""
}
}, |
Which problem is this PR solving?
Description of the changes
Rough outline of the milestones: (Copied from Issue)
comments)
How was this change tested?
struct_docs.json
Checklist
jaeger
:make lint test
jaeger-ui
:npm run lint
andnpm run test