File tree Expand file tree Collapse file tree
api/archive-query-service/v2 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,9 +38,10 @@ openapi-v3-gen:
3838 query_services.proto
3939 @echo " Cleaning up OpenAPI spec..."
4040 cd " $( PROTO_DIR) " && \
41- yq -i ' del(.paths."/health")' query_services.openapi.yaml && \
42- yq -i ' (.tags[] | select(.name == "ArchiveQueryService")).x-scalar-ignore = true' query_services.openapi.yaml && \
43- yq -i ' (.paths[][].tags) -= ["ArchiveQueryService"]' query_services.openapi.yaml
41+ yq -i --indent 4 ' del(.paths."/health")' query_services.openapi.yaml && \
42+ yq -i --indent 4 ' (.tags[] | select(.name == "ArchiveQueryService")).x-scalar-ignore = true' query_services.openapi.yaml && \
43+ yq -i --indent 4 ' (.tags[] | select(.name == "Events (Beta)")).x-scalar-ignore = true' query_services.openapi.yaml && \
44+ yq -i --indent 4 ' (.paths[][].tags) -= ["ArchiveQueryService"]' query_services.openapi.yaml
4445
4546test-cover :
4647 @echo " Performing Go cover test..."
Original file line number Diff line number Diff line change @@ -223,5 +223,16 @@ See [messages.proto](api/archive-query-service/v2/messages.proto)
223223and [ query_services.proto] ( api/archive-query-service/v2/query_services.proto )
224224for full details.
225225
226+ ## Regenerating protobuf and OpenAPI files
227+
228+ Run ` make ` (or ` make all ` ) to regenerate all protobuf and OpenAPI files.
229+
230+ ### Dev dependencies
231+
232+ - ` protoc ` with Go plugins (` protoc-gen-go ` , ` protoc-gen-go-grpc ` , ` protoc-gen-grpc-gateway ` )
233+ - ` protoc-gen-openapi ` (` go install github.com/google/gnostic/cmd/protoc-gen-openapi@latest ` )
234+ - ` yq ` - used for OpenAPI post-processing (` brew install yq ` on macOS, ` snap install yq ` on Linux,
235+ ` choco install yq ` on Windows, or [ GitHub releases] ( https://github.com/mikefarah/yq/releases ) )
236+
226237## Caching
227238See [ CACHE.md] ( CACHE.md ) for details about enabling and using caching in Archive Query Service v2.
You can’t perform that action at this time.
0 commit comments