-
Notifications
You must be signed in to change notification settings - Fork 118
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
Swagger: Add support for File Content #1085
Conversation
WalkthroughThe latest update enriches the Swagger middleware by enabling direct input of Swagger file content through Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Synced my fork. Rebased on main. |
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.
Overall looks good, reorder the New() and add swagger.json to be used for FileContent testing that's different than the current one.
For example copy the current swagger.json, change the version # and make a new file. Use this file in the test verify the file returned has that version instead of the current one.
@willfaught looks open to me.... |
Different PR, the previous one was closed |
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.
LGTM
Ping @gofiber/maintainers |
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.
- documentation missing
@willfaught can you please add a description for the new feature in the markdown files and maybe an example |
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.
Actionable comments posted: 1
Out of diff range and nitpick comments (1)
swagger/README.md (1)
118-122
: ### Document the precedence ofFileContent
overFilePath
The documentation forFileContent
in theConfig
structure does not explicitly mention that it takes precedence overFilePath
if both are provided. This is a crucial piece of information that can affect how users configure their Swagger middleware. Consider adding a note here to clarify this behavior.
I need to be able to embed a swagger.json file into a Go program using the embed package. Config.FileContent enables that.
Summary by CodeRabbit