Open smitthakkar96 opened 8 months ago
@smitthakkar96 I would like to work on this!
@rootxrishabh thanks for expressing interest. I am not tackling this currently so please go ahead but I would suggest aligning with the maintainers first. You can also join the slack channel https://app.slack.com/client/T09NY5SBT/CNXNB0ZTN
cc: @Saranya-jena @neelanjan00 @namkyu1999
@smitthakkar96 I had joined the slack channel earlier. I will post my approach here before making a PR to get everyone's opinion. Sounds good?
Yup sounds good
CC: @amityt can you please take a look?
Apologies folks, I currently don't have the bandwidth to complete this. Please feel free to take it up!
I would like to work on this @Saranya-jena @neelanjan00 @namkyu1999
go ahead, @bhoopesh369
So, I had to add this @param annotation to reference an object for the request # body (entities.MemberInput). this has to be done for all structs.
But swagger was not able to parse it and throwed an error saying : 'cannot find type definition: entities.MemberInput'
So I looked into the official docs of swaggo/swag, The object we need to reference here is from the entities module which is present in the authentication/pkg dir It seems swag cannot parse files in outside dirs by default.
So I had to include the --parseDependency flag in the swag init command, and it works
But this makes the 'swag init' go through unwanted files inside dependencies, thus taking little more time than previously it took.
Should I use the flag and continue ? OR Should I change the files/folder structure for it to be inside ?
@namkyu1999 @neelanjan00 @smitthakkar96 @Saranya-jena
While addressing issue #4236, I introduced a new endpoint to the Auth Server's capabilities. Following the steps in this documentation, I regenerated the swagger.json.
During frontend development, I noticed the auth client is generated using oats, but the oats config points to a manually generated swagger.json at a different location, not the auto-generated one. Switching to the auto-generated swagger.json led to several issues:
Encountered Issuess
Missing Version
This can be corrected by setting
@Version
here.Missing
operationId
This can be corrected by adding
@ID
for every handler. ExampleAfter resolving these, I observed a huge diff in the client code, likely due to some responses not being composed of struct types and missing annotations on some structs.
Proposed Solution
@ID
for all routes