Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing put request – snippets Expect a put request but only a patch exists #100

Open
Tracked by #96
rkodev opened this issue May 30, 2022 · 3 comments
Open
Tracked by #96
Labels
blocked bug Something isn't working ToTriage

Comments

@rkodev
Copy link
Contributor

rkodev commented May 30, 2022

Request Builder is missing a PUT request method. Only Patch is available

Sample Link Go: https://docs.microsoft.com/en-us/graph/api/shift-put?view=graph-rest-beta&tabs=go

Example

Expected

const requestBody1 : Shift = {
    lastModifiedBy : {
        application : null,
        device : null,
        conversation : null,
        user : {
            id : "366c0b19-49b1-41b5-a03f-9f3887bd0ed8",
            displayName : "John Doe",
        },
    },
    sharedShift : {
        displayName : "Day shift",
        notes : "Please do inventory as part of your shift.",
        startDateTime : "2019-03-11T15:00:00Z",
        endDateTime : "2019-03-12T00:00:00Z",
        theme : "blue",
        activities : [
            {
                isPaid : true,
                startDateTime : "2019-03-11T15:00:00Z",
                endDateTime : "2019-03-11T15:15:00Z",
                code : "",
                displayName : "Lunch",
            },
        ],
    },
    draftShift : {
        displayName : "Day shift",
        notes : "Please do inventory as part of your shift.",
        startDateTime : "2019-03-11T15:00:00Z",
        endDateTime : "2019-03-12T00:00:00Z",
        theme : "blue",
        activities : [
            {
                isPaid : true,
                startDateTime : "2019-03-11T15:00:00Z",
                endDateTime : "2019-03-11T15:30:00Z",
                code : "",
                displayName : "Lunch",
            },
        ],
    },
    additionalData : {
        "id" : "SHFT_577b75d2-a927-48c0-a5d1-dc984894e7b8",
        "createdDateTime" : "2019-03-14T04:32:51.451Z",
        "lastModifiedDateTime" : "2019-03-14T05:32:51.451Z",
        "userId" : "c5d0c76b-80c4-481c-be50-923cd8d680a1",
        "schedulingGroupId" : "TAG_228940ed-ff84-4e25-b129-1b395cf78be0",
    },
};

async () => {
    await graphServiceClient.teamsById("team-id").schedule.shiftsById("shift-id").put(requestBody1);
}
@rkodev
Copy link
Contributor Author

rkodev commented May 30, 2022

cc @baywet

@baywet
Copy link
Member

baywet commented May 30, 2022

This one is missing from the OpenAPI description all together. From looking at the CSDL I'd say it's actually missing an annotation that says it's updatable by PUT (can't remember the exact name here). @irvinesunday might be able to help out on this.

@baywet
Copy link
Member

baywet commented Jan 26, 2024

@rkodev can you create an associated issue in the metadata repo, we'll be able to add the annotation there and fix the issue across the SDKs this way. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked bug Something isn't working ToTriage
Projects
None yet
Development

No branches or pull requests

3 participants