Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Jörn Friedrich Dreyer
2021-07-08 20:05:50 +00:00
parent 9376e2ef5e
commit 7a25f2ac5e
5 changed files with 2 additions and 49 deletions
+1 -24
View File
@@ -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://raw.githubusercontent.com/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}
ci-node-generate:
+1 -2
View File
@@ -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