Skip to content

Commit c493ccf

Browse files
authored
[v2] added workflow to trigger api docs update (#88)
1 parent 7f163bd commit c493ccf

File tree

4 files changed

+24
-5
lines changed

4 files changed

+24
-5
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Trigger Docs Update for v2
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'v2/api/archive-query-service/v2/query_services.swagger.json' # Only trigger if the swagger file changed
9+
10+
jobs:
11+
api-docs-update-trigger:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Dispatch Event
15+
uses: peter-evans/repository-dispatch@v3
16+
with:
17+
token: ${{ secrets.GH_PAT }}
18+
repository: qubic/integration
19+
event-type: api-docs-update

v2/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
PROTO_DIR := $(shell pwd)/api/archive-query-service/v2
33

44
# Apple arm64 specific
5-
OPT_ARGS := $(shell [ "$$(uname -s)" = "Darwin" ] && [ "$$(uname -m)" = "arm64" ] && echo "--proto_path=/opt/homebrew/Cellar/protobuf/25.3_1/include")
5+
OPT_ARGS := $(shell [ "$$(uname -s)" = "Darwin" ] && [ "$$(uname -m)" = "arm64" ] && echo "--proto_path=/opt/homebrew/Cellar/protobuf/33.1/include")
66

77
# Tasks
88
.PHONY: all mock-gen proto-gen proto-clean swagger-gen test-cover
@@ -28,12 +28,12 @@ proto-clean:
2828
@echo "Cleaning protobuf files..."
2929
cd "$(PROTO_DIR)" && \
3030
rm -f *.pb.go && \
31-
rm -f *.go
31+
rm -f *.pb.gw.go
3232

3333
swagger-gen:
3434
@echo "Generating openapi swagger files..."
3535
cd "$(PROTO_DIR)" && \
36-
protoc --openapiv2_out=logtostderr=true:. $(OPT_ARGS) \
36+
protoc --openapiv2_out=logtostderr=true:. $(OPT_ARGS) -I "$(PROTO_DIR)" \
3737
query_services.proto
3838

3939
test-cover:

v2/api/archive-query-service/v2/query_services.swagger.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"/getLastProcessedTick": {
6060
"get": {
6161
"summary": "Get last processed tick",
62-
"description": "Get the last processed tick and other processing information from the archive.\nAll data queried from the archive is only fully processed up to this tick.\nBefore calling the service you should check the last processed tick to be sure to get\nvalid data and do not request data for future ticks that are not processed yet. You can use\nthe epoch and initial tick information in the response to switch to a new interval.",
62+
"description": "Get the last processed tick and other processing information from the archive.\nAll data queried from the archive is only fully processed up to this tick.\nBefore calling the service you should check the last processed tick to be sure to get\nvalid data and do not request data for future ticks that are not processed yet. You can use\nthe epoch and initial tick information in the response to switch to a new interval.",
6363
"operationId": "ArchiveQueryService_GetLastProcessedTick",
6464
"responses": {
6565
"200": {

v2/cmd/archive-query-service/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func run() error {
7474
DB int `conf:"default:0"`
7575
PoolSize int `conf:"default:10"`
7676
MinIdleCons int `conf:"default:5"`
77-
PoolTimeout time.Duration `conf:"default:200s"`
77+
PoolTimeout time.Duration `conf:"default:200ms"`
7878
ReadTimeout time.Duration `conf:"default:100ms"`
7979
WriteTimeout time.Duration `conf:"default:300ms"`
8080
}

0 commit comments

Comments
 (0)