owncloud / owncloud/libre-graph-api

Create drive return zero quota size

Open
#149 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
4
Forks
3
Avg merge
23h 14m
Merged PRs (30d)
1

Description

While doing create drive API request we get some numeric value in quota->total. Using libre graph create drive return zero. So there is difference in response from api and libre graph library

curl -XPOST 'https://localhost:9200/graph/v1.0/drives' \
--data '{
  "name": "Venus"
}'

-------Response------------

{
    "driveAlias": "project/venus",
    "driveType": "project",
    "id": "bb740b6b-d7e7-4cd7-b7ed-c10b45c6f648$426a5fb6-a547-4a15-ba1e-326855c98298",
    "lastModifiedDateTime": "2023-12-01T12:25:49.425938453+05:45",
    "name": "Venus",
    "owner": {
        "user": {
            "displayName": "",
            "id": "426a5fb6-a547-4a15-ba1e-326855c98298"
        }
    },
    "quota": {
        "total": 1000000000
    },
    "root": {
        "eTag": "\"45440fdf2bc0aa8a7a2ab85048c6f3c4\"",
        "id": "bb740b6b-d7e7-4cd7-b7ed-c10b45c6f648$426a5fb6-a547-4a15-ba1e-326855c98298",
        "permissions": [
            {
                "grantedToIdentities": [
                    {
                        "user": {
                            "displayName": "Admin",
                            "id": "42283afb-2a06-4b47-b707-db649d1ba001"
                        }
                    }
                ],
                "roles": [
                    "manager"
                ]
            }
        ],
        "webDavUrl": "https://localhost:9200/dav/spaces/bb740b6b-d7e7-4cd7-b7ed-c10b45c6f648$426a5fb6-a547-4a15-ba1e-326855c98298"
    },
    "webUrl": "https://localhost:9200/f/bb740b6b-d7e7-4cd7-b7ed-c10b45c6f648$426a5fb6-a547-4a15-ba1e-326855c98298"
}

Using Libregraph

            [quota] => OpenAPI\Client\Model\Quota Object
                (
                    [openAPINullablesSetToNull:protected] => Array
                        (
                        )

                    [container:protected] => Array
                        (
                            [deleted] => 
                            [remaining] => 
                            [state] => 
                            [total] => 0
                            [used] => 
                        )

                )

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the OpenAPI definition and generated OpenAPI\Client\Model\Quota used by the create-drive response; compare the quota.total schema and deserialization with the API payload. Add or update coverage for a created drive and confirm the client preserves 1000000000 instead of returning 0.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi
Domain
api, backend-api-design
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.