Notes
5/14/25Less than 1 minuteFAQ
Swagger Documentation Update
Applicable Scenarios: Web services created based on SQL
Operation Steps:
- After modifying the Swagger annotations in the code
- Execute command:
make docs
(regenerate documentation) - Restart the service:
make run
(to make changes take effect)
Tips
The above steps must be executed after each modification of Swagger annotations for the changes to take effect.
Data Deletion Mechanism
Services Created Based on SQL:
- Enable Embedded Model → uses
soft deletion
(marks as deleted) - Disable Embedded Model → uses
physical deletion
(directly removed from the database)
Protobuf Generation Configuration
Applicable Scenarios: Services created based on Protobuf
Default Behavior:
- The
xxx.pb.go
file generated by executingmake proto
- Automatically removes the
omitempty
attribute from thejson
tag of struct fields
To retain omitempty:
Open the
scripts/protoc.sh
fileComment out the following command:
sponge del-omitempty --dir=$protoBasePath --suffix-name=pb.go > /dev/null
Are there any other points you think need attention while using sponge? please let us know in the comments section.