From 88bf1d24371f895262a95dbe5e8bbc872417d106 Mon Sep 17 00:00:00 2001 From: tosaken1116 Date: Sat, 13 Apr 2024 23:26:32 +0900 Subject: [PATCH] fix: get work v1 works_total_count --- Makefile | 10 +--------- openapi/api_definition.swagger.yaml | 3 +++ proto/schema/works/schema/works/resource.proto | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index bef16f8..5cff9c1 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,12 @@ PROTO_FILES = $(shell find ./proto/schema -name "*.proto" -type f) -.PHONY: build clean new fmt setup-mac setup-linux build-openapi build-msw +.PHONY: build clean new fmt setup-mac setup-linux build-openapi build: $(MAKE) build-openapi - $(MAKE) build-msw clean: rm -rf openapi - rm -rf msw mkdir openapi - mkdir msw build-openapi: rm -rf openapi @@ -22,11 +19,6 @@ build-openapi: --openapiv2_opt allow_delete_body=true \ --openapiv2_opt json_names_for_fields=false -build-msw: - rm -rf msw - mkdir msw - protoc -I. --plugin=./protoc-plugin/protoc-gen-ts-msw-handlers/protoc-gen-ts-msw-handlers --ts-msw-handlers_out=./msw ./proto/schema/**/*.proto - new: npx scaffdog generate service --output ./proto/schema diff --git a/openapi/api_definition.swagger.yaml b/openapi/api_definition.swagger.yaml index 6f3cfb3..98fa136 100644 --- a/openapi/api_definition.swagger.yaml +++ b/openapi/api_definition.swagger.yaml @@ -1108,6 +1108,9 @@ definitions: items: type: object $ref: '#/definitions/modelWork' + works_total_count: + type: integer + format: int32 worksUrlInfo: type: object properties: diff --git a/proto/schema/works/schema/works/resource.proto b/proto/schema/works/schema/works/resource.proto index 573281c..497c028 100644 --- a/proto/schema/works/schema/works/resource.proto +++ b/proto/schema/works/schema/works/resource.proto @@ -35,7 +35,7 @@ message CreateWorkRequest { "}" }; } -message GetWorksResponse { repeated .works.model.Work works = 1; } +message GetWorksResponse { repeated .works.model.Work works = 1; int32 works_total_count= 2;} message GetWorksRequest { int32 page = 1;