-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Feature markdown description #377
Feature markdown description #377
Conversation
…own files. This features are mainly for redoc
@easonlin404 beside the broken CI Build. |
Codecov Report
@@ Coverage Diff @@
## master #377 +/- ##
==========================================
- Coverage 84.71% 83.65% -1.06%
==========================================
Files 7 7
Lines 1341 1383 +42
==========================================
+ Hits 1136 1157 +21
- Misses 119 130 +11
- Partials 86 96 +10
Continue to review full report at Codecov.
|
@Nerzal Thanks for your contributions. 👍 IMO, it's a useful feature to support markdown descriptions. |
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.
leave comment, thx.
I secure time to see. |
I'll try to add to add examples + cleanup the branch in the next days. Currently only have little time caused by workload :D |
* refactor: return error instead of panic * fix fmt check * fix error check * refine getPropertyName * refine CheckSchemaType method
… only used by some vscode extensions
* refactor: return error instead of panic * fix fmt check * fix error check * refine getPropertyName * refine CheckSchemaType method
… into feature_markdown_description
I merged master branch again, cause of merge conflicts. |
@Nerzal Just stumbled across this beautiful PR. How can you use redoc with swaggo? |
Heyho, i'll add another pr soon, which introduces this feature. In the meantime you can jut add this and add deliver the HTML content of the constant as response. package docs // RedocDocumentation is a static HTML used to deliver the redoc API-Documentation
See #396 as reference issue. |
Describe the PR
Added new annotation "@description.markdown" which parses the general api description from a api.md file in the given directory
Added new annotation "@tag.description.markdown" which parses the tag description from a tagname.md file in the given directory
Added a new parameter for the cli which takes the markdown directory path
Added 2 test methods for the stuff above
Fixed some linter warnings.
Additional context
This addition is mainly for the use with redoc, as redoc is able to render markdown, which allows us to create stunning documentations using code annotations in combinition with markdown files stored in the project. <3
Link to redoc: https://github.com/Rebilly/ReDoc