Skip to content

Instantly share code, notes, and snippets.

View baywet's full-sized avatar
✈️
travelling

Vincent Biret baywet

✈️
travelling
View GitHub Profile
@baywet
baywet / openapi-example-extended.yaml
Created April 29, 2026 13:55
Comparison of overlay reusable action target string interpolation support. The best way to look at this is to first diff the two descriptions to better understand that we're adding monitor endpoints for both creation operations. Then diff the overlays to understand the difference it makes when using string interpolation for the targets
openapi: 3.2.0
info:
title: Payment Service API
version: 1.0.0
description: Simple API for order placement and wire transfers
paths:
/orders:
post:
operationId: place_order
@baywet
baywet / .spectral.yaml
Last active January 2, 2025 20:24
My VSCode spectral rules
extends: ["spectral:oas"]
rules:
operation-operationId: off
operation-tags: off
operation-tag-defined: off
operation-description: off
info-contact: off
oas3-unused-component: off
@baywet
baywet / build.gradle
Created February 7, 2024 19:42 — forked from maisarissi/build.gradle
microsoftgraph-java-v6-sefl-serve-kiota-build-gradle
repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
}
dependencies {
// Use JUnit test framework.
testImplementation libs.junit
// This dependency is used by the application.
@baywet
baywet / app.go
Last active November 29, 2021 17:49
msgraph go sdk fluent api demo
// indexes into the users and message folders collections using the fluent style API to list out messages
client.UserById("jane@contoso.com").MessageFoldersById("Inbox").Messages().Get(nil)
// sends a message using the models and the fluent style API POST method
requestBody := msgraphsdk.NewSendMailRequestBody()
message := msgraphsdk.NewMessage()
requestBody.SetMessage(message)
subject := "Meet for lunch?"
message.SetSubject(&subject)
body := msgraphsdk.NewItemBody()
@baywet
baywet / app.go
Created November 18, 2021 21:02
ms graph go beta sdk
import (
azidentity "github.com/Azure/azure-sdk-for-go/sdk/azidentity"
a "github.com/microsoft/kiota/authentication/go/azure"
"context"
// this line imports the v1.0 SDK
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
// this line imports the beta SDK
msgraphbetasdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
)
@baywet
baywet / app.go
Last active November 23, 2021 13:22
Sample for the go sdk preview announcement
import (
azidentity "github.com/Azure/azure-sdk-for-go/sdk/azidentity"
a "github.com/microsoft/kiota/authentication/go/azure"
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
)
// the following block creates a new device code credential using the Azure Identity library which will be used by the authentication provider to obtain an access token for requests
cred, err := azidentity.NewDeviceCodeCredential(&azidentity.DeviceCodeCredentialOptions{
@baywet
baywet / testScript.ps1
Created September 8, 2021 13:36
AGS request payload compression test
$accessToken = "<AccessTokenWithMailSendPermission>"
$srcFileName = "PathToRequestPayloadUncompress-SeeOtherFile"
$destFileName = "APath"
$srcFileStream = New-Object System.IO.FileStream($srcFileName,([IO.FileMode]::Open),([IO.FileAccess]::Read),([IO.FileShare]::Read))
$destFileStream = New-Object System.IO.FileStream($destFileName,([IO.FileMode]::Create),([IO.FileAccess]::Write),([IO.FileShare]::None))
$gzip = New-Object System.IO.Compression.GZipStream($destFileStream,[System.IO.Compression.CompressionMode]::Compress)
$gzip.CopyTo($srcFileStream)
$gzip.Flush()
$destFileStream.Dispose()
Invoke-WebRequest -UseBasicParsing -Uri "https://graph.microsoft.com/v1.0/me/sendMail" `
@baywet
baywet / MS Graph Change Notifications useful links.txt
Created October 1, 2020 12:23
Microsoft Graph Change Notifications useful links
import { ACTIVITY_TYPE_DIGITAL, DIGITAL_CATEGORY_EMAIL } from '../../definitions';
export const modelName = 'email';
export const modelVersion = '1';
export const explanation = {
text:
'Calculations take into account the direct emissions associated with the email infrastructure worldwide.',
links: [
{
label: 'Phys.org (2015)',
param([String]$version)
Install-PackageProvider -Name NuGet -Force -Scope "CurrentUser"
if($version -ne "") {
Install-Module SharePointPnPPowerShellOnline -Scope "CurrentUser" -RequiredVersion $version -Verbose -AllowClobber -Force
} else {
Install-Module SharePointPnPPowerShellOnline -Scope "CurrentUser" -Verbose -AllowClobber -Force
}