diff --git a/.bingo/Variables.mk b/.bingo/Variables.mk index 4139df84e8d..22a381b2633 100644 --- a/.bingo/Variables.mk +++ b/.bingo/Variables.mk @@ -83,12 +83,6 @@ $(MUTAGEN): $(BINGO_DIR)/mutagen.mod @echo "(re)installing $(GOBIN)/mutagen-v0.11.8" @cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=mutagen.mod -o=$(GOBIN)/mutagen-v0.11.8 "github.com/mutagen-io/mutagen/cmd/mutagen" -OAPI_CODEGEN := $(GOBIN)/oapi-codegen-v1.6.1 -$(OAPI_CODEGEN): $(BINGO_DIR)/oapi-codegen.mod - @# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies. - @echo "(re)installing $(GOBIN)/oapi-codegen-v1.6.1" - @cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=oapi-codegen.mod -o=$(GOBIN)/oapi-codegen-v1.6.1 "github.com/deepmap/oapi-codegen/cmd/oapi-codegen" - PROTOC_GEN_DOC := $(GOBIN)/protoc-gen-doc-v1.4.1 $(PROTOC_GEN_DOC): $(BINGO_DIR)/protoc-gen-doc.mod @# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies. diff --git a/.bingo/variables.env b/.bingo/variables.env index 3d30c1ddf2e..d2574f53c18 100644 --- a/.bingo/variables.env +++ b/.bingo/variables.env @@ -30,8 +30,6 @@ HUGO="${GOBIN}/hugo-v0.80.0" MUTAGEN="${GOBIN}/mutagen-v0.11.8" -OAPI_CODEGEN="${GOBIN}/oapi-codegen-v1.6.1" - PROTOC_GEN_DOC="${GOBIN}/protoc-gen-doc-v1.4.1" PROTOC_GEN_GO="${GOBIN}/protoc-gen-go-v1.26.0" diff --git a/.make/openapi.mk b/.make/openapi.mk deleted file mode 100644 index a70f0167acb..00000000000 --- a/.make/openapi.mk +++ /dev/null @@ -1,15 +0,0 @@ -.PHONY: $(OPENAPI_SRC)/${NAME}.types.go -$(OPENAPI_SRC)/${NAME}.types.go: $(OAPI_CODEGEN) - @echo "$(NAME): generating $(OPENAPI_SRC)/${NAME}.types.go" - @$(OAPI_CODEGEN) \ - -generate types \ - -o $(OPENAPI_SRC)/${NAME}.types.go \ - $(OPENAPI_SRC)/${NAME}-${OPENGRAPH_VERSION}.yml - -.PHONY: $(OPENAPI_SRC)/${NAME}.server.go -$(OPENAPI_SRC)/${NAME}.server.go: $(OAPI_CODEGEN) - @echo "$(NAME): generating $(OPENAPI_SRC)/${NAME}.types.go" - @$(OAPI_CODEGEN) \ - -generate chi-server \ - -o $(OPENAPI_SRC)/${NAME}.server.go \ - $(OPENAPI_SRC)/${NAME}-${OPENGRAPH_VERSION}.yml diff --git a/graph/Makefile b/graph/Makefile index 090c8557601..3ce061c3097 100644 --- a/graph/Makefile +++ b/graph/Makefile @@ -26,27 +26,4 @@ ci-go-generate: # CI runs ci-node-generate automatically before this target @go generate $(GENERATE) .PHONY: ci-node-generate -ci-node-generate: - -############ openapi ############ -OPENAPI_VERSION := v0 -OPENAPI_SRC := pkg/openapi/$(OPENAPI_VERSION) -OPENGRAPH_VERSION := v0.0 - -include ../.make/openapi.mk - -$(OPENAPI_SRC): - @mkdir -p $(OPENAPI_SRC) - -.PHONY: openapi -openapi: $(OPENAPI_SRC) \ - $(OPENAPI_SRC)/${NAME}-${OPENGRAPH_VERSION}.yml \ - $(OPENAPI_SRC)/${NAME}.types.go \ - $(OPENAPI_SRC)/${NAME}.server.go - - -SPEC_URL = https://github.com/raw/owncloud/open-graph-api/fix-code-generation/api/openapi-spec/${OPENGRAPH_VERSION}.yml - -#.PHONY: $(OPENAPI_SRC)/${NAME}-${OPENGRAPH_VERSION}.yml # force overwrite -$(OPENAPI_SRC)/${NAME}-${OPENGRAPH_VERSION}.yml: - curl -o $(OPENAPI_SRC)/${NAME}-${OPENGRAPH_VERSION}.yml ${SPEC_URL} \ No newline at end of file +ci-node-generate: \ No newline at end of file diff --git a/graph/pkg/service/v0/drives.go b/graph/pkg/service/v0/drives.go index 1d0a86a902b..df8454587d0 100644 --- a/graph/pkg/service/v0/drives.go +++ b/graph/pkg/service/v0/drives.go @@ -167,7 +167,7 @@ func cs3ResourceToDriveItem(res *storageprovider.ResourceInfo) (*msgraph.DriveIt driveItem.BaseItem.LastModifiedDateTime = &lastModified } if res.Type == storageprovider.ResourceType_RESOURCE_TYPE_FILE { - driveItem.File = &msgraph.OpenGraphFile{ + driveItem.File = &msgraph.OpenGraphFile{ // FIXME We cannot use msgraph.File here because the openapi codegenerator autodetects 'File' as a go type ... MimeType: &res.MimeType, } } @@ -231,7 +231,6 @@ func cs3StorageSpaceToDrive(baseURL *url.URL, space *storageprovider.StorageSpac drive.BaseItem.LastModifiedDateTime = &lastModified } if space.Quota != nil { - // FIXME use https://github.com/owncloud/open-graph-api and return proper int64 var t int64 if space.Quota.QuotaMaxBytes > math.MaxInt64 { t = math.MaxInt64