Repository navigation
feat: add feature to expose yaml format OpenAPI document - #111
Conversation
|
@ubogdan Please review my PR!!! |
EdouardBavoux
left a comment
There was a problem hiding this comment.
Thanks a lot. I just have one suggestion so far. I'll test it and let you know
| } | ||
|
|
||
| _, _ = c.Response().Writer.Write([]byte(doc)) | ||
| case "doc.yaml": |
There was a problem hiding this comment.
There is already a .yaml file generated, it is probably better to read it directly than doing the conversion from json ?
There was a problem hiding this comment.
The yaml file is not embedded in the binary so reading it from disk may be a problem,
There was a problem hiding this comment.
Makes perfect sense, thanks for the info. So let's merge it this way.
EdouardBavoux
left a comment
There was a problem hiding this comment.
OK, I did a few tests and it looks good to me ! Thanks
|
@EdouardBavoux Thanks fo approval this PR! |
|
@ubogdan Please review this PR if you have time Thanks. |
| } | ||
|
|
||
| _, _ = c.Response().Writer.Write([]byte(doc)) | ||
| case "doc.yaml": |
There was a problem hiding this comment.
The yaml file is not embedded in the binary so reading it from disk may be a problem,
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #111 +/- ##
============================================
- Coverage 100.00% 86.36% -13.64%
============================================
Files 1 1
Lines 76 88 +12
============================================
Hits 76 76
- Misses 0 12 +12
☔ View full report in Codecov by Sentry. |
|
need tests? |
|
@starcharles Thanks for your contribution. |
* feat: respond yaml format * feat: modify swagger-UI
Describe the PR
add feature to expose yaml format OpenAPI document.
You can see yaml formatted openapi document at "/swagger/doc.yaml" endpoint.
Relation issue
#109
Additional context
It's sometimes comfortable to get yaml format openapi document from Swagger UI.