Fix: Add missing Swagger annotations for identity path parameters #1704
+63
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes
Please include a summary of the changes here and why we need those changes. And also let us know which issue is fixed.
This PR resolves Issue #1528, where the embedded Swagger UI failed to correctly prompt for and substitute the identity ID (
iid) in the path forGET /identities/{iid}andPATCH /identities/{iid}API calls.The issue was caused by missing Go Swagger annotations (
@Param) above the relevant route handler declarations.The fix involves adding the necessary annotations to ensure the Swagger documentation generator correctly maps the path variable to a user input field, allowing the API calls to execute properly from the UI.
Fixes #1528
Types of changes
Please make sure to follow these points
Screenshots (If Applicable)
Other Information
The Swagger annotations were added to the
route_get_identity_by_id.goandroute_patch_update_identity.gofiles, and the documentation was regenerated using theswagtool.I have verified the fix locally by running the FireFly stack and testing both the GET and PATCH identity endpoints in the Swagger UI.