Skip to content

Commit

Permalink
api(ticdc): add swagger gen back (#10791)
Browse files Browse the repository at this point in the history
close #10790
  • Loading branch information
sdojjy authored Mar 19, 2024
1 parent 193d123 commit 896bcc0
Show file tree
Hide file tree
Showing 4 changed files with 548 additions and 104 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ check: check-copyright generate_mock go-generate fmt check-static tidy terror_ch
@git --no-pager diff --exit-code || (echo "Please add changed files!" && false)

fast_check: check-copyright fmt check-static tidy terror_check errdoc \
check-merge-conflicts check-ticdc-dashboard check-diff-line-width check-makefiles \
check-merge-conflicts check-ticdc-dashboard check-diff-line-width swagger-spec check-makefiles \
check_cdc_integration_test check_dm_integration_test check_engine_integration_test
@git --no-pager diff --exit-code || (echo "Please add changed files!" && false)

Expand All @@ -370,6 +370,9 @@ else
go tool cover -html "$(TEST_DIR)/all_cov.out" -o "$(TEST_DIR)/all_cov.html"
endif

swagger-spec: tools/bin/swag
tools/bin/swag init --exclude dm,engine --parseVendor -generalInfo cdc/api/v1/api.go --output docs/swagger

unit_test_coverage:
grep -vE ".*.pb.go|$(CDC_PKG)/testing_utils/.*|$(CDC_PKG)/cdc/sink/simple_mysql_tester.go|.*.__failpoint_binding__.go" "$(TEST_DIR)/cov.unit.out" > "$(TEST_DIR)/unit_cov.out"
go tool cover -html "$(TEST_DIR)/unit_cov.out" -o "$(TEST_DIR)/unit_cov.html"
Expand Down
Loading

0 comments on commit 896bcc0

Please sign in to comment.