diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml
index 5649e50c5..616776585 100644
--- a/.azure-pipelines/ci-build.yml
+++ b/.azure-pipelines/ci-build.yml
@@ -7,120 +7,344 @@ trigger:
branches:
include:
- master
-pr: none
+ - vnext
+pr:
+ branches:
+ include:
+ - master
+ - vnext
pool:
name: Azure Pipelines
vmImage: windows-latest
- demands:
- - msbuild
- - vstest
-
-steps:
-- task: NuGetCommand@2
- displayName: 'NuGet restore'
-
-- task: MSBuild@1
- displayName: 'Build solution **/*.sln'
- inputs:
- configuration: Release
-
-- task: VSTest@2
- displayName: 'XUnit Tests'
- inputs:
- testAssemblyVer2: |
- **\*.Tests.dll
-
- vsTestVersion: 16.0
- codeCoverageEnabled: true
-
-- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
- displayName: 'ESRP CodeSigning'
- inputs:
- ConnectedServiceName: 'microsoftgraph ESRP CodeSign DLL and NuGet (AKV)'
- FolderPath: src
- signConfigType: inlineSignParams
- inlineOperation: |
- [
- {
- "keyCode": "CP-230012",
- "operationSetCode": "SigntoolSign",
- "parameters": [
- {
- "parameterName": "OpusName",
- "parameterValue": "Microsoft"
- },
- {
- "parameterName": "OpusInfo",
- "parameterValue": "http://www.microsoft.com"
- },
- {
- "parameterName": "FileDigest",
- "parameterValue": "/fd \"SHA256\""
- },
- {
- "parameterName": "PageHash",
- "parameterValue": "/NPH"
- },
- {
- "parameterName": "TimeStamp",
- "parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
- }
- ],
- "toolName": "sign",
- "toolVersion": "1.0"
- },
- {
- "keyCode": "CP-230012",
- "operationSetCode": "SigntoolVerify",
- "parameters": [ ],
- "toolName": "sign",
- "toolVersion": "1.0"
- }
- ]
- SessionTimeout: 20
-
-- task: MSBuild@1
- displayName: 'Pack OpenAPI'
- inputs:
- solution: src/Microsoft.OpenApi/Microsoft.OpenApi.csproj
- configuration: Release
- msbuildArguments: '/t:pack /p:PackageOutputPath=$(Build.ArtifactStagingDirectory) /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg'
-
-- task: MSBuild@1
- displayName: 'Pack OpenAPI Readers'
- inputs:
- solution: src/Microsoft.OpenApi.Readers/Microsoft.OpenApi.Readers.csproj
- configuration: Release
- msbuildArguments: '/t:pack /p:PackageOutputPath=$(Build.ArtifactStagingDirectory) /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg'
-
-- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
- displayName: 'ESRP CodeSigning Nuget Packages'
- inputs:
- ConnectedServiceName: 'microsoftgraph ESRP CodeSign DLL and NuGet (AKV)'
- FolderPath: '$(Build.ArtifactStagingDirectory)'
- Pattern: '*.nupkg'
- signConfigType: inlineSignParams
- inlineOperation: |
- [
- {
- "keyCode": "CP-401405",
- "operationSetCode": "NuGetSign",
- "parameters": [ ],
- "toolName": "sign",
- "toolVersion": "1.0"
- },
- {
- "keyCode": "CP-401405",
- "operationSetCode": "NuGetVerify",
- "parameters": [ ],
- "toolName": "sign",
- "toolVersion": "1.0"
- }
- ]
- SessionTimeout: 20
-
-- task: PublishBuildArtifacts@1
- displayName: 'Publish Artifact: Nugets'
- inputs:
- ArtifactName: Nugets
\ No newline at end of file
+
+variables:
+ buildPlatform: 'Any CPU'
+ buildConfiguration: 'Release'
+ ProductBinPath: '$(Build.SourcesDirectory)\src\Microsoft.OpenApi\bin\$(BuildConfiguration)'
+
+
+stages:
+
+- stage: build
+ jobs:
+ - job: build
+ steps:
+ - task: UseDotNet@2
+ displayName: 'Use .NET 6'
+ inputs:
+ version: 6.x
+
+ - task: PoliCheck@1
+ displayName: 'Run PoliCheck "/src"'
+ inputs:
+ inputType: CmdLine
+ cmdLineArgs: '/F:$(Build.SourcesDirectory)/src /T:9 /Sev:"1|2" /PE:2 /O:poli_result_src.xml'
+
+ - task: PoliCheck@1
+ displayName: 'Run PoliCheck "/test"'
+ inputs:
+ inputType: CmdLine
+ cmdLineArgs: '/F:$(Build.SourcesDirectory)/test /T:9 /Sev:"1|2" /PE:2 /O:poli_result_test.xml'
+
+ # Install the nuget tool.
+ - task: NuGetToolInstaller@0
+ displayName: 'Use NuGet >=5.2.0'
+ inputs:
+ versionSpec: '>=5.2.0'
+ checkLatest: true
+
+ # Build the Product project
+ - task: DotNetCoreCLI@2
+ displayName: 'build'
+ inputs:
+ projects: '$(Build.SourcesDirectory)\Microsoft.OpenApi.sln'
+ arguments: '--configuration $(BuildConfiguration) --no-incremental'
+
+ # Run the Unit test
+ - task: DotNetCoreCLI@2
+ displayName: 'test'
+ inputs:
+ command: test
+ projects: '$(Build.SourcesDirectory)\Microsoft.OpenApi.sln'
+ arguments: '--configuration $(BuildConfiguration) --no-build'
+
+ # CredScan
+ - task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@2
+ displayName: 'Run CredScan - Src'
+ inputs:
+ toolMajorVersion: 'V2'
+ scanFolder: '$(Build.SourcesDirectory)\src'
+ debugMode: false
+
+ - task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@2
+ displayName: 'Run CredScan - Test'
+ inputs:
+ toolMajorVersion: 'V2'
+ scanFolder: '$(Build.SourcesDirectory)\test'
+ debugMode: false
+
+ - task: AntiMalware@3
+ displayName: 'Run MpCmdRun.exe - ProductBinPath'
+ inputs:
+ FileDirPath: '$(ProductBinPath)'
+ enabled: false
+
+ - task: BinSkim@3
+ displayName: 'Run BinSkim - Product Binaries'
+ inputs:
+ InputType: Basic
+ AnalyzeTarget: '$(ProductBinPath)\**\Microsoft.OpenApi.dll'
+ AnalyzeSymPath: '$(ProductBinPath)'
+ AnalyzeVerbose: true
+ AnalyzeHashes: true
+ AnalyzeEnvironment: true
+
+ - task: PublishSecurityAnalysisLogs@2
+ displayName: 'Publish Security Analysis Logs'
+ inputs:
+ ArtifactName: SecurityLogs
+
+ - task: PostAnalysis@1
+ displayName: 'Post Analysis'
+ inputs:
+ BinSkim: true
+ CredScan: true
+ PoliCheck: true
+
+ - task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
+ displayName: 'ESRP CodeSigning'
+ inputs:
+ ConnectedServiceName: 'microsoftgraph ESRP CodeSign DLL and NuGet (AKV)'
+ FolderPath: src
+ signConfigType: inlineSignParams
+ inlineOperation: |
+ [
+ {
+ "keyCode": "CP-230012",
+ "operationSetCode": "SigntoolSign",
+ "parameters": [
+ {
+ "parameterName": "OpusName",
+ "parameterValue": "Microsoft"
+ },
+ {
+ "parameterName": "OpusInfo",
+ "parameterValue": "http://www.microsoft.com"
+ },
+ {
+ "parameterName": "FileDigest",
+ "parameterValue": "/fd \"SHA256\""
+ },
+ {
+ "parameterName": "PageHash",
+ "parameterValue": "/NPH"
+ },
+ {
+ "parameterName": "TimeStamp",
+ "parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
+ }
+ ],
+ "toolName": "sign",
+ "toolVersion": "1.0"
+ },
+ {
+ "keyCode": "CP-230012",
+ "operationSetCode": "SigntoolVerify",
+ "parameters": [ ],
+ "toolName": "sign",
+ "toolVersion": "1.0"
+ }
+ ]
+ SessionTimeout: 20
+
+ # Pack
+ - task: DotNetCoreCLI@2
+ displayName: 'pack OpenAPI'
+ inputs:
+ command: pack
+ projects: src/Microsoft.OpenApi/Microsoft.OpenApi.csproj
+ arguments: '-o $(Build.ArtifactStagingDirectory) --configuration $(BuildConfiguration) --no-build --include-symbols --include-source /p:SymbolPackageFormat=snupkg'
+
+ # Pack
+ - task: DotNetCoreCLI@2
+ displayName: 'pack Readers'
+ inputs:
+ command: pack
+ projects: src/Microsoft.OpenApi.Readers/Microsoft.OpenApi.Readers.csproj
+ arguments: '-o $(Build.ArtifactStagingDirectory) --configuration $(BuildConfiguration) --no-build --include-symbols --include-source /p:SymbolPackageFormat=snupkg'
+
+ # Pack
+ - task: DotNetCoreCLI@2
+ displayName: 'pack Hidi'
+ inputs:
+ command: pack
+ projects: src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj
+ arguments: '-o $(Build.ArtifactStagingDirectory) --configuration $(BuildConfiguration) --no-build --include-symbols --include-source /p:SymbolPackageFormat=snupkg'
+
+ - task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
+ displayName: 'ESRP CodeSigning Nuget Packages'
+ inputs:
+ ConnectedServiceName: 'microsoftgraph ESRP CodeSign DLL and NuGet (AKV)'
+ FolderPath: '$(Build.ArtifactStagingDirectory)'
+ Pattern: '*.nupkg'
+ signConfigType: inlineSignParams
+ inlineOperation: |
+ [
+ {
+ "keyCode": "CP-401405",
+ "operationSetCode": "NuGetSign",
+ "parameters": [ ],
+ "toolName": "sign",
+ "toolVersion": "1.0"
+ },
+ {
+ "keyCode": "CP-401405",
+ "operationSetCode": "NuGetVerify",
+ "parameters": [ ],
+ "toolName": "sign",
+ "toolVersion": "1.0"
+ }
+ ]
+ SessionTimeout: 20
+
+ - task: PowerShell@2
+ displayName: "Get Hidi's version-number from .csproj"
+ inputs:
+ targetType: 'inline'
+ script: |
+ $xml = [Xml] (Get-Content .\src\Microsoft.OpenApi.Hidi\Microsoft.OpenApi.Hidi.csproj)
+ $version = $xml.Project.PropertyGroup.Version
+ echo $version
+ echo "##vso[task.setvariable variable=hidiversion]$version"
+
+ # publish hidi as an .exe
+ - task: DotNetCoreCLI@2
+ displayName: publish Hidi as executable
+ inputs:
+ command: 'publish'
+ arguments: -c Release --runtime win-x64 /p:PublishSingleFile=true --self-contained --output $(Build.ArtifactStagingDirectory)/Microsoft.OpenApi.Hidi-v$(hidiversion) -p:PublishTrimmed=true
+ projects: 'src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj'
+ publishWebProjects: False
+ zipAfterPublish: false
+
+ - task: CopyFiles@2
+ displayName: Prepare staging folder for upload
+ inputs:
+ targetFolder: $(Build.ArtifactStagingDirectory)/Nugets
+ sourceFolder: $(Build.ArtifactStagingDirectory)
+ content: '*.nupkg'
+
+ - task: PublishBuildArtifacts@1
+ displayName: 'Publish Artifact: Nugets'
+ inputs:
+ ArtifactName: Nugets
+ PathtoPublish: '$(Build.ArtifactStagingDirectory)/Nugets'
+
+ - task: PublishBuildArtifacts@1
+ displayName: 'Publish Artifact: Hidi'
+ inputs:
+ ArtifactName: Microsoft.OpenApi.Hidi-v$(hidiversion)
+ PathtoPublish: '$(Build.ArtifactStagingDirectory)/Microsoft.OpenApi.Hidi-v$(hidiversion)'
+
+- stage: deploy
+ condition: and(contains(variables['build.sourceBranch'], 'refs/heads/master'), succeeded())
+ dependsOn: build
+ jobs:
+ - deployment: deploy_hidi
+ dependsOn: []
+ environment: nuget-org
+ strategy:
+ runOnce:
+ deploy:
+ pool:
+ vmImage: ubuntu-latest
+ steps:
+ - task: DownloadPipelineArtifact@2
+ displayName: Download nupkg from artifacts
+ inputs:
+ artifact: Nugets
+ source: current
+ - task: DownloadPipelineArtifact@2
+ displayName: Download hidi executable from artifacts
+ inputs:
+ source: current
+ - pwsh: |
+ $artifactName = Get-ChildItem -Path $(Pipeline.Workspace)\Nugets -Filter Microsoft.OpenApi.*.nupkg -recurse | select -First 1
+ $artifactVersion= $artifactName.Name -replace "Microsoft.OpenApi.", "" -replace ".nupkg", ""
+ #Set Variable $artifactName and $artifactVersion
+ Write-Host "##vso[task.setvariable variable=artifactVersion; isSecret=false; isOutput=true]$artifactVersion"
+ Write-Host "##vso[task.setvariable variable=artifactName; isSecret=false; isOutput=true]$artifactName.FullName"
+ echo "$artifactName"
+ echo "$artifactVersion"
+ displayName: 'Fetch Artifact Name'
+
+ - task: NuGetCommand@2
+ displayName: 'NuGet push'
+ inputs:
+ command: push
+ packagesToPush: '$(Pipeline.Workspace)/Nugets/Microsoft.OpenApi.Hidi.*.nupkg'
+ nuGetFeedType: external
+ publishFeedCredentials: 'OpenAPI Nuget Connection'
+ - task: GitHubRelease@1
+ displayName: 'GitHub release (create)'
+ inputs:
+ gitHubConnection: 'Github-MaggieKimani1'
+ tagSource: userSpecifiedTag
+ tag: '$(artifactVersion)'
+ title: '$(artifactVersion)'
+ releaseNotesSource: inline
+ assets: '$(Pipeline.Workspace)\**\*.exe'
+ changeLogType: issueBased
+
+ - deployment: deploy_lib
+ dependsOn: []
+ environment: nuget-org
+ strategy:
+ runOnce:
+ deploy:
+ pool:
+ vmImage: ubuntu-latest
+ steps:
+ - task: DownloadPipelineArtifact@2
+ displayName: Download nupkg from artifacts
+ inputs:
+ artifact: Nugets
+ source: current
+ - powershell: |
+ $fileNames = "$(Pipeline.Workspace)/Nugets/Microsoft.OpenApi.Hidi.*.nupkg", "$(Pipeline.Workspace)/Nugets/Microsoft.OpenApi.Readers.*.nupkg", "$(Pipeline.Workspace)/Nugets/Microsoft.OpenApi.Workbench.*.nupkg"
+ foreach($fileName in $fileNames) {
+ if(Test-Path $fileName) {
+ rm $fileName -Verbose
+ }
+ }
+ displayName: remove other nupkgs to avoid duplication
+ - task: NuGetCommand@2
+ displayName: 'NuGet push'
+ inputs:
+ command: push
+ packagesToPush: '$(Pipeline.Workspace)/Nugets/Microsoft.OpenApi.*.nupkg'
+ nuGetFeedType: external
+ publishFeedCredentials: 'OpenAPI Nuget Connection'
+
+ - deployment: deploy_readers
+ dependsOn: deploy_lib
+ environment: nuget-org
+ strategy:
+ runOnce:
+ deploy:
+ pool:
+ vmImage: ubuntu-latest
+ steps:
+ - task: DownloadPipelineArtifact@2
+ displayName: Download nupkg from artifacts
+ inputs:
+ artifact: Nugets
+ source: current
+ - task: NuGetCommand@2
+ displayName: 'NuGet push'
+ inputs:
+ command: push
+ packagesToPush: '$(Pipeline.Workspace)/Nugets/Microsoft.OpenApi.Readers.*.nupkg'
+ nuGetFeedType: external
+ publishFeedCredentials: 'OpenAPI Nuget Connection'
diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml
index 5cb12e734..171690a50 100644
--- a/.github/workflows/ci-cd.yml
+++ b/.github/workflows/ci-cd.yml
@@ -13,13 +13,13 @@ jobs:
GITHUB_RUN_NUMBER: ${{ github.run_number }}
steps:
- name: Setup .NET
- uses: actions/setup-dotnet@v1
+ uses: actions/setup-dotnet@v2
with:
- dotnet-version: 5.0.x
+ dotnet-version: 6.0.x
- name: Checkout repository
id: checkout_repo
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
@@ -27,7 +27,7 @@ jobs:
- if: github.event_name == 'push' && github.ref == 'refs/heads/master'
name: Bump GH tag
id: tag_generator
- uses: mathieudutour/github-tag-action@v5.4
+ uses: mathieudutour/github-tag-action@v6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
default_bump: false
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 95c813772..0adca3d2d 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -2,6 +2,7 @@ name: CodeQL Analysis
on:
push:
+ branches: [ vnext ]
pull_request:
schedule:
- cron: '0 8 * * *'
@@ -13,12 +14,12 @@ jobs:
steps:
- name: Checkout repository
id: checkout_repo
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Setup .NET
- uses: actions/setup-dotnet@v1
+ uses: actions/setup-dotnet@v2
with:
- dotnet-version: 5.0.x
+ dotnet-version: 6.0.x
- name: Initialize CodeQL
id: init_codeql
@@ -33,7 +34,7 @@ jobs:
$projectsArray = @(
'.\src\Microsoft.OpenApi\Microsoft.OpenApi.csproj',
'.\src\Microsoft.OpenApi.Readers\Microsoft.OpenApi.Readers.csproj',
- '.\src\Microsoft.OpenApi.Tool\Microsoft.OpenApi.Tool.csproj'
+ '.\src\Microsoft.OpenApi.Hidi\Microsoft.OpenApi.Hidi.csproj'
)
$projectsArray | ForEach-Object {
diff --git a/.vscode/launch.json b/.vscode/launch.json
index 0d20a9b46..b59349979 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -10,9 +10,9 @@
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
- "program": "${workspaceFolder}/src/Microsoft.OpenApi.Tool/bin/Debug/netcoreapp3.1/Microsoft.OpenApi.Tool.dll",
+ "program": "${workspaceFolder}/src/Microsoft.OpenApi.Hidi/bin/Debug/net6.0/Microsoft.OpenApi.Hidi.dll",
"args": [],
- "cwd": "${workspaceFolder}/src/Microsoft.OpenApi.Tool",
+ "cwd": "${workspaceFolder}/src/Microsoft.OpenApi.Hidi",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole",
"stopAtEntry": false
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
index 358fd0e1a..6040a610f 100644
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -5,16 +5,43 @@
"tasks": [
{
"label": "build",
- "type": "shell",
- "command": "msbuild",
+ "command": "dotnet",
+ "type": "process",
+ "group": "build",
+ "args": [
+ "build",
+ "${workspaceFolder}/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj",
+ "/property:GenerateFullPaths=true",
+ "/consoleloggerparameters:NoSummary"
+ ],
+ "problemMatcher": "$msCompile"
+ },
+ {
+ "label": "test",
+ "command": "dotnet",
+ "type": "process",
+ "group": "test",
"args": [
+ "test",
+ "${workspaceFolder}/Microsoft.OpenApi.sln",
"/property:GenerateFullPaths=true",
- "/t:build"
+ "/consoleloggerparameters:NoSummary",
+ "--collect:\"XPlat Code Coverage\""
],
+ "problemMatcher": "$msCompile"
+ },
+ {
+ "label": "watch",
+ "command": "dotnet",
+ "type": "process",
"group": "build",
- "presentation": {
- "reveal": "silent"
- },
+ "args": [
+ "watch",
+ "run",
+ "${workspaceFolder}/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj",
+ "/property:GenerateFullPaths=true",
+ "/consoleloggerparameters:NoSummary"
+ ],
"problemMatcher": "$msCompile"
},
{
diff --git a/Microsoft.OpenApi.sln b/Microsoft.OpenApi.sln
index e64ff3a24..cca18f1e5 100644
--- a/Microsoft.OpenApi.sln
+++ b/Microsoft.OpenApi.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.29613.14
+# Visual Studio Version 17
+VisualStudioVersion = 17.1.32210.238
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.OpenApi", "src\Microsoft.OpenApi\Microsoft.OpenApi.csproj", "{A8E50143-69B2-472A-9D45-3F9A05D13202}"
EndProject
@@ -12,7 +12,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
readme.md = readme.md
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.OpenApi.Workbench", "src\Microsoft.OpenApi.Workbench\Microsoft.OpenApi.Workbench.csproj", "{6A5E91E5-0441-46EE-AEB9-8334981B7F08}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.OpenApi.Workbench", "src\Microsoft.OpenApi.Workbench\Microsoft.OpenApi.Workbench.csproj", "{6A5E91E5-0441-46EE-AEB9-8334981B7F08}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.OpenApi.Readers", "src\Microsoft.OpenApi.Readers\Microsoft.OpenApi.Readers.csproj", "{79933258-0126-4382-8755-D50820ECC483}"
EndProject
@@ -26,7 +26,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{6357D7FD-2
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.OpenApi.SmokeTests", "test\Microsoft.OpenApi.SmokeTests\Microsoft.OpenApi.SmokeTests.csproj", "{AD79B61D-88CF-497C-9ED5-41AE3867C5AC}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.OpenApi.Tool", "src\Microsoft.OpenApi.Tool\Microsoft.OpenApi.Tool.csproj", "{254841B5-7DAC-4D1D-A9C5-44FE5CE467BE}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.OpenApi.Hidi", "src\Microsoft.OpenApi.Hidi\Microsoft.OpenApi.Hidi.csproj", "{254841B5-7DAC-4D1D-A9C5-44FE5CE467BE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
diff --git a/build.cmd b/build.cmd
index b3612c9ed..43cc95956 100644
--- a/build.cmd
+++ b/build.cmd
@@ -1,21 +1,21 @@
@echo off
-Echo Building Microsoft.OpenApi
+Echo Building Microsoft.OpenApi
-SET PROJ=%~dp0src\Microsoft.OpenApi\Microsoft.OpenApi.csproj
+SET PROJ=%~dp0src\Microsoft.OpenApi\Microsoft.OpenApi.csproj
dotnet msbuild %PROJ% /t:restore /p:Configuration=Release
dotnet msbuild %PROJ% /t:build /p:Configuration=Release
dotnet msbuild %PROJ% /t:pack /p:Configuration=Release;PackageOutputPath=%~dp0artifacts
Echo Building Microsoft.OpenApi.Readers
-SET PROJ=%~dp0src\Microsoft.OpenApi.Readers\Microsoft.OpenApi.Readers.csproj
+SET PROJ=%~dp0src\Microsoft.OpenApi.Readers\Microsoft.OpenApi.Readers.csproj
dotnet msbuild %PROJ% /t:restore /p:Configuration=Release
dotnet msbuild %PROJ% /t:build /p:Configuration=Release
dotnet msbuild %PROJ% /t:pack /p:Configuration=Release;PackageOutputPath=%~dp0artifacts
-Echo Building Microsoft.OpenApi.Tool
+Echo Building Microsoft.OpenApi.Hidi
-SET PROJ=%~dp0src\Microsoft.OpenApi.Tool\Microsoft.OpenApi.Tool.csproj
+SET PROJ=%~dp0src\Microsoft.OpenApi.Hidi\Microsoft.OpenApi.Hidi.csproj
dotnet msbuild %PROJ% /t:restore /p:Configuration=Release
dotnet msbuild %PROJ% /t:build /p:Configuration=Release
dotnet msbuild %PROJ% /t:pack /p:Configuration=Release;PackageOutputPath=%~dp0artifacts
diff --git a/install-tool.ps1 b/install-tool.ps1
index 0e6521110..0b4615c67 100644
--- a/install-tool.ps1
+++ b/install-tool.ps1
@@ -1,7 +1,7 @@
-$latest = Get-ChildItem .\artifacts\ Microsoft.OpenApi.Tool* | select-object -Last 1
+$latest = Get-ChildItem .\artifacts\Microsoft.OpenApi.Hidi* | select-object -Last 1
$version = $latest.Name.Split(".")[3..5] | join-string -Separator "."
-if (Test-Path -Path ./artifacts/openapi-parser.exe) {
- dotnet tool uninstall --tool-path artifacts Microsoft.OpenApi.Tool
+if (Test-Path -Path ./artifacts/hidi.exe) {
+ dotnet tool uninstall --tool-path artifacts Microsoft.OpenApi.Hidi
}
-dotnet tool install --tool-path artifacts --add-source .\artifacts\ --version $version Microsoft.OpenApi.Tool
\ No newline at end of file
+dotnet tool install --tool-path artifacts --add-source .\artifacts\ --version $version Microsoft.OpenApi.Hidi
\ No newline at end of file
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index adb086cc1..7f0f6e9c0 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -3,6 +3,6 @@
$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb
-
+
\ No newline at end of file
diff --git a/src/Microsoft.OpenApi.Hidi/CsdlFilter.xslt b/src/Microsoft.OpenApi.Hidi/CsdlFilter.xslt
new file mode 100644
index 000000000..ee3bf0d40
--- /dev/null
+++ b/src/Microsoft.OpenApi.Hidi/CsdlFilter.xslt
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj b/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj
new file mode 100644
index 000000000..52d0b3c1e
--- /dev/null
+++ b/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj
@@ -0,0 +1,61 @@
+
+
+
+ Exe
+ net6.0
+ 9.0
+ true
+ http://go.microsoft.com/fwlink/?LinkID=288890
+ https://github.com/Microsoft/OpenAPI.NET
+ MIT
+ true
+ Microsoft
+ Microsoft
+ Microsoft.OpenApi.Hidi
+ Microsoft.OpenApi.Hidi
+ hidi
+ ./../../artifacts
+ 1.0.0-preview1
+ OpenAPI.NET CLI tool for slicing OpenAPI documents
+ © Microsoft Corporation. All rights reserved.
+ OpenAPI .NET
+ https://github.com/Microsoft/OpenAPI.NET
+
+- Upgrades Microsoft.OpenApi.OData to 1.0.10-preview1
+- Fixes an issue where hidi would not process async operations
+
+ Microsoft.OpenApi.Hidi
+ Microsoft.OpenApi.Hidi
+ true
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Microsoft.OpenApi.Hidi/OpenApiService.cs b/src/Microsoft.OpenApi.Hidi/OpenApiService.cs
new file mode 100644
index 000000000..584087ea7
--- /dev/null
+++ b/src/Microsoft.OpenApi.Hidi/OpenApiService.cs
@@ -0,0 +1,596 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT license.
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Security;
+using System.Text;
+using System.Threading.Tasks;
+using System.Text.Json;
+using Microsoft.Extensions.Logging;
+using System.Xml.Linq;
+using Microsoft.OData.Edm.Csdl;
+using Microsoft.OpenApi.Extensions;
+using Microsoft.OpenApi.Models;
+using Microsoft.OpenApi.OData;
+using Microsoft.OpenApi.Readers;
+using Microsoft.OpenApi.Services;
+using Microsoft.OpenApi.Validations;
+using Microsoft.OpenApi.Writers;
+using static Microsoft.OpenApi.Hidi.OpenApiSpecVersionHelper;
+using System.Threading;
+using System.Xml.Xsl;
+using System.Xml;
+using System.Runtime.CompilerServices;
+using System.Reflection;
+
+namespace Microsoft.OpenApi.Hidi
+{
+ public class OpenApiService
+ {
+ ///
+ /// Implementation of the transform command
+ ///
+ public static async Task TransformOpenApiDocument(
+ string openapi,
+ string csdl,
+ string csdlFilter,
+ FileInfo output,
+ bool cleanoutput,
+ string? version,
+ OpenApiFormat? format,
+ bool terseOutput,
+ LogLevel loglevel,
+ bool inlineLocal,
+ bool inlineExternal,
+ string filterbyoperationids,
+ string filterbytags,
+ string filterbycollection,
+ CancellationToken cancellationToken
+ )
+ {
+ var logger = ConfigureLoggerInstance(loglevel);
+
+ try
+ {
+ if (string.IsNullOrEmpty(openapi) && string.IsNullOrEmpty(csdl))
+ {
+ throw new ArgumentException("Please input a file path");
+ }
+ if(output == null)
+ {
+ throw new ArgumentNullException(nameof(output));
+ }
+ if (cleanoutput && output.Exists)
+ {
+ output.Delete();
+ }
+ if (output.Exists)
+ {
+ throw new IOException($"The file {output} already exists. Please input a new file path.");
+ }
+
+ Stream stream;
+ OpenApiDocument document;
+ OpenApiFormat openApiFormat;
+ OpenApiSpecVersion openApiVersion;
+ var stopwatch = new Stopwatch();
+
+ if (!string.IsNullOrEmpty(csdl))
+ {
+ using (logger.BeginScope($"Convert CSDL: {csdl}", csdl))
+ {
+ stopwatch.Start();
+ // Default to yaml and OpenApiVersion 3 during csdl to OpenApi conversion
+ openApiFormat = format ?? GetOpenApiFormat(csdl, logger);
+ openApiVersion = version != null ? TryParseOpenApiSpecVersion(version) : OpenApiSpecVersion.OpenApi3_0;
+
+ stream = await GetStream(csdl, logger, cancellationToken);
+
+ if (!string.IsNullOrEmpty(csdlFilter))
+ {
+ XslCompiledTransform transform = GetFilterTransform();
+ stream = ApplyFilter(csdl, csdlFilter, transform);
+ stream.Position = 0;
+ }
+ document = await ConvertCsdlToOpenApi(stream);
+ stopwatch.Stop();
+ logger.LogTrace("{timestamp}ms: Generated OpenAPI with {paths} paths.", stopwatch.ElapsedMilliseconds, document.Paths.Count);
+ }
+ }
+ else
+ {
+ stream = await GetStream(openapi, logger, cancellationToken);
+
+ using (logger.BeginScope($"Parse OpenAPI: {openapi}",openapi))
+ {
+ stopwatch.Restart();
+ var result = await new OpenApiStreamReader(new OpenApiReaderSettings
+ {
+ RuleSet = ValidationRuleSet.GetDefaultRuleSet(),
+ LoadExternalRefs = inlineExternal,
+ BaseUrl = openapi.StartsWith("http") ? new Uri(openapi) : new Uri("file:" + new FileInfo(openapi).DirectoryName + "\\")
+ }
+ ).ReadAsync(stream);
+
+ document = result.OpenApiDocument;
+
+ var context = result.OpenApiDiagnostic;
+ if (context.Errors.Count > 0)
+ {
+ logger.LogTrace("{timestamp}ms: Parsed OpenAPI with errors. {count} paths found.", stopwatch.ElapsedMilliseconds, document.Paths.Count);
+
+ var errorReport = new StringBuilder();
+
+ foreach (var error in context.Errors)
+ {
+ logger.LogError("OpenApi Parsing error: {message}", error.ToString());
+ errorReport.AppendLine(error.ToString());
+ }
+ logger.LogError($"{stopwatch.ElapsedMilliseconds}ms: OpenApi Parsing errors {string.Join(Environment.NewLine, context.Errors.Select(e => e.Message).ToArray())}");
+ }
+ else
+ {
+ logger.LogTrace("{timestamp}ms: Parsed OpenApi successfully. {count} paths found.", stopwatch.ElapsedMilliseconds, document.Paths.Count);
+ }
+
+ openApiFormat = format ?? GetOpenApiFormat(openapi, logger);
+ openApiVersion = version != null ? TryParseOpenApiSpecVersion(version) : result.OpenApiDiagnostic.SpecificationVersion;
+ stopwatch.Stop();
+ }
+ }
+
+ using (logger.BeginScope("Filter"))
+ {
+ Func predicate = null;
+
+ // Check if filter options are provided, then slice the OpenAPI document
+ if (!string.IsNullOrEmpty(filterbyoperationids) && !string.IsNullOrEmpty(filterbytags))
+ {
+ throw new InvalidOperationException("Cannot filter by operationIds and tags at the same time.");
+ }
+ if (!string.IsNullOrEmpty(filterbyoperationids))
+ {
+ logger.LogTrace("Creating predicate based on the operationIds supplied.");
+ predicate = OpenApiFilterService.CreatePredicate(operationIds: filterbyoperationids);
+
+ }
+ if (!string.IsNullOrEmpty(filterbytags))
+ {
+ logger.LogTrace("Creating predicate based on the tags supplied.");
+ predicate = OpenApiFilterService.CreatePredicate(tags: filterbytags);
+
+ }
+ if (!string.IsNullOrEmpty(filterbycollection))
+ {
+ var fileStream = await GetStream(filterbycollection, logger, cancellationToken);
+ var requestUrls = ParseJsonCollectionFile(fileStream, logger);
+
+ logger.LogTrace("Creating predicate based on the paths and Http methods defined in the Postman collection.");
+ predicate = OpenApiFilterService.CreatePredicate(requestUrls: requestUrls, source: document);
+ }
+ if (predicate != null)
+ {
+ stopwatch.Restart();
+ document = OpenApiFilterService.CreateFilteredDocument(document, predicate);
+ stopwatch.Stop();
+ logger.LogTrace("{timestamp}ms: Creating filtered OpenApi document with {paths} paths.", stopwatch.ElapsedMilliseconds, document.Paths.Count);
+ }
+ }
+
+ using (logger.BeginScope("Output"))
+ {
+ ;
+ using var outputStream = output?.Create();
+ var textWriter = outputStream != null ? new StreamWriter(outputStream) : Console.Out;
+
+ var settings = new OpenApiWriterSettings()
+ {
+ InlineLocalReferences = inlineLocal,
+ InlineExternalReferences = inlineExternal
+ };
+
+ IOpenApiWriter writer = openApiFormat switch
+ {
+ OpenApiFormat.Json => terseOutput ? new OpenApiJsonWriter(textWriter, settings, terseOutput) : new OpenApiJsonWriter(textWriter, settings, false),
+ OpenApiFormat.Yaml => new OpenApiYamlWriter(textWriter, settings),
+ _ => throw new ArgumentException("Unknown format"),
+ };
+
+ logger.LogTrace("Serializing to OpenApi document using the provided spec version and writer");
+
+ stopwatch.Start();
+ document.Serialize(writer, openApiVersion);
+ stopwatch.Stop();
+
+ logger.LogTrace($"Finished serializing in {stopwatch.ElapsedMilliseconds}ms");
+ textWriter.Flush();
+ }
+ return 0;
+ }
+ catch (Exception ex)
+ {
+#if DEBUG
+ logger.LogCritical(ex, ex.Message);
+#else
+ logger.LogCritical(ex.Message);
+
+#endif
+ return 1;
+ }
+ }
+
+ private static XslCompiledTransform GetFilterTransform()
+ {
+ XslCompiledTransform transform = new();
+ Assembly assembly = typeof(OpenApiService).GetTypeInfo().Assembly;
+ Stream xslt = assembly.GetManifestResourceStream("Microsoft.OpenApi.Hidi.CsdlFilter.xslt");
+ transform.Load(new XmlTextReader(new StreamReader(xslt)));
+ return transform;
+ }
+
+ private static Stream ApplyFilter(string csdl, string entitySetOrSingleton, XslCompiledTransform transform)
+ {
+ Stream stream;
+ StreamReader inputReader = new(csdl);
+ XmlReader inputXmlReader = XmlReader.Create(inputReader);
+ MemoryStream filteredStream = new();
+ StreamWriter writer = new(filteredStream);
+ XsltArgumentList args = new();
+ args.AddParam("entitySetOrSingleton", "", entitySetOrSingleton);
+ transform.Transform(inputXmlReader, args, writer);
+ stream = filteredStream;
+ return stream;
+ }
+
+
+
+ ///
+ /// Implementation of the validate command
+ ///
+ public static async Task ValidateOpenApiDocument(
+ string openapi,
+ LogLevel loglevel,
+ CancellationToken cancellationToken)
+ {
+ var logger = ConfigureLoggerInstance(loglevel);
+
+ try
+ {
+ if (string.IsNullOrEmpty(openapi))
+ {
+ throw new ArgumentNullException(nameof(openapi));
+ }
+ var stream = await GetStream(openapi, logger, cancellationToken);
+
+ OpenApiDocument document;
+ Stopwatch stopwatch = Stopwatch.StartNew();
+ using (logger.BeginScope($"Parsing OpenAPI: {openapi}", openapi))
+ {
+ stopwatch.Start();
+
+ var result = await new OpenApiStreamReader(new OpenApiReaderSettings
+ {
+ RuleSet = ValidationRuleSet.GetDefaultRuleSet()
+ }
+ ).ReadAsync(stream);
+
+ logger.LogTrace("{timestamp}ms: Completed parsing.", stopwatch.ElapsedMilliseconds);
+
+ document = result.OpenApiDocument;
+ var context = result.OpenApiDiagnostic;
+ if (context.Errors.Count != 0)
+ {
+ using (logger.BeginScope("Detected errors"))
+ {
+ foreach (var error in context.Errors)
+ {
+ logger.LogError(error.ToString());
+ }
+ }
+ }
+ stopwatch.Stop();
+ }
+
+ using (logger.BeginScope("Calculating statistics"))
+ {
+ var statsVisitor = new StatsVisitor();
+ var walker = new OpenApiWalker(statsVisitor);
+ walker.Walk(document);
+
+ logger.LogTrace("Finished walking through the OpenApi document. Generating a statistics report..");
+ logger.LogInformation(statsVisitor.GetStatisticsReport());
+ }
+
+ return 0;
+ }
+ catch (Exception ex)
+ {
+#if DEBUG
+ logger.LogCritical(ex, ex.Message);
+#else
+ logger.LogCritical(ex.Message);
+#endif
+ return 1;
+ }
+
+ }
+
+ ///
+ /// Converts CSDL to OpenAPI
+ ///
+ /// The CSDL stream.
+ /// An OpenAPI document.
+ public static async Task ConvertCsdlToOpenApi(Stream csdl)
+ {
+ using var reader = new StreamReader(csdl);
+ var csdlText = await reader.ReadToEndAsync();
+ var edmModel = CsdlReader.Parse(XElement.Parse(csdlText).CreateReader());
+
+ var settings = new OpenApiConvertSettings()
+ {
+ AddSingleQuotesForStringParameters = true,
+ AddEnumDescriptionExtension = true,
+ DeclarePathParametersOnPathItem = true,
+ EnableKeyAsSegment = true,
+ EnableOperationId = true,
+ ErrorResponsesAsDefault = false,
+ PrefixEntityTypeNameBeforeKey = true,
+ TagDepth = 2,
+ EnablePagination = true,
+ EnableDiscriminatorValue = false,
+ EnableDerivedTypesReferencesForRequestBody = false,
+ EnableDerivedTypesReferencesForResponses = false,
+ ShowRootPath = false,
+ ShowLinks = false
+ };
+ OpenApiDocument document = edmModel.ConvertToOpenApi(settings);
+
+ document = FixReferences(document);
+
+ return document;
+ }
+
+ ///
+ /// Fixes the references in the resulting OpenApiDocument.
+ ///
+ /// The converted OpenApiDocument.
+ /// A valid OpenApiDocument instance.
+ public static OpenApiDocument FixReferences(OpenApiDocument document)
+ {
+ // This method is only needed because the output of ConvertToOpenApi isn't quite a valid OpenApiDocument instance.
+ // So we write it out, and read it back in again to fix it up.
+
+ var sb = new StringBuilder();
+ document.SerializeAsV3(new OpenApiYamlWriter(new StringWriter(sb)));
+ var doc = new OpenApiStringReader().Read(sb.ToString(), out _);
+
+ return doc;
+ }
+
+ private static async Task GetStream(string input, ILogger logger)
+ {
+ var stopwatch = new Stopwatch();
+ stopwatch.Start();
+
+ Stream stream;
+ if (input.StartsWith("http"))
+ {
+ try
+ {
+ var httpClientHandler = new HttpClientHandler()
+ {
+ SslProtocols = System.Security.Authentication.SslProtocols.Tls12,
+ };
+ using var httpClient = new HttpClient(httpClientHandler)
+ {
+ DefaultRequestVersion = HttpVersion.Version20
+ };
+ stream = await httpClient.GetStreamAsync(input);
+ }
+ catch (HttpRequestException ex)
+ {
+ logger.LogError($"Could not download the file at {input}, reason{ex}");
+ return null;
+ }
+ }
+ else
+ {
+ try
+ {
+ var fileInput = new FileInfo(input);
+ stream = fileInput.OpenRead();
+ }
+ catch (Exception ex) when (ex is FileNotFoundException ||
+ ex is PathTooLongException ||
+ ex is DirectoryNotFoundException ||
+ ex is IOException ||
+ ex is UnauthorizedAccessException ||
+ ex is SecurityException ||
+ ex is NotSupportedException)
+ {
+ logger.LogError($"Could not open the file at {input}, reason: {ex.Message}");
+ return null;
+ }
+ }
+ stopwatch.Stop();
+ logger.LogTrace("{timestamp}ms: Read file {input}", stopwatch.ElapsedMilliseconds, input);
+ return stream;
+ }
+
+ ///
+ /// Takes in a file stream, parses the stream into a JsonDocument and gets a list of paths and Http methods
+ ///
+ /// A file stream.
+ /// A dictionary of request urls and http methods from a collection.
+ public static Dictionary> ParseJsonCollectionFile(Stream stream, ILogger logger)
+ {
+ var requestUrls = new Dictionary>();
+
+ logger.LogTrace("Parsing the json collection file into a JsonDocument");
+ using var document = JsonDocument.Parse(stream);
+ var root = document.RootElement;
+
+ requestUrls = EnumerateJsonDocument(root, requestUrls);
+ logger.LogTrace("Finished fetching the list of paths and Http methods defined in the Postman collection.");
+
+ return requestUrls;
+ }
+
+ private static Dictionary> EnumerateJsonDocument(JsonElement itemElement, Dictionary> paths)
+ {
+ var itemsArray = itemElement.GetProperty("item");
+
+ foreach (var item in itemsArray.EnumerateArray())
+ {
+ if(item.ValueKind == JsonValueKind.Object)
+ {
+ if(item.TryGetProperty("request", out var request))
+ {
+ // Fetch list of methods and urls from collection, store them in a dictionary
+ var path = request.GetProperty("url").GetProperty("raw").ToString();
+ var method = request.GetProperty("method").ToString();
+ if (!paths.ContainsKey(path))
+ {
+ paths.Add(path, new List { method });
+ }
+ else
+ {
+ paths[path].Add(method);
+ }
+ }
+ else
+ {
+ EnumerateJsonDocument(item, paths);
+ }
+ }
+ else
+ {
+ EnumerateJsonDocument(item, paths);
+ }
+ }
+
+ return paths;
+ }
+
+ ///
+ /// Fixes the references in the resulting OpenApiDocument.
+ ///
+ /// The converted OpenApiDocument.
+ /// A valid OpenApiDocument instance.
+ // private static OpenApiDocument FixReferences2(OpenApiDocument document)
+ // {
+ // // This method is only needed because the output of ConvertToOpenApi isn't quite a valid OpenApiDocument instance.
+ // // So we write it out, and read it back in again to fix it up.
+
+ // OpenApiDocument document;
+ // logger.LogTrace("Parsing the OpenApi file");
+ // var result = await new OpenApiStreamReader(new OpenApiReaderSettings
+ // {
+ // RuleSet = ValidationRuleSet.GetDefaultRuleSet(),
+ // BaseUrl = new Uri(openapi)
+ // }
+ // ).ReadAsync(stream);
+
+ // document = result.OpenApiDocument;
+ // var context = result.OpenApiDiagnostic;
+ // var sb = new StringBuilder();
+ // document.SerializeAsV3(new OpenApiYamlWriter(new StringWriter(sb)));
+ // var doc = new OpenApiStringReader().Read(sb.ToString(), out _);
+
+ // return doc;
+ // }
+
+ ///
+ /// Reads stream from file system or makes HTTP request depending on the input string
+ ///
+ private static async Task GetStream(string input, ILogger logger, CancellationToken cancellationToken)
+ {
+ Stream stream;
+ using (logger.BeginScope("Reading input stream"))
+ {
+ var stopwatch = new Stopwatch();
+ stopwatch.Start();
+
+ if (input.StartsWith("http"))
+ {
+ try
+ {
+ var httpClientHandler = new HttpClientHandler()
+ {
+ SslProtocols = System.Security.Authentication.SslProtocols.Tls12,
+ };
+ using var httpClient = new HttpClient(httpClientHandler)
+ {
+ DefaultRequestVersion = HttpVersion.Version20
+ };
+ stream = await httpClient.GetStreamAsync(input, cancellationToken);
+ }
+ catch (HttpRequestException ex)
+ {
+ throw new InvalidOperationException($"Could not download the file at {input}", ex);
+ }
+ }
+ else
+ {
+ try
+ {
+ var fileInput = new FileInfo(input);
+ stream = fileInput.OpenRead();
+ }
+ catch (Exception ex) when (ex is FileNotFoundException ||
+ ex is PathTooLongException ||
+ ex is DirectoryNotFoundException ||
+ ex is IOException ||
+ ex is UnauthorizedAccessException ||
+ ex is SecurityException ||
+ ex is NotSupportedException)
+ {
+ throw new InvalidOperationException($"Could not open the file at {input}", ex);
+ }
+ }
+ stopwatch.Stop();
+ logger.LogTrace("{timestamp}ms: Read file {input}", stopwatch.ElapsedMilliseconds, input);
+ }
+ return stream;
+ }
+
+ ///
+ /// Attempt to guess OpenAPI format based in input URL
+ ///
+ ///
+ ///
+ ///
+ private static OpenApiFormat GetOpenApiFormat(string input, ILogger logger)
+ {
+ logger.LogTrace("Getting the OpenApi format");
+ return !input.StartsWith("http") && Path.GetExtension(input) == ".json" ? OpenApiFormat.Json : OpenApiFormat.Yaml;
+ }
+
+ private static ILogger ConfigureLoggerInstance(LogLevel loglevel)
+ {
+ // Configure logger options
+#if DEBUG
+ loglevel = loglevel > LogLevel.Debug ? LogLevel.Debug : loglevel;
+#endif
+
+ var logger = LoggerFactory.Create((builder) => {
+ builder
+ .AddSimpleConsole(c => {
+ c.IncludeScopes = true;
+ })
+#if DEBUG
+ .AddDebug()
+#endif
+ .SetMinimumLevel(loglevel);
+ }).CreateLogger();
+
+ return logger;
+ }
+ }
+}
diff --git a/src/Microsoft.OpenApi.Hidi/OpenApiSpecVersionHelper.cs b/src/Microsoft.OpenApi.Hidi/OpenApiSpecVersionHelper.cs
new file mode 100644
index 000000000..a78255be2
--- /dev/null
+++ b/src/Microsoft.OpenApi.Hidi/OpenApiSpecVersionHelper.cs
@@ -0,0 +1,31 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT license.
+
+using System;
+using System.Linq;
+
+namespace Microsoft.OpenApi.Hidi
+{
+ public static class OpenApiSpecVersionHelper
+ {
+ public static OpenApiSpecVersion TryParseOpenApiSpecVersion(string value)
+ {
+ if (string.IsNullOrEmpty(value))
+ {
+ throw new InvalidOperationException("Please provide a version");
+ }
+ var res = value.Split('.', StringSplitOptions.RemoveEmptyEntries).FirstOrDefault();
+
+ if (int.TryParse(res, out int result))
+ {
+
+ if (result >= 2 && result < 3)
+ {
+ return OpenApiSpecVersion.OpenApi2_0;
+ }
+ }
+
+ return OpenApiSpecVersion.OpenApi3_0; // default
+ }
+ }
+}
diff --git a/src/Microsoft.OpenApi.Hidi/Program.cs b/src/Microsoft.OpenApi.Hidi/Program.cs
new file mode 100644
index 000000000..80a4c2e14
--- /dev/null
+++ b/src/Microsoft.OpenApi.Hidi/Program.cs
@@ -0,0 +1,102 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT license.
+
+using System;
+using System.CommandLine;
+using System.IO;
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.Extensions.Logging;
+
+namespace Microsoft.OpenApi.Hidi
+{
+ static class Program
+ {
+ static async Task Main(string[] args)
+ {
+ var rootCommand = new RootCommand() {
+ };
+
+ // command option parameters and aliases
+ var descriptionOption = new Option("--openapi", "Input OpenAPI description file path or URL");
+ descriptionOption.AddAlias("-d");
+
+ var csdlOption = new Option("--csdl", "Input CSDL file path or URL");
+ csdlOption.AddAlias("-cs");
+
+ var csdlFilterOption = new Option("--csdl-filter", "Comma delimited list of EntitySets or Singletons to filter CSDL on. e.g. tasks,accounts");
+ csdlFilterOption.AddAlias("-csf");
+
+ var outputOption = new Option("--output", () => new FileInfo("./output"), "The output directory path for the generated file.") { Arity = ArgumentArity.ZeroOrOne };
+ outputOption.AddAlias("-o");
+
+ var cleanOutputOption = new Option("--clean-output", "Overwrite an existing file");
+ cleanOutputOption.AddAlias("-co");
+
+ var versionOption = new Option("--version", "OpenAPI specification version");
+ versionOption.AddAlias("-v");
+
+ var formatOption = new Option("--format", "File format");
+ formatOption.AddAlias("-f");
+
+ var terseOutputOption = new Option("--terse-output", "Produce terse json output");
+ terseOutputOption.AddAlias("-to");
+
+ var logLevelOption = new Option("--loglevel", () => LogLevel.Information, "The log level to use when logging messages to the main output.");
+ logLevelOption.AddAlias("-ll");
+
+ var filterByOperationIdsOption = new Option("--filter-by-operationids", "Filters OpenApiDocument by comma delimited list of OperationId(s) provided");
+ filterByOperationIdsOption.AddAlias("-op");
+
+ var filterByTagsOption = new Option("--filter-by-tags", "Filters OpenApiDocument by comma delimited list of Tag(s) provided. Also accepts a single regex.");
+ filterByTagsOption.AddAlias("-t");
+
+ var filterByCollectionOption = new Option("--filter-by-collection", "Filters OpenApiDocument by Postman collection provided. Provide path to collection file.");
+ filterByCollectionOption.AddAlias("-c");
+
+ var inlineLocalOption = new Option("--inlineLocal", "Inline local $ref instances");
+ inlineLocalOption.AddAlias("-il");
+
+ var inlineExternalOption = new Option("--inlineExternal", "Inline external $ref instances");
+ inlineExternalOption.AddAlias("-ie");
+
+ var validateCommand = new Command("validate")
+ {
+ descriptionOption,
+ logLevelOption
+ };
+
+ validateCommand.SetHandler(OpenApiService.ValidateOpenApiDocument, descriptionOption, logLevelOption);
+
+ var transformCommand = new Command("transform")
+ {
+ descriptionOption,
+ csdlOption,
+ csdlFilterOption,
+ outputOption,
+ cleanOutputOption,
+ versionOption,
+ formatOption,
+ terseOutputOption,
+ logLevelOption,
+ filterByOperationIdsOption,
+ filterByTagsOption,
+ filterByCollectionOption,
+ inlineLocalOption,
+ inlineExternalOption
+ };
+
+ transformCommand.SetHandler (
+ OpenApiService.TransformOpenApiDocument, descriptionOption, csdlOption, csdlFilterOption, outputOption, cleanOutputOption, versionOption, formatOption, terseOutputOption, logLevelOption, inlineLocalOption, inlineExternalOption, filterByOperationIdsOption, filterByTagsOption, filterByCollectionOption);
+
+ rootCommand.Add(transformCommand);
+ rootCommand.Add(validateCommand);
+
+ // Parse the incoming args and invoke the handler
+ await rootCommand.InvokeAsync(args);
+
+ //// Wait for logger to write messages to the console before exiting
+ await Task.Delay(10);
+ }
+ }
+}
diff --git a/src/Microsoft.OpenApi.Tool/StatsVisitor.cs b/src/Microsoft.OpenApi.Hidi/StatsVisitor.cs
similarity index 95%
rename from src/Microsoft.OpenApi.Tool/StatsVisitor.cs
rename to src/Microsoft.OpenApi.Hidi/StatsVisitor.cs
index 3c633d860..b05b0de7c 100644
--- a/src/Microsoft.OpenApi.Tool/StatsVisitor.cs
+++ b/src/Microsoft.OpenApi.Hidi/StatsVisitor.cs
@@ -3,13 +3,10 @@
using System;
using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.Services;
-namespace Microsoft.OpenApi.Tool
+namespace Microsoft.OpenApi.Hidi
{
internal class StatsVisitor : OpenApiVisitorBase
{
diff --git a/src/Microsoft.OpenApi.Readers/Microsoft.OpenApi.Readers.csproj b/src/Microsoft.OpenApi.Readers/Microsoft.OpenApi.Readers.csproj
index c52601ebb..440180d88 100644
--- a/src/Microsoft.OpenApi.Readers/Microsoft.OpenApi.Readers.csproj
+++ b/src/Microsoft.OpenApi.Readers/Microsoft.OpenApi.Readers.csproj
@@ -10,14 +10,14 @@
Microsoft
Microsoft.OpenApi.Readers
Microsoft.OpenApi.Readers
- 1.3.0-preview
+ 1.3.1
OpenAPI.NET Readers for JSON and YAML documents
© Microsoft Corporation. All rights reserved.
OpenAPI .NET
https://github.com/Microsoft/OpenAPI.NET
- Publish symbols.
-
+
Microsoft.OpenApi.Readers
Microsoft.OpenApi.Readers
true
@@ -36,11 +36,11 @@
-
+
-
+
@@ -66,4 +66,4 @@
SRResource.Designer.cs
-
+
\ No newline at end of file
diff --git a/src/Microsoft.OpenApi.Readers/OpenApiDiagnostic.cs b/src/Microsoft.OpenApi.Readers/OpenApiDiagnostic.cs
index ea11c7939..c3178ccfb 100644
--- a/src/Microsoft.OpenApi.Readers/OpenApiDiagnostic.cs
+++ b/src/Microsoft.OpenApi.Readers/OpenApiDiagnostic.cs
@@ -17,6 +17,11 @@ public class OpenApiDiagnostic : IDiagnostic
///
public IList Errors { get; set; } = new List();
+ ///
+ /// List of all warnings
+ ///
+ public IList Warnings { get; set; } = new List();
+
///
/// Open API specification version of the document parsed.
///
diff --git a/src/Microsoft.OpenApi.Readers/OpenApiReaderSettings.cs b/src/Microsoft.OpenApi.Readers/OpenApiReaderSettings.cs
index 732708459..12ccdb681 100644
--- a/src/Microsoft.OpenApi.Readers/OpenApiReaderSettings.cs
+++ b/src/Microsoft.OpenApi.Readers/OpenApiReaderSettings.cs
@@ -4,15 +4,10 @@
using Microsoft.OpenApi.Any;
using Microsoft.OpenApi.Interfaces;
using Microsoft.OpenApi.Readers.Interface;
-using Microsoft.OpenApi.Readers.ParseNodes;
-using Microsoft.OpenApi.Readers.Services;
using Microsoft.OpenApi.Validations;
using System;
using System.Collections.Generic;
using System.IO;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace Microsoft.OpenApi.Readers
{
@@ -30,7 +25,7 @@ public enum ReferenceResolutionSetting
///
ResolveLocalReferences,
///
- /// Convert all references to references of valid domain objects.
+ /// ResolveAllReferences effectively means load external references. Will be removed in v2. External references are never "resolved".
///
ResolveAllReferences
}
@@ -43,8 +38,14 @@ public class OpenApiReaderSettings
///
/// Indicates how references in the source document should be handled.
///
+ /// This setting will be going away in the next major version of this library. Use GetEffective on model objects to get resolved references.
public ReferenceResolutionSetting ReferenceResolution { get; set; } = ReferenceResolutionSetting.ResolveLocalReferences;
+ ///
+ /// When external references are found, load them into a shared workspace
+ ///
+ public bool LoadExternalRefs { get; set; } = false;
+
///
/// Dictionary of parsers for converting extensions into strongly typed classes
///
diff --git a/src/Microsoft.OpenApi.Readers/OpenApiStreamReader.cs b/src/Microsoft.OpenApi.Readers/OpenApiStreamReader.cs
index cccf06a68..13bdbdef8 100644
--- a/src/Microsoft.OpenApi.Readers/OpenApiStreamReader.cs
+++ b/src/Microsoft.OpenApi.Readers/OpenApiStreamReader.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
+using System;
using System.IO;
using System.Threading.Tasks;
using Microsoft.OpenApi.Interfaces;
@@ -23,6 +24,12 @@ public class OpenApiStreamReader : IOpenApiReader
public OpenApiStreamReader(OpenApiReaderSettings settings = null)
{
_settings = settings ?? new OpenApiReaderSettings();
+
+ if((_settings.ReferenceResolution == ReferenceResolutionSetting.ResolveAllReferences || _settings.LoadExternalRefs)
+ && _settings.BaseUrl == null)
+ {
+ throw new ArgumentException("BaseUrl must be provided to resolve external references.");
+ }
}
///
diff --git a/src/Microsoft.OpenApi.Readers/OpenApiYamlDocumentReader.cs b/src/Microsoft.OpenApi.Readers/OpenApiYamlDocumentReader.cs
index bb00fb370..aae09ec86 100644
--- a/src/Microsoft.OpenApi.Readers/OpenApiYamlDocumentReader.cs
+++ b/src/Microsoft.OpenApi.Readers/OpenApiYamlDocumentReader.cs
@@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
using System.IO;
+using System.Linq;
using System.Threading.Tasks;
using Microsoft.OpenApi.Exceptions;
using Microsoft.OpenApi.Extensions;
@@ -12,6 +13,7 @@
using Microsoft.OpenApi.Readers.Interface;
using Microsoft.OpenApi.Readers.Services;
using Microsoft.OpenApi.Services;
+using Microsoft.OpenApi.Validations;
using SharpYaml.Serialization;
namespace Microsoft.OpenApi.Readers
@@ -53,6 +55,11 @@ public OpenApiDocument Read(YamlDocument input, out OpenApiDiagnostic diagnostic
// Parse the OpenAPI Document
document = context.Parse(input);
+ if (_settings.LoadExternalRefs)
+ {
+ throw new InvalidOperationException("Cannot load external refs using the synchronous Read, use ReadAsync instead.");
+ }
+
ResolveReferences(diagnostic, document);
}
catch (OpenApiException ex)
@@ -63,11 +70,16 @@ public OpenApiDocument Read(YamlDocument input, out OpenApiDiagnostic diagnostic
// Validate the document
if (_settings.RuleSet != null && _settings.RuleSet.Rules.Count > 0)
{
- var errors = document.Validate(_settings.RuleSet);
- foreach (var item in errors)
+ var openApiErrors = document.Validate(_settings.RuleSet);
+ foreach (var item in openApiErrors.Where(e => e is OpenApiValidatorError))
{
diagnostic.Errors.Add(item);
}
+ foreach (var item in openApiErrors.Where(e => e is OpenApiValidatorWarning))
+ {
+ diagnostic.Warnings.Add(item);
+ }
+
}
return document;
@@ -88,7 +100,12 @@ public async Task ReadAsync(YamlDocument input)
// Parse the OpenAPI Document
document = context.Parse(input);
- await ResolveReferencesAsync(diagnostic, document);
+ if (_settings.LoadExternalRefs)
+ {
+ await LoadExternalRefs(document);
+ }
+
+ ResolveReferences(diagnostic, document);
}
catch (OpenApiException ex)
{
@@ -112,28 +129,18 @@ public async Task ReadAsync(YamlDocument input)
};
}
-
- private void ResolveReferences(OpenApiDiagnostic diagnostic, OpenApiDocument document)
+ private async Task LoadExternalRefs(OpenApiDocument document)
{
- // Resolve References if requested
- switch (_settings.ReferenceResolution)
- {
- case ReferenceResolutionSetting.ResolveAllReferences:
- throw new ArgumentException("Cannot resolve all references via a synchronous call. Use ReadAsync.");
- case ReferenceResolutionSetting.ResolveLocalReferences:
- var errors = document.ResolveReferences(false);
+ // Create workspace for all documents to live in.
+ var openApiWorkSpace = new OpenApiWorkspace();
- foreach (var item in errors)
- {
- diagnostic.Errors.Add(item);
- }
- break;
- case ReferenceResolutionSetting.DoNotResolveReferences:
- break;
- }
+ // Load this root document into the workspace
+ var streamLoader = new DefaultStreamLoader(_settings.BaseUrl);
+ var workspaceLoader = new OpenApiWorkspaceLoader(openApiWorkSpace, _settings.CustomExternalLoader ?? streamLoader, _settings);
+ await workspaceLoader.LoadAsync(new OpenApiReference() { ExternalResource = "/" }, document);
}
- private async Task ResolveReferencesAsync(OpenApiDiagnostic diagnostic, OpenApiDocument document)
+ private void ResolveReferences(OpenApiDiagnostic diagnostic, OpenApiDocument document)
{
List errors = new List();
@@ -141,23 +148,9 @@ private async Task ResolveReferencesAsync(OpenApiDiagnostic diagnostic, OpenApiD
switch (_settings.ReferenceResolution)
{
case ReferenceResolutionSetting.ResolveAllReferences:
-
- // Create workspace for all documents to live in.
- var openApiWorkSpace = new OpenApiWorkspace();
-
- // Load this root document into the workspace
- var streamLoader = new DefaultStreamLoader();
- var workspaceLoader = new OpenApiWorkspaceLoader(openApiWorkSpace, _settings.CustomExternalLoader ?? streamLoader, _settings);
- await workspaceLoader.LoadAsync(new OpenApiReference() { ExternalResource = "/" }, document);
-
- // Resolve all references in all the documents loaded into the OpenApiWorkspace
- foreach (var doc in openApiWorkSpace.Documents)
- {
- errors.AddRange(doc.ResolveReferences(true));
- }
- break;
+ throw new ArgumentException("Resolving external references is not supported");
case ReferenceResolutionSetting.ResolveLocalReferences:
- errors.AddRange(document.ResolveReferences(false));
+ errors.AddRange(document.ResolveReferences());
break;
case ReferenceResolutionSetting.DoNotResolveReferences:
break;
diff --git a/src/Microsoft.OpenApi.Readers/ParsingContext.cs b/src/Microsoft.OpenApi.Readers/ParsingContext.cs
index b7cfb6acb..6c4dece2f 100644
--- a/src/Microsoft.OpenApi.Readers/ParsingContext.cs
+++ b/src/Microsoft.OpenApi.Readers/ParsingContext.cs
@@ -60,13 +60,13 @@ internal OpenApiDocument Parse(YamlDocument yamlDocument)
switch (inputVersion)
{
case string version when version == "2.0":
- VersionService = new OpenApiV2VersionService();
+ VersionService = new OpenApiV2VersionService(Diagnostic);
doc = VersionService.LoadDocument(RootNode);
this.Diagnostic.SpecificationVersion = OpenApiSpecVersion.OpenApi2_0;
break;
case string version when version.StartsWith("3.0"):
- VersionService = new OpenApiV3VersionService();
+ VersionService = new OpenApiV3VersionService(Diagnostic);
doc = VersionService.LoadDocument(RootNode);
this.Diagnostic.SpecificationVersion = OpenApiSpecVersion.OpenApi3_0;
break;
@@ -93,12 +93,12 @@ internal T ParseFragment(YamlDocument yamlDocument, OpenApiSpecVersion versio
switch (version)
{
case OpenApiSpecVersion.OpenApi2_0:
- VersionService = new OpenApiV2VersionService();
+ VersionService = new OpenApiV2VersionService(Diagnostic);
element = this.VersionService.LoadElement(node);
break;
case OpenApiSpecVersion.OpenApi3_0:
- this.VersionService = new OpenApiV3VersionService();
+ this.VersionService = new OpenApiV3VersionService(Diagnostic);
element = this.VersionService.LoadElement(node);
break;
}
diff --git a/src/Microsoft.OpenApi.Readers/Services/DefaultStreamLoader.cs b/src/Microsoft.OpenApi.Readers/Services/DefaultStreamLoader.cs
index 4659db711..09f16632b 100644
--- a/src/Microsoft.OpenApi.Readers/Services/DefaultStreamLoader.cs
+++ b/src/Microsoft.OpenApi.Readers/Services/DefaultStreamLoader.cs
@@ -14,18 +14,25 @@ namespace Microsoft.OpenApi.Readers.Services
///
internal class DefaultStreamLoader : IStreamLoader
{
+ private readonly Uri baseUrl;
private HttpClient _httpClient = new HttpClient();
+
+ public DefaultStreamLoader(Uri baseUrl)
+ {
+ this.baseUrl = baseUrl;
+ }
+
public Stream Load(Uri uri)
{
+ var absoluteUri = new Uri(baseUrl, uri);
switch (uri.Scheme)
{
case "file":
- return File.OpenRead(uri.AbsolutePath);
+ return File.OpenRead(absoluteUri.AbsolutePath);
case "http":
case "https":
- return _httpClient.GetStreamAsync(uri).GetAwaiter().GetResult();
-
+ return _httpClient.GetStreamAsync(absoluteUri).GetAwaiter().GetResult();
default:
throw new ArgumentException("Unsupported scheme");
}
@@ -33,13 +40,15 @@ public Stream Load(Uri uri)
public async Task LoadAsync(Uri uri)
{
- switch (uri.Scheme)
+ var absoluteUri = new Uri(baseUrl, uri);
+
+ switch (absoluteUri.Scheme)
{
case "file":
- return File.OpenRead(uri.AbsolutePath);
+ return File.OpenRead(absoluteUri.AbsolutePath);
case "http":
case "https":
- return await _httpClient.GetStreamAsync(uri);
+ return await _httpClient.GetStreamAsync(absoluteUri);
default:
throw new ArgumentException("Unsupported scheme");
}
diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiSecuritySchemeDeserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiSecuritySchemeDeserializer.cs
index 7e0c6c1dc..b2aab773c 100644
--- a/src/Microsoft.OpenApi.Readers/V2/OpenApiSecuritySchemeDeserializer.cs
+++ b/src/Microsoft.OpenApi.Readers/V2/OpenApiSecuritySchemeDeserializer.cs
@@ -30,7 +30,7 @@ internal static partial class OpenApiV2Deserializer
{
case "basic":
o.Type = SecuritySchemeType.Http;
- o.Scheme = "basic";
+ o.Scheme = OpenApiConstants.Basic;
break;
case "apiKey":
diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiV2VersionService.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiV2VersionService.cs
index 5baa580af..c4d765734 100644
--- a/src/Microsoft.OpenApi.Readers/V2/OpenApiV2VersionService.cs
+++ b/src/Microsoft.OpenApi.Readers/V2/OpenApiV2VersionService.cs
@@ -20,6 +20,17 @@ namespace Microsoft.OpenApi.Readers.V2
///
internal class OpenApiV2VersionService : IOpenApiVersionService
{
+ public OpenApiDiagnostic Diagnostic { get; }
+
+ ///
+ /// Create Parsing Context
+ ///
+ /// Provide instance for diagnotic object for collecting and accessing information about the parsing.
+ public OpenApiV2VersionService(OpenApiDiagnostic diagnostic)
+ {
+ Diagnostic = diagnostic;
+ }
+
private IDictionary> _loaders = new Dictionary>
{
[typeof(IOpenApiAny)] = OpenApiV2Deserializer.LoadAny,
@@ -119,6 +130,30 @@ private static string GetReferenceTypeV2Name(ReferenceType referenceType)
}
}
+ private static ReferenceType GetReferenceTypeV2FromName(string referenceType)
+ {
+ switch (referenceType)
+ {
+ case "definitions":
+ return ReferenceType.Schema;
+
+ case "parameters":
+ return ReferenceType.Parameter;
+
+ case "responses":
+ return ReferenceType.Response;
+
+ case "tags":
+ return ReferenceType.Tag;
+
+ case "securityDefinitions":
+ return ReferenceType.SecurityScheme;
+
+ default:
+ throw new ArgumentException();
+ }
+ }
+
///
/// Parse the string to a object.
///
@@ -154,15 +189,45 @@ public OpenApiReference ConvertToOpenApiReference(string reference, ReferenceTyp
if (reference.StartsWith("#"))
{
// "$ref": "#/definitions/Pet"
- return ParseLocalReference(segments[1]);
+ try
+ {
+ return ParseLocalReference(segments[1]);
+ }
+ catch (OpenApiException ex)
+ {
+ Diagnostic.Errors.Add(new OpenApiError(ex));
+ return null;
+ }
}
+ // Where fragments point into a non-OpenAPI document, the id will be the complete fragment identifier
+ string id = segments[1];
+ // $ref: externalSource.yaml#/Pet
+ if (id.StartsWith("/definitions/"))
+ {
+ var localSegments = id.Split('/');
+ var referencedType = GetReferenceTypeV2FromName(localSegments[1]);
+ if (type == null)
+ {
+ type = referencedType;
+ }
+ else
+ {
+ if (type != referencedType)
+ {
+ throw new OpenApiException("Referenced type mismatch");
+ }
+ }
+ id = localSegments[2];
+ }
+
+
// $ref: externalSource.yaml#/Pet
return new OpenApiReference
{
ExternalResource = segments[0],
Type = type,
- Id = segments[1].Substring(1)
+ Id = id
};
}
}
diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiEncodingDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiEncodingDeserializer.cs
index b3bda4b61..fc2f990e7 100644
--- a/src/Microsoft.OpenApi.Readers/V3/OpenApiEncodingDeserializer.cs
+++ b/src/Microsoft.OpenApi.Readers/V3/OpenApiEncodingDeserializer.cs
@@ -31,15 +31,7 @@ internal static partial class OpenApiV3Deserializer
{
"style", (o, n) =>
{
- ParameterStyle style;
- if (Enum.TryParse(n.GetScalarValue(), out style))
- {
- o.Style = style;
- }
- else
- {
- o.Style = null;
- }
+ o.Style = n.GetScalarValue().GetEnumFromDisplayName();
}
},
{
diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiMediaTypeDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiMediaTypeDeserializer.cs
index 695f1cc1b..c8bd3d240 100644
--- a/src/Microsoft.OpenApi.Readers/V3/OpenApiMediaTypeDeserializer.cs
+++ b/src/Microsoft.OpenApi.Readers/V3/OpenApiMediaTypeDeserializer.cs
@@ -81,11 +81,6 @@ public static OpenApiMediaType LoadMediaType(ParseNode node)
{
var mapNode = node.CheckMapNode(OpenApiConstants.Content);
- if (!mapNode.Any())
- {
- return null;
- }
-
var mediaType = new OpenApiMediaType();
ParseMap(mapNode, mediaType, _mediaTypeFixedFields, _mediaTypePatternFields);
diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiV3VersionService.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiV3VersionService.cs
index 2663b6a3b..c967cde55 100644
--- a/src/Microsoft.OpenApi.Readers/V3/OpenApiV3VersionService.cs
+++ b/src/Microsoft.OpenApi.Readers/V3/OpenApiV3VersionService.cs
@@ -19,6 +19,17 @@ namespace Microsoft.OpenApi.Readers.V3
///
internal class OpenApiV3VersionService : IOpenApiVersionService
{
+ public OpenApiDiagnostic Diagnostic { get; }
+
+ ///
+ /// Create Parsing Context
+ ///
+ /// Provide instance for diagnotic object for collecting and accessing information about the parsing.
+ public OpenApiV3VersionService(OpenApiDiagnostic diagnostic)
+ {
+ Diagnostic = diagnostic;
+ }
+
private IDictionary> _loaders = new Dictionary>
{
[typeof(IOpenApiAny)] = OpenApiV3Deserializer.LoadAny,
@@ -53,6 +64,8 @@ internal class OpenApiV3VersionService : IOpenApiVersionService
///
/// Parse the string to a object.
///
+ /// The URL of the reference
+ /// The type of object refefenced based on the context of the reference
public OpenApiReference ConvertToOpenApiReference(
string reference,
ReferenceType? type)
@@ -62,18 +75,6 @@ public OpenApiReference ConvertToOpenApiReference(
var segments = reference.Split('#');
if (segments.Length == 1)
{
- // Either this is an external reference as an entire file
- // or a simple string-style reference for tag and security scheme.
- if (type == null)
- {
- // "$ref": "Pet.json"
- return new OpenApiReference
- {
- Type = type,
- ExternalResource = segments[0]
- };
- }
-
if (type == ReferenceType.Tag || type == ReferenceType.SecurityScheme)
{
return new OpenApiReference
@@ -82,21 +83,51 @@ public OpenApiReference ConvertToOpenApiReference(
Id = reference
};
}
+
+ // Either this is an external reference as an entire file
+ // or a simple string-style reference for tag and security scheme.
+ return new OpenApiReference
+ {
+ Type = type,
+ ExternalResource = segments[0]
+ };
}
else if (segments.Length == 2)
{
if (reference.StartsWith("#"))
{
// "$ref": "#/components/schemas/Pet"
- return ParseLocalReference(segments[1]);
+ try
+ {
+ return ParseLocalReference(segments[1]);
+ }
+ catch (OpenApiException ex)
+ {
+ Diagnostic.Errors.Add(new OpenApiError(ex));
+ return null;
+ }
}
// Where fragments point into a non-OpenAPI document, the id will be the complete fragment identifier
string id = segments[1];
// $ref: externalSource.yaml#/Pet
if (id.StartsWith("/components/"))
{
- id = segments[1].Split('/')[3];
- }
+ var localSegments = segments[1].Split('/');
+ var referencedType = localSegments[2].GetEnumFromDisplayName();
+ if (type == null)
+ {
+ type = referencedType;
+ }
+ else
+ {
+ if (type != referencedType)
+ {
+ throw new OpenApiException("Referenced type mismatch");
+ }
+ }
+ id = localSegments[3];
+ }
+
return new OpenApiReference
{
ExternalResource = segments[0],
diff --git a/src/Microsoft.OpenApi.Tool/Microsoft.OpenApi.Tool.csproj b/src/Microsoft.OpenApi.Tool/Microsoft.OpenApi.Tool.csproj
deleted file mode 100644
index 40e46f1a4..000000000
--- a/src/Microsoft.OpenApi.Tool/Microsoft.OpenApi.Tool.csproj
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
- Exe
- netcoreapp3.1
- true
- openapi-parser
- ./../../artifacts
- 1.3.0-preview
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Microsoft.OpenApi.Tool/OpenApiService.cs b/src/Microsoft.OpenApi.Tool/OpenApiService.cs
deleted file mode 100644
index c52c08941..000000000
--- a/src/Microsoft.OpenApi.Tool/OpenApiService.cs
+++ /dev/null
@@ -1,150 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Net;
-using System.Net.Http;
-using System.Text;
-using Microsoft.OpenApi.Extensions;
-using Microsoft.OpenApi.Models;
-using Microsoft.OpenApi.Readers;
-using Microsoft.OpenApi.Services;
-using Microsoft.OpenApi.Validations;
-using Microsoft.OpenApi.Writers;
-
-namespace Microsoft.OpenApi.Tool
-{
- static class OpenApiService
- {
- public static void ProcessOpenApiDocument(
- string input,
- FileInfo output,
- OpenApiSpecVersion version,
- OpenApiFormat format,
- bool inline,
- bool resolveExternal)
- {
- if (input == null)
- {
- throw new ArgumentNullException("input");
- }
-
- var stream = GetStream(input);
-
- OpenApiDocument document;
-
- var result = new OpenApiStreamReader(new OpenApiReaderSettings
- {
- ReferenceResolution = resolveExternal == true ? ReferenceResolutionSetting.ResolveAllReferences : ReferenceResolutionSetting.ResolveLocalReferences,
- RuleSet = ValidationRuleSet.GetDefaultRuleSet()
- }
- ).ReadAsync(stream).GetAwaiter().GetResult();
-
- document = result.OpenApiDocument;
- var context = result.OpenApiDiagnostic;
-
- if (context.Errors.Count != 0)
- {
- var errorReport = new StringBuilder();
-
- foreach (var error in context.Errors)
- {
- errorReport.AppendLine(error.ToString());
- }
-
- throw new ArgumentException(String.Join(Environment.NewLine, context.Errors.Select(e => e.Message).ToArray()));
- }
-
- using (var outputStream = output?.Create())
- {
- TextWriter textWriter;
-
- if (outputStream != null)
- {
- textWriter = new StreamWriter(outputStream);
- }
- else
- {
- textWriter = Console.Out;
- }
-
- var settings = new OpenApiWriterSettings()
- {
- ReferenceInline = inline == true ? ReferenceInlineSetting.InlineLocalReferences : ReferenceInlineSetting.DoNotInlineReferences
- };
- IOpenApiWriter writer;
- switch (format)
- {
- case OpenApiFormat.Json:
- writer = new OpenApiJsonWriter(textWriter, settings);
- break;
- case OpenApiFormat.Yaml:
- writer = new OpenApiYamlWriter(textWriter, settings);
- break;
- default:
- throw new ArgumentException("Unknown format");
- }
-
- document.Serialize(writer, version);
-
- textWriter.Flush();
- }
- }
-
- private static Stream GetStream(string input)
- {
- Stream stream;
- if (input.StartsWith("http"))
- {
- var httpClient = new HttpClient(new HttpClientHandler()
- {
- SslProtocols = System.Security.Authentication.SslProtocols.Tls12,
- })
- {
- DefaultRequestVersion = HttpVersion.Version20
- };
- stream = httpClient.GetStreamAsync(input).Result;
- }
- else
- {
- var fileInput = new FileInfo(input);
- stream = fileInput.OpenRead();
- }
-
- return stream;
- }
-
- internal static void ValidateOpenApiDocument(string input)
- {
- if (input == null)
- {
- throw new ArgumentNullException("input");
- }
-
- var stream = GetStream(input);
-
- OpenApiDocument document;
-
- document = new OpenApiStreamReader(new OpenApiReaderSettings
- {
- //ReferenceResolution = resolveExternal == true ? ReferenceResolutionSetting.ResolveAllReferences : ReferenceResolutionSetting.ResolveLocalReferences,
- RuleSet = ValidationRuleSet.GetDefaultRuleSet()
- }
- ).Read(stream, out var context);
-
- if (context.Errors.Count != 0)
- {
- foreach (var error in context.Errors)
- {
- Console.WriteLine(error.ToString());
- }
- }
-
- var statsVisitor = new StatsVisitor();
- var walker = new OpenApiWalker(statsVisitor);
- walker.Walk(document);
-
- Console.WriteLine(statsVisitor.GetStatisticsReport());
- }
- }
-}
diff --git a/src/Microsoft.OpenApi.Tool/Program.cs b/src/Microsoft.OpenApi.Tool/Program.cs
deleted file mode 100644
index 446e2829a..000000000
--- a/src/Microsoft.OpenApi.Tool/Program.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-using System;
-using System.CommandLine;
-using System.CommandLine.Invocation;
-using System.IO;
-using System.Threading.Tasks;
-using Microsoft.OpenApi;
-
-namespace Microsoft.OpenApi.Tool
-{
- class Program
- {
- static async Task OldMain(string[] args)
- {
-
- var command = new RootCommand
- {
- new Option("--input", "Input OpenAPI description file path or URL", typeof(string) ),
- new Option("--output","Output OpenAPI description file", typeof(FileInfo), arity: ArgumentArity.ZeroOrOne),
- new Option("--version", "OpenAPI specification version", typeof(OpenApiSpecVersion)),
- new Option("--format", "File format",typeof(OpenApiFormat) ),
- new Option("--inline", "Inline $ref instances", typeof(bool) ),
- new Option("--resolveExternal","Resolve external $refs", typeof(bool))
- };
-
- command.Handler = CommandHandler.Create(
- OpenApiService.ProcessOpenApiDocument);
-
- // Parse the incoming args and invoke the handler
- return await command.InvokeAsync(args);
- }
-
- static async Task Main(string[] args)
- {
- var rootCommand = new RootCommand() {
- };
-
- var validateCommand = new Command("validate")
- {
- new Option("--input", "Input OpenAPI description file path or URL", typeof(string) )
- };
- validateCommand.Handler = CommandHandler.Create(OpenApiService.ValidateOpenApiDocument);
-
- var transformCommand = new Command("transform")
- {
- new Option("--input", "Input OpenAPI description file path or URL", typeof(string) ),
- new Option("--output","Output OpenAPI description file", typeof(FileInfo), arity: ArgumentArity.ZeroOrOne),
- new Option("--version", "OpenAPI specification version", typeof(OpenApiSpecVersion)),
- new Option("--format", "File format",typeof(OpenApiFormat) ),
- new Option("--inline", "Inline $ref instances", typeof(bool) ),
- new Option("--resolveExternal","Resolve external $refs", typeof(bool))
- };
- transformCommand.Handler = CommandHandler.Create(
- OpenApiService.ProcessOpenApiDocument);
-
- rootCommand.Add(transformCommand);
- rootCommand.Add(validateCommand);
-
- // Parse the incoming args and invoke the handler
- return await rootCommand.InvokeAsync(args);
- }
- }
-}
diff --git a/src/Microsoft.OpenApi.Workbench/App.config b/src/Microsoft.OpenApi.Workbench/App.config
deleted file mode 100644
index 4bfa00561..000000000
--- a/src/Microsoft.OpenApi.Workbench/App.config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/src/Microsoft.OpenApi.Workbench/App.xaml b/src/Microsoft.OpenApi.Workbench/App.xaml
index 40e1d5bad..d4fbb4a0c 100644
--- a/src/Microsoft.OpenApi.Workbench/App.xaml
+++ b/src/Microsoft.OpenApi.Workbench/App.xaml
@@ -3,12 +3,4 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Microsoft.OpenApi.Workbench"
StartupUri="MainWindow.xaml">
-
-
-
-
-
-
-
-
diff --git a/src/Microsoft.OpenApi.Workbench/EnumBindingSourceExtension.cs b/src/Microsoft.OpenApi.Workbench/EnumBindingSourceExtension.cs
new file mode 100644
index 000000000..d1f8bd798
--- /dev/null
+++ b/src/Microsoft.OpenApi.Workbench/EnumBindingSourceExtension.cs
@@ -0,0 +1,53 @@
+// Thanks Brian! https://brianlagunas.com/a-better-way-to-data-bind-enums-in-wpf/
+using System;
+using System.Windows.Markup;
+
+namespace Microsoft.OpenApi.Workbench
+{
+ public class EnumBindingSourceExtension : MarkupExtension
+ {
+ private Type _enumType;
+ public Type EnumType
+ {
+ get { return this._enumType; }
+ set
+ {
+ if (value != this._enumType)
+ {
+ if (null != value)
+ {
+ Type enumType = Nullable.GetUnderlyingType(value) ?? value;
+ if (!enumType.IsEnum)
+ throw new ArgumentException("Type must be for an Enum.");
+ }
+
+ this._enumType = value;
+ }
+ }
+ }
+
+ public EnumBindingSourceExtension() { }
+
+ public EnumBindingSourceExtension(Type enumType)
+ {
+ this.EnumType = enumType;
+ }
+
+ public override object ProvideValue(IServiceProvider serviceProvider)
+ {
+ if (null == this._enumType)
+ throw new InvalidOperationException("The EnumType must be specified.");
+
+ Type actualEnumType = Nullable.GetUnderlyingType(this._enumType) ?? this._enumType;
+ Array enumValues = Enum.GetValues(actualEnumType);
+
+ if (actualEnumType == this._enumType)
+ return enumValues;
+
+ Array tempArray = Array.CreateInstance(actualEnumType, enumValues.Length + 1);
+ enumValues.CopyTo(tempArray, 1);
+ return tempArray;
+ }
+ }
+
+}
diff --git a/src/Microsoft.OpenApi.Workbench/MainModel.cs b/src/Microsoft.OpenApi.Workbench/MainModel.cs
index 6304b7f23..70074736b 100644
--- a/src/Microsoft.OpenApi.Workbench/MainModel.cs
+++ b/src/Microsoft.OpenApi.Workbench/MainModel.cs
@@ -1,4 +1,4 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
+// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
using System;
@@ -6,7 +6,9 @@
using System.Diagnostics;
using System.Globalization;
using System.IO;
+using System.Net.Http;
using System.Text;
+using System.Threading.Tasks;
using Microsoft.OpenApi.Extensions;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.Readers;
@@ -23,6 +25,11 @@ public class MainModel : INotifyPropertyChanged
{
private string _input;
+ private bool _inlineLocal = false;
+ private bool _inlineExternal = false;
+
+ private bool _resolveExternal = false;
+
private string _inputFile;
private string _output;
@@ -33,11 +40,7 @@ public class MainModel : INotifyPropertyChanged
private string _renderTime;
- ///
- /// Default format.
- ///
- private bool _Inline = false;
-
+
///
/// Default format.
///
@@ -48,6 +51,9 @@ public class MainModel : INotifyPropertyChanged
///
private OpenApiSpecVersion _version = OpenApiSpecVersion.OpenApi3_0;
+
+ private HttpClient _httpClient = new HttpClient();
+
public string Input
{
get => _input;
@@ -58,6 +64,16 @@ public string Input
}
}
+ public bool ResolveExternal
+ {
+ get => _resolveExternal;
+ set
+ {
+ _resolveExternal = value;
+ OnPropertyChanged(nameof(ResolveExternal));
+ }
+ }
+
public string InputFile
{
get => _inputFile;
@@ -67,7 +83,6 @@ public string InputFile
OnPropertyChanged(nameof(InputFile));
}
}
-
public string Output
{
get => _output;
@@ -119,13 +134,23 @@ public OpenApiFormat Format
}
}
- public bool Inline
+ public bool InlineLocal
+ {
+ get => _inlineLocal;
+ set
+ {
+ _inlineLocal = value;
+ OnPropertyChanged(nameof(InlineLocal));
+ }
+ }
+
+ public bool InlineExternal
{
- get => _Inline;
+ get => _inlineExternal;
set
{
- _Inline = value;
- OnPropertyChanged(nameof(Inline));
+ _inlineExternal = value;
+ OnPropertyChanged(nameof(InlineExternal));
}
}
@@ -180,17 +205,28 @@ protected void OnPropertyChanged(string propertyName)
/// The core method of the class.
/// Runs the parsing and serializing.
///
- internal void ParseDocument()
+ internal async Task ParseDocument()
{
+ Stream stream = null;
try
{
- Stream stream;
- if (!String.IsNullOrWhiteSpace(_inputFile))
+ if (!string.IsNullOrWhiteSpace(_inputFile))
{
- stream = new FileStream(_inputFile, FileMode.Open);
+ if (_inputFile.StartsWith("http"))
+ {
+ stream = await _httpClient.GetStreamAsync(_inputFile);
+ }
+ else
+ {
+ stream = new FileStream(_inputFile, FileMode.Open);
+ }
}
else
{
+ if (ResolveExternal)
+ {
+ throw new ArgumentException("Input file must be used to resolve external references");
+ }
stream = CreateStream(_input);
}
@@ -198,12 +234,27 @@ internal void ParseDocument()
var stopwatch = new Stopwatch();
stopwatch.Start();
- var document = new OpenApiStreamReader(new OpenApiReaderSettings
+ var settings = new OpenApiReaderSettings
{
- ReferenceResolution = ReferenceResolutionSetting.ResolveLocalReferences,
+ ReferenceResolution = ResolveExternal ? ReferenceResolutionSetting.ResolveAllReferences : ReferenceResolutionSetting.ResolveLocalReferences,
RuleSet = ValidationRuleSet.GetDefaultRuleSet()
+ };
+ if (ResolveExternal)
+ {
+ if (_inputFile.StartsWith("http"))
+ {
+ settings.BaseUrl = new Uri(_inputFile);
+ }
+ else
+ {
+ settings.BaseUrl = new Uri("file://" + Path.GetDirectoryName(_inputFile) + "/");
+ }
}
- ).Read(stream, out var context);
+ var readResult = await new OpenApiStreamReader(settings
+ ).ReadAsync(stream);
+ var document = readResult.OpenApiDocument;
+ var context = readResult.OpenApiDiagnostic;
+
stopwatch.Stop();
ParseTime = $"{stopwatch.ElapsedMilliseconds} ms";
@@ -241,6 +292,14 @@ internal void ParseDocument()
Output = string.Empty;
Errors = "Failed to parse input: " + ex.Message;
}
+ finally {
+ if (stream != null)
+ {
+ stream.Close();
+ stream.Dispose();
+ }
+
+ }
}
///
@@ -255,7 +314,8 @@ private string WriteContents(OpenApiDocument document)
Version,
Format,
new OpenApiWriterSettings() {
- ReferenceInline = this.Inline == true ? ReferenceInlineSetting.InlineLocalReferences : ReferenceInlineSetting.DoNotInlineReferences
+ InlineLocalReferences = InlineLocal,
+ InlineExternalReferences = InlineExternal
});
outputStream.Position = 0;
diff --git a/src/Microsoft.OpenApi.Workbench/MainWindow.xaml b/src/Microsoft.OpenApi.Workbench/MainWindow.xaml
index daf8a2209..41a4f2543 100644
--- a/src/Microsoft.OpenApi.Workbench/MainWindow.xaml
+++ b/src/Microsoft.OpenApi.Workbench/MainWindow.xaml
@@ -4,6 +4,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Microsoft.OpenApi.Workbench"
+ xmlns:writers="clr-namespace:Microsoft.OpenApi.Writers;assembly=Microsoft.OpenApi"
mc:Ignorable="d"
Title="OpenAPI Workbench" Height="600" Width="800">
@@ -42,7 +43,9 @@
-
+
+
+
diff --git a/src/Microsoft.OpenApi.Workbench/MainWindow.xaml.cs b/src/Microsoft.OpenApi.Workbench/MainWindow.xaml.cs
index f33132359..08bbb177d 100644
--- a/src/Microsoft.OpenApi.Workbench/MainWindow.xaml.cs
+++ b/src/Microsoft.OpenApi.Workbench/MainWindow.xaml.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
+using System;
using System.Windows;
namespace Microsoft.OpenApi.Workbench
@@ -18,9 +19,15 @@ public MainWindow()
DataContext = _mainModel;
}
- private void Button_Click(object sender, RoutedEventArgs e)
+ private async void Button_Click(object sender, RoutedEventArgs e)
{
- _mainModel.ParseDocument();
+ try
+ {
+ await _mainModel.ParseDocument();
+ } catch (Exception ex)
+ {
+ _mainModel.Errors = ex.Message;
+ }
}
}
}
diff --git a/src/Microsoft.OpenApi.Workbench/Microsoft.OpenApi.Workbench.csproj b/src/Microsoft.OpenApi.Workbench/Microsoft.OpenApi.Workbench.csproj
index 47a9d6ffe..d56e31ec5 100644
--- a/src/Microsoft.OpenApi.Workbench/Microsoft.OpenApi.Workbench.csproj
+++ b/src/Microsoft.OpenApi.Workbench/Microsoft.OpenApi.Workbench.csproj
@@ -1,136 +1,34 @@
-
-
-
+
- Debug
- AnyCPU
- {6A5E91E5-0441-46EE-AEB9-8334981B7F08}
+ net6.0-windows
WinExe
- Microsoft.OpenApi.Workbench
- Microsoft.OpenApi.Workbench
- v4.8
- 512
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- 4
- true
-
-
-
+ false
+ true
+ true
-
- AnyCPU
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- AnyCPU
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
-
-
-
-
-
-
-
- 4.0
-
-
-
-
-
-
-
- MSBuild:Compile
- Designer
-
-
-
- MSBuild:Compile
- Designer
-
-
- App.xaml
- Code
-
-
-
- MainWindow.xaml
- Code
-
-
- MSBuild:Compile
- Designer
-
-
- MSBuild:Compile
- Designer
-
-
- MSBuild:Compile
- Designer
-
-
- MSBuild:Compile
- Designer
-
-
- MSBuild:Compile
- Designer
-
+
+
+ all
+
+
-
- Code
-
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
-
- ResXFileCodeGenerator
- Resources.Designer.cs
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
+
-
+
+
-
+
+
-
- {79933258-0126-4382-8755-d50820ecc483}
- Microsoft.OpenApi.Readers
-
-
- {a8e50143-69b2-472a-9d45-3f9a05d13202}
- Microsoft.OpenApi.Core
-
+
+
+
+
+
-
\ No newline at end of file
diff --git a/src/Microsoft.OpenApi/Extensions/OpenApiElementExtensions.cs b/src/Microsoft.OpenApi/Extensions/OpenApiElementExtensions.cs
index 81893a3b2..a047c066d 100644
--- a/src/Microsoft.OpenApi/Extensions/OpenApiElementExtensions.cs
+++ b/src/Microsoft.OpenApi/Extensions/OpenApiElementExtensions.cs
@@ -2,6 +2,7 @@
// Licensed under the MIT license.
using System.Collections.Generic;
+using System.Linq;
using Microsoft.OpenApi.Interfaces;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.Services;
@@ -25,7 +26,7 @@ public static IEnumerable Validate(this IOpenApiElement element, V
var validator = new OpenApiValidator(ruleSet);
var walker = new OpenApiWalker(validator);
walker.Walk(element);
- return validator.Errors;
+ return validator.Errors.Cast().Union(validator.Warnings);
}
}
}
diff --git a/src/Microsoft.OpenApi/Extensions/OpenApiSerializableExtensions.cs b/src/Microsoft.OpenApi/Extensions/OpenApiSerializableExtensions.cs
index 4694692ad..f60c5483b 100755
--- a/src/Microsoft.OpenApi/Extensions/OpenApiSerializableExtensions.cs
+++ b/src/Microsoft.OpenApi/Extensions/OpenApiSerializableExtensions.cs
@@ -83,20 +83,14 @@ public static void Serialize(
throw Error.ArgumentNull(nameof(stream));
}
- IOpenApiWriter writer;
var streamWriter = new FormattingStreamWriter(stream, CultureInfo.InvariantCulture);
- switch (format)
- {
- case OpenApiFormat.Json:
- writer = new OpenApiJsonWriter(streamWriter,settings);
- break;
- case OpenApiFormat.Yaml:
- writer = new OpenApiYamlWriter(streamWriter, settings);
- break;
- default:
- throw new OpenApiException(string.Format(SRResource.OpenApiFormatNotSupported, format));
- }
+ IOpenApiWriter writer = format switch
+ {
+ OpenApiFormat.Json => new OpenApiJsonWriter(streamWriter, settings, false),
+ OpenApiFormat.Yaml => new OpenApiYamlWriter(streamWriter, settings),
+ _ => throw new OpenApiException(string.Format(SRResource.OpenApiFormatNotSupported, format)),
+ };
element.Serialize(writer, specVersion);
}
diff --git a/src/Microsoft.OpenApi/Interfaces/IEffective.cs b/src/Microsoft.OpenApi/Interfaces/IEffective.cs
new file mode 100644
index 000000000..b62ec12ab
--- /dev/null
+++ b/src/Microsoft.OpenApi/Interfaces/IEffective.cs
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT license.
+
+using Microsoft.OpenApi.Models;
+
+namespace Microsoft.OpenApi.Interfaces
+{
+ ///
+ /// OpenApiElements that implement IEffective indicate that their description is not self-contained.
+ /// External elements affect the effective description.
+ ///
+ /// Currently this will only be used for accessing external references.
+ /// In the next major version, this will be the approach accessing all referenced elements.
+ /// This will enable us to support merging properties that are peers of the $ref
+ /// Type of OpenApi Element that is being referenced.
+ public interface IEffective where T : class,IOpenApiElement
+ {
+ ///
+ /// Returns a calculated and cloned version of the element.
+ ///
+ T GetEffective(OpenApiDocument document);
+ }
+}
diff --git a/src/Microsoft.OpenApi/Interfaces/IOpenApiReferenceable.cs b/src/Microsoft.OpenApi/Interfaces/IOpenApiReferenceable.cs
index eb47c64bc..c790e1fda 100644
--- a/src/Microsoft.OpenApi/Interfaces/IOpenApiReferenceable.cs
+++ b/src/Microsoft.OpenApi/Interfaces/IOpenApiReferenceable.cs
@@ -31,5 +31,6 @@ public interface IOpenApiReferenceable : IOpenApiSerializable
/// Serialize to OpenAPI V2 document without using reference.
///
void SerializeAsV2WithoutReference(IOpenApiWriter writer);
+
}
}
diff --git a/src/Microsoft.OpenApi/Microsoft.OpenApi.csproj b/src/Microsoft.OpenApi/Microsoft.OpenApi.csproj
index d0ff2fbcd..cbdcde393 100644
--- a/src/Microsoft.OpenApi/Microsoft.OpenApi.csproj
+++ b/src/Microsoft.OpenApi/Microsoft.OpenApi.csproj
@@ -1,6 +1,7 @@
netstandard2.0
+ Latest
true
http://go.microsoft.com/fwlink/?LinkID=288890
https://github.com/Microsoft/OpenAPI.NET
@@ -10,7 +11,7 @@
Microsoft
Microsoft.OpenApi
Microsoft.OpenApi
- 1.3.0-preview
+ 1.3.1
.NET models with JSON and YAML writers for OpenAPI specification
© Microsoft Corporation. All rights reserved.
OpenAPI .NET
@@ -36,7 +37,7 @@
-
+
diff --git a/src/Microsoft.OpenApi/Models/OpenApiCallback.cs b/src/Microsoft.OpenApi/Models/OpenApiCallback.cs
index 4f685d2de..57aa3c888 100644
--- a/src/Microsoft.OpenApi/Models/OpenApiCallback.cs
+++ b/src/Microsoft.OpenApi/Models/OpenApiCallback.cs
@@ -12,7 +12,7 @@ namespace Microsoft.OpenApi.Models
///
/// Callback Object: A map of possible out-of band callbacks related to the parent operation.
///
- public class OpenApiCallback : IOpenApiSerializable, IOpenApiReferenceable, IOpenApiExtensible
+ public class OpenApiCallback : IOpenApiSerializable, IOpenApiReferenceable, IOpenApiExtensible, IEffective
{
///
/// A Path Item Object used to define a callback request and expected responses.
@@ -70,15 +70,41 @@ public void SerializeAsV3(IOpenApiWriter writer)
throw Error.ArgumentNull(nameof(writer));
}
- if (Reference != null && writer.GetSettings().ReferenceInline != ReferenceInlineSetting.InlineLocalReferences)
+ var target = this;
+
+ if (Reference != null)
{
- Reference.SerializeAsV3(writer);
- return;
+ if (!writer.GetSettings().ShouldInlineReference(Reference))
+ {
+ Reference.SerializeAsV3(writer);
+ return;
+ }
+ else
+ {
+ target = GetEffective(Reference.HostDocument);
+ }
}
+ target.SerializeAsV3WithoutReference(writer);
+ }
- SerializeAsV3WithoutReference(writer);
+ ///
+ /// Returns an effective OpenApiCallback object based on the presence of a $ref
+ ///
+ /// The host OpenApiDocument that contains the reference.
+ /// OpenApiCallback
+ public OpenApiCallback GetEffective(OpenApiDocument doc)
+ {
+ if (this.Reference != null)
+ {
+ return doc.ResolveReferenceTo(this.Reference);
+ }
+ else
+ {
+ return this;
+ }
}
+
///
/// Serialize to OpenAPI V3 document without using reference.
///
diff --git a/src/Microsoft.OpenApi/Models/OpenApiComponents.cs b/src/Microsoft.OpenApi/Models/OpenApiComponents.cs
index 08b8bd020..cd8cdae74 100644
--- a/src/Microsoft.OpenApi/Models/OpenApiComponents.cs
+++ b/src/Microsoft.OpenApi/Models/OpenApiComponents.cs
@@ -80,7 +80,7 @@ public void SerializeAsV3(IOpenApiWriter writer)
// If references have been inlined we don't need the to render the components section
// however if they have cycles, then we will need a component rendered
- if (writer.GetSettings().ReferenceInline != ReferenceInlineSetting.DoNotInlineReferences)
+ if (writer.GetSettings().InlineLocalReferences)
{
var loops = writer.GetSettings().LoopDetector.Loops;
writer.WriteStartObject();
diff --git a/src/Microsoft.OpenApi/Models/OpenApiConstants.cs b/src/Microsoft.OpenApi/Models/OpenApiConstants.cs
index 3a29a88b1..553844764 100644
--- a/src/Microsoft.OpenApi/Models/OpenApiConstants.cs
+++ b/src/Microsoft.OpenApi/Models/OpenApiConstants.cs
@@ -617,6 +617,16 @@ public static class OpenApiConstants
///
public const string Basic = "basic";
+ ///
+ /// Field: Bearer
+ ///
+ public const string Bearer = "bearer";
+
+ ///
+ /// Field: JWT
+ ///
+ public const string Jwt = "JWT";
+
///
/// Field: Consumes
///
diff --git a/src/Microsoft.OpenApi/Models/OpenApiDocument.cs b/src/Microsoft.OpenApi/Models/OpenApiDocument.cs
index 0db9b2391..59b8da16c 100644
--- a/src/Microsoft.OpenApi/Models/OpenApiDocument.cs
+++ b/src/Microsoft.OpenApi/Models/OpenApiDocument.cs
@@ -135,7 +135,7 @@ public void SerializeAsV2(IOpenApiWriter writer)
// If references have been inlined we don't need the to render the components section
// however if they have cycles, then we will need a component rendered
- if (writer.GetSettings().ReferenceInline != ReferenceInlineSetting.DoNotInlineReferences)
+ if (writer.GetSettings().InlineLocalReferences)
{
var loops = writer.GetSettings().LoopDetector.Loops;
@@ -321,27 +321,45 @@ private static void WriteHostInfoV2(IOpenApiWriter writer, IList
///
/// Walk the OpenApiDocument and resolve unresolved references
///
- /// Indicates if external references should be resolved. Document needs to reference a workspace for this to be possible.
- public IEnumerable ResolveReferences(bool useExternal = false)
+ ///
+ /// This method will be replaced by a LoadExternalReferences in the next major update to this library.
+ /// Resolving references at load time is going to go away.
+ ///
+ public IEnumerable ResolveReferences()
{
- var resolver = new OpenApiReferenceResolver(this, useExternal);
+ var resolver = new OpenApiReferenceResolver(this, false);
var walker = new OpenApiWalker(resolver);
walker.Walk(this);
return resolver.Errors;
}
- ///
- /// Load the referenced object from a object
- ///
- public IOpenApiReferenceable ResolveReference(OpenApiReference reference)
+ ///
+ /// Load the referenced object from a object
+ ///
+ internal T ResolveReferenceTo(OpenApiReference reference) where T : class, IOpenApiReferenceable
+ {
+ if (reference.IsExternal)
{
- return ResolveReference(reference, false);
+ return ResolveReference(reference, true) as T;
}
+ else
+ {
+ return ResolveReference(reference, false) as T;
+ }
+ }
- ///
- /// Load the referenced object from a object
- ///
- public IOpenApiReferenceable ResolveReference(OpenApiReference reference, bool useExternal)
+ ///
+ /// Load the referenced object from a object
+ ///
+ public IOpenApiReferenceable ResolveReference(OpenApiReference reference)
+ {
+ return ResolveReference(reference, false);
+ }
+
+ ///
+ /// Load the referenced object from a object
+ ///
+ internal IOpenApiReferenceable ResolveReference(OpenApiReference reference, bool useExternal)
{
if (reference == null)
{
diff --git a/src/Microsoft.OpenApi/Models/OpenApiExample.cs b/src/Microsoft.OpenApi/Models/OpenApiExample.cs
index d9bc08e30..d4c268584 100644
--- a/src/Microsoft.OpenApi/Models/OpenApiExample.cs
+++ b/src/Microsoft.OpenApi/Models/OpenApiExample.cs
@@ -11,7 +11,7 @@ namespace Microsoft.OpenApi.Models
///
/// Example Object.
///
- public class OpenApiExample : IOpenApiSerializable, IOpenApiReferenceable, IOpenApiExtensible
+ public class OpenApiExample : IOpenApiSerializable, IOpenApiReferenceable, IOpenApiExtensible, IEffective
{
///
/// Short description for the example.
@@ -64,13 +64,38 @@ public void SerializeAsV3(IOpenApiWriter writer)
throw Error.ArgumentNull(nameof(writer));
}
- if (Reference != null && writer.GetSettings().ReferenceInline != ReferenceInlineSetting.InlineLocalReferences)
+ var target = this;
+
+ if (Reference != null)
{
- Reference.SerializeAsV3(writer);
- return;
+ if (!writer.GetSettings().ShouldInlineReference(Reference))
+ {
+ Reference.SerializeAsV3(writer);
+ return;
+ }
+ else
+ {
+ target = GetEffective(Reference.HostDocument);
+ }
}
+ target.SerializeAsV3WithoutReference(writer);
+ }
- SerializeAsV3WithoutReference(writer);
+ ///
+ /// Returns an effective OpenApiExample object based on the presence of a $ref
+ ///
+ /// The host OpenApiDocument that contains the reference.
+ /// OpenApiExample
+ public OpenApiExample GetEffective(OpenApiDocument doc)
+ {
+ if (this.Reference != null)
+ {
+ return doc.ResolveReferenceTo(this.Reference);
+ }
+ else
+ {
+ return this;
+ }
}
///
diff --git a/src/Microsoft.OpenApi/Models/OpenApiHeader.cs b/src/Microsoft.OpenApi/Models/OpenApiHeader.cs
index eb6736183..e8576a0ca 100644
--- a/src/Microsoft.OpenApi/Models/OpenApiHeader.cs
+++ b/src/Microsoft.OpenApi/Models/OpenApiHeader.cs
@@ -13,7 +13,7 @@ namespace Microsoft.OpenApi.Models
/// Header Object.
/// The Header Object follows the structure of the Parameter Object.
///
- public class OpenApiHeader : IOpenApiSerializable, IOpenApiReferenceable, IOpenApiExtensible
+ public class OpenApiHeader : IOpenApiSerializable, IOpenApiReferenceable, IOpenApiExtensible, IEffective
{
///
/// Indicates if object is populated with data or is just a reference to the data
@@ -96,15 +96,42 @@ public void SerializeAsV3(IOpenApiWriter writer)
throw Error.ArgumentNull(nameof(writer));
}
- if (Reference != null && writer.GetSettings().ReferenceInline != ReferenceInlineSetting.InlineLocalReferences)
+ var target = this;
+
+ if (Reference != null)
{
- Reference.SerializeAsV3(writer);
- return;
+ if (!writer.GetSettings().ShouldInlineReference(Reference))
+ {
+ Reference.SerializeAsV3(writer);
+ return;
+ }
+ else
+ {
+ target = GetEffective(Reference.HostDocument);
+ }
}
+ target.SerializeAsV3WithoutReference(writer);
- SerializeAsV3WithoutReference(writer);
}
+ ///
+ /// Returns an effective OpenApiHeader object based on the presence of a $ref
+ ///
+ /// The host OpenApiDocument that contains the reference.
+ /// OpenApiHeader
+ public OpenApiHeader GetEffective(OpenApiDocument doc)
+ {
+ if (this.Reference != null)
+ {
+ return doc.ResolveReferenceTo(this.Reference);
+ }
+ else
+ {
+ return this;
+ }
+ }
+
+
///
/// Serialize to OpenAPI V3 document without using reference.
///
@@ -161,13 +188,21 @@ public void SerializeAsV2(IOpenApiWriter writer)
throw Error.ArgumentNull(nameof(writer));
}
- if (Reference != null && writer.GetSettings().ReferenceInline != ReferenceInlineSetting.InlineLocalReferences)
+ var target = this;
+
+ if (Reference != null)
{
- Reference.SerializeAsV2(writer);
- return;
+ if (!writer.GetSettings().ShouldInlineReference(Reference))
+ {
+ Reference.SerializeAsV2(writer);
+ return;
+ }
+ else
+ {
+ target = GetEffective(Reference.HostDocument);
+ }
}
-
- SerializeAsV2WithoutReference(writer);
+ target.SerializeAsV2WithoutReference(writer);
}
///
diff --git a/src/Microsoft.OpenApi/Models/OpenApiLink.cs b/src/Microsoft.OpenApi/Models/OpenApiLink.cs
index fb7396db2..f5acb0d3f 100644
--- a/src/Microsoft.OpenApi/Models/OpenApiLink.cs
+++ b/src/Microsoft.OpenApi/Models/OpenApiLink.cs
@@ -11,7 +11,7 @@ namespace Microsoft.OpenApi.Models
///
/// Link Object.
///
- public class OpenApiLink : IOpenApiSerializable, IOpenApiReferenceable, IOpenApiExtensible
+ public class OpenApiLink : IOpenApiSerializable, IOpenApiReferenceable, IOpenApiExtensible, IEffective
{
///
/// A relative or absolute reference to an OAS operation.
@@ -71,15 +71,42 @@ public void SerializeAsV3(IOpenApiWriter writer)
throw Error.ArgumentNull(nameof(writer));
}
- if (Reference != null && writer.GetSettings().ReferenceInline != ReferenceInlineSetting.InlineLocalReferences)
+ var target = this;
+
+ if (Reference != null)
{
- Reference.SerializeAsV3(writer);
- return;
+ if (!writer.GetSettings().ShouldInlineReference(Reference))
+ {
+ Reference.SerializeAsV3(writer);
+ return;
+ }
+ else
+ {
+ target = GetEffective(Reference.HostDocument);
+ }
}
+ target.SerializeAsV3WithoutReference(writer);
- SerializeAsV3WithoutReference(writer);
}
+ ///
+ /// Returns an effective OpenApiLink object based on the presence of a $ref
+ ///
+ /// The host OpenApiDocument that contains the reference.
+ /// OpenApiLink
+ public OpenApiLink GetEffective(OpenApiDocument doc)
+ {
+ if (this.Reference != null)
+ {
+ return doc.ResolveReferenceTo(this.Reference);
+ }
+ else
+ {
+ return this;
+ }
+ }
+
+
///
/// Serialize to OpenAPI V3 document without using reference.
///
diff --git a/src/Microsoft.OpenApi/Models/OpenApiParameter.cs b/src/Microsoft.OpenApi/Models/OpenApiParameter.cs
index 03b465109..12f37f61a 100644
--- a/src/Microsoft.OpenApi/Models/OpenApiParameter.cs
+++ b/src/Microsoft.OpenApi/Models/OpenApiParameter.cs
@@ -2,6 +2,7 @@
// Licensed under the MIT license.
using System.Collections.Generic;
+using System.Runtime;
using Microsoft.OpenApi.Any;
using Microsoft.OpenApi.Extensions;
using Microsoft.OpenApi.Interfaces;
@@ -12,7 +13,7 @@ namespace Microsoft.OpenApi.Models
///
/// Parameter Object.
///
- public class OpenApiParameter : IOpenApiSerializable, IOpenApiReferenceable, IOpenApiExtensible
+ public class OpenApiParameter : IOpenApiSerializable, IOpenApiReferenceable, IEffective, IOpenApiExtensible
{
private bool? _explode;
@@ -145,13 +146,39 @@ public void SerializeAsV3(IOpenApiWriter writer)
throw Error.ArgumentNull(nameof(writer));
}
- if (Reference != null && writer.GetSettings().ReferenceInline != ReferenceInlineSetting.InlineLocalReferences)
+ var target = this;
+
+ if (Reference != null)
{
- Reference.SerializeAsV3(writer);
- return;
+ if (!writer.GetSettings().ShouldInlineReference(Reference))
+ {
+ Reference.SerializeAsV3(writer);
+ return;
+ }
+ else
+ {
+ target = this.GetEffective(Reference.HostDocument);
+ }
}
- SerializeAsV3WithoutReference(writer);
+ target.SerializeAsV3WithoutReference(writer);
+ }
+
+ ///
+ /// Returns an effective OpenApiParameter object based on the presence of a $ref
+ ///
+ /// The host OpenApiDocument that contains the reference.
+ /// OpenApiParameter
+ public OpenApiParameter GetEffective(OpenApiDocument doc)
+ {
+ if (this.Reference != null)
+ {
+ return doc.ResolveReferenceTo(this.Reference);
+ }
+ else
+ {
+ return this;
+ }
}
///
@@ -216,13 +243,21 @@ public void SerializeAsV2(IOpenApiWriter writer)
throw Error.ArgumentNull(nameof(writer));
}
- if (Reference != null && writer.GetSettings().ReferenceInline != ReferenceInlineSetting.InlineLocalReferences)
+ var target = this;
+ if (Reference != null)
{
- Reference.SerializeAsV2(writer);
- return;
+ if (!writer.GetSettings().ShouldInlineReference(Reference))
+ {
+ Reference.SerializeAsV2(writer);
+ return;
+ }
+ else
+ {
+ target = this.GetEffective(Reference.HostDocument);
+ }
}
- SerializeAsV2WithoutReference(writer);
+ target.SerializeAsV2WithoutReference(writer);
}
///
@@ -332,6 +367,7 @@ public void SerializeAsV2WithoutReference(IOpenApiWriter writer)
writer.WriteEndObject();
}
+
}
///
diff --git a/src/Microsoft.OpenApi/Models/OpenApiPathItem.cs b/src/Microsoft.OpenApi/Models/OpenApiPathItem.cs
index b222ba34f..375f1f034 100644
--- a/src/Microsoft.OpenApi/Models/OpenApiPathItem.cs
+++ b/src/Microsoft.OpenApi/Models/OpenApiPathItem.cs
@@ -11,7 +11,7 @@ namespace Microsoft.OpenApi.Models
///
/// Path Item Object: to describe the operations available on a single path.
///
- public class OpenApiPathItem : IOpenApiSerializable, IOpenApiExtensible, IOpenApiReferenceable
+ public class OpenApiPathItem : IOpenApiSerializable, IOpenApiExtensible, IOpenApiReferenceable, IEffective
{
///
/// An optional, string summary, intended to apply to all operations in this path.
@@ -74,15 +74,38 @@ public void SerializeAsV3(IOpenApiWriter writer)
{
throw Error.ArgumentNull(nameof(writer));
}
+ var target = this;
- if (Reference != null && writer.GetSettings().ReferenceInline != ReferenceInlineSetting.InlineAllReferences)
+ if (Reference != null)
{
- Reference.SerializeAsV3(writer);
- return;
+ if (!writer.GetSettings().ShouldInlineReference(Reference))
+ {
+ Reference.SerializeAsV3(writer);
+ return;
+ }
+ else
+ {
+ target = GetEffective(Reference.HostDocument);
+ }
}
+ target.SerializeAsV3WithoutReference(writer);
+ }
- SerializeAsV3WithoutReference(writer);
-
+ ///
+ /// Returns an effective OpenApiPathItem object based on the presence of a $ref
+ ///
+ /// The host OpenApiDocument that contains the reference.
+ /// OpenApiPathItem
+ public OpenApiPathItem GetEffective(OpenApiDocument doc)
+ {
+ if (this.Reference != null)
+ {
+ return doc.ResolveReferenceTo(this.Reference);
+ }
+ else
+ {
+ return this;
+ }
}
///
@@ -95,13 +118,22 @@ public void SerializeAsV2(IOpenApiWriter writer)
throw Error.ArgumentNull(nameof(writer));
}
- if (Reference != null && writer.GetSettings().ReferenceInline != ReferenceInlineSetting.InlineAllReferences)
+ var target = this;
+
+ if (Reference != null)
{
- Reference.SerializeAsV2(writer);
- return;
+ if (!writer.GetSettings().ShouldInlineReference(Reference))
+ {
+ Reference.SerializeAsV2(writer);
+ return;
+ }
+ else
+ {
+ target = this.GetEffective(Reference.HostDocument);
+ }
}
- SerializeAsV2WithoutReference(writer);
+ target.SerializeAsV2WithoutReference(writer);
}
///
diff --git a/src/Microsoft.OpenApi/Models/OpenApiReference.cs b/src/Microsoft.OpenApi/Models/OpenApiReference.cs
index 2c8f738ca..3f1370800 100644
--- a/src/Microsoft.OpenApi/Models/OpenApiReference.cs
+++ b/src/Microsoft.OpenApi/Models/OpenApiReference.cs
@@ -45,6 +45,11 @@ public class OpenApiReference : IOpenApiSerializable
///
public bool IsLocal => ExternalResource == null;
+ ///
+ /// The OpenApiDocument that is hosting the OpenApiReference instance. This is used to enable dereferencing the reference.
+ ///
+ public OpenApiDocument HostDocument { get; set; } = null;
+
///
/// Gets the full reference string for v3.0.
///
@@ -54,7 +59,7 @@ public string ReferenceV3
{
if (IsExternal)
{
- return GetExternalReference();
+ return GetExternalReferenceV3();
}
if (!Type.HasValue)
@@ -85,7 +90,7 @@ public string ReferenceV2
{
if (IsExternal)
{
- return GetExternalReference();
+ return GetExternalReferenceV2();
}
if (!Type.HasValue)
@@ -171,11 +176,21 @@ public void SerializeAsV2(IOpenApiWriter writer)
writer.WriteEndObject();
}
- private string GetExternalReference()
+ private string GetExternalReferenceV3()
+ {
+ if (Id != null)
+ {
+ return ExternalResource + "#/components/" + Type.GetDisplayName() + "/"+ Id;
+ }
+
+ return ExternalResource;
+ }
+
+ private string GetExternalReferenceV2()
{
if (Id != null)
{
- return ExternalResource + "#/" + Id;
+ return ExternalResource + "#/" + GetReferenceTypeNameAsV2((ReferenceType)Type) + "/" + Id;
}
return ExternalResource;
diff --git a/src/Microsoft.OpenApi/Models/OpenApiRequestBody.cs b/src/Microsoft.OpenApi/Models/OpenApiRequestBody.cs
index d6308efcf..8a65f1fde 100644
--- a/src/Microsoft.OpenApi/Models/OpenApiRequestBody.cs
+++ b/src/Microsoft.OpenApi/Models/OpenApiRequestBody.cs
@@ -11,7 +11,7 @@ namespace Microsoft.OpenApi.Models
///
/// Request Body Object
///
- public class OpenApiRequestBody : IOpenApiSerializable, IOpenApiReferenceable, IOpenApiExtensible
+ public class OpenApiRequestBody : IOpenApiSerializable, IOpenApiReferenceable, IOpenApiExtensible, IEffective
{
///
/// Indicates if object is populated with data or is just a reference to the data
@@ -55,13 +55,38 @@ public void SerializeAsV3(IOpenApiWriter writer)
throw Error.ArgumentNull(nameof(writer));
}
+ var target = this;
+
if (Reference != null)
{
- Reference.SerializeAsV3(writer);
- return;
+ if (!writer.GetSettings().ShouldInlineReference(Reference))
+ {
+ Reference.SerializeAsV3(writer);
+ return;
+ }
+ else
+ {
+ target = GetEffective(Reference.HostDocument);
+ }
}
+ target.SerializeAsV3WithoutReference(writer);
+ }
- SerializeAsV3WithoutReference(writer);
+ ///
+ /// Returns an effective OpenApiRequestBody object based on the presence of a $ref
+ ///
+ /// The host OpenApiDocument that contains the reference.
+ /// OpenApiRequestBody
+ public OpenApiRequestBody GetEffective(OpenApiDocument doc)
+ {
+ if (this.Reference != null)
+ {
+ return doc.ResolveReferenceTo(this.Reference);
+ }
+ else
+ {
+ return this;
+ }
}
///
diff --git a/src/Microsoft.OpenApi/Models/OpenApiResponse.cs b/src/Microsoft.OpenApi/Models/OpenApiResponse.cs
index bc2e4e525..0a31ca0a4 100644
--- a/src/Microsoft.OpenApi/Models/OpenApiResponse.cs
+++ b/src/Microsoft.OpenApi/Models/OpenApiResponse.cs
@@ -11,7 +11,7 @@ namespace Microsoft.OpenApi.Models
///
/// Response object.
///
- public class OpenApiResponse : IOpenApiSerializable, IOpenApiReferenceable, IOpenApiExtensible
+ public class OpenApiResponse : IOpenApiSerializable, IOpenApiReferenceable, IOpenApiExtensible, IEffective
{
///
/// REQUIRED. A short description of the response.
@@ -61,13 +61,38 @@ public void SerializeAsV3(IOpenApiWriter writer)
throw Error.ArgumentNull(nameof(writer));
}
- if (Reference != null && writer.GetSettings().ReferenceInline != ReferenceInlineSetting.InlineLocalReferences)
+ var target = this;
+
+ if (Reference != null)
{
- Reference.SerializeAsV3(writer);
- return;
+ if (!writer.GetSettings().ShouldInlineReference(Reference))
+ {
+ Reference.SerializeAsV3(writer);
+ return;
+ }
+ else
+ {
+ target = GetEffective(Reference.HostDocument);
+ }
}
+ target.SerializeAsV3WithoutReference(writer);
+ }
- SerializeAsV3WithoutReference(writer);
+ ///
+ /// Returns an effective OpenApiRequestBody object based on the presence of a $ref
+ ///
+ /// The host OpenApiDocument that contains the reference.
+ /// OpenApiResponse
+ public OpenApiResponse GetEffective(OpenApiDocument doc)
+ {
+ if (this.Reference != null)
+ {
+ return doc.ResolveReferenceTo(this.Reference);
+ }
+ else
+ {
+ return this;
+ }
}
///
@@ -105,13 +130,21 @@ public void SerializeAsV2(IOpenApiWriter writer)
throw Error.ArgumentNull(nameof(writer));
}
- if (Reference != null && writer.GetSettings().ReferenceInline != ReferenceInlineSetting.InlineLocalReferences)
+ var target = this;
+
+ if (Reference != null)
{
- Reference.SerializeAsV2(writer);
- return;
+ if (!writer.GetSettings().ShouldInlineReference(Reference))
+ {
+ Reference.SerializeAsV2(writer);
+ return;
+ }
+ else
+ {
+ target = GetEffective(Reference.HostDocument);
+ }
}
-
- SerializeAsV2WithoutReference(writer);
+ target.SerializeAsV2WithoutReference(writer);
}
///
diff --git a/src/Microsoft.OpenApi/Models/OpenApiSchema.cs b/src/Microsoft.OpenApi/Models/OpenApiSchema.cs
index 60e314fcf..036222261 100644
--- a/src/Microsoft.OpenApi/Models/OpenApiSchema.cs
+++ b/src/Microsoft.OpenApi/Models/OpenApiSchema.cs
@@ -2,6 +2,7 @@
// Licensed under the MIT license.
using System.Collections.Generic;
+using System.Linq;
using Microsoft.OpenApi.Any;
using Microsoft.OpenApi.Interfaces;
using Microsoft.OpenApi.Writers;
@@ -11,7 +12,7 @@ namespace Microsoft.OpenApi.Models
///
/// Schema Object.
///
- public class OpenApiSchema : IOpenApiSerializable, IOpenApiReferenceable, IOpenApiExtensible
+ public class OpenApiSchema : IOpenApiSerializable, IOpenApiReferenceable, IEffective, IOpenApiExtensible
{
///
/// Follow JSON Schema definition. Short text providing information about the data.
@@ -252,14 +253,22 @@ public void SerializeAsV3(IOpenApiWriter writer)
}
var settings = writer.GetSettings();
+ var target = this;
if (Reference != null)
{
- if (settings.ReferenceInline != ReferenceInlineSetting.InlineLocalReferences)
+ if (!settings.ShouldInlineReference(Reference))
{
Reference.SerializeAsV3(writer);
return;
}
+ else
+ {
+ if (Reference.IsExternal) // Temporary until v2
+ {
+ target = this.GetEffective(Reference.HostDocument);
+ }
+ }
// If Loop is detected then just Serialize as a reference.
if (!settings.LoopDetector.PushLoop(this))
@@ -270,7 +279,7 @@ public void SerializeAsV3(IOpenApiWriter writer)
}
}
- SerializeAsV3WithoutReference(writer);
+ target.SerializeAsV3WithoutReference(writer);
if (Reference != null)
{
@@ -283,6 +292,7 @@ public void SerializeAsV3(IOpenApiWriter writer)
///
public void SerializeAsV3WithoutReference(IOpenApiWriter writer)
{
+
writer.WriteStartObject();
// title
@@ -442,14 +452,23 @@ internal void SerializeAsV2(
throw Error.ArgumentNull(nameof(writer));
}
+ var settings = writer.GetSettings();
+ var target = this;
+
if (Reference != null)
{
- var settings = writer.GetSettings();
- if (settings.ReferenceInline != ReferenceInlineSetting.InlineLocalReferences)
+ if (!settings.ShouldInlineReference(Reference))
{
Reference.SerializeAsV2(writer);
return;
}
+ else
+ {
+ if (Reference.IsExternal) // Temporary until v2
+ {
+ target = this.GetEffective(Reference.HostDocument);
+ }
+ }
// If Loop is detected then just Serialize as a reference.
if (!settings.LoopDetector.PushLoop(this))
@@ -466,7 +485,7 @@ internal void SerializeAsV2(
parentRequiredProperties = new HashSet();
}
- SerializeAsV2WithoutReference(writer, parentRequiredProperties, propertyName);
+ target.SerializeAsV2WithoutReference(writer, parentRequiredProperties, propertyName);
}
///
@@ -626,6 +645,20 @@ internal void WriteAsSchemaProperties(
// allOf
writer.WriteOptionalCollection(OpenApiConstants.AllOf, AllOf, (w, s) => s.SerializeAsV2(w));
+ // If there isn't already an AllOf, and the schema contains a oneOf or anyOf write an allOf with the first
+ // schema in the list as an attempt to guess at a graceful downgrade situation.
+ if (AllOf == null || AllOf.Count == 0)
+ {
+ // anyOf (Not Supported in V2) - Write the first schema only as an allOf.
+ writer.WriteOptionalCollection(OpenApiConstants.AllOf, AnyOf.Take(1), (w, s) => s.SerializeAsV2(w));
+
+ if (AnyOf == null || AnyOf.Count == 0)
+ {
+ // oneOf (Not Supported in V2) - Write the first schema only as an allOf.
+ writer.WriteOptionalCollection(OpenApiConstants.AllOf, OneOf.Take(1), (w, s) => s.SerializeAsV2(w));
+ }
+ }
+
// properties
writer.WriteOptionalMap(OpenApiConstants.Properties, Properties, (w, key, s) =>
s.SerializeAsV2(w, Required, key));
@@ -666,5 +699,21 @@ internal void WriteAsSchemaProperties(
// extensions
writer.WriteExtensions(Extensions, OpenApiSpecVersion.OpenApi2_0);
}
+
+ ///
+ /// Returns an effective OpenApiSchema object based on the presence of a $ref
+ ///
+ /// The host OpenApiDocument that contains the reference.
+ /// OpenApiSchema
+ public OpenApiSchema GetEffective(OpenApiDocument doc)
+ {
+ if (this.Reference != null)
+ {
+ return doc.ResolveReferenceTo(this.Reference);
+ } else
+ {
+ return this;
+ }
+ }
}
}
diff --git a/src/Microsoft.OpenApi/Models/OpenApiSecurityScheme.cs b/src/Microsoft.OpenApi/Models/OpenApiSecurityScheme.cs
index 7694c5fd4..902ce19bc 100644
--- a/src/Microsoft.OpenApi/Models/OpenApiSecurityScheme.cs
+++ b/src/Microsoft.OpenApi/Models/OpenApiSecurityScheme.cs
@@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
+using System.Linq;
using Microsoft.OpenApi.Any;
using Microsoft.OpenApi.Extensions;
using Microsoft.OpenApi.Interfaces;
@@ -83,7 +84,8 @@ public void SerializeAsV3(IOpenApiWriter writer)
throw Error.ArgumentNull(nameof(writer));
}
- if (Reference != null)
+
+ if (Reference != null)
{
Reference.SerializeAsV3(writer);
return;
diff --git a/src/Microsoft.OpenApi/Services/CopyReferences.cs b/src/Microsoft.OpenApi/Services/CopyReferences.cs
new file mode 100644
index 000000000..24dcfee25
--- /dev/null
+++ b/src/Microsoft.OpenApi/Services/CopyReferences.cs
@@ -0,0 +1,112 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT license.
+
+using System.Collections.Generic;
+using Microsoft.OpenApi.Interfaces;
+using Microsoft.OpenApi.Models;
+
+namespace Microsoft.OpenApi.Services
+{
+ internal class CopyReferences : OpenApiVisitorBase
+ {
+ private readonly OpenApiDocument _target;
+ public OpenApiComponents Components = new();
+
+ public CopyReferences(OpenApiDocument target)
+ {
+ _target = target;
+ }
+
+ ///
+ /// Visits IOpenApiReferenceable instances that are references and not in components.
+ ///
+ /// An IOpenApiReferenceable object.
+ public override void Visit(IOpenApiReferenceable referenceable)
+ {
+ switch (referenceable)
+ {
+ case OpenApiSchema schema:
+ EnsureComponentsExists();
+ EnsureSchemasExists();
+ if (!Components.Schemas.ContainsKey(schema.Reference.Id))
+ {
+ Components.Schemas.Add(schema.Reference.Id, schema);
+ }
+ break;
+
+ case OpenApiParameter parameter:
+ EnsureComponentsExists();
+ EnsureParametersExists();
+ if (!Components.Parameters.ContainsKey(parameter.Reference.Id))
+ {
+ Components.Parameters.Add(parameter.Reference.Id, parameter);
+ }
+ break;
+
+ case OpenApiResponse response:
+ EnsureComponentsExists();
+ EnsureResponsesExists();
+ if (!Components.Responses.ContainsKey(response.Reference.Id))
+ {
+ Components.Responses.Add(response.Reference.Id, response);
+ }
+ break;
+
+ default:
+ break;
+ }
+ base.Visit(referenceable);
+ }
+
+ ///
+ /// Visits
+ ///
+ /// The OpenApiSchema to be visited.
+ public override void Visit(OpenApiSchema schema)
+ {
+ // This is needed to handle schemas used in Responses in components
+ if (schema.Reference != null)
+ {
+ EnsureComponentsExists();
+ EnsureSchemasExists();
+ if (!Components.Schemas.ContainsKey(schema.Reference.Id))
+ {
+ Components.Schemas.Add(schema.Reference.Id, schema);
+ }
+ }
+ base.Visit(schema);
+ }
+
+ private void EnsureComponentsExists()
+ {
+ if (_target.Components == null)
+ {
+ _target.Components = new OpenApiComponents();
+ }
+ }
+
+ private void EnsureSchemasExists()
+ {
+ if (_target.Components.Schemas == null)
+ {
+ _target.Components.Schemas = new Dictionary();
+ }
+ }
+
+ private void EnsureParametersExists()
+ {
+ if (_target.Components.Parameters == null)
+ {
+ _target.Components.Parameters = new Dictionary();
+ }
+ }
+
+ private void EnsureResponsesExists()
+ {
+ if (_target.Components.Responses == null)
+ {
+ _target.Components.Responses = new Dictionary();
+ }
+ }
+ }
+}
diff --git a/src/Microsoft.OpenApi/Services/OpenApiFilterService.cs b/src/Microsoft.OpenApi/Services/OpenApiFilterService.cs
new file mode 100644
index 000000000..11dcaec14
--- /dev/null
+++ b/src/Microsoft.OpenApi/Services/OpenApiFilterService.cs
@@ -0,0 +1,344 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT license.
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text.RegularExpressions;
+using Microsoft.OpenApi.Models;
+
+namespace Microsoft.OpenApi.Services
+{
+ ///
+ /// A service that slices an OpenApiDocument into a subset document
+ ///
+ public static class OpenApiFilterService
+ {
+ ///
+ /// Create predicate function based on passed query parameters
+ ///
+ /// Comma delimited list of operationIds or * for all operations.
+ /// Comma delimited list of tags or a single regex.
+ /// A dictionary of requests from a postman collection.
+ /// The input OpenAPI document.
+ /// A predicate.
+ public static Func CreatePredicate(string operationIds = null,
+ string tags = null, Dictionary> requestUrls = null, OpenApiDocument source = null)
+ {
+ Func predicate;
+
+ if (requestUrls != null && (operationIds != null || tags != null))
+ {
+ throw new InvalidOperationException("Cannot filter by Postman collection and either operationIds and tags at the same time.");
+ }
+ if (!string.IsNullOrEmpty(operationIds) && !string.IsNullOrEmpty(tags))
+ {
+ throw new InvalidOperationException("Cannot specify both operationIds and tags at the same time.");
+ }
+ if (operationIds != null)
+ {
+ if (operationIds == "*")
+ {
+ predicate = (url, operationType, operation) => true; // All operations
+ }
+ else
+ {
+ var operationIdsArray = operationIds.Split(',');
+ predicate = (url, operationType, operation) => operationIdsArray.Contains(operation.OperationId);
+ }
+ }
+ else if (tags != null)
+ {
+ var tagsArray = tags.Split(',');
+ if (tagsArray.Length == 1)
+ {
+ var regex = new Regex(tagsArray[0]);
+
+ predicate = (url, operationType, operation) => operation.Tags.Any(tag => regex.IsMatch(tag.Name));
+ }
+ else
+ {
+ predicate = (url, operationType, operation) => operation.Tags.Any(tag => tagsArray.Contains(tag.Name));
+ }
+ }
+ else if (requestUrls != null)
+ {
+ var operationTypes = new List();
+
+ if (source != null)
+ {
+ var apiVersion = source.Info.Version;
+
+ var sources = new Dictionary {{ apiVersion, source}};
+ var rootNode = CreateOpenApiUrlTreeNode(sources);
+
+ // Iterate through urls dictionary and fetch operations for each url
+ foreach (var url in requestUrls)
+ {
+ var serverList = source.Servers;
+ var path = ExtractPath(url.Key, serverList);
+
+ var openApiOperations = GetOpenApiOperations(rootNode, path, apiVersion);
+ if (openApiOperations == null)
+ {
+ Console.WriteLine($"The url {url.Key} could not be found in the OpenApi description");
+ continue;
+ }
+
+ // Add the available ops if they are in the postman collection. See path.Value
+ foreach (var ops in openApiOperations)
+ {
+ if (url.Value.Contains(ops.Key.ToString().ToUpper()))
+ {
+ operationTypes.Add(ops.Key + path);
+ }
+ }
+ }
+ }
+
+ if (!operationTypes.Any())
+ {
+ throw new ArgumentException("The urls in the Postman collection supplied could not be found.");
+ }
+
+ // predicate for matching url and operationTypes
+ predicate = (path, operationType, operation) => operationTypes.Contains(operationType + path);
+ }
+
+ else
+ {
+ throw new InvalidOperationException("Either operationId(s),tag(s) or Postman collection need to be specified.");
+ }
+
+ return predicate;
+ }
+
+ ///
+ /// Create partial OpenAPI document based on the provided predicate.
+ ///
+ /// The target .
+ /// A predicate function.
+ /// A partial OpenAPI document.
+ public static OpenApiDocument CreateFilteredDocument(OpenApiDocument source, Func predicate)
+ {
+ // Fetch and copy title, graphVersion and server info from OpenApiDoc
+ var subset = new OpenApiDocument
+ {
+ Info = new OpenApiInfo
+ {
+ Title = source.Info.Title + " - Subset",
+ Description = source.Info.Description,
+ TermsOfService = source.Info.TermsOfService,
+ Contact = source.Info.Contact,
+ License = source.Info.License,
+ Version = source.Info.Version,
+ Extensions = source.Info.Extensions
+ },
+
+ Components = new OpenApiComponents {SecuritySchemes = source.Components.SecuritySchemes},
+ SecurityRequirements = source.SecurityRequirements,
+ Servers = source.Servers
+ };
+
+ var results = FindOperations(source, predicate);
+ foreach (var result in results)
+ {
+ OpenApiPathItem pathItem;
+ var pathKey = result.CurrentKeys.Path;
+
+ if (subset.Paths == null)
+ {
+ subset.Paths = new OpenApiPaths();
+ pathItem = new OpenApiPathItem();
+ subset.Paths.Add(pathKey, pathItem);
+ }
+ else
+ {
+ if (!subset.Paths.TryGetValue(pathKey, out pathItem))
+ {
+ pathItem = new OpenApiPathItem();
+ subset.Paths.Add(pathKey, pathItem);
+ }
+ }
+
+ if (result.CurrentKeys.Operation != null)
+ {
+ pathItem.Operations.Add((OperationType)result.CurrentKeys.Operation, result.Operation);
+ }
+ }
+
+ if (subset.Paths == null)
+ {
+ throw new ArgumentException("No paths found for the supplied parameters.");
+ }
+
+ CopyReferences(subset);
+
+ return subset;
+ }
+
+ ///
+ /// Creates an from a collection of .
+ ///
+ /// Dictionary of labels and their corresponding objects.
+ /// The created .
+ public static OpenApiUrlTreeNode CreateOpenApiUrlTreeNode(Dictionary sources)
+ {
+ var rootNode = OpenApiUrlTreeNode.Create();
+ foreach (var source in sources)
+ {
+ rootNode.Attach(source.Value, source.Key);
+ }
+ return rootNode;
+ }
+
+ private static IDictionary GetOpenApiOperations(OpenApiUrlTreeNode rootNode, string relativeUrl, string label)
+ {
+ if (relativeUrl.Equals("/", StringComparison.Ordinal) && rootNode.HasOperations(label))
+ {
+ return rootNode.PathItems[label].Operations;
+ }
+
+ var urlSegments = relativeUrl.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
+
+ IDictionary operations = null;
+
+ var targetChild = rootNode;
+
+ /* This will help keep track of whether we've skipped a segment
+ * in the target url due to a possible parameter naming mismatch
+ * with the corresponding OpenApiUrlTreeNode target child segment.
+ */
+ var parameterNameOffset = 0;
+
+ for (var i = 0; i < urlSegments?.Length; i++)
+ {
+ var tempTargetChild = targetChild?.Children?
+ .FirstOrDefault(x => x.Key.Equals(urlSegments[i],
+ StringComparison.OrdinalIgnoreCase)).Value;
+
+ // Segment name mismatch
+ if (tempTargetChild == null)
+ {
+ if (i == 0)
+ {
+ /* If no match and we are at the 1st segment of the relative url,
+ * exit; no need to continue matching subsequent segments.
+ */
+ break;
+ }
+
+ /* Attempt to get the parameter segment from the children of the current node:
+ * We are assuming a failed match because of different parameter namings
+ * between the relative url segment and the corresponding OpenApiUrlTreeNode segment name
+ * ex.: matching '/users/12345/messages' with '/users/{user-id}/messages'
+ */
+ tempTargetChild = targetChild?.Children?
+ .FirstOrDefault(x => x.Value.IsParameter).Value;
+
+ /* If no parameter segment exists in the children of the
+ * current node or we've already skipped a parameter
+ * segment in the relative url from the last pass,
+ * then exit; there's no match.
+ */
+ if (tempTargetChild == null || parameterNameOffset > 0)
+ {
+ break;
+ }
+
+ /* To help us know we've skipped a
+ * corresponding segment in the relative url.
+ */
+ parameterNameOffset++;
+ }
+ else
+ {
+ parameterNameOffset = 0;
+ }
+
+ // Move to the next segment
+ targetChild = tempTargetChild;
+
+ // We want the operations of the last segment of the path.
+ if (i == urlSegments.Length - 1 && targetChild.HasOperations(label))
+ {
+ operations = targetChild.PathItems[label].Operations;
+ }
+ }
+
+ return operations;
+ }
+
+ private static IList FindOperations(OpenApiDocument sourceDocument, Func predicate)
+ {
+ var search = new OperationSearch(predicate);
+ var walker = new OpenApiWalker(search);
+ walker.Walk(sourceDocument);
+ return search.SearchResults;
+ }
+
+ private static void CopyReferences(OpenApiDocument target)
+ {
+ bool morestuff;
+ do
+ {
+ var copy = new CopyReferences(target);
+ var walker = new OpenApiWalker(copy);
+ walker.Walk(target);
+
+ morestuff = AddReferences(copy.Components, target.Components);
+
+ } while (morestuff);
+ }
+
+ private static bool AddReferences(OpenApiComponents newComponents, OpenApiComponents target)
+ {
+ var moreStuff = false;
+ foreach (var item in newComponents.Schemas)
+ {
+ if (!target.Schemas.ContainsKey(item.Key))
+ {
+ moreStuff = true;
+ target.Schemas.Add(item);
+ }
+ }
+
+ foreach (var item in newComponents.Parameters)
+ {
+ if (!target.Parameters.ContainsKey(item.Key))
+ {
+ moreStuff = true;
+ target.Parameters.Add(item);
+ }
+ }
+
+ foreach (var item in newComponents.Responses)
+ {
+ if (!target.Responses.ContainsKey(item.Key))
+ {
+ moreStuff = true;
+ target.Responses.Add(item);
+ }
+ }
+ return moreStuff;
+ }
+
+ private static string ExtractPath(string url, IList serverList)
+ {
+ var queryPath = string.Empty;
+ foreach (var server in serverList)
+ {
+ var serverUrl = server.Url.TrimEnd('/');
+ if (!url.Contains(serverUrl))
+ {
+ continue;
+ }
+
+ var urlComponents = url.Split(new[]{ serverUrl }, StringSplitOptions.None);
+ queryPath = urlComponents[1];
+ }
+
+ return queryPath;
+ }
+ }
+}
diff --git a/src/Microsoft.OpenApi/Services/OpenApiReferenceResolver.cs b/src/Microsoft.OpenApi/Services/OpenApiReferenceResolver.cs
index 6755883b6..840f9c660 100644
--- a/src/Microsoft.OpenApi/Services/OpenApiReferenceResolver.cs
+++ b/src/Microsoft.OpenApi/Services/OpenApiReferenceResolver.cs
@@ -42,6 +42,13 @@ public override void Visit(OpenApiDocument doc)
}
}
+ public override void Visit(IOpenApiReferenceable referenceable)
+ {
+ if (referenceable.Reference != null)
+ {
+ referenceable.Reference.HostDocument = _currentDocument;
+ }
+ }
public override void Visit(OpenApiComponents components)
{
ResolveMap(components.Parameters);
@@ -237,7 +244,7 @@ private void ResolveTags(IList tags)
{
try
{
- return _currentDocument.ResolveReference(reference) as T;
+ return _currentDocument.ResolveReference(reference, false) as T;
}
catch (OpenApiException ex)
{
@@ -245,24 +252,26 @@ private void ResolveTags(IList tags)
return null;
}
}
- else if (_resolveRemoteReferences == true)
- {
- if (_currentDocument.Workspace == null)
- {
- _errors.Add(new OpenApiReferenceError(reference,"Cannot resolve external references for documents not in workspaces."));
- // Leave as unresolved reference
- return new T()
- {
- UnresolvedReference = true,
- Reference = reference
- };
- }
- var target = _currentDocument.Workspace.ResolveReference(reference);
+ // The concept of merging references with their target at load time is going away in the next major version
+ // External references will not support this approach.
+ //else if (_resolveRemoteReferences == true)
+ //{
+ // if (_currentDocument.Workspace == null)
+ // {
+ // _errors.Add(new OpenApiReferenceError(reference,"Cannot resolve external references for documents not in workspaces."));
+ // // Leave as unresolved reference
+ // return new T()
+ // {
+ // UnresolvedReference = true,
+ // Reference = reference
+ // };
+ // }
+ // var target = _currentDocument.Workspace.ResolveReference(reference);
- // TODO: If it is a document fragment, then we should resolve it within the current context
+ // // TODO: If it is a document fragment, then we should resolve it within the current context
- return target as T;
- }
+ // return target as T;
+ //}
else
{
// Leave as unresolved reference
diff --git a/src/Microsoft.OpenApi/Services/OpenApiVisitorBase.cs b/src/Microsoft.OpenApi/Services/OpenApiVisitorBase.cs
index bc65fdfc2..c9679381a 100644
--- a/src/Microsoft.OpenApi/Services/OpenApiVisitorBase.cs
+++ b/src/Microsoft.OpenApi/Services/OpenApiVisitorBase.cs
@@ -25,7 +25,7 @@ public abstract class OpenApiVisitorBase
/// Allow Rule to indicate validation error occured at a deeper context level.
///
/// Identifier for context
- public void Enter(string segment)
+ public virtual void Enter(string segment)
{
this._path.Push(segment);
}
@@ -33,7 +33,7 @@ public void Enter(string segment)
///
/// Exit from path context elevel. Enter and Exit calls should be matched.
///
- public void Exit()
+ public virtual void Exit()
{
this._path.Pop();
}
diff --git a/src/Microsoft.OpenApi/Services/OperationSearch.cs b/src/Microsoft.OpenApi/Services/OperationSearch.cs
new file mode 100644
index 000000000..95b3a6341
--- /dev/null
+++ b/src/Microsoft.OpenApi/Services/OperationSearch.cs
@@ -0,0 +1,77 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT license.
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Microsoft.OpenApi.Models;
+
+namespace Microsoft.OpenApi.Services
+{
+ ///
+ /// Visits OpenApi operations and parameters.
+ ///
+ public class OperationSearch : OpenApiVisitorBase
+ {
+ private readonly Func _predicate;
+ private readonly List _searchResults = new();
+
+ ///
+ /// A list of operations from the operation search.
+ ///
+ public IList SearchResults => _searchResults;
+
+ ///
+ /// The OperationSearch constructor.
+ ///
+ /// A predicate function.
+ public OperationSearch(Func predicate)
+ {
+ _predicate = predicate ?? throw new ArgumentNullException(nameof(predicate));
+ }
+
+ ///
+ /// Visits .
+ ///
+ /// The target .
+ public override void Visit(OpenApiOperation operation)
+ {
+ if (_predicate(CurrentKeys.Path, CurrentKeys.Operation, operation))
+ {
+ _searchResults.Add(new SearchResult()
+ {
+ Operation = operation,
+ CurrentKeys = CopyCurrentKeys(CurrentKeys)
+ });
+ }
+ }
+
+ ///
+ /// Visits list of .
+ ///
+ /// The target list of .
+ public override void Visit(IList parameters)
+ {
+ /* The Parameter.Explode property should be true
+ * if Parameter.Style == Form; but OData query params
+ * as used in Microsoft Graph implement explode: false
+ * ex: $select=id,displayName,givenName
+ */
+ foreach (var parameter in parameters.Where(x => x.Style == ParameterStyle.Form))
+ {
+ parameter.Explode = false;
+ }
+
+ base.Visit(parameters);
+ }
+
+ private static CurrentKeys CopyCurrentKeys(CurrentKeys currentKeys)
+ {
+ return new CurrentKeys
+ {
+ Path = currentKeys.Path,
+ Operation = currentKeys.Operation
+ };
+ }
+ }
+}
diff --git a/src/Microsoft.OpenApi/Services/SearchResult.cs b/src/Microsoft.OpenApi/Services/SearchResult.cs
new file mode 100644
index 000000000..381a11f95
--- /dev/null
+++ b/src/Microsoft.OpenApi/Services/SearchResult.cs
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT license.
+
+using Microsoft.OpenApi.Models;
+
+namespace Microsoft.OpenApi.Services
+{
+ ///
+ /// Defines a search result model for visited operations.
+ ///
+ public class SearchResult
+ {
+ ///
+ /// An object containing contextual information based on where the walker is currently referencing in an OpenApiDocument.
+ ///
+ public CurrentKeys CurrentKeys { get; set; }
+
+ ///
+ /// An Operation object.
+ ///
+ public OpenApiOperation Operation { get; set; }
+ }
+}
diff --git a/src/Microsoft.OpenApi/Validations/IValidationContext.cs b/src/Microsoft.OpenApi/Validations/IValidationContext.cs
index 58f324bab..7ab4d08e7 100644
--- a/src/Microsoft.OpenApi/Validations/IValidationContext.cs
+++ b/src/Microsoft.OpenApi/Validations/IValidationContext.cs
@@ -14,6 +14,12 @@ public interface IValidationContext
/// Error to register.
void AddError(OpenApiValidatorError error);
+ ///
+ /// Register a warning with the validation context.
+ ///
+ /// Warning to register.
+ void AddWarning(OpenApiValidatorWarning warning);
+
///
/// Allow Rule to indicate validation error occured at a deeper context level.
///
diff --git a/src/Microsoft.OpenApi/Validations/OpenApiValidatiorWarning.cs b/src/Microsoft.OpenApi/Validations/OpenApiValidatiorWarning.cs
new file mode 100644
index 000000000..77480584d
--- /dev/null
+++ b/src/Microsoft.OpenApi/Validations/OpenApiValidatiorWarning.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Microsoft.OpenApi.Exceptions;
+using Microsoft.OpenApi.Models;
+
+namespace Microsoft.OpenApi.Validations
+{
+ ///
+ /// Warnings detected when validating an OpenAPI Element
+ ///
+ public class OpenApiValidatorWarning : OpenApiError
+ {
+ ///
+ /// Initializes the class.
+ ///
+ public OpenApiValidatorWarning(string ruleName, string pointer, string message) : base(pointer, message)
+ {
+ RuleName = ruleName;
+ }
+
+ ///
+ /// Name of rule that detected the error.
+ ///
+ public string RuleName { get; set; }
+ }
+
+}
diff --git a/src/Microsoft.OpenApi/Validations/OpenApiValidator.cs b/src/Microsoft.OpenApi/Validations/OpenApiValidator.cs
index 69bcda93d..ba2ed4129 100644
--- a/src/Microsoft.OpenApi/Validations/OpenApiValidator.cs
+++ b/src/Microsoft.OpenApi/Validations/OpenApiValidator.cs
@@ -17,6 +17,7 @@ public class OpenApiValidator : OpenApiVisitorBase, IValidationContext
{
private readonly ValidationRuleSet _ruleSet;
private readonly IList _errors = new List();
+ private readonly IList _warnings = new List();
///
/// Create a vistor that will validate an OpenAPIDocument
@@ -38,6 +39,17 @@ public IEnumerable Errors
}
}
+ ///
+ /// Gets the validation warnings.
+ ///
+ public IEnumerable Warnings
+ {
+ get
+ {
+ return _warnings;
+ }
+ }
+
///
/// Register an error with the validation context.
///
@@ -52,6 +64,19 @@ public void AddError(OpenApiValidatorError error)
_errors.Add(error);
}
+ ///
+ /// Register an error with the validation context.
+ ///
+ /// Error to register.
+ public void AddWarning(OpenApiValidatorWarning warning)
+ {
+ if (warning == null)
+ {
+ throw Error.ArgumentNull(nameof(warning));
+ }
+
+ _warnings.Add(warning);
+ }
///
/// Execute validation rules against an
diff --git a/src/Microsoft.OpenApi/Validations/Rules/OpenApiHeaderRules.cs b/src/Microsoft.OpenApi/Validations/Rules/OpenApiHeaderRules.cs
index f2b036457..9ffbc38f4 100644
--- a/src/Microsoft.OpenApi/Validations/Rules/OpenApiHeaderRules.cs
+++ b/src/Microsoft.OpenApi/Validations/Rules/OpenApiHeaderRules.cs
@@ -10,6 +10,7 @@ namespace Microsoft.OpenApi.Validations.Rules
///
/// The validation rules for .
///
+ //Removed from Default Rules as this is not a MUST in OpenAPI
[OpenApiRule]
public static class OpenApiHeaderRules
{
diff --git a/src/Microsoft.OpenApi/Validations/Rules/OpenApiMediaTypeRules.cs b/src/Microsoft.OpenApi/Validations/Rules/OpenApiMediaTypeRules.cs
index c86b5e79e..21ad4ef72 100644
--- a/src/Microsoft.OpenApi/Validations/Rules/OpenApiMediaTypeRules.cs
+++ b/src/Microsoft.OpenApi/Validations/Rules/OpenApiMediaTypeRules.cs
@@ -17,7 +17,7 @@ namespace Microsoft.OpenApi.Validations.Rules
/// Future versions of the example parsers should not try an infer types.
/// Example validation should be done as a separate post reading step so all schemas can be fully available.
///
- //[OpenApiRule]
+ [OpenApiRule]
public static class OpenApiMediaTypeRules
{
///
diff --git a/src/Microsoft.OpenApi/Validations/Rules/OpenApiParameterRules.cs b/src/Microsoft.OpenApi/Validations/Rules/OpenApiParameterRules.cs
index 7f1a8ec04..d38bd7f9e 100644
--- a/src/Microsoft.OpenApi/Validations/Rules/OpenApiParameterRules.cs
+++ b/src/Microsoft.OpenApi/Validations/Rules/OpenApiParameterRules.cs
@@ -103,7 +103,8 @@ public static class OpenApiParameterRules
new ValidationRule(
(context, parameter) =>
{
- if (parameter.In == ParameterLocation.Path && !context.PathString.Contains("{" + parameter.Name + "}"))
+ if (parameter.In == ParameterLocation.Path &&
+ !(context.PathString.Contains("{" + parameter.Name + "}") || context.PathString.Contains("#/components")))
{
context.Enter("in");
context.CreateError(
diff --git a/src/Microsoft.OpenApi/Validations/Rules/OpenApiSchemaRules.cs b/src/Microsoft.OpenApi/Validations/Rules/OpenApiSchemaRules.cs
index 8c45c8ff9..1639e6248 100644
--- a/src/Microsoft.OpenApi/Validations/Rules/OpenApiSchemaRules.cs
+++ b/src/Microsoft.OpenApi/Validations/Rules/OpenApiSchemaRules.cs
@@ -11,6 +11,7 @@ namespace Microsoft.OpenApi.Validations.Rules
///
/// The validation rules for .
///
+
[OpenApiRule]
public static class OpenApiSchemaRules
{
diff --git a/src/Microsoft.OpenApi/Validations/Rules/RuleHelpers.cs b/src/Microsoft.OpenApi/Validations/Rules/RuleHelpers.cs
index 05cce7fbc..630dc8e65 100644
--- a/src/Microsoft.OpenApi/Validations/Rules/RuleHelpers.cs
+++ b/src/Microsoft.OpenApi/Validations/Rules/RuleHelpers.cs
@@ -77,7 +77,7 @@ public static void ValidateDataTypeMismatch(
// If value is not a string and also not an object, there is a data mismatch.
if (!(value is OpenApiObject))
{
- context.CreateError(
+ context.CreateWarning(
ruleName,
DataTypeMismatchedErrorMessage);
return;
@@ -117,7 +117,7 @@ public static void ValidateDataTypeMismatch(
// If value is not a string and also not an array, there is a data mismatch.
if (!(value is OpenApiArray))
{
- context.CreateError(
+ context.CreateWarning(
ruleName,
DataTypeMismatchedErrorMessage);
return;
@@ -141,7 +141,7 @@ public static void ValidateDataTypeMismatch(
{
if (!(value is OpenApiInteger))
{
- context.CreateError(
+ context.CreateWarning(
ruleName,
DataTypeMismatchedErrorMessage);
}
@@ -153,7 +153,7 @@ public static void ValidateDataTypeMismatch(
{
if (!(value is OpenApiLong))
{
- context.CreateError(
+ context.CreateWarning(
ruleName,
DataTypeMismatchedErrorMessage);
}
@@ -165,7 +165,7 @@ public static void ValidateDataTypeMismatch(
{
if (!(value is OpenApiInteger))
{
- context.CreateError(
+ context.CreateWarning(
ruleName,
DataTypeMismatchedErrorMessage);
}
@@ -177,7 +177,7 @@ public static void ValidateDataTypeMismatch(
{
if (!(value is OpenApiFloat))
{
- context.CreateError(
+ context.CreateWarning(
ruleName,
DataTypeMismatchedErrorMessage);
}
@@ -189,7 +189,7 @@ public static void ValidateDataTypeMismatch(
{
if (!(value is OpenApiDouble))
{
- context.CreateError(
+ context.CreateWarning(
ruleName,
DataTypeMismatchedErrorMessage);
}
@@ -201,7 +201,7 @@ public static void ValidateDataTypeMismatch(
{
if (!(value is OpenApiDouble))
{
- context.CreateError(
+ context.CreateWarning(
ruleName,
DataTypeMismatchedErrorMessage);
}
@@ -213,7 +213,7 @@ public static void ValidateDataTypeMismatch(
{
if (!(value is OpenApiByte))
{
- context.CreateError(
+ context.CreateWarning(
ruleName,
DataTypeMismatchedErrorMessage);
}
@@ -225,7 +225,7 @@ public static void ValidateDataTypeMismatch(
{
if (!(value is OpenApiDate))
{
- context.CreateError(
+ context.CreateWarning(
ruleName,
DataTypeMismatchedErrorMessage);
}
@@ -237,7 +237,7 @@ public static void ValidateDataTypeMismatch(
{
if (!(value is OpenApiDateTime))
{
- context.CreateError(
+ context.CreateWarning(
ruleName,
DataTypeMismatchedErrorMessage);
}
@@ -249,7 +249,7 @@ public static void ValidateDataTypeMismatch(
{
if (!(value is OpenApiPassword))
{
- context.CreateError(
+ context.CreateWarning(
ruleName,
DataTypeMismatchedErrorMessage);
}
@@ -261,7 +261,7 @@ public static void ValidateDataTypeMismatch(
{
if (!(value is OpenApiString))
{
- context.CreateError(
+ context.CreateWarning(
ruleName,
DataTypeMismatchedErrorMessage);
}
@@ -273,7 +273,7 @@ public static void ValidateDataTypeMismatch(
{
if (!(value is OpenApiBoolean))
{
- context.CreateError(
+ context.CreateWarning(
ruleName,
DataTypeMismatchedErrorMessage);
}
diff --git a/src/Microsoft.OpenApi/Validations/ValidationExtensions.cs b/src/Microsoft.OpenApi/Validations/ValidationExtensions.cs
index a66d085c3..195df89cd 100644
--- a/src/Microsoft.OpenApi/Validations/ValidationExtensions.cs
+++ b/src/Microsoft.OpenApi/Validations/ValidationExtensions.cs
@@ -23,5 +23,15 @@ public static void CreateError(this IValidationContext context, string ruleName,
OpenApiValidatorError error = new OpenApiValidatorError(ruleName, context.PathString, message);
context.AddError(error);
}
+
+ ///
+ /// Helper method to simplify validation rules
+ ///
+ public static void CreateWarning(this IValidationContext context, string ruleName, string message)
+ {
+ OpenApiValidatorWarning warning = new OpenApiValidatorWarning(ruleName, context.PathString, message);
+ context.AddWarning(warning);
+ }
+
}
}
diff --git a/src/Microsoft.OpenApi/Writers/OpenApiJsonWriter.cs b/src/Microsoft.OpenApi/Writers/OpenApiJsonWriter.cs
index 72e74a51e..10049974b 100644
--- a/src/Microsoft.OpenApi/Writers/OpenApiJsonWriter.cs
+++ b/src/Microsoft.OpenApi/Writers/OpenApiJsonWriter.cs
@@ -23,10 +23,27 @@ public OpenApiJsonWriter(TextWriter textWriter) : base(textWriter, null)
///
/// The text writer.
/// Settings for controlling how the OpenAPI document will be written out.
- public OpenApiJsonWriter(TextWriter textWriter, OpenApiWriterSettings settings) : base(textWriter, settings)
+ public OpenApiJsonWriter(TextWriter textWriter, OpenApiJsonWriterSettings settings) : base(textWriter, settings)
{
+ _produceTerseOutput = settings.Terse;
}
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The text writer.
+ /// Settings for controlling how the OpenAPI document will be written out.
+ /// Setting for allowing the JSON emitted to be in terse format.
+ public OpenApiJsonWriter(TextWriter textWriter, OpenApiWriterSettings settings, bool terseOutput = false) : base(textWriter, settings)
+ {
+ _produceTerseOutput = terseOutput;
+ }
+
+ ///
+ /// Indicates whether or not the produced document will be written in a compact or pretty fashion.
+ ///
+ private bool _produceTerseOutput = false;
+
///
/// Base Indentation Level.
/// This denotes how many indentations are needed for the property in the base object.
@@ -51,7 +68,7 @@ public override void WriteStartObject()
Writer.Write(WriterConstants.ArrayElementSeparator);
}
- Writer.WriteLine();
+ WriteLine();
WriteIndentation();
}
@@ -68,13 +85,16 @@ public override void WriteEndObject()
var currentScope = EndScope(ScopeType.Object);
if (currentScope.ObjectCount != 0)
{
- Writer.WriteLine();
+ WriteLine();
DecreaseIndentation();
WriteIndentation();
}
else
{
- Writer.Write(WriterConstants.WhiteSpaceForEmptyObject);
+ if (!_produceTerseOutput)
+ {
+ Writer.Write(WriterConstants.WhiteSpaceForEmptyObject);
+ }
DecreaseIndentation();
}
@@ -99,7 +119,7 @@ public override void WriteStartArray()
Writer.Write(WriterConstants.ArrayElementSeparator);
}
- Writer.WriteLine();
+ WriteLine();
WriteIndentation();
}
@@ -115,7 +135,7 @@ public override void WriteEndArray()
var current = EndScope(ScopeType.Array);
if (current.ObjectCount != 0)
{
- Writer.WriteLine();
+ WriteLine();
DecreaseIndentation();
WriteIndentation();
}
@@ -143,7 +163,7 @@ public override void WritePropertyName(string name)
Writer.Write(WriterConstants.ObjectMemberSeparator);
}
- Writer.WriteLine();
+ WriteLine();
currentScope.ObjectCount++;
@@ -154,6 +174,11 @@ public override void WritePropertyName(string name)
Writer.Write(name);
Writer.Write(WriterConstants.NameValueSeparator);
+
+ if (!_produceTerseOutput)
+ {
+ Writer.Write(WriterConstants.NameValueSeparatorWhiteSpaceSuffix);
+ }
}
///
@@ -198,7 +223,7 @@ protected override void WriteValueSeparator()
Writer.Write(WriterConstants.ArrayElementSeparator);
}
- Writer.WriteLine();
+ WriteLine();
WriteIndentation();
currentScope.ObjectCount++;
}
@@ -212,5 +237,31 @@ public override void WriteRaw(string value)
WriteValueSeparator();
Writer.Write(value);
}
+
+ ///
+ /// Write the indentation.
+ ///
+ public override void WriteIndentation()
+ {
+ if (_produceTerseOutput)
+ {
+ return;
+ }
+
+ base.WriteIndentation();
+ }
+
+ ///
+ /// Writes a line terminator to the text string or stream.
+ ///
+ private void WriteLine()
+ {
+ if (_produceTerseOutput)
+ {
+ return;
+ }
+
+ Writer.WriteLine();
+ }
}
}
diff --git a/src/Microsoft.OpenApi/Writers/OpenApiJsonWriterSettings.cs b/src/Microsoft.OpenApi/Writers/OpenApiJsonWriterSettings.cs
new file mode 100644
index 000000000..4784dc9cf
--- /dev/null
+++ b/src/Microsoft.OpenApi/Writers/OpenApiJsonWriterSettings.cs
@@ -0,0 +1,19 @@
+namespace Microsoft.OpenApi.Writers
+{
+ ///
+ /// Configuration settings to control how OpenAPI Json documents are written
+ ///
+ public class OpenApiJsonWriterSettings : OpenApiWriterSettings
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public OpenApiJsonWriterSettings()
+ { }
+
+ ///
+ /// Indicates whether or not the produced document will be written in a compact or pretty fashion.
+ ///
+ public bool Terse { get; set; } = false;
+ }
+}
diff --git a/src/Microsoft.OpenApi/Writers/OpenApiWriterSettings.cs b/src/Microsoft.OpenApi/Writers/OpenApiWriterSettings.cs
index 45eedc831..cf00c1339 100644
--- a/src/Microsoft.OpenApi/Writers/OpenApiWriterSettings.cs
+++ b/src/Microsoft.OpenApi/Writers/OpenApiWriterSettings.cs
@@ -1,36 +1,79 @@
+using System;
+using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.Services;
namespace Microsoft.OpenApi.Writers
{
///
- /// Indicates if and when the reader should convert references into complete object renderings
+ /// Indicates if and when the writer should convert references into complete object renderings
///
+ [Obsolete("Use InlineLocalReference and InlineExternalReference settings instead")]
public enum ReferenceInlineSetting
{
///
- /// Create placeholder objects with an OpenApiReference instance and UnresolvedReference set to true.
+ /// Render all references as $ref.
///
DoNotInlineReferences,
///
- /// Convert local references to references of valid domain objects.
+ /// Render all local references as inline objects
///
InlineLocalReferences,
///
- /// Convert all references to references of valid domain objects.
+ /// Render all references as inline objects.
///
InlineAllReferences
}
+
///
/// Configuration settings to control how OpenAPI documents are written
///
public class OpenApiWriterSettings
{
+ private ReferenceInlineSetting referenceInline = ReferenceInlineSetting.DoNotInlineReferences;
+
internal LoopDetector LoopDetector { get; } = new LoopDetector();
///
/// Indicates how references in the source document should be handled.
///
- public ReferenceInlineSetting ReferenceInline { get; set; } = ReferenceInlineSetting.DoNotInlineReferences;
+ [Obsolete("Use InlineLocalReference and InlineExternalReference settings instead")]
+ public ReferenceInlineSetting ReferenceInline {
+ get { return referenceInline; }
+ set {
+ referenceInline = value;
+ switch(referenceInline)
+ {
+ case ReferenceInlineSetting.DoNotInlineReferences:
+ InlineLocalReferences = false;
+ InlineExternalReferences = false;
+ break;
+ case ReferenceInlineSetting.InlineLocalReferences:
+ InlineLocalReferences = true;
+ InlineExternalReferences = false;
+ break;
+ case ReferenceInlineSetting.InlineAllReferences:
+ InlineLocalReferences = true;
+ InlineExternalReferences = true;
+ break;
+ }
+ }
+ }
+ ///
+ /// Indicates if local references should be rendered as an inline object
+ ///
+ public bool InlineLocalReferences { get; set; } = false;
+
+ ///
+ /// Indicates if external references should be rendered as an inline object
+ ///
+ public bool InlineExternalReferences { get; set; } = false;
+
+ internal bool ShouldInlineReference(OpenApiReference reference)
+ {
+ return (reference.IsLocal && InlineLocalReferences)
+ || (reference.IsExternal && InlineExternalReferences);
+ }
+
}
}
diff --git a/src/Microsoft.OpenApi/Writers/WriterConstants.cs b/src/Microsoft.OpenApi/Writers/WriterConstants.cs
index bfc943797..5b4f2da91 100644
--- a/src/Microsoft.OpenApi/Writers/WriterConstants.cs
+++ b/src/Microsoft.OpenApi/Writers/WriterConstants.cs
@@ -81,7 +81,13 @@ internal static class WriterConstants
///
/// The separator between the name and the value.
///
- internal const string NameValueSeparator = ": ";
+ internal const string NameValueSeparator = ":";
+
+ ///
+ /// The white space postfixing
+ /// when producing pretty content.
+ ///
+ internal const string NameValueSeparatorWhiteSpaceSuffix = " ";
///
/// The white space for empty object
diff --git a/test/.gitignore b/test/.gitignore
new file mode 100644
index 000000000..1c9a99104
--- /dev/null
+++ b/test/.gitignore
@@ -0,0 +1 @@
+*.received.*
diff --git a/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj b/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj
index 0a4ed6494..bfcba0163 100644
--- a/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj
+++ b/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj
@@ -1,6 +1,6 @@
- net462;net50
+ net6.0
false
Microsoft
@@ -242,12 +242,12 @@
-
-
+
+
-
+
diff --git a/test/Microsoft.OpenApi.Readers.Tests/OpenApiWorkspaceTests/OpenApiWorkspaceStreamTests.cs b/test/Microsoft.OpenApi.Readers.Tests/OpenApiWorkspaceTests/OpenApiWorkspaceStreamTests.cs
index d684144cb..4a2c2cafe 100644
--- a/test/Microsoft.OpenApi.Readers.Tests/OpenApiWorkspaceTests/OpenApiWorkspaceStreamTests.cs
+++ b/test/Microsoft.OpenApi.Readers.Tests/OpenApiWorkspaceTests/OpenApiWorkspaceStreamTests.cs
@@ -1,13 +1,9 @@
using System;
-using System.Collections.Generic;
using System.IO;
using System.Linq;
-using System.Text;
using System.Threading.Tasks;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.Readers.Interface;
-using Microsoft.OpenApi.Readers.Services;
-using Microsoft.OpenApi.Services;
using Xunit;
namespace Microsoft.OpenApi.Readers.Tests.OpenApiWorkspaceTests
@@ -19,13 +15,14 @@ public class OpenApiWorkspaceStreamTests
// Use OpenApiWorkspace to load a document and a referenced document
[Fact]
- public async Task LoadDocumentIntoWorkspace()
+ public async Task LoadingDocumentWithResolveAllReferencesShouldLoadDocumentIntoWorkspace()
{
// Create a reader that will resolve all references
var reader = new OpenApiStreamReader(new OpenApiReaderSettings()
{
- ReferenceResolution = ReferenceResolutionSetting.ResolveAllReferences,
- CustomExternalLoader = new MockLoader()
+ LoadExternalRefs = true,
+ CustomExternalLoader = new MockLoader(),
+ BaseUrl = new Uri("file://c:\\")
});
// Todo: this should be ReadAsync
@@ -48,13 +45,14 @@ public async Task LoadDocumentIntoWorkspace()
[Fact]
- public async Task LoadTodoDocumentIntoWorkspace()
+ public async Task LoadDocumentWithExternalReferenceShouldLoadBothDocumentsIntoWorkspace()
{
// Create a reader that will resolve all references
var reader = new OpenApiStreamReader(new OpenApiReaderSettings()
{
- ReferenceResolution = ReferenceResolutionSetting.ResolveAllReferences,
- CustomExternalLoader = new ResourceLoader()
+ LoadExternalRefs = true,
+ CustomExternalLoader = new ResourceLoader(),
+ BaseUrl = new Uri("fie://c:\\")
});
ReadResult result;
@@ -65,12 +63,13 @@ public async Task LoadTodoDocumentIntoWorkspace()
Assert.NotNull(result.OpenApiDocument.Workspace);
Assert.True(result.OpenApiDocument.Workspace.Contains("TodoComponents.yaml"));
+
var referencedSchema = result.OpenApiDocument
.Paths["/todos"]
.Operations[OperationType.Get]
.Responses["200"]
.Content["application/json"]
- .Schema;
+ .Schema.GetEffective(result.OpenApiDocument);
Assert.Equal("object", referencedSchema.Type);
Assert.Equal("string", referencedSchema.Properties["subject"].Type);
Assert.False(referencedSchema.UnresolvedReference);
@@ -78,8 +77,9 @@ public async Task LoadTodoDocumentIntoWorkspace()
var referencedParameter = result.OpenApiDocument
.Paths["/todos"]
.Operations[OperationType.Get]
- .Parameters
+ .Parameters.Select(p => p.GetEffective(result.OpenApiDocument))
.Where(p => p.Name == "filter").FirstOrDefault();
+
Assert.Equal("string", referencedParameter.Schema.Type);
}
diff --git a/test/Microsoft.OpenApi.Readers.Tests/ReferenceService/ConvertToOpenApiReferenceV2Tests.cs b/test/Microsoft.OpenApi.Readers.Tests/ReferenceService/ConvertToOpenApiReferenceV2Tests.cs
index e374dc205..bd9600e4f 100644
--- a/test/Microsoft.OpenApi.Readers.Tests/ReferenceService/ConvertToOpenApiReferenceV2Tests.cs
+++ b/test/Microsoft.OpenApi.Readers.Tests/ReferenceService/ConvertToOpenApiReferenceV2Tests.cs
@@ -10,15 +10,39 @@ namespace Microsoft.OpenApi.Readers.Tests
{
public class ConvertToOpenApiReferenceV2Tests
{
+ public OpenApiDiagnostic Diagnostic{get;}
+
+ public ConvertToOpenApiReferenceV2Tests()
+ {
+ Diagnostic = new OpenApiDiagnostic();
+ }
+
+ [Fact]
+ public void ParseExternalReferenceToV2OpenApi()
+ {
+ // Arrange
+ var versionService = new OpenApiV2VersionService(Diagnostic);
+ var externalResource = "externalSchema.json";
+ var id = "mySchema";
+ var input = $"{externalResource}#/definitions/{id}";
+
+ // Act
+ var reference = versionService.ConvertToOpenApiReference(input, null);
+
+ // Assert
+ reference.ExternalResource.Should().Be(externalResource);
+ reference.Type.Should().NotBeNull();
+ reference.Id.Should().Be(id);
+ }
[Fact]
public void ParseExternalReference()
{
// Arrange
- var versionService = new OpenApiV2VersionService();
+ var versionService = new OpenApiV2VersionService(Diagnostic);
var externalResource = "externalSchema.json";
- var id = "externalPathSegment1/externalPathSegment2/externalPathSegment3";
- var input = $"{externalResource}#/{id}";
+ var id = "/externalPathSegment1/externalPathSegment2/externalPathSegment3";
+ var input = $"{externalResource}#{id}";
// Act
var reference = versionService.ConvertToOpenApiReference(input, null);
@@ -33,7 +57,7 @@ public void ParseExternalReference()
public void ParseLocalParameterReference()
{
// Arrange
- var versionService = new OpenApiV2VersionService();
+ var versionService = new OpenApiV2VersionService(Diagnostic);
var referenceType = ReferenceType.Parameter;
var id = "parameterId";
var input = $"#/parameters/{id}";
@@ -51,7 +75,7 @@ public void ParseLocalParameterReference()
public void ParseLocalSchemaReference()
{
// Arrange
- var versionService = new OpenApiV2VersionService();
+ var versionService = new OpenApiV2VersionService(Diagnostic);
var referenceType = ReferenceType.Schema;
var id = "parameterId";
var input = $"#/definitions/{id}";
@@ -69,7 +93,7 @@ public void ParseLocalSchemaReference()
public void ParseTagReference()
{
// Arrange
- var versionService = new OpenApiV2VersionService();
+ var versionService = new OpenApiV2VersionService(Diagnostic);
var referenceType = ReferenceType.Tag;
var id = "tagId";
var input = $"{id}";
@@ -87,7 +111,7 @@ public void ParseTagReference()
public void ParseSecuritySchemeReference()
{
// Arrange
- var versionService = new OpenApiV2VersionService();
+ var versionService = new OpenApiV2VersionService(Diagnostic);
var referenceType = ReferenceType.SecurityScheme;
var id = "securitySchemeId";
var input = $"{id}";
diff --git a/test/Microsoft.OpenApi.Readers.Tests/ReferenceService/ConvertToOpenApiReferenceV3Tests.cs b/test/Microsoft.OpenApi.Readers.Tests/ReferenceService/ConvertToOpenApiReferenceV3Tests.cs
index 04debfd7d..f7368b09b 100644
--- a/test/Microsoft.OpenApi.Readers.Tests/ReferenceService/ConvertToOpenApiReferenceV3Tests.cs
+++ b/test/Microsoft.OpenApi.Readers.Tests/ReferenceService/ConvertToOpenApiReferenceV3Tests.cs
@@ -10,12 +10,20 @@ namespace Microsoft.OpenApi.Readers.Tests
{
public class ConvertToOpenApiReferenceV3Tests
{
+ public OpenApiDiagnostic Diagnostic { get; }
+
+ public ConvertToOpenApiReferenceV3Tests()
+ {
+ Diagnostic = new OpenApiDiagnostic();
+ }
+
+
[Fact]
public void ParseExternalReference()
{
// Arrange
- var versionService = new OpenApiV3VersionService();
+ var versionService = new OpenApiV3VersionService(Diagnostic);
var externalResource = "externalSchema.json";
var id = "/externalPathSegment1/externalPathSegment2/externalPathSegment3";
var input = $"{externalResource}#{id}";
@@ -33,7 +41,7 @@ public void ParseExternalReference()
public void ParseLocalParameterReference()
{
// Arrange
- var versionService = new OpenApiV3VersionService();
+ var versionService = new OpenApiV3VersionService(Diagnostic);
var referenceType = ReferenceType.Parameter;
var id = "parameterId";
var input = $"#/components/parameters/{id}";
@@ -51,7 +59,7 @@ public void ParseLocalParameterReference()
public void ParseLocalSchemaReference()
{
// Arrange
- var versionService = new OpenApiV3VersionService();
+ var versionService = new OpenApiV3VersionService(Diagnostic);
var referenceType = ReferenceType.Schema;
var id = "schemaId";
var input = $"#/components/schemas/{id}";
@@ -69,7 +77,7 @@ public void ParseLocalSchemaReference()
public void ParseTagReference()
{
// Arrange
- var versionService = new OpenApiV3VersionService();
+ var versionService = new OpenApiV3VersionService(Diagnostic);
var referenceType = ReferenceType.Tag;
var id = "tagId";
var input = $"{id}";
@@ -87,7 +95,7 @@ public void ParseTagReference()
public void ParseSecuritySchemeReference()
{
// Arrange
- var versionService = new OpenApiV3VersionService();
+ var versionService = new OpenApiV3VersionService(Diagnostic);
var referenceType = ReferenceType.SecurityScheme;
var id = "securitySchemeId";
var input = $"{id}";
@@ -100,5 +108,21 @@ public void ParseSecuritySchemeReference()
reference.ExternalResource.Should().BeNull();
reference.Id.Should().Be(id);
}
+
+ [Fact]
+ public void ParseLocalFileReference()
+ {
+ // Arrange
+ var versionService = new OpenApiV3VersionService(Diagnostic);
+ var referenceType = ReferenceType.Schema;
+ var input = $"../schemas/collection.json";
+
+ // Act
+ var reference = versionService.ConvertToOpenApiReference(input, referenceType);
+
+ // Assert
+ reference.Type.Should().Be(referenceType);
+ reference.ExternalResource.Should().Be(input);
+ }
}
}
diff --git a/test/Microsoft.OpenApi.Readers.Tests/ReferenceService/TryLoadReferenceV2Tests.cs b/test/Microsoft.OpenApi.Readers.Tests/ReferenceService/TryLoadReferenceV2Tests.cs
index d7f110b10..a641b7d6f 100644
--- a/test/Microsoft.OpenApi.Readers.Tests/ReferenceService/TryLoadReferenceV2Tests.cs
+++ b/test/Microsoft.OpenApi.Readers.Tests/ReferenceService/TryLoadReferenceV2Tests.cs
@@ -38,7 +38,7 @@ public void LoadSchemaReference()
};
// Act
- var referencedObject = document.ResolveReference(reference);
+ var referencedObject = document.ResolveReferenceTo(reference);
// Assert
referencedObject.Should().BeEquivalentTo(
@@ -93,7 +93,7 @@ public void LoadParameterReference()
};
// Act
- var referencedObject = document.ResolveReference(reference);
+ var referencedObject = document.ResolveReferenceTo(reference);
// Assert
referencedObject.Should().BeEquivalentTo(
@@ -136,7 +136,7 @@ public void LoadSecuritySchemeReference()
};
// Act
- var referencedObject = document.ResolveReference(reference);
+ var referencedObject = document.ResolveReferenceTo(reference);
// Assert
referencedObject.Should().BeEquivalentTo(
@@ -173,7 +173,7 @@ public void LoadResponseReference()
};
// Act
- var referencedObject = document.ResolveReference(reference);
+ var referencedObject = document.ResolveReferenceTo(reference);
// Assert
referencedObject.Should().BeEquivalentTo(
@@ -212,7 +212,7 @@ public void LoadResponseAndSchemaReference()
};
// Act
- var referencedObject = document.ResolveReference(reference);
+ var referencedObject = document.ResolveReferenceTo(reference);
// Assert
referencedObject.Should().BeEquivalentTo(
@@ -241,7 +241,8 @@ public void LoadResponseAndSchemaReference()
Reference = new OpenApiReference
{
Type = ReferenceType.Schema,
- Id = "SampleObject2"
+ Id = "SampleObject2",
+ HostDocument = document
}
}
}
diff --git a/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiDocumentTests.cs b/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiDocumentTests.cs
index ad8e7e445..57593a79e 100644
--- a/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiDocumentTests.cs
+++ b/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiDocumentTests.cs
@@ -8,15 +8,23 @@
using FluentAssertions;
using Microsoft.OpenApi.Any;
using Microsoft.OpenApi.Exceptions;
+using Microsoft.OpenApi.Extensions;
+using Microsoft.OpenApi.Interfaces;
using Microsoft.OpenApi.Models;
+using Microsoft.OpenApi.Writers;
using Xunit;
namespace Microsoft.OpenApi.Readers.Tests.V2Tests
{
+
+
public class OpenApiDocumentTests
{
private const string SampleFolderPath = "V2Tests/Samples/";
+
+
+
[Fact]
public void ShouldThrowWhenReferenceTypeIsInvalid()
{
@@ -161,7 +169,8 @@ public void ShouldParseProducesInAnyOrder()
Reference = new OpenApiReference
{
Type = ReferenceType.Schema,
- Id = "Item"
+ Id = "Item",
+ HostDocument = doc
},
Items = new OpenApiSchema()
{
@@ -177,7 +186,8 @@ public void ShouldParseProducesInAnyOrder()
Reference = new OpenApiReference()
{
Type = ReferenceType.Schema,
- Id = "Item"
+ Id = "Item",
+ HostDocument = doc
}
}
};
@@ -187,7 +197,8 @@ public void ShouldParseProducesInAnyOrder()
Reference = new OpenApiReference
{
Type = ReferenceType.Schema,
- Id = "Item"
+ Id = "Item",
+ HostDocument = doc
},
Properties = new Dictionary()
{
@@ -205,7 +216,8 @@ public void ShouldParseProducesInAnyOrder()
Reference = new OpenApiReference
{
Type = ReferenceType.Schema,
- Id = "Error"
+ Id = "Error",
+ HostDocument= doc
},
Properties = new Dictionary()
{
@@ -375,7 +387,8 @@ public void ShouldAssignSchemaToAllResponses()
Reference = new OpenApiReference
{
Id = "Item",
- Type = ReferenceType.Schema
+ Type = ReferenceType.Schema,
+ HostDocument = document
}
}
};
@@ -402,7 +415,8 @@ public void ShouldAssignSchemaToAllResponses()
Reference = new OpenApiReference
{
Id = "Error",
- Type = ReferenceType.Schema
+ Type = ReferenceType.Schema,
+ HostDocument= document
}
};
var responses = document.Paths["/items"].Operations[OperationType.Get].Responses;
@@ -430,7 +444,7 @@ public void ShouldAllowComponentsThatJustContainAReference()
OpenApiDocument doc = reader.Read(stream, out OpenApiDiagnostic diags);
OpenApiSchema schema1 = doc.Components.Schemas["AllPets"];
Assert.False(schema1.UnresolvedReference);
- OpenApiSchema schema2 = (OpenApiSchema)doc.ResolveReference(schema1.Reference);
+ OpenApiSchema schema2 = doc.ResolveReferenceTo(schema1.Reference);
if (schema2.UnresolvedReference && schema1.Reference.Id == schema2.Reference.Id)
{
// detected a cycle - this code gets triggered
diff --git a/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiSecuritySchemeTests.cs b/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiSecuritySchemeTests.cs
index 1a4a2a3d7..22f7d1633 100644
--- a/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiSecuritySchemeTests.cs
+++ b/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiSecuritySchemeTests.cs
@@ -38,7 +38,7 @@ public void ParseHttpSecuritySchemeShouldSucceed()
new OpenApiSecurityScheme
{
Type = SecuritySchemeType.Http,
- Scheme = "basic"
+ Scheme = OpenApiConstants.Basic
});
}
}
diff --git a/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiCallbackTests.cs b/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiCallbackTests.cs
index f23bee9f9..320f01fae 100644
--- a/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiCallbackTests.cs
+++ b/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiCallbackTests.cs
@@ -127,6 +127,7 @@ public void ParseCallbackWithReferenceShouldSucceed()
{
Type = ReferenceType.Callback,
Id = "simpleHook",
+ HostDocument = openApiDoc
}
});
}
@@ -185,6 +186,7 @@ public void ParseMultipleCallbacksWithReferenceShouldSucceed()
{
Type = ReferenceType.Callback,
Id = "simpleHook",
+ HostDocument = openApiDoc
}
});
diff --git a/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiDocumentTests.cs b/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiDocumentTests.cs
index 93d3c1a1b..f1d8b805f 100644
--- a/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiDocumentTests.cs
+++ b/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiDocumentTests.cs
@@ -9,9 +9,12 @@
using System.Threading;
using FluentAssertions;
using Microsoft.OpenApi.Any;
+using Microsoft.OpenApi.Extensions;
+using Microsoft.OpenApi.Interfaces;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.Validations;
using Microsoft.OpenApi.Validations.Rules;
+using Microsoft.OpenApi.Writers;
using Newtonsoft.Json;
using Xunit;
using Xunit.Abstractions;
@@ -25,6 +28,49 @@ public class OpenApiDocumentTests
private readonly ITestOutputHelper _output;
+ public T Clone(T element) where T : IOpenApiSerializable
+ {
+ using (var stream = new MemoryStream())
+ {
+ IOpenApiWriter writer;
+ var streamWriter = new FormattingStreamWriter(stream, CultureInfo.InvariantCulture);
+ writer = new OpenApiJsonWriter(streamWriter, new OpenApiJsonWriterSettings() {
+ InlineLocalReferences = true});
+ element.SerializeAsV3(writer);
+ writer.Flush();
+ stream.Position = 0;
+
+ using (var streamReader = new StreamReader(stream))
+ {
+ var result = streamReader.ReadToEnd();
+ return new OpenApiStringReader().ReadFragment(result, OpenApiSpecVersion.OpenApi3_0, out OpenApiDiagnostic diagnostic4);
+ }
+ }
+ }
+
+ public OpenApiSecurityScheme CloneSecurityScheme(OpenApiSecurityScheme element)
+ {
+ using (var stream = new MemoryStream())
+ {
+ IOpenApiWriter writer;
+ var streamWriter = new FormattingStreamWriter(stream, CultureInfo.InvariantCulture);
+ writer = new OpenApiJsonWriter(streamWriter, new OpenApiJsonWriterSettings()
+ {
+ InlineLocalReferences = true
+ });
+ element.SerializeAsV3WithoutReference(writer);
+ writer.Flush();
+ stream.Position = 0;
+
+ using (var streamReader = new StreamReader(stream))
+ {
+ var result = streamReader.ReadToEnd();
+ return new OpenApiStringReader().ReadFragment(result, OpenApiSpecVersion.OpenApi3_0, out OpenApiDiagnostic diagnostic4);
+ }
+ }
+ }
+
+
public OpenApiDocumentTests(ITestOutputHelper output)
{
_output = output;
@@ -256,7 +302,8 @@ public void ParseStandardPetStoreDocumentShouldSucceed()
Reference = new OpenApiReference
{
Type = ReferenceType.Schema,
- Id = "pet"
+ Id = "pet",
+ HostDocument = actual
}
},
["newPet"] = new OpenApiSchema
@@ -285,7 +332,8 @@ public void ParseStandardPetStoreDocumentShouldSucceed()
Reference = new OpenApiReference
{
Type = ReferenceType.Schema,
- Id = "newPet"
+ Id = "newPet",
+ HostDocument = actual
}
},
["errorModel"] = new OpenApiSchema
@@ -311,38 +359,39 @@ public void ParseStandardPetStoreDocumentShouldSucceed()
Reference = new OpenApiReference
{
Type = ReferenceType.Schema,
- Id = "errorModel"
+ Id = "errorModel",
+ HostDocument = actual
}
},
}
};
// Create a clone of the schema to avoid modifying things in components.
- var petSchema =
- JsonConvert.DeserializeObject(
- JsonConvert.SerializeObject(components.Schemas["pet"]));
+ var petSchema = Clone(components.Schemas["pet"]);
+
petSchema.Reference = new OpenApiReference
{
Id = "pet",
- Type = ReferenceType.Schema
+ Type = ReferenceType.Schema,
+ HostDocument = actual
};
- var newPetSchema =
- JsonConvert.DeserializeObject(
- JsonConvert.SerializeObject(components.Schemas["newPet"]));
+ var newPetSchema = Clone(components.Schemas["newPet"]);
+
newPetSchema.Reference = new OpenApiReference
{
Id = "newPet",
- Type = ReferenceType.Schema
+ Type = ReferenceType.Schema,
+ HostDocument = actual
};
- var errorModelSchema =
- JsonConvert.DeserializeObject(
- JsonConvert.SerializeObject(components.Schemas["errorModel"]));
+ var errorModelSchema = Clone(components.Schemas["errorModel"]);
+
errorModelSchema.Reference = new OpenApiReference
{
Id = "errorModel",
- Type = ReferenceType.Schema
+ Type = ReferenceType.Schema,
+ HostDocument = actual
};
var expected = new OpenApiDocument
@@ -683,7 +732,8 @@ public void ParseModifiedPetStoreDocumentWithTagAndSecurityShouldSucceed()
Reference = new OpenApiReference
{
Type = ReferenceType.Schema,
- Id = "pet"
+ Id = "pet",
+ HostDocument = actual
}
},
["newPet"] = new OpenApiSchema
@@ -712,7 +762,8 @@ public void ParseModifiedPetStoreDocumentWithTagAndSecurityShouldSucceed()
Reference = new OpenApiReference
{
Type = ReferenceType.Schema,
- Id = "newPet"
+ Id = "newPet",
+ HostDocument = actual
}
},
["errorModel"] = new OpenApiSchema
@@ -752,7 +803,8 @@ public void ParseModifiedPetStoreDocumentWithTagAndSecurityShouldSucceed()
Reference = new OpenApiReference
{
Id = "securitySchemeName1",
- Type = ReferenceType.SecurityScheme
+ Type = ReferenceType.SecurityScheme,
+ HostDocument = actual
}
},
@@ -763,34 +815,31 @@ public void ParseModifiedPetStoreDocumentWithTagAndSecurityShouldSucceed()
Reference = new OpenApiReference
{
Id = "securitySchemeName2",
- Type = ReferenceType.SecurityScheme
+ Type = ReferenceType.SecurityScheme,
+ HostDocument = actual
}
}
}
};
// Create a clone of the schema to avoid modifying things in components.
- var petSchema =
- JsonConvert.DeserializeObject(
- JsonConvert.SerializeObject(components.Schemas["pet"]));
+ var petSchema = Clone(components.Schemas["pet"]);
petSchema.Reference = new OpenApiReference
{
Id = "pet",
Type = ReferenceType.Schema
};
- var newPetSchema =
- JsonConvert.DeserializeObject(
- JsonConvert.SerializeObject(components.Schemas["newPet"]));
+ var newPetSchema = Clone(components.Schemas["newPet"]);
+
newPetSchema.Reference = new OpenApiReference
{
Id = "newPet",
Type = ReferenceType.Schema
};
- var errorModelSchema =
- JsonConvert.DeserializeObject(
- JsonConvert.SerializeObject(components.Schemas["errorModel"]));
+ var errorModelSchema = Clone(components.Schemas["errorModel"]);
+
errorModelSchema.Reference = new OpenApiReference
{
Id = "errorModel",
@@ -814,16 +863,16 @@ public void ParseModifiedPetStoreDocumentWithTagAndSecurityShouldSucceed()
Name = "tagName2"
};
- var securityScheme1 = JsonConvert.DeserializeObject(
- JsonConvert.SerializeObject(components.SecuritySchemes["securitySchemeName1"]));
+ var securityScheme1 = CloneSecurityScheme(components.SecuritySchemes["securitySchemeName1"]);
+
securityScheme1.Reference = new OpenApiReference
{
Id = "securitySchemeName1",
Type = ReferenceType.SecurityScheme
};
- var securityScheme2 = JsonConvert.DeserializeObject(
- JsonConvert.SerializeObject(components.SecuritySchemes["securitySchemeName2"]));
+ var securityScheme2 = CloneSecurityScheme(components.SecuritySchemes["securitySchemeName2"]);
+
securityScheme2.Reference = new OpenApiReference
{
Id = "securitySchemeName2",
@@ -1170,7 +1219,7 @@ public void ParseModifiedPetStoreDocumentWithTagAndSecurityShouldSucceed()
}
};
- actual.Should().BeEquivalentTo(expected);
+ actual.Should().BeEquivalentTo(expected, options => options.Excluding(m => m.Name == "HostDocument"));
}
context.Should().BeEquivalentTo(
diff --git a/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiSchemaTests.cs b/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiSchemaTests.cs
index dbf0cf3f6..9bdafeba6 100644
--- a/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiSchemaTests.cs
+++ b/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiSchemaTests.cs
@@ -359,7 +359,8 @@ public void ParseBasicSchemaWithReferenceShouldSucceed()
Reference = new OpenApiReference
{
Type = ReferenceType.Schema,
- Id = "ErrorModel"
+ Id = "ErrorModel",
+ HostDocument = openApiDoc
},
Required =
{
@@ -372,7 +373,8 @@ public void ParseBasicSchemaWithReferenceShouldSucceed()
Reference = new OpenApiReference
{
Type = ReferenceType.Schema,
- Id = "ExtendedErrorModel"
+ Id = "ExtendedErrorModel",
+ HostDocument = openApiDoc
},
AllOf =
{
@@ -381,7 +383,8 @@ public void ParseBasicSchemaWithReferenceShouldSucceed()
Reference = new OpenApiReference
{
Type = ReferenceType.Schema,
- Id = "ErrorModel"
+ Id = "ErrorModel",
+ HostDocument = openApiDoc
},
// Schema should be dereferenced in our model, so all the properties
// from the ErrorModel above should be propagated here.
@@ -420,7 +423,7 @@ public void ParseBasicSchemaWithReferenceShouldSucceed()
}
}
}
- });
+ },options => options.Excluding(m => m.Name == "HostDocument"));
}
}
@@ -469,7 +472,8 @@ public void ParseAdvancedSchemaWithReferenceShouldSucceed()
Reference = new OpenApiReference()
{
Id= "Pet",
- Type = ReferenceType.Schema
+ Type = ReferenceType.Schema,
+ HostDocument = openApiDoc
}
},
["Cat"] = new OpenApiSchema
@@ -482,7 +486,8 @@ public void ParseAdvancedSchemaWithReferenceShouldSucceed()
Reference = new OpenApiReference
{
Type = ReferenceType.Schema,
- Id = "Pet"
+ Id = "Pet",
+ HostDocument = openApiDoc
},
// Schema should be dereferenced in our model, so all the properties
// from the Pet above should be propagated here.
@@ -532,7 +537,8 @@ public void ParseAdvancedSchemaWithReferenceShouldSucceed()
Reference = new OpenApiReference()
{
Id= "Cat",
- Type = ReferenceType.Schema
+ Type = ReferenceType.Schema,
+ HostDocument = openApiDoc
}
},
["Dog"] = new OpenApiSchema
@@ -545,7 +551,8 @@ public void ParseAdvancedSchemaWithReferenceShouldSucceed()
Reference = new OpenApiReference
{
Type = ReferenceType.Schema,
- Id = "Pet"
+ Id = "Pet",
+ HostDocument = openApiDoc
},
// Schema should be dereferenced in our model, so all the properties
// from the Pet above should be propagated here.
@@ -591,11 +598,12 @@ public void ParseAdvancedSchemaWithReferenceShouldSucceed()
Reference = new OpenApiReference()
{
Id= "Dog",
- Type = ReferenceType.Schema
+ Type = ReferenceType.Schema,
+ HostDocument = openApiDoc
}
}
}
- });
+ }, options => options.Excluding(m => m.Name == "HostDocument"));
}
}
diff --git a/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiSecuritySchemeTests.cs b/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiSecuritySchemeTests.cs
index 57c156cc0..9d7a27d72 100644
--- a/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiSecuritySchemeTests.cs
+++ b/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiSecuritySchemeTests.cs
@@ -40,7 +40,7 @@ public void ParseHttpSecuritySchemeShouldSucceed()
new OpenApiSecurityScheme
{
Type = SecuritySchemeType.Http,
- Scheme = "basic"
+ Scheme = OpenApiConstants.Basic
});
}
}
@@ -95,8 +95,8 @@ public void ParseBearerSecuritySchemeShouldSucceed()
new OpenApiSecurityScheme
{
Type = SecuritySchemeType.Http,
- Scheme = "bearer",
- BearerFormat = "JWT"
+ Scheme = OpenApiConstants.Bearer,
+ BearerFormat = OpenApiConstants.Jwt
});
}
}
diff --git a/test/Microsoft.OpenApi.SmokeTests/Microsoft.OpenApi.SmokeTests.csproj b/test/Microsoft.OpenApi.SmokeTests/Microsoft.OpenApi.SmokeTests.csproj
index a4e017455..aadfb919d 100644
--- a/test/Microsoft.OpenApi.SmokeTests/Microsoft.OpenApi.SmokeTests.csproj
+++ b/test/Microsoft.OpenApi.SmokeTests/Microsoft.OpenApi.SmokeTests.csproj
@@ -1,15 +1,14 @@
- net462
+ net6.0
- TRACE;DEBUG;net462
-
+
diff --git a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj
old mode 100755
new mode 100644
index 576e420cf..39026a9f7
--- a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj
+++ b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj
@@ -1,6 +1,6 @@
- net462;net50
+ net6.0
false
Microsoft
@@ -15,24 +15,43 @@
-
-
+
+
+
-
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiCallbackTests.SerializeAdvancedCallbackAsV3JsonWorks_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiCallbackTests.SerializeAdvancedCallbackAsV3JsonWorks_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..8017028d1
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiCallbackTests.SerializeAdvancedCallbackAsV3JsonWorks_produceTerseOutput=False.verified.txt
@@ -0,0 +1,20 @@
+{
+ "$request.body#/url": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Success"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiCallbackTests.SerializeAdvancedCallbackAsV3JsonWorks_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiCallbackTests.SerializeAdvancedCallbackAsV3JsonWorks_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..690cc5e9d
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiCallbackTests.SerializeAdvancedCallbackAsV3JsonWorks_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"$request.body#/url":{"post":{"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Success"}}}}}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiCallbackTests.SerializeReferencedCallbackAsV3JsonWithoutReferenceWorks_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiCallbackTests.SerializeReferencedCallbackAsV3JsonWithoutReferenceWorks_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..8017028d1
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiCallbackTests.SerializeReferencedCallbackAsV3JsonWithoutReferenceWorks_produceTerseOutput=False.verified.txt
@@ -0,0 +1,20 @@
+{
+ "$request.body#/url": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Success"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiCallbackTests.SerializeReferencedCallbackAsV3JsonWithoutReferenceWorks_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiCallbackTests.SerializeReferencedCallbackAsV3JsonWithoutReferenceWorks_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..690cc5e9d
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiCallbackTests.SerializeReferencedCallbackAsV3JsonWithoutReferenceWorks_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"$request.body#/url":{"post":{"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Success"}}}}}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiCallbackTests.SerializeReferencedCallbackAsV3JsonWorks_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiCallbackTests.SerializeReferencedCallbackAsV3JsonWorks_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..8c9f1f140
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiCallbackTests.SerializeReferencedCallbackAsV3JsonWorks_produceTerseOutput=False.verified.txt
@@ -0,0 +1,3 @@
+{
+ "$ref": "#/components/callbacks/simpleHook"
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiCallbackTests.SerializeReferencedCallbackAsV3JsonWorks_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiCallbackTests.SerializeReferencedCallbackAsV3JsonWorks_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..20e44f987
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiCallbackTests.SerializeReferencedCallbackAsV3JsonWorks_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"$ref":"#/components/callbacks/simpleHook"}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiCallbackTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiCallbackTests.cs
index fbc86e7f9..9d512566f 100644
--- a/test/Microsoft.OpenApi.Tests/Models/OpenApiCallbackTests.cs
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiCallbackTests.cs
@@ -3,16 +3,18 @@
using System.Globalization;
using System.IO;
-using FluentAssertions;
+using System.Threading.Tasks;
using Microsoft.OpenApi.Expressions;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.Writers;
+using VerifyXunit;
using Xunit;
using Xunit.Abstractions;
namespace Microsoft.OpenApi.Tests.Models
{
[Collection("DefaultSettings")]
+ [UsesVerify]
public class OpenApiCallbackTests
{
public static OpenApiCallback AdvancedCallback = new OpenApiCallback
@@ -103,33 +105,14 @@ public OpenApiCallbackTests(ITestOutputHelper output)
_output = output;
}
- [Fact]
- public void SerializeAdvancedCallbackAsV3JsonWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeAdvancedCallbackAsV3JsonWorks(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""$request.body#/url"": {
- ""post"": {
- ""requestBody"": {
- ""content"": {
- ""application/json"": {
- ""schema"": {
- ""type"": ""object""
- }
- }
- }
- },
- ""responses"": {
- ""200"": {
- ""description"": ""Success""
- }
- }
- }
- }
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
AdvancedCallback.SerializeAsV3(writer);
@@ -137,21 +120,17 @@ public void SerializeAdvancedCallbackAsV3JsonWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeReferencedCallbackAsV3JsonWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeReferencedCallbackAsV3JsonWorks(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""$ref"": ""#/components/callbacks/simpleHook""
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
ReferencedCallback.SerializeAsV3(writer);
@@ -159,38 +138,17 @@ public void SerializeReferencedCallbackAsV3JsonWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeReferencedCallbackAsV3JsonWithoutReferenceWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeReferencedCallbackAsV3JsonWithoutReferenceWorks(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""$request.body#/url"": {
- ""post"": {
- ""requestBody"": {
- ""content"": {
- ""application/json"": {
- ""schema"": {
- ""type"": ""object""
- }
- }
- }
- },
- ""responses"": {
- ""200"": {
- ""description"": ""Success""
- }
- }
- }
- }
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
ReferencedCallback.SerializeAsV3WithoutReference(writer);
@@ -198,9 +156,7 @@ public void SerializeReferencedCallbackAsV3JsonWithoutReferenceWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
}
}
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiComponentsTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiComponentsTests.cs
index 002143b15..7ba6d132c 100644
--- a/test/Microsoft.OpenApi.Tests/Models/OpenApiComponentsTests.cs
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiComponentsTests.cs
@@ -57,7 +57,7 @@ public class OpenApiComponentsTests
{
Description = "description1",
Type = SecuritySchemeType.OpenIdConnect,
- Scheme = "openIdConnectUrl",
+ Scheme = OpenApiConstants.Bearer,
OpenIdConnectUrl = new Uri("https://example.com/openIdConnect")
}
}
@@ -129,7 +129,7 @@ public class OpenApiComponentsTests
{
Description = "description1",
Type = SecuritySchemeType.OpenIdConnect,
- Scheme = "openIdConnectUrl",
+ Scheme = OpenApiConstants.Bearer,
OpenIdConnectUrl = new Uri("https://example.com/openIdConnect"),
Reference = new OpenApiReference
{
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeAdvancedDocumentAsV2JsonWorks_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeAdvancedDocumentAsV2JsonWorks_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..96eff63d4
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeAdvancedDocumentAsV2JsonWorks_produceTerseOutput=False.verified.txt
@@ -0,0 +1,416 @@
+{
+ "swagger": "2.0",
+ "info": {
+ "title": "Swagger Petstore (Simple)",
+ "description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification",
+ "termsOfService": "http://helloreverb.com/terms/",
+ "contact": {
+ "name": "Swagger API team",
+ "url": "http://swagger.io",
+ "email": "foo@example.com"
+ },
+ "license": {
+ "name": "MIT",
+ "url": "http://opensource.org/licenses/MIT"
+ },
+ "version": "1.0.0"
+ },
+ "host": "petstore.swagger.io",
+ "basePath": "/api",
+ "schemes": [
+ "http"
+ ],
+ "paths": {
+ "/pets": {
+ "get": {
+ "description": "Returns all pets from the system that the user has access to",
+ "operationId": "findPets",
+ "produces": [
+ "application/json",
+ "application/xml",
+ "text/html"
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "tags",
+ "description": "tags to filter by",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "limit",
+ "description": "maximum number of results to return",
+ "type": "integer",
+ "format": "int32"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "pet response",
+ "schema": {
+ "type": "array",
+ "items": {
+ "required": [
+ "id",
+ "name"
+ ],
+ "type": "object",
+ "properties": {
+ "id": {
+ "format": "int64",
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ },
+ "tag": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "4XX": {
+ "description": "unexpected client error",
+ "schema": {
+ "required": [
+ "code",
+ "message"
+ ],
+ "type": "object",
+ "properties": {
+ "code": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "message": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "5XX": {
+ "description": "unexpected server error",
+ "schema": {
+ "required": [
+ "code",
+ "message"
+ ],
+ "type": "object",
+ "properties": {
+ "code": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "message": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "post": {
+ "description": "Creates a new pet in the store. Duplicates are allowed",
+ "operationId": "addPet",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json",
+ "text/html"
+ ],
+ "parameters": [
+ {
+ "in": "body",
+ "name": "body",
+ "description": "Pet to add to the store",
+ "required": true,
+ "schema": {
+ "required": [
+ "name"
+ ],
+ "type": "object",
+ "properties": {
+ "id": {
+ "format": "int64",
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ },
+ "tag": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "pet response",
+ "schema": {
+ "required": [
+ "id",
+ "name"
+ ],
+ "type": "object",
+ "properties": {
+ "id": {
+ "format": "int64",
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ },
+ "tag": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "4XX": {
+ "description": "unexpected client error",
+ "schema": {
+ "required": [
+ "code",
+ "message"
+ ],
+ "type": "object",
+ "properties": {
+ "code": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "message": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "5XX": {
+ "description": "unexpected server error",
+ "schema": {
+ "required": [
+ "code",
+ "message"
+ ],
+ "type": "object",
+ "properties": {
+ "code": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "message": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/pets/{id}": {
+ "get": {
+ "description": "Returns a user based on a single ID, if the user does not have access to the pet",
+ "operationId": "findPetById",
+ "produces": [
+ "application/json",
+ "application/xml",
+ "text/html"
+ ],
+ "parameters": [
+ {
+ "in": "path",
+ "name": "id",
+ "description": "ID of pet to fetch",
+ "required": true,
+ "type": "integer",
+ "format": "int64"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "pet response",
+ "schema": {
+ "required": [
+ "id",
+ "name"
+ ],
+ "type": "object",
+ "properties": {
+ "id": {
+ "format": "int64",
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ },
+ "tag": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "4XX": {
+ "description": "unexpected client error",
+ "schema": {
+ "required": [
+ "code",
+ "message"
+ ],
+ "type": "object",
+ "properties": {
+ "code": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "message": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "5XX": {
+ "description": "unexpected server error",
+ "schema": {
+ "required": [
+ "code",
+ "message"
+ ],
+ "type": "object",
+ "properties": {
+ "code": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "message": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "delete": {
+ "description": "deletes a single pet based on the ID supplied",
+ "operationId": "deletePet",
+ "produces": [
+ "text/html"
+ ],
+ "parameters": [
+ {
+ "in": "path",
+ "name": "id",
+ "description": "ID of pet to delete",
+ "required": true,
+ "type": "integer",
+ "format": "int64"
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "pet deleted"
+ },
+ "4XX": {
+ "description": "unexpected client error",
+ "schema": {
+ "required": [
+ "code",
+ "message"
+ ],
+ "type": "object",
+ "properties": {
+ "code": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "message": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "5XX": {
+ "description": "unexpected server error",
+ "schema": {
+ "required": [
+ "code",
+ "message"
+ ],
+ "type": "object",
+ "properties": {
+ "code": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "message": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "definitions": {
+ "pet": {
+ "required": [
+ "id",
+ "name"
+ ],
+ "type": "object",
+ "properties": {
+ "id": {
+ "format": "int64",
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ },
+ "tag": {
+ "type": "string"
+ }
+ }
+ },
+ "newPet": {
+ "required": [
+ "name"
+ ],
+ "type": "object",
+ "properties": {
+ "id": {
+ "format": "int64",
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ },
+ "tag": {
+ "type": "string"
+ }
+ }
+ },
+ "errorModel": {
+ "required": [
+ "code",
+ "message"
+ ],
+ "type": "object",
+ "properties": {
+ "code": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "message": {
+ "type": "string"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeAdvancedDocumentAsV2JsonWorks_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeAdvancedDocumentAsV2JsonWorks_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..903ff33f7
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeAdvancedDocumentAsV2JsonWorks_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"swagger":"2.0","info":{"title":"Swagger Petstore (Simple)","description":"A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification","termsOfService":"http://helloreverb.com/terms/","contact":{"name":"Swagger API team","url":"http://swagger.io","email":"foo@example.com"},"license":{"name":"MIT","url":"http://opensource.org/licenses/MIT"},"version":"1.0.0"},"host":"petstore.swagger.io","basePath":"/api","schemes":["http"],"paths":{"/pets":{"get":{"description":"Returns all pets from the system that the user has access to","operationId":"findPets","produces":["application/json","application/xml","text/html"],"parameters":[{"in":"query","name":"tags","description":"tags to filter by","type":"array","items":{"type":"string"}},{"in":"query","name":"limit","description":"maximum number of results to return","type":"integer","format":"int32"}],"responses":{"200":{"description":"pet response","schema":{"type":"array","items":{"required":["id","name"],"type":"object","properties":{"id":{"format":"int64","type":"integer"},"name":{"type":"string"},"tag":{"type":"string"}}}}},"4XX":{"description":"unexpected client error","schema":{"required":["code","message"],"type":"object","properties":{"code":{"format":"int32","type":"integer"},"message":{"type":"string"}}}},"5XX":{"description":"unexpected server error","schema":{"required":["code","message"],"type":"object","properties":{"code":{"format":"int32","type":"integer"},"message":{"type":"string"}}}}}},"post":{"description":"Creates a new pet in the store. Duplicates are allowed","operationId":"addPet","consumes":["application/json"],"produces":["application/json","text/html"],"parameters":[{"in":"body","name":"body","description":"Pet to add to the store","required":true,"schema":{"required":["name"],"type":"object","properties":{"id":{"format":"int64","type":"integer"},"name":{"type":"string"},"tag":{"type":"string"}}}}],"responses":{"200":{"description":"pet response","schema":{"required":["id","name"],"type":"object","properties":{"id":{"format":"int64","type":"integer"},"name":{"type":"string"},"tag":{"type":"string"}}}},"4XX":{"description":"unexpected client error","schema":{"required":["code","message"],"type":"object","properties":{"code":{"format":"int32","type":"integer"},"message":{"type":"string"}}}},"5XX":{"description":"unexpected server error","schema":{"required":["code","message"],"type":"object","properties":{"code":{"format":"int32","type":"integer"},"message":{"type":"string"}}}}}}},"/pets/{id}":{"get":{"description":"Returns a user based on a single ID, if the user does not have access to the pet","operationId":"findPetById","produces":["application/json","application/xml","text/html"],"parameters":[{"in":"path","name":"id","description":"ID of pet to fetch","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"pet response","schema":{"required":["id","name"],"type":"object","properties":{"id":{"format":"int64","type":"integer"},"name":{"type":"string"},"tag":{"type":"string"}}}},"4XX":{"description":"unexpected client error","schema":{"required":["code","message"],"type":"object","properties":{"code":{"format":"int32","type":"integer"},"message":{"type":"string"}}}},"5XX":{"description":"unexpected server error","schema":{"required":["code","message"],"type":"object","properties":{"code":{"format":"int32","type":"integer"},"message":{"type":"string"}}}}}},"delete":{"description":"deletes a single pet based on the ID supplied","operationId":"deletePet","produces":["text/html"],"parameters":[{"in":"path","name":"id","description":"ID of pet to delete","required":true,"type":"integer","format":"int64"}],"responses":{"204":{"description":"pet deleted"},"4XX":{"description":"unexpected client error","schema":{"required":["code","message"],"type":"object","properties":{"code":{"format":"int32","type":"integer"},"message":{"type":"string"}}}},"5XX":{"description":"unexpected server error","schema":{"required":["code","message"],"type":"object","properties":{"code":{"format":"int32","type":"integer"},"message":{"type":"string"}}}}}}}},"definitions":{"pet":{"required":["id","name"],"type":"object","properties":{"id":{"format":"int64","type":"integer"},"name":{"type":"string"},"tag":{"type":"string"}}},"newPet":{"required":["name"],"type":"object","properties":{"id":{"format":"int64","type":"integer"},"name":{"type":"string"},"tag":{"type":"string"}}},"errorModel":{"required":["code","message"],"type":"object","properties":{"code":{"format":"int32","type":"integer"},"message":{"type":"string"}}}}}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeAdvancedDocumentAsV3JsonWorks_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeAdvancedDocumentAsV3JsonWorks_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..a688f8525
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeAdvancedDocumentAsV3JsonWorks_produceTerseOutput=False.verified.txt
@@ -0,0 +1,495 @@
+{
+ "openapi": "3.0.1",
+ "info": {
+ "title": "Swagger Petstore (Simple)",
+ "description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification",
+ "termsOfService": "http://helloreverb.com/terms/",
+ "contact": {
+ "name": "Swagger API team",
+ "url": "http://swagger.io",
+ "email": "foo@example.com"
+ },
+ "license": {
+ "name": "MIT",
+ "url": "http://opensource.org/licenses/MIT"
+ },
+ "version": "1.0.0"
+ },
+ "servers": [
+ {
+ "url": "http://petstore.swagger.io/api"
+ }
+ ],
+ "paths": {
+ "/pets": {
+ "get": {
+ "description": "Returns all pets from the system that the user has access to",
+ "operationId": "findPets",
+ "parameters": [
+ {
+ "name": "tags",
+ "in": "query",
+ "description": "tags to filter by",
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ {
+ "name": "limit",
+ "in": "query",
+ "description": "maximum number of results to return",
+ "schema": {
+ "type": "integer",
+ "format": "int32"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "pet response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "required": [
+ "id",
+ "name"
+ ],
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "name": {
+ "type": "string"
+ },
+ "tag": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "application/xml": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "required": [
+ "id",
+ "name"
+ ],
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "name": {
+ "type": "string"
+ },
+ "tag": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "4XX": {
+ "description": "unexpected client error",
+ "content": {
+ "text/html": {
+ "schema": {
+ "required": [
+ "code",
+ "message"
+ ],
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "message": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "5XX": {
+ "description": "unexpected server error",
+ "content": {
+ "text/html": {
+ "schema": {
+ "required": [
+ "code",
+ "message"
+ ],
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "message": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "post": {
+ "description": "Creates a new pet in the store. Duplicates are allowed",
+ "operationId": "addPet",
+ "requestBody": {
+ "description": "Pet to add to the store",
+ "content": {
+ "application/json": {
+ "schema": {
+ "required": [
+ "name"
+ ],
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "name": {
+ "type": "string"
+ },
+ "tag": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "pet response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "required": [
+ "id",
+ "name"
+ ],
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "name": {
+ "type": "string"
+ },
+ "tag": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "4XX": {
+ "description": "unexpected client error",
+ "content": {
+ "text/html": {
+ "schema": {
+ "required": [
+ "code",
+ "message"
+ ],
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "message": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "5XX": {
+ "description": "unexpected server error",
+ "content": {
+ "text/html": {
+ "schema": {
+ "required": [
+ "code",
+ "message"
+ ],
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "message": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/pets/{id}": {
+ "get": {
+ "description": "Returns a user based on a single ID, if the user does not have access to the pet",
+ "operationId": "findPetById",
+ "parameters": [
+ {
+ "name": "id",
+ "in": "path",
+ "description": "ID of pet to fetch",
+ "required": true,
+ "schema": {
+ "type": "integer",
+ "format": "int64"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "pet response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "required": [
+ "id",
+ "name"
+ ],
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "name": {
+ "type": "string"
+ },
+ "tag": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "application/xml": {
+ "schema": {
+ "required": [
+ "id",
+ "name"
+ ],
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "name": {
+ "type": "string"
+ },
+ "tag": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "4XX": {
+ "description": "unexpected client error",
+ "content": {
+ "text/html": {
+ "schema": {
+ "required": [
+ "code",
+ "message"
+ ],
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "message": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "5XX": {
+ "description": "unexpected server error",
+ "content": {
+ "text/html": {
+ "schema": {
+ "required": [
+ "code",
+ "message"
+ ],
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "message": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "delete": {
+ "description": "deletes a single pet based on the ID supplied",
+ "operationId": "deletePet",
+ "parameters": [
+ {
+ "name": "id",
+ "in": "path",
+ "description": "ID of pet to delete",
+ "required": true,
+ "schema": {
+ "type": "integer",
+ "format": "int64"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "pet deleted"
+ },
+ "4XX": {
+ "description": "unexpected client error",
+ "content": {
+ "text/html": {
+ "schema": {
+ "required": [
+ "code",
+ "message"
+ ],
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "message": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "5XX": {
+ "description": "unexpected server error",
+ "content": {
+ "text/html": {
+ "schema": {
+ "required": [
+ "code",
+ "message"
+ ],
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "message": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "components": {
+ "schemas": {
+ "pet": {
+ "required": [
+ "id",
+ "name"
+ ],
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "name": {
+ "type": "string"
+ },
+ "tag": {
+ "type": "string"
+ }
+ }
+ },
+ "newPet": {
+ "required": [
+ "name"
+ ],
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "name": {
+ "type": "string"
+ },
+ "tag": {
+ "type": "string"
+ }
+ }
+ },
+ "errorModel": {
+ "required": [
+ "code",
+ "message"
+ ],
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "message": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeAdvancedDocumentAsV3JsonWorks_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeAdvancedDocumentAsV3JsonWorks_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..0bb1c9679
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeAdvancedDocumentAsV3JsonWorks_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"openapi":"3.0.1","info":{"title":"Swagger Petstore (Simple)","description":"A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification","termsOfService":"http://helloreverb.com/terms/","contact":{"name":"Swagger API team","url":"http://swagger.io","email":"foo@example.com"},"license":{"name":"MIT","url":"http://opensource.org/licenses/MIT"},"version":"1.0.0"},"servers":[{"url":"http://petstore.swagger.io/api"}],"paths":{"/pets":{"get":{"description":"Returns all pets from the system that the user has access to","operationId":"findPets","parameters":[{"name":"tags","in":"query","description":"tags to filter by","schema":{"type":"array","items":{"type":"string"}}},{"name":"limit","in":"query","description":"maximum number of results to return","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"pet response","content":{"application/json":{"schema":{"type":"array","items":{"required":["id","name"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"tag":{"type":"string"}}}}},"application/xml":{"schema":{"type":"array","items":{"required":["id","name"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"tag":{"type":"string"}}}}}}},"4XX":{"description":"unexpected client error","content":{"text/html":{"schema":{"required":["code","message"],"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}}}}}},"5XX":{"description":"unexpected server error","content":{"text/html":{"schema":{"required":["code","message"],"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}}}}}}}},"post":{"description":"Creates a new pet in the store. Duplicates are allowed","operationId":"addPet","requestBody":{"description":"Pet to add to the store","content":{"application/json":{"schema":{"required":["name"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"tag":{"type":"string"}}}}},"required":true},"responses":{"200":{"description":"pet response","content":{"application/json":{"schema":{"required":["id","name"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"tag":{"type":"string"}}}}}},"4XX":{"description":"unexpected client error","content":{"text/html":{"schema":{"required":["code","message"],"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}}}}}},"5XX":{"description":"unexpected server error","content":{"text/html":{"schema":{"required":["code","message"],"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}}}}}}}}},"/pets/{id}":{"get":{"description":"Returns a user based on a single ID, if the user does not have access to the pet","operationId":"findPetById","parameters":[{"name":"id","in":"path","description":"ID of pet to fetch","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"pet response","content":{"application/json":{"schema":{"required":["id","name"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"tag":{"type":"string"}}}},"application/xml":{"schema":{"required":["id","name"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"tag":{"type":"string"}}}}}},"4XX":{"description":"unexpected client error","content":{"text/html":{"schema":{"required":["code","message"],"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}}}}}},"5XX":{"description":"unexpected server error","content":{"text/html":{"schema":{"required":["code","message"],"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}}}}}}}},"delete":{"description":"deletes a single pet based on the ID supplied","operationId":"deletePet","parameters":[{"name":"id","in":"path","description":"ID of pet to delete","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"204":{"description":"pet deleted"},"4XX":{"description":"unexpected client error","content":{"text/html":{"schema":{"required":["code","message"],"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}}}}}},"5XX":{"description":"unexpected server error","content":{"text/html":{"schema":{"required":["code","message"],"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}}}}}}}}}},"components":{"schemas":{"pet":{"required":["id","name"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"tag":{"type":"string"}}},"newPet":{"required":["name"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"tag":{"type":"string"}}},"errorModel":{"required":["code","message"],"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}}}}}}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeAdvancedDocumentWithReferenceAsV2JsonWorks_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeAdvancedDocumentWithReferenceAsV2JsonWorks_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..0e3b74125
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeAdvancedDocumentWithReferenceAsV2JsonWorks_produceTerseOutput=False.verified.txt
@@ -0,0 +1,249 @@
+{
+ "swagger": "2.0",
+ "info": {
+ "title": "Swagger Petstore (Simple)",
+ "description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification",
+ "termsOfService": "http://helloreverb.com/terms/",
+ "contact": {
+ "name": "Swagger API team",
+ "url": "http://swagger.io",
+ "email": "foo@example.com"
+ },
+ "license": {
+ "name": "MIT",
+ "url": "http://opensource.org/licenses/MIT"
+ },
+ "version": "1.0.0"
+ },
+ "host": "petstore.swagger.io",
+ "basePath": "/api",
+ "schemes": [
+ "http"
+ ],
+ "paths": {
+ "/pets": {
+ "get": {
+ "description": "Returns all pets from the system that the user has access to",
+ "operationId": "findPets",
+ "produces": [
+ "application/json",
+ "application/xml",
+ "text/html"
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "tags",
+ "description": "tags to filter by",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "limit",
+ "description": "maximum number of results to return",
+ "type": "integer",
+ "format": "int32"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "pet response",
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/pet"
+ }
+ }
+ },
+ "4XX": {
+ "description": "unexpected client error",
+ "schema": {
+ "$ref": "#/definitions/errorModel"
+ }
+ },
+ "5XX": {
+ "description": "unexpected server error",
+ "schema": {
+ "$ref": "#/definitions/errorModel"
+ }
+ }
+ }
+ },
+ "post": {
+ "description": "Creates a new pet in the store. Duplicates are allowed",
+ "operationId": "addPet",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json",
+ "text/html"
+ ],
+ "parameters": [
+ {
+ "in": "body",
+ "name": "body",
+ "description": "Pet to add to the store",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/newPet"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "pet response",
+ "schema": {
+ "$ref": "#/definitions/pet"
+ }
+ },
+ "4XX": {
+ "description": "unexpected client error",
+ "schema": {
+ "$ref": "#/definitions/errorModel"
+ }
+ },
+ "5XX": {
+ "description": "unexpected server error",
+ "schema": {
+ "$ref": "#/definitions/errorModel"
+ }
+ }
+ }
+ }
+ },
+ "/pets/{id}": {
+ "get": {
+ "description": "Returns a user based on a single ID, if the user does not have access to the pet",
+ "operationId": "findPetById",
+ "produces": [
+ "application/json",
+ "application/xml",
+ "text/html"
+ ],
+ "parameters": [
+ {
+ "in": "path",
+ "name": "id",
+ "description": "ID of pet to fetch",
+ "required": true,
+ "type": "integer",
+ "format": "int64"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "pet response",
+ "schema": {
+ "$ref": "#/definitions/pet"
+ }
+ },
+ "4XX": {
+ "description": "unexpected client error",
+ "schema": {
+ "$ref": "#/definitions/errorModel"
+ }
+ },
+ "5XX": {
+ "description": "unexpected server error",
+ "schema": {
+ "$ref": "#/definitions/errorModel"
+ }
+ }
+ }
+ },
+ "delete": {
+ "description": "deletes a single pet based on the ID supplied",
+ "operationId": "deletePet",
+ "produces": [
+ "text/html"
+ ],
+ "parameters": [
+ {
+ "in": "path",
+ "name": "id",
+ "description": "ID of pet to delete",
+ "required": true,
+ "type": "integer",
+ "format": "int64"
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "pet deleted"
+ },
+ "4XX": {
+ "description": "unexpected client error",
+ "schema": {
+ "$ref": "#/definitions/errorModel"
+ }
+ },
+ "5XX": {
+ "description": "unexpected server error",
+ "schema": {
+ "$ref": "#/definitions/errorModel"
+ }
+ }
+ }
+ }
+ }
+ },
+ "definitions": {
+ "pet": {
+ "required": [
+ "id",
+ "name"
+ ],
+ "type": "object",
+ "properties": {
+ "id": {
+ "format": "int64",
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ },
+ "tag": {
+ "type": "string"
+ }
+ }
+ },
+ "newPet": {
+ "required": [
+ "name"
+ ],
+ "type": "object",
+ "properties": {
+ "id": {
+ "format": "int64",
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ },
+ "tag": {
+ "type": "string"
+ }
+ }
+ },
+ "errorModel": {
+ "required": [
+ "code",
+ "message"
+ ],
+ "type": "object",
+ "properties": {
+ "code": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "message": {
+ "type": "string"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeAdvancedDocumentWithReferenceAsV2JsonWorks_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeAdvancedDocumentWithReferenceAsV2JsonWorks_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..b54e2ac86
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeAdvancedDocumentWithReferenceAsV2JsonWorks_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"swagger":"2.0","info":{"title":"Swagger Petstore (Simple)","description":"A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification","termsOfService":"http://helloreverb.com/terms/","contact":{"name":"Swagger API team","url":"http://swagger.io","email":"foo@example.com"},"license":{"name":"MIT","url":"http://opensource.org/licenses/MIT"},"version":"1.0.0"},"host":"petstore.swagger.io","basePath":"/api","schemes":["http"],"paths":{"/pets":{"get":{"description":"Returns all pets from the system that the user has access to","operationId":"findPets","produces":["application/json","application/xml","text/html"],"parameters":[{"in":"query","name":"tags","description":"tags to filter by","type":"array","items":{"type":"string"}},{"in":"query","name":"limit","description":"maximum number of results to return","type":"integer","format":"int32"}],"responses":{"200":{"description":"pet response","schema":{"type":"array","items":{"$ref":"#/definitions/pet"}}},"4XX":{"description":"unexpected client error","schema":{"$ref":"#/definitions/errorModel"}},"5XX":{"description":"unexpected server error","schema":{"$ref":"#/definitions/errorModel"}}}},"post":{"description":"Creates a new pet in the store. Duplicates are allowed","operationId":"addPet","consumes":["application/json"],"produces":["application/json","text/html"],"parameters":[{"in":"body","name":"body","description":"Pet to add to the store","required":true,"schema":{"$ref":"#/definitions/newPet"}}],"responses":{"200":{"description":"pet response","schema":{"$ref":"#/definitions/pet"}},"4XX":{"description":"unexpected client error","schema":{"$ref":"#/definitions/errorModel"}},"5XX":{"description":"unexpected server error","schema":{"$ref":"#/definitions/errorModel"}}}}},"/pets/{id}":{"get":{"description":"Returns a user based on a single ID, if the user does not have access to the pet","operationId":"findPetById","produces":["application/json","application/xml","text/html"],"parameters":[{"in":"path","name":"id","description":"ID of pet to fetch","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"pet response","schema":{"$ref":"#/definitions/pet"}},"4XX":{"description":"unexpected client error","schema":{"$ref":"#/definitions/errorModel"}},"5XX":{"description":"unexpected server error","schema":{"$ref":"#/definitions/errorModel"}}}},"delete":{"description":"deletes a single pet based on the ID supplied","operationId":"deletePet","produces":["text/html"],"parameters":[{"in":"path","name":"id","description":"ID of pet to delete","required":true,"type":"integer","format":"int64"}],"responses":{"204":{"description":"pet deleted"},"4XX":{"description":"unexpected client error","schema":{"$ref":"#/definitions/errorModel"}},"5XX":{"description":"unexpected server error","schema":{"$ref":"#/definitions/errorModel"}}}}}},"definitions":{"pet":{"required":["id","name"],"type":"object","properties":{"id":{"format":"int64","type":"integer"},"name":{"type":"string"},"tag":{"type":"string"}}},"newPet":{"required":["name"],"type":"object","properties":{"id":{"format":"int64","type":"integer"},"name":{"type":"string"},"tag":{"type":"string"}}},"errorModel":{"required":["code","message"],"type":"object","properties":{"code":{"format":"int32","type":"integer"},"message":{"type":"string"}}}}}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeAdvancedDocumentWithReferenceAsV3JsonWorks_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeAdvancedDocumentWithReferenceAsV3JsonWorks_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..f1da0b354
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeAdvancedDocumentWithReferenceAsV3JsonWorks_produceTerseOutput=False.verified.txt
@@ -0,0 +1,296 @@
+{
+ "openapi": "3.0.1",
+ "info": {
+ "title": "Swagger Petstore (Simple)",
+ "description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification",
+ "termsOfService": "http://helloreverb.com/terms/",
+ "contact": {
+ "name": "Swagger API team",
+ "url": "http://swagger.io",
+ "email": "foo@example.com"
+ },
+ "license": {
+ "name": "MIT",
+ "url": "http://opensource.org/licenses/MIT"
+ },
+ "version": "1.0.0"
+ },
+ "servers": [
+ {
+ "url": "http://petstore.swagger.io/api"
+ }
+ ],
+ "paths": {
+ "/pets": {
+ "get": {
+ "description": "Returns all pets from the system that the user has access to",
+ "operationId": "findPets",
+ "parameters": [
+ {
+ "name": "tags",
+ "in": "query",
+ "description": "tags to filter by",
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ {
+ "name": "limit",
+ "in": "query",
+ "description": "maximum number of results to return",
+ "schema": {
+ "type": "integer",
+ "format": "int32"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "pet response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/pet"
+ }
+ }
+ },
+ "application/xml": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/pet"
+ }
+ }
+ }
+ }
+ },
+ "4XX": {
+ "description": "unexpected client error",
+ "content": {
+ "text/html": {
+ "schema": {
+ "$ref": "#/components/schemas/errorModel"
+ }
+ }
+ }
+ },
+ "5XX": {
+ "description": "unexpected server error",
+ "content": {
+ "text/html": {
+ "schema": {
+ "$ref": "#/components/schemas/errorModel"
+ }
+ }
+ }
+ }
+ }
+ },
+ "post": {
+ "description": "Creates a new pet in the store. Duplicates are allowed",
+ "operationId": "addPet",
+ "requestBody": {
+ "description": "Pet to add to the store",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/newPet"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "pet response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/pet"
+ }
+ }
+ }
+ },
+ "4XX": {
+ "description": "unexpected client error",
+ "content": {
+ "text/html": {
+ "schema": {
+ "$ref": "#/components/schemas/errorModel"
+ }
+ }
+ }
+ },
+ "5XX": {
+ "description": "unexpected server error",
+ "content": {
+ "text/html": {
+ "schema": {
+ "$ref": "#/components/schemas/errorModel"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/pets/{id}": {
+ "get": {
+ "description": "Returns a user based on a single ID, if the user does not have access to the pet",
+ "operationId": "findPetById",
+ "parameters": [
+ {
+ "name": "id",
+ "in": "path",
+ "description": "ID of pet to fetch",
+ "required": true,
+ "schema": {
+ "type": "integer",
+ "format": "int64"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "pet response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/pet"
+ }
+ },
+ "application/xml": {
+ "schema": {
+ "$ref": "#/components/schemas/pet"
+ }
+ }
+ }
+ },
+ "4XX": {
+ "description": "unexpected client error",
+ "content": {
+ "text/html": {
+ "schema": {
+ "$ref": "#/components/schemas/errorModel"
+ }
+ }
+ }
+ },
+ "5XX": {
+ "description": "unexpected server error",
+ "content": {
+ "text/html": {
+ "schema": {
+ "$ref": "#/components/schemas/errorModel"
+ }
+ }
+ }
+ }
+ }
+ },
+ "delete": {
+ "description": "deletes a single pet based on the ID supplied",
+ "operationId": "deletePet",
+ "parameters": [
+ {
+ "name": "id",
+ "in": "path",
+ "description": "ID of pet to delete",
+ "required": true,
+ "schema": {
+ "type": "integer",
+ "format": "int64"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "pet deleted"
+ },
+ "4XX": {
+ "description": "unexpected client error",
+ "content": {
+ "text/html": {
+ "schema": {
+ "$ref": "#/components/schemas/errorModel"
+ }
+ }
+ }
+ },
+ "5XX": {
+ "description": "unexpected server error",
+ "content": {
+ "text/html": {
+ "schema": {
+ "$ref": "#/components/schemas/errorModel"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "components": {
+ "schemas": {
+ "pet": {
+ "required": [
+ "id",
+ "name"
+ ],
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "name": {
+ "type": "string"
+ },
+ "tag": {
+ "type": "string"
+ }
+ }
+ },
+ "newPet": {
+ "required": [
+ "name"
+ ],
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "name": {
+ "type": "string"
+ },
+ "tag": {
+ "type": "string"
+ }
+ }
+ },
+ "errorModel": {
+ "required": [
+ "code",
+ "message"
+ ],
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "message": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeAdvancedDocumentWithReferenceAsV3JsonWorks_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeAdvancedDocumentWithReferenceAsV3JsonWorks_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..be8dcc627
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeAdvancedDocumentWithReferenceAsV3JsonWorks_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"openapi":"3.0.1","info":{"title":"Swagger Petstore (Simple)","description":"A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification","termsOfService":"http://helloreverb.com/terms/","contact":{"name":"Swagger API team","url":"http://swagger.io","email":"foo@example.com"},"license":{"name":"MIT","url":"http://opensource.org/licenses/MIT"},"version":"1.0.0"},"servers":[{"url":"http://petstore.swagger.io/api"}],"paths":{"/pets":{"get":{"description":"Returns all pets from the system that the user has access to","operationId":"findPets","parameters":[{"name":"tags","in":"query","description":"tags to filter by","schema":{"type":"array","items":{"type":"string"}}},{"name":"limit","in":"query","description":"maximum number of results to return","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"pet response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/pet"}}},"application/xml":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/pet"}}}}},"4XX":{"description":"unexpected client error","content":{"text/html":{"schema":{"$ref":"#/components/schemas/errorModel"}}}},"5XX":{"description":"unexpected server error","content":{"text/html":{"schema":{"$ref":"#/components/schemas/errorModel"}}}}}},"post":{"description":"Creates a new pet in the store. Duplicates are allowed","operationId":"addPet","requestBody":{"description":"Pet to add to the store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/newPet"}}},"required":true},"responses":{"200":{"description":"pet response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/pet"}}}},"4XX":{"description":"unexpected client error","content":{"text/html":{"schema":{"$ref":"#/components/schemas/errorModel"}}}},"5XX":{"description":"unexpected server error","content":{"text/html":{"schema":{"$ref":"#/components/schemas/errorModel"}}}}}}},"/pets/{id}":{"get":{"description":"Returns a user based on a single ID, if the user does not have access to the pet","operationId":"findPetById","parameters":[{"name":"id","in":"path","description":"ID of pet to fetch","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"pet response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/pet"}},"application/xml":{"schema":{"$ref":"#/components/schemas/pet"}}}},"4XX":{"description":"unexpected client error","content":{"text/html":{"schema":{"$ref":"#/components/schemas/errorModel"}}}},"5XX":{"description":"unexpected server error","content":{"text/html":{"schema":{"$ref":"#/components/schemas/errorModel"}}}}}},"delete":{"description":"deletes a single pet based on the ID supplied","operationId":"deletePet","parameters":[{"name":"id","in":"path","description":"ID of pet to delete","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"204":{"description":"pet deleted"},"4XX":{"description":"unexpected client error","content":{"text/html":{"schema":{"$ref":"#/components/schemas/errorModel"}}}},"5XX":{"description":"unexpected server error","content":{"text/html":{"schema":{"$ref":"#/components/schemas/errorModel"}}}}}}}},"components":{"schemas":{"pet":{"required":["id","name"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"tag":{"type":"string"}}},"newPet":{"required":["name"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"tag":{"type":"string"}}},"errorModel":{"required":["code","message"],"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}}}}}}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeDuplicateExtensionsAsV2JsonWorks_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeDuplicateExtensionsAsV2JsonWorks_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..671c21ec5
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeDuplicateExtensionsAsV2JsonWorks_produceTerseOutput=False.verified.txt
@@ -0,0 +1,68 @@
+{
+ "swagger": "2.0",
+ "info": {
+ "title": "Swagger Petstore (Simple)",
+ "description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification",
+ "version": "1.0.0"
+ },
+ "host": "petstore.swagger.io",
+ "basePath": "/api",
+ "schemes": [
+ "http"
+ ],
+ "paths": {
+ "/add/{operand1}/{operand2}": {
+ "get": {
+ "operationId": "addByOperand1AndByOperand2",
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "in": "path",
+ "name": "operand1",
+ "description": "The first operand",
+ "required": true,
+ "type": "integer",
+ "my-extension": 4
+ },
+ {
+ "in": "path",
+ "name": "operand2",
+ "description": "The second operand",
+ "required": true,
+ "type": "integer",
+ "my-extension": 4
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "pet response",
+ "schema": {
+ "type": "array",
+ "items": {
+ "required": [
+ "id",
+ "name"
+ ],
+ "type": "object",
+ "properties": {
+ "id": {
+ "format": "int64",
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ },
+ "tag": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeDuplicateExtensionsAsV2JsonWorks_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeDuplicateExtensionsAsV2JsonWorks_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..7dd31e201
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeDuplicateExtensionsAsV2JsonWorks_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"swagger":"2.0","info":{"title":"Swagger Petstore (Simple)","description":"A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification","version":"1.0.0"},"host":"petstore.swagger.io","basePath":"/api","schemes":["http"],"paths":{"/add/{operand1}/{operand2}":{"get":{"operationId":"addByOperand1AndByOperand2","produces":["application/json"],"parameters":[{"in":"path","name":"operand1","description":"The first operand","required":true,"type":"integer","my-extension":4},{"in":"path","name":"operand2","description":"The second operand","required":true,"type":"integer","my-extension":4}],"responses":{"200":{"description":"pet response","schema":{"type":"array","items":{"required":["id","name"],"type":"object","properties":{"id":{"format":"int64","type":"integer"},"name":{"type":"string"},"tag":{"type":"string"}}}}}}}}}}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeDuplicateExtensionsAsV3JsonWorks_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeDuplicateExtensionsAsV3JsonWorks_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..c2e9f5312
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeDuplicateExtensionsAsV3JsonWorks_produceTerseOutput=False.verified.txt
@@ -0,0 +1,75 @@
+{
+ "openapi": "3.0.1",
+ "info": {
+ "title": "Swagger Petstore (Simple)",
+ "description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification",
+ "version": "1.0.0"
+ },
+ "servers": [
+ {
+ "url": "http://petstore.swagger.io/api"
+ }
+ ],
+ "paths": {
+ "/add/{operand1}/{operand2}": {
+ "get": {
+ "operationId": "addByOperand1AndByOperand2",
+ "parameters": [
+ {
+ "name": "operand1",
+ "in": "path",
+ "description": "The first operand",
+ "required": true,
+ "schema": {
+ "type": "integer",
+ "my-extension": 4
+ },
+ "my-extension": 4
+ },
+ {
+ "name": "operand2",
+ "in": "path",
+ "description": "The second operand",
+ "required": true,
+ "schema": {
+ "type": "integer",
+ "my-extension": 4
+ },
+ "my-extension": 4
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "pet response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "required": [
+ "id",
+ "name"
+ ],
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "name": {
+ "type": "string"
+ },
+ "tag": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeDuplicateExtensionsAsV3JsonWorks_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeDuplicateExtensionsAsV3JsonWorks_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..da61a8817
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeDuplicateExtensionsAsV3JsonWorks_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"openapi":"3.0.1","info":{"title":"Swagger Petstore (Simple)","description":"A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification","version":"1.0.0"},"servers":[{"url":"http://petstore.swagger.io/api"}],"paths":{"/add/{operand1}/{operand2}":{"get":{"operationId":"addByOperand1AndByOperand2","parameters":[{"name":"operand1","in":"path","description":"The first operand","required":true,"schema":{"type":"integer","my-extension":4},"my-extension":4},{"name":"operand2","in":"path","description":"The second operand","required":true,"schema":{"type":"integer","my-extension":4},"my-extension":4}],"responses":{"200":{"description":"pet response","content":{"application/json":{"schema":{"type":"array","items":{"required":["id","name"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"tag":{"type":"string"}}}}}}}}}}}}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.cs
index ea65ec6eb..10cadd597 100644
--- a/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.cs
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.cs
@@ -5,17 +5,20 @@
using System.Collections.Generic;
using System.Globalization;
using System.IO;
+using System.Threading.Tasks;
using FluentAssertions;
using Microsoft.OpenApi.Extensions;
using Microsoft.OpenApi.Interfaces;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.Writers;
+using VerifyXunit;
using Xunit;
using Xunit.Abstractions;
namespace Microsoft.OpenApi.Tests.Models
{
[Collection("DefaultSettings")]
+ [UsesVerify]
public class OpenApiDocumentTests
{
public static OpenApiComponents TopLevelReferencingComponents = new OpenApiComponents()
@@ -982,508 +985,14 @@ public OpenApiDocumentTests(ITestOutputHelper output)
_output = output;
}
- [Fact]
- public void SerializeAdvancedDocumentAsV3JsonWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeAdvancedDocumentAsV3JsonWorks(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""openapi"": ""3.0.1"",
- ""info"": {
- ""title"": ""Swagger Petstore (Simple)"",
- ""description"": ""A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification"",
- ""termsOfService"": ""http://helloreverb.com/terms/"",
- ""contact"": {
- ""name"": ""Swagger API team"",
- ""url"": ""http://swagger.io"",
- ""email"": ""foo@example.com""
- },
- ""license"": {
- ""name"": ""MIT"",
- ""url"": ""http://opensource.org/licenses/MIT""
- },
- ""version"": ""1.0.0""
- },
- ""servers"": [
- {
- ""url"": ""http://petstore.swagger.io/api""
- }
- ],
- ""paths"": {
- ""/pets"": {
- ""get"": {
- ""description"": ""Returns all pets from the system that the user has access to"",
- ""operationId"": ""findPets"",
- ""parameters"": [
- {
- ""name"": ""tags"",
- ""in"": ""query"",
- ""description"": ""tags to filter by"",
- ""schema"": {
- ""type"": ""array"",
- ""items"": {
- ""type"": ""string""
- }
- }
- },
- {
- ""name"": ""limit"",
- ""in"": ""query"",
- ""description"": ""maximum number of results to return"",
- ""schema"": {
- ""type"": ""integer"",
- ""format"": ""int32""
- }
- }
- ],
- ""responses"": {
- ""200"": {
- ""description"": ""pet response"",
- ""content"": {
- ""application/json"": {
- ""schema"": {
- ""type"": ""array"",
- ""items"": {
- ""required"": [
- ""id"",
- ""name""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""id"": {
- ""type"": ""integer"",
- ""format"": ""int64""
- },
- ""name"": {
- ""type"": ""string""
- },
- ""tag"": {
- ""type"": ""string""
- }
- }
- }
- }
- },
- ""application/xml"": {
- ""schema"": {
- ""type"": ""array"",
- ""items"": {
- ""required"": [
- ""id"",
- ""name""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""id"": {
- ""type"": ""integer"",
- ""format"": ""int64""
- },
- ""name"": {
- ""type"": ""string""
- },
- ""tag"": {
- ""type"": ""string""
- }
- }
- }
- }
- }
- }
- },
- ""4XX"": {
- ""description"": ""unexpected client error"",
- ""content"": {
- ""text/html"": {
- ""schema"": {
- ""required"": [
- ""code"",
- ""message""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""code"": {
- ""type"": ""integer"",
- ""format"": ""int32""
- },
- ""message"": {
- ""type"": ""string""
- }
- }
- }
- }
- }
- },
- ""5XX"": {
- ""description"": ""unexpected server error"",
- ""content"": {
- ""text/html"": {
- ""schema"": {
- ""required"": [
- ""code"",
- ""message""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""code"": {
- ""type"": ""integer"",
- ""format"": ""int32""
- },
- ""message"": {
- ""type"": ""string""
- }
- }
- }
- }
- }
- }
- }
- },
- ""post"": {
- ""description"": ""Creates a new pet in the store. Duplicates are allowed"",
- ""operationId"": ""addPet"",
- ""requestBody"": {
- ""description"": ""Pet to add to the store"",
- ""content"": {
- ""application/json"": {
- ""schema"": {
- ""required"": [
- ""name""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""id"": {
- ""type"": ""integer"",
- ""format"": ""int64""
- },
- ""name"": {
- ""type"": ""string""
- },
- ""tag"": {
- ""type"": ""string""
- }
- }
- }
- }
- },
- ""required"": true
- },
- ""responses"": {
- ""200"": {
- ""description"": ""pet response"",
- ""content"": {
- ""application/json"": {
- ""schema"": {
- ""required"": [
- ""id"",
- ""name""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""id"": {
- ""type"": ""integer"",
- ""format"": ""int64""
- },
- ""name"": {
- ""type"": ""string""
- },
- ""tag"": {
- ""type"": ""string""
- }
- }
- }
- }
- }
- },
- ""4XX"": {
- ""description"": ""unexpected client error"",
- ""content"": {
- ""text/html"": {
- ""schema"": {
- ""required"": [
- ""code"",
- ""message""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""code"": {
- ""type"": ""integer"",
- ""format"": ""int32""
- },
- ""message"": {
- ""type"": ""string""
- }
- }
- }
- }
- }
- },
- ""5XX"": {
- ""description"": ""unexpected server error"",
- ""content"": {
- ""text/html"": {
- ""schema"": {
- ""required"": [
- ""code"",
- ""message""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""code"": {
- ""type"": ""integer"",
- ""format"": ""int32""
- },
- ""message"": {
- ""type"": ""string""
- }
- }
- }
- }
- }
- }
- }
- }
- },
- ""/pets/{id}"": {
- ""get"": {
- ""description"": ""Returns a user based on a single ID, if the user does not have access to the pet"",
- ""operationId"": ""findPetById"",
- ""parameters"": [
- {
- ""name"": ""id"",
- ""in"": ""path"",
- ""description"": ""ID of pet to fetch"",
- ""required"": true,
- ""schema"": {
- ""type"": ""integer"",
- ""format"": ""int64""
- }
- }
- ],
- ""responses"": {
- ""200"": {
- ""description"": ""pet response"",
- ""content"": {
- ""application/json"": {
- ""schema"": {
- ""required"": [
- ""id"",
- ""name""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""id"": {
- ""type"": ""integer"",
- ""format"": ""int64""
- },
- ""name"": {
- ""type"": ""string""
- },
- ""tag"": {
- ""type"": ""string""
- }
- }
- }
- },
- ""application/xml"": {
- ""schema"": {
- ""required"": [
- ""id"",
- ""name""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""id"": {
- ""type"": ""integer"",
- ""format"": ""int64""
- },
- ""name"": {
- ""type"": ""string""
- },
- ""tag"": {
- ""type"": ""string""
- }
- }
- }
- }
- }
- },
- ""4XX"": {
- ""description"": ""unexpected client error"",
- ""content"": {
- ""text/html"": {
- ""schema"": {
- ""required"": [
- ""code"",
- ""message""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""code"": {
- ""type"": ""integer"",
- ""format"": ""int32""
- },
- ""message"": {
- ""type"": ""string""
- }
- }
- }
- }
- }
- },
- ""5XX"": {
- ""description"": ""unexpected server error"",
- ""content"": {
- ""text/html"": {
- ""schema"": {
- ""required"": [
- ""code"",
- ""message""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""code"": {
- ""type"": ""integer"",
- ""format"": ""int32""
- },
- ""message"": {
- ""type"": ""string""
- }
- }
- }
- }
- }
- }
- }
- },
- ""delete"": {
- ""description"": ""deletes a single pet based on the ID supplied"",
- ""operationId"": ""deletePet"",
- ""parameters"": [
- {
- ""name"": ""id"",
- ""in"": ""path"",
- ""description"": ""ID of pet to delete"",
- ""required"": true,
- ""schema"": {
- ""type"": ""integer"",
- ""format"": ""int64""
- }
- }
- ],
- ""responses"": {
- ""204"": {
- ""description"": ""pet deleted""
- },
- ""4XX"": {
- ""description"": ""unexpected client error"",
- ""content"": {
- ""text/html"": {
- ""schema"": {
- ""required"": [
- ""code"",
- ""message""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""code"": {
- ""type"": ""integer"",
- ""format"": ""int32""
- },
- ""message"": {
- ""type"": ""string""
- }
- }
- }
- }
- }
- },
- ""5XX"": {
- ""description"": ""unexpected server error"",
- ""content"": {
- ""text/html"": {
- ""schema"": {
- ""required"": [
- ""code"",
- ""message""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""code"": {
- ""type"": ""integer"",
- ""format"": ""int32""
- },
- ""message"": {
- ""type"": ""string""
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- ""components"": {
- ""schemas"": {
- ""pet"": {
- ""required"": [
- ""id"",
- ""name""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""id"": {
- ""type"": ""integer"",
- ""format"": ""int64""
- },
- ""name"": {
- ""type"": ""string""
- },
- ""tag"": {
- ""type"": ""string""
- }
- }
- },
- ""newPet"": {
- ""required"": [
- ""name""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""id"": {
- ""type"": ""integer"",
- ""format"": ""int64""
- },
- ""name"": {
- ""type"": ""string""
- },
- ""tag"": {
- ""type"": ""string""
- }
- }
- },
- ""errorModel"": {
- ""required"": [
- ""code"",
- ""message""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""code"": {
- ""type"": ""integer"",
- ""format"": ""int32""
- },
- ""message"": {
- ""type"": ""string""
- }
- }
- }
- }
- }
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
AdvancedDocument.SerializeAsV3(writer);
@@ -1491,314 +1000,17 @@ public void SerializeAdvancedDocumentAsV3JsonWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeAdvancedDocumentWithReferenceAsV3JsonWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeAdvancedDocumentWithReferenceAsV3JsonWorks(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""openapi"": ""3.0.1"",
- ""info"": {
- ""title"": ""Swagger Petstore (Simple)"",
- ""description"": ""A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification"",
- ""termsOfService"": ""http://helloreverb.com/terms/"",
- ""contact"": {
- ""name"": ""Swagger API team"",
- ""url"": ""http://swagger.io"",
- ""email"": ""foo@example.com""
- },
- ""license"": {
- ""name"": ""MIT"",
- ""url"": ""http://opensource.org/licenses/MIT""
- },
- ""version"": ""1.0.0""
- },
- ""servers"": [
- {
- ""url"": ""http://petstore.swagger.io/api""
- }
- ],
- ""paths"": {
- ""/pets"": {
- ""get"": {
- ""description"": ""Returns all pets from the system that the user has access to"",
- ""operationId"": ""findPets"",
- ""parameters"": [
- {
- ""name"": ""tags"",
- ""in"": ""query"",
- ""description"": ""tags to filter by"",
- ""schema"": {
- ""type"": ""array"",
- ""items"": {
- ""type"": ""string""
- }
- }
- },
- {
- ""name"": ""limit"",
- ""in"": ""query"",
- ""description"": ""maximum number of results to return"",
- ""schema"": {
- ""type"": ""integer"",
- ""format"": ""int32""
- }
- }
- ],
- ""responses"": {
- ""200"": {
- ""description"": ""pet response"",
- ""content"": {
- ""application/json"": {
- ""schema"": {
- ""type"": ""array"",
- ""items"": {
- ""$ref"": ""#/components/schemas/pet""
- }
- }
- },
- ""application/xml"": {
- ""schema"": {
- ""type"": ""array"",
- ""items"": {
- ""$ref"": ""#/components/schemas/pet""
- }
- }
- }
- }
- },
- ""4XX"": {
- ""description"": ""unexpected client error"",
- ""content"": {
- ""text/html"": {
- ""schema"": {
- ""$ref"": ""#/components/schemas/errorModel""
- }
- }
- }
- },
- ""5XX"": {
- ""description"": ""unexpected server error"",
- ""content"": {
- ""text/html"": {
- ""schema"": {
- ""$ref"": ""#/components/schemas/errorModel""
- }
- }
- }
- }
- }
- },
- ""post"": {
- ""description"": ""Creates a new pet in the store. Duplicates are allowed"",
- ""operationId"": ""addPet"",
- ""requestBody"": {
- ""description"": ""Pet to add to the store"",
- ""content"": {
- ""application/json"": {
- ""schema"": {
- ""$ref"": ""#/components/schemas/newPet""
- }
- }
- },
- ""required"": true
- },
- ""responses"": {
- ""200"": {
- ""description"": ""pet response"",
- ""content"": {
- ""application/json"": {
- ""schema"": {
- ""$ref"": ""#/components/schemas/pet""
- }
- }
- }
- },
- ""4XX"": {
- ""description"": ""unexpected client error"",
- ""content"": {
- ""text/html"": {
- ""schema"": {
- ""$ref"": ""#/components/schemas/errorModel""
- }
- }
- }
- },
- ""5XX"": {
- ""description"": ""unexpected server error"",
- ""content"": {
- ""text/html"": {
- ""schema"": {
- ""$ref"": ""#/components/schemas/errorModel""
- }
- }
- }
- }
- }
- }
- },
- ""/pets/{id}"": {
- ""get"": {
- ""description"": ""Returns a user based on a single ID, if the user does not have access to the pet"",
- ""operationId"": ""findPetById"",
- ""parameters"": [
- {
- ""name"": ""id"",
- ""in"": ""path"",
- ""description"": ""ID of pet to fetch"",
- ""required"": true,
- ""schema"": {
- ""type"": ""integer"",
- ""format"": ""int64""
- }
- }
- ],
- ""responses"": {
- ""200"": {
- ""description"": ""pet response"",
- ""content"": {
- ""application/json"": {
- ""schema"": {
- ""$ref"": ""#/components/schemas/pet""
- }
- },
- ""application/xml"": {
- ""schema"": {
- ""$ref"": ""#/components/schemas/pet""
- }
- }
- }
- },
- ""4XX"": {
- ""description"": ""unexpected client error"",
- ""content"": {
- ""text/html"": {
- ""schema"": {
- ""$ref"": ""#/components/schemas/errorModel""
- }
- }
- }
- },
- ""5XX"": {
- ""description"": ""unexpected server error"",
- ""content"": {
- ""text/html"": {
- ""schema"": {
- ""$ref"": ""#/components/schemas/errorModel""
- }
- }
- }
- }
- }
- },
- ""delete"": {
- ""description"": ""deletes a single pet based on the ID supplied"",
- ""operationId"": ""deletePet"",
- ""parameters"": [
- {
- ""name"": ""id"",
- ""in"": ""path"",
- ""description"": ""ID of pet to delete"",
- ""required"": true,
- ""schema"": {
- ""type"": ""integer"",
- ""format"": ""int64""
- }
- }
- ],
- ""responses"": {
- ""204"": {
- ""description"": ""pet deleted""
- },
- ""4XX"": {
- ""description"": ""unexpected client error"",
- ""content"": {
- ""text/html"": {
- ""schema"": {
- ""$ref"": ""#/components/schemas/errorModel""
- }
- }
- }
- },
- ""5XX"": {
- ""description"": ""unexpected server error"",
- ""content"": {
- ""text/html"": {
- ""schema"": {
- ""$ref"": ""#/components/schemas/errorModel""
- }
- }
- }
- }
- }
- }
- }
- },
- ""components"": {
- ""schemas"": {
- ""pet"": {
- ""required"": [
- ""id"",
- ""name""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""id"": {
- ""type"": ""integer"",
- ""format"": ""int64""
- },
- ""name"": {
- ""type"": ""string""
- },
- ""tag"": {
- ""type"": ""string""
- }
- }
- },
- ""newPet"": {
- ""required"": [
- ""name""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""id"": {
- ""type"": ""integer"",
- ""format"": ""int64""
- },
- ""name"": {
- ""type"": ""string""
- },
- ""tag"": {
- ""type"": ""string""
- }
- }
- },
- ""errorModel"": {
- ""required"": [
- ""code"",
- ""message""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""code"": {
- ""type"": ""integer"",
- ""format"": ""int32""
- },
- ""message"": {
- ""type"": ""string""
- }
- }
- }
- }
- }
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
AdvancedDocumentWithReference.SerializeAsV3(writer);
@@ -1806,433 +1018,17 @@ public void SerializeAdvancedDocumentWithReferenceAsV3JsonWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeAdvancedDocumentAsV2JsonWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeAdvancedDocumentAsV2JsonWorks(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected = @"{
- ""swagger"": ""2.0"",
- ""info"": {
- ""title"": ""Swagger Petstore (Simple)"",
- ""description"": ""A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification"",
- ""termsOfService"": ""http://helloreverb.com/terms/"",
- ""contact"": {
- ""name"": ""Swagger API team"",
- ""url"": ""http://swagger.io"",
- ""email"": ""foo@example.com""
- },
- ""license"": {
- ""name"": ""MIT"",
- ""url"": ""http://opensource.org/licenses/MIT""
- },
- ""version"": ""1.0.0""
- },
- ""host"": ""petstore.swagger.io"",
- ""basePath"": ""/api"",
- ""schemes"": [
- ""http""
- ],
- ""paths"": {
- ""/pets"": {
- ""get"": {
- ""description"": ""Returns all pets from the system that the user has access to"",
- ""operationId"": ""findPets"",
- ""produces"": [
- ""application/json"",
- ""application/xml"",
- ""text/html""
- ],
- ""parameters"": [
- {
- ""in"": ""query"",
- ""name"": ""tags"",
- ""description"": ""tags to filter by"",
- ""type"": ""array"",
- ""items"": {
- ""type"": ""string""
- }
- },
- {
- ""in"": ""query"",
- ""name"": ""limit"",
- ""description"": ""maximum number of results to return"",
- ""type"": ""integer"",
- ""format"": ""int32""
- }
- ],
- ""responses"": {
- ""200"": {
- ""description"": ""pet response"",
- ""schema"": {
- ""type"": ""array"",
- ""items"": {
- ""required"": [
- ""id"",
- ""name""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""id"": {
- ""format"": ""int64"",
- ""type"": ""integer""
- },
- ""name"": {
- ""type"": ""string""
- },
- ""tag"": {
- ""type"": ""string""
- }
- }
- }
- }
- },
- ""4XX"": {
- ""description"": ""unexpected client error"",
- ""schema"": {
- ""required"": [
- ""code"",
- ""message""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""code"": {
- ""format"": ""int32"",
- ""type"": ""integer""
- },
- ""message"": {
- ""type"": ""string""
- }
- }
- }
- },
- ""5XX"": {
- ""description"": ""unexpected server error"",
- ""schema"": {
- ""required"": [
- ""code"",
- ""message""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""code"": {
- ""format"": ""int32"",
- ""type"": ""integer""
- },
- ""message"": {
- ""type"": ""string""
- }
- }
- }
- }
- }
- },
- ""post"": {
- ""description"": ""Creates a new pet in the store. Duplicates are allowed"",
- ""operationId"": ""addPet"",
- ""consumes"": [
- ""application/json""
- ],
- ""produces"": [
- ""application/json"",
- ""text/html""
- ],
- ""parameters"": [
- {
- ""in"": ""body"",
- ""name"": ""body"",
- ""description"": ""Pet to add to the store"",
- ""required"": true,
- ""schema"": {
- ""required"": [
- ""name""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""id"": {
- ""format"": ""int64"",
- ""type"": ""integer""
- },
- ""name"": {
- ""type"": ""string""
- },
- ""tag"": {
- ""type"": ""string""
- }
- }
- }
- }
- ],
- ""responses"": {
- ""200"": {
- ""description"": ""pet response"",
- ""schema"": {
- ""required"": [
- ""id"",
- ""name""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""id"": {
- ""format"": ""int64"",
- ""type"": ""integer""
- },
- ""name"": {
- ""type"": ""string""
- },
- ""tag"": {
- ""type"": ""string""
- }
- }
- }
- },
- ""4XX"": {
- ""description"": ""unexpected client error"",
- ""schema"": {
- ""required"": [
- ""code"",
- ""message""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""code"": {
- ""format"": ""int32"",
- ""type"": ""integer""
- },
- ""message"": {
- ""type"": ""string""
- }
- }
- }
- },
- ""5XX"": {
- ""description"": ""unexpected server error"",
- ""schema"": {
- ""required"": [
- ""code"",
- ""message""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""code"": {
- ""format"": ""int32"",
- ""type"": ""integer""
- },
- ""message"": {
- ""type"": ""string""
- }
- }
- }
- }
- }
- }
- },
- ""/pets/{id}"": {
- ""get"": {
- ""description"": ""Returns a user based on a single ID, if the user does not have access to the pet"",
- ""operationId"": ""findPetById"",
- ""produces"": [
- ""application/json"",
- ""application/xml"",
- ""text/html""
- ],
- ""parameters"": [
- {
- ""in"": ""path"",
- ""name"": ""id"",
- ""description"": ""ID of pet to fetch"",
- ""required"": true,
- ""type"": ""integer"",
- ""format"": ""int64""
- }
- ],
- ""responses"": {
- ""200"": {
- ""description"": ""pet response"",
- ""schema"": {
- ""required"": [
- ""id"",
- ""name""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""id"": {
- ""format"": ""int64"",
- ""type"": ""integer""
- },
- ""name"": {
- ""type"": ""string""
- },
- ""tag"": {
- ""type"": ""string""
- }
- }
- }
- },
- ""4XX"": {
- ""description"": ""unexpected client error"",
- ""schema"": {
- ""required"": [
- ""code"",
- ""message""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""code"": {
- ""format"": ""int32"",
- ""type"": ""integer""
- },
- ""message"": {
- ""type"": ""string""
- }
- }
- }
- },
- ""5XX"": {
- ""description"": ""unexpected server error"",
- ""schema"": {
- ""required"": [
- ""code"",
- ""message""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""code"": {
- ""format"": ""int32"",
- ""type"": ""integer""
- },
- ""message"": {
- ""type"": ""string""
- }
- }
- }
- }
- }
- },
- ""delete"": {
- ""description"": ""deletes a single pet based on the ID supplied"",
- ""operationId"": ""deletePet"",
- ""produces"": [
- ""text/html""
- ],
- ""parameters"": [
- {
- ""in"": ""path"",
- ""name"": ""id"",
- ""description"": ""ID of pet to delete"",
- ""required"": true,
- ""type"": ""integer"",
- ""format"": ""int64""
- }
- ],
- ""responses"": {
- ""204"": {
- ""description"": ""pet deleted""
- },
- ""4XX"": {
- ""description"": ""unexpected client error"",
- ""schema"": {
- ""required"": [
- ""code"",
- ""message""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""code"": {
- ""format"": ""int32"",
- ""type"": ""integer""
- },
- ""message"": {
- ""type"": ""string""
- }
- }
- }
- },
- ""5XX"": {
- ""description"": ""unexpected server error"",
- ""schema"": {
- ""required"": [
- ""code"",
- ""message""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""code"": {
- ""format"": ""int32"",
- ""type"": ""integer""
- },
- ""message"": {
- ""type"": ""string""
- }
- }
- }
- }
- }
- }
- }
- },
- ""definitions"": {
- ""pet"": {
- ""required"": [
- ""id"",
- ""name""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""id"": {
- ""format"": ""int64"",
- ""type"": ""integer""
- },
- ""name"": {
- ""type"": ""string""
- },
- ""tag"": {
- ""type"": ""string""
- }
- }
- },
- ""newPet"": {
- ""required"": [
- ""name""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""id"": {
- ""format"": ""int64"",
- ""type"": ""integer""
- },
- ""name"": {
- ""type"": ""string""
- },
- ""tag"": {
- ""type"": ""string""
- }
- }
- },
- ""errorModel"": {
- ""required"": [
- ""code"",
- ""message""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""code"": {
- ""format"": ""int32"",
- ""type"": ""integer""
- },
- ""message"": {
- ""type"": ""string""
- }
- }
- }
- }
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
AdvancedDocument.SerializeAsV2(writer);
@@ -2240,92 +1036,17 @@ public void SerializeAdvancedDocumentAsV2JsonWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeDuplicateExtensionsAsV3JsonWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeDuplicateExtensionsAsV3JsonWorks(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected = @"{
- ""openapi"": ""3.0.1"",
- ""info"": {
- ""title"": ""Swagger Petstore (Simple)"",
- ""description"": ""A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification"",
- ""version"": ""1.0.0""
- },
- ""servers"": [
- {
- ""url"": ""http://petstore.swagger.io/api""
- }
- ],
- ""paths"": {
- ""/add/{operand1}/{operand2}"": {
- ""get"": {
- ""operationId"": ""addByOperand1AndByOperand2"",
- ""parameters"": [
- {
- ""name"": ""operand1"",
- ""in"": ""path"",
- ""description"": ""The first operand"",
- ""required"": true,
- ""schema"": {
- ""type"": ""integer"",
- ""my-extension"": 4
- },
- ""my-extension"": 4
- },
- {
- ""name"": ""operand2"",
- ""in"": ""path"",
- ""description"": ""The second operand"",
- ""required"": true,
- ""schema"": {
- ""type"": ""integer"",
- ""my-extension"": 4
- },
- ""my-extension"": 4
- }
- ],
- ""responses"": {
- ""200"": {
- ""description"": ""pet response"",
- ""content"": {
- ""application/json"": {
- ""schema"": {
- ""type"": ""array"",
- ""items"": {
- ""required"": [
- ""id"",
- ""name""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""id"": {
- ""type"": ""integer"",
- ""format"": ""int64""
- },
- ""name"": {
- ""type"": ""string""
- },
- ""tag"": {
- ""type"": ""string""
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
DuplicateExtensions.SerializeAsV3(writer);
@@ -2333,85 +1054,17 @@ public void SerializeDuplicateExtensionsAsV3JsonWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeDuplicateExtensionsAsV2JsonWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeDuplicateExtensionsAsV2JsonWorks(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected = @"{
- ""swagger"": ""2.0"",
- ""info"": {
- ""title"": ""Swagger Petstore (Simple)"",
- ""description"": ""A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification"",
- ""version"": ""1.0.0""
- },
- ""host"": ""petstore.swagger.io"",
- ""basePath"": ""/api"",
- ""schemes"": [
- ""http""
- ],
- ""paths"": {
- ""/add/{operand1}/{operand2}"": {
- ""get"": {
- ""operationId"": ""addByOperand1AndByOperand2"",
- ""produces"": [
- ""application/json""
- ],
- ""parameters"": [
- {
- ""in"": ""path"",
- ""name"": ""operand1"",
- ""description"": ""The first operand"",
- ""required"": true,
- ""type"": ""integer"",
- ""my-extension"": 4
- },
- {
- ""in"": ""path"",
- ""name"": ""operand2"",
- ""description"": ""The second operand"",
- ""required"": true,
- ""type"": ""integer"",
- ""my-extension"": 4
- }
- ],
- ""responses"": {
- ""200"": {
- ""description"": ""pet response"",
- ""schema"": {
- ""type"": ""array"",
- ""items"": {
- ""required"": [
- ""id"",
- ""name""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""id"": {
- ""format"": ""int64"",
- ""type"": ""integer""
- },
- ""name"": {
- ""type"": ""string""
- },
- ""tag"": {
- ""type"": ""string""
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
DuplicateExtensions.SerializeAsV2(writer);
@@ -2419,267 +1072,17 @@ public void SerializeDuplicateExtensionsAsV2JsonWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeAdvancedDocumentWithReferenceAsV2JsonWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeAdvancedDocumentWithReferenceAsV2JsonWorks(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""swagger"": ""2.0"",
- ""info"": {
- ""title"": ""Swagger Petstore (Simple)"",
- ""description"": ""A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification"",
- ""termsOfService"": ""http://helloreverb.com/terms/"",
- ""contact"": {
- ""name"": ""Swagger API team"",
- ""url"": ""http://swagger.io"",
- ""email"": ""foo@example.com""
- },
- ""license"": {
- ""name"": ""MIT"",
- ""url"": ""http://opensource.org/licenses/MIT""
- },
- ""version"": ""1.0.0""
- },
- ""host"": ""petstore.swagger.io"",
- ""basePath"": ""/api"",
- ""schemes"": [
- ""http""
- ],
- ""paths"": {
- ""/pets"": {
- ""get"": {
- ""description"": ""Returns all pets from the system that the user has access to"",
- ""operationId"": ""findPets"",
- ""produces"": [
- ""application/json"",
- ""application/xml"",
- ""text/html""
- ],
- ""parameters"": [
- {
- ""in"": ""query"",
- ""name"": ""tags"",
- ""description"": ""tags to filter by"",
- ""type"": ""array"",
- ""items"": {
- ""type"": ""string""
- }
- },
- {
- ""in"": ""query"",
- ""name"": ""limit"",
- ""description"": ""maximum number of results to return"",
- ""type"": ""integer"",
- ""format"": ""int32""
- }
- ],
- ""responses"": {
- ""200"": {
- ""description"": ""pet response"",
- ""schema"": {
- ""type"": ""array"",
- ""items"": {
- ""$ref"": ""#/definitions/pet""
- }
- }
- },
- ""4XX"": {
- ""description"": ""unexpected client error"",
- ""schema"": {
- ""$ref"": ""#/definitions/errorModel""
- }
- },
- ""5XX"": {
- ""description"": ""unexpected server error"",
- ""schema"": {
- ""$ref"": ""#/definitions/errorModel""
- }
- }
- }
- },
- ""post"": {
- ""description"": ""Creates a new pet in the store. Duplicates are allowed"",
- ""operationId"": ""addPet"",
- ""consumes"": [
- ""application/json""
- ],
- ""produces"": [
- ""application/json"",
- ""text/html""
- ],
- ""parameters"": [
- {
- ""in"": ""body"",
- ""name"": ""body"",
- ""description"": ""Pet to add to the store"",
- ""required"": true,
- ""schema"": {
- ""$ref"": ""#/definitions/newPet""
- }
- }
- ],
- ""responses"": {
- ""200"": {
- ""description"": ""pet response"",
- ""schema"": {
- ""$ref"": ""#/definitions/pet""
- }
- },
- ""4XX"": {
- ""description"": ""unexpected client error"",
- ""schema"": {
- ""$ref"": ""#/definitions/errorModel""
- }
- },
- ""5XX"": {
- ""description"": ""unexpected server error"",
- ""schema"": {
- ""$ref"": ""#/definitions/errorModel""
- }
- }
- }
- }
- },
- ""/pets/{id}"": {
- ""get"": {
- ""description"": ""Returns a user based on a single ID, if the user does not have access to the pet"",
- ""operationId"": ""findPetById"",
- ""produces"": [
- ""application/json"",
- ""application/xml"",
- ""text/html""
- ],
- ""parameters"": [
- {
- ""in"": ""path"",
- ""name"": ""id"",
- ""description"": ""ID of pet to fetch"",
- ""required"": true,
- ""type"": ""integer"",
- ""format"": ""int64""
- }
- ],
- ""responses"": {
- ""200"": {
- ""description"": ""pet response"",
- ""schema"": {
- ""$ref"": ""#/definitions/pet""
- }
- },
- ""4XX"": {
- ""description"": ""unexpected client error"",
- ""schema"": {
- ""$ref"": ""#/definitions/errorModel""
- }
- },
- ""5XX"": {
- ""description"": ""unexpected server error"",
- ""schema"": {
- ""$ref"": ""#/definitions/errorModel""
- }
- }
- }
- },
- ""delete"": {
- ""description"": ""deletes a single pet based on the ID supplied"",
- ""operationId"": ""deletePet"",
- ""produces"": [
- ""text/html""
- ],
- ""parameters"": [
- {
- ""in"": ""path"",
- ""name"": ""id"",
- ""description"": ""ID of pet to delete"",
- ""required"": true,
- ""type"": ""integer"",
- ""format"": ""int64""
- }
- ],
- ""responses"": {
- ""204"": {
- ""description"": ""pet deleted""
- },
- ""4XX"": {
- ""description"": ""unexpected client error"",
- ""schema"": {
- ""$ref"": ""#/definitions/errorModel""
- }
- },
- ""5XX"": {
- ""description"": ""unexpected server error"",
- ""schema"": {
- ""$ref"": ""#/definitions/errorModel""
- }
- }
- }
- }
- }
- },
- ""definitions"": {
- ""pet"": {
- ""required"": [
- ""id"",
- ""name""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""id"": {
- ""format"": ""int64"",
- ""type"": ""integer""
- },
- ""name"": {
- ""type"": ""string""
- },
- ""tag"": {
- ""type"": ""string""
- }
- }
- },
- ""newPet"": {
- ""required"": [
- ""name""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""id"": {
- ""format"": ""int64"",
- ""type"": ""integer""
- },
- ""name"": {
- ""type"": ""string""
- },
- ""tag"": {
- ""type"": ""string""
- }
- }
- },
- ""errorModel"": {
- ""required"": [
- ""code"",
- ""message""
- ],
- ""type"": ""object"",
- ""properties"": {
- ""code"": {
- ""format"": ""int32"",
- ""type"": ""integer""
- },
- ""message"": {
- ""type"": ""string""
- }
- }
- }
- }
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
AdvancedDocumentWithReference.SerializeAsV2(writer);
@@ -2687,9 +1090,7 @@ public void SerializeAdvancedDocumentWithReferenceAsV2JsonWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
[Fact]
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiExampleTests.SerializeAdvancedExampleAsV3JsonWorks_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiExampleTests.SerializeAdvancedExampleAsV3JsonWorks_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..44d48dd73
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiExampleTests.SerializeAdvancedExampleAsV3JsonWorks_produceTerseOutput=False.verified.txt
@@ -0,0 +1,28 @@
+{
+ "value": {
+ "versions": [
+ {
+ "status": "Status1",
+ "id": "v1",
+ "links": [
+ {
+ "href": "http://example.com/1",
+ "rel": "sampleRel1",
+ "bytes": "AQID",
+ "binary": "Ñ😻😑♮Í☛oƞ♑😲☇éNjžŁ♻😟¥a´Ī♃ƠąøƩ"
+ }
+ ]
+ },
+ {
+ "status": "Status2",
+ "id": "v2",
+ "links": [
+ {
+ "href": "http://example.com/2",
+ "rel": "sampleRel2"
+ }
+ ]
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiExampleTests.SerializeAdvancedExampleAsV3JsonWorks_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiExampleTests.SerializeAdvancedExampleAsV3JsonWorks_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..c42b2a5ac
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiExampleTests.SerializeAdvancedExampleAsV3JsonWorks_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"value":{"versions":[{"status":"Status1","id":"v1","links":[{"href":"http://example.com/1","rel":"sampleRel1","bytes":"AQID","binary":"Ñ😻😑♮Í☛oƞ♑😲☇éNjžŁ♻😟¥a´Ī♃ƠąøƩ"}]},{"status":"Status2","id":"v2","links":[{"href":"http://example.com/2","rel":"sampleRel2"}]}]}}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiExampleTests.SerializeReferencedExampleAsV3JsonWithoutReferenceWorks_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiExampleTests.SerializeReferencedExampleAsV3JsonWithoutReferenceWorks_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..45f085f73
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiExampleTests.SerializeReferencedExampleAsV3JsonWithoutReferenceWorks_produceTerseOutput=False.verified.txt
@@ -0,0 +1,26 @@
+{
+ "value": {
+ "versions": [
+ {
+ "status": "Status1",
+ "id": "v1",
+ "links": [
+ {
+ "href": "http://example.com/1",
+ "rel": "sampleRel1"
+ }
+ ]
+ },
+ {
+ "status": "Status2",
+ "id": "v2",
+ "links": [
+ {
+ "href": "http://example.com/2",
+ "rel": "sampleRel2"
+ }
+ ]
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiExampleTests.SerializeReferencedExampleAsV3JsonWithoutReferenceWorks_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiExampleTests.SerializeReferencedExampleAsV3JsonWithoutReferenceWorks_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..b503d318e
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiExampleTests.SerializeReferencedExampleAsV3JsonWithoutReferenceWorks_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"value":{"versions":[{"status":"Status1","id":"v1","links":[{"href":"http://example.com/1","rel":"sampleRel1"}]},{"status":"Status2","id":"v2","links":[{"href":"http://example.com/2","rel":"sampleRel2"}]}]}}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiExampleTests.SerializeReferencedExampleAsV3JsonWorks_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiExampleTests.SerializeReferencedExampleAsV3JsonWorks_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..74aae72ef
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiExampleTests.SerializeReferencedExampleAsV3JsonWorks_produceTerseOutput=False.verified.txt
@@ -0,0 +1,3 @@
+{
+ "$ref": "#/components/examples/example1"
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiExampleTests.SerializeReferencedExampleAsV3JsonWorks_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiExampleTests.SerializeReferencedExampleAsV3JsonWorks_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..12898c9c5
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiExampleTests.SerializeReferencedExampleAsV3JsonWorks_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"$ref":"#/components/examples/example1"}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiExampleTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiExampleTests.cs
index 896b96215..6108c3c26 100644
--- a/test/Microsoft.OpenApi.Tests/Models/OpenApiExampleTests.cs
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiExampleTests.cs
@@ -4,16 +4,18 @@
using System.Globalization;
using System.IO;
using System.Text;
-using FluentAssertions;
+using System.Threading.Tasks;
using Microsoft.OpenApi.Any;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.Writers;
+using VerifyXunit;
using Xunit;
using Xunit.Abstractions;
namespace Microsoft.OpenApi.Tests.Models
{
[Collection("DefaultSettings")]
+ [UsesVerify]
public class OpenApiExampleTests
{
public static OpenApiExample AdvancedExample = new OpenApiExample
@@ -104,41 +106,14 @@ public OpenApiExampleTests(ITestOutputHelper output)
_output = output;
}
- [Fact]
- public void SerializeAdvancedExampleAsV3JsonWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeAdvancedExampleAsV3JsonWorks(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""value"": {
- ""versions"": [
- {
- ""status"": ""Status1"",
- ""id"": ""v1"",
- ""links"": [
- {
- ""href"": ""http://example.com/1"",
- ""rel"": ""sampleRel1"",
- ""bytes"": ""AQID"",
- ""binary"": ""Ñ😻😑♮Í☛oƞ♑😲☇éNjžŁ♻😟¥a´Ī♃ƠąøƩ""
- }
- ]
- },
- {
- ""status"": ""Status2"",
- ""id"": ""v2"",
- ""links"": [
- {
- ""href"": ""http://example.com/2"",
- ""rel"": ""sampleRel2""
- }
- ]
- }
- ]
- }
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
AdvancedExample.SerializeAsV3(writer);
@@ -146,21 +121,17 @@ public void SerializeAdvancedExampleAsV3JsonWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeReferencedExampleAsV3JsonWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeReferencedExampleAsV3JsonWorks(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""$ref"": ""#/components/examples/example1""
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
ReferencedExample.SerializeAsV3(writer);
@@ -168,44 +139,17 @@ public void SerializeReferencedExampleAsV3JsonWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeReferencedExampleAsV3JsonWithoutReferenceWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeReferencedExampleAsV3JsonWithoutReferenceWorks(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""value"": {
- ""versions"": [
- {
- ""status"": ""Status1"",
- ""id"": ""v1"",
- ""links"": [
- {
- ""href"": ""http://example.com/1"",
- ""rel"": ""sampleRel1""
- }
- ]
- },
- {
- ""status"": ""Status2"",
- ""id"": ""v2"",
- ""links"": [
- {
- ""href"": ""http://example.com/2"",
- ""rel"": ""sampleRel2""
- }
- ]
- }
- ]
- }
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
ReferencedExample.SerializeAsV3WithoutReference(writer);
@@ -213,9 +157,7 @@ public void SerializeReferencedExampleAsV3JsonWithoutReferenceWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
}
}
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeAdvancedHeaderAsV2JsonWorks_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeAdvancedHeaderAsV2JsonWorks_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..5b0eb86be
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeAdvancedHeaderAsV2JsonWorks_produceTerseOutput=False.verified.txt
@@ -0,0 +1,5 @@
+{
+ "description": "sampleHeader",
+ "type": "integer",
+ "format": "int32"
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeAdvancedHeaderAsV2JsonWorks_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeAdvancedHeaderAsV2JsonWorks_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..8feb99289
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeAdvancedHeaderAsV2JsonWorks_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"description":"sampleHeader","type":"integer","format":"int32"}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeAdvancedHeaderAsV3JsonWorks_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeAdvancedHeaderAsV3JsonWorks_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..8234610e0
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeAdvancedHeaderAsV3JsonWorks_produceTerseOutput=False.verified.txt
@@ -0,0 +1,7 @@
+{
+ "description": "sampleHeader",
+ "schema": {
+ "type": "integer",
+ "format": "int32"
+ }
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeAdvancedHeaderAsV3JsonWorks_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeAdvancedHeaderAsV3JsonWorks_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..37ebf2515
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeAdvancedHeaderAsV3JsonWorks_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"description":"sampleHeader","schema":{"type":"integer","format":"int32"}}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeReferencedHeaderAsV2JsonWithoutReferenceWorks_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeReferencedHeaderAsV2JsonWithoutReferenceWorks_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..5b0eb86be
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeReferencedHeaderAsV2JsonWithoutReferenceWorks_produceTerseOutput=False.verified.txt
@@ -0,0 +1,5 @@
+{
+ "description": "sampleHeader",
+ "type": "integer",
+ "format": "int32"
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeReferencedHeaderAsV2JsonWithoutReferenceWorks_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeReferencedHeaderAsV2JsonWithoutReferenceWorks_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..8feb99289
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeReferencedHeaderAsV2JsonWithoutReferenceWorks_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"description":"sampleHeader","type":"integer","format":"int32"}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeReferencedHeaderAsV2JsonWorks_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeReferencedHeaderAsV2JsonWorks_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..9791d3c4a
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeReferencedHeaderAsV2JsonWorks_produceTerseOutput=False.verified.txt
@@ -0,0 +1,3 @@
+{
+ "$ref": "#/headers/example1"
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeReferencedHeaderAsV2JsonWorks_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeReferencedHeaderAsV2JsonWorks_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..58060ead9
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeReferencedHeaderAsV2JsonWorks_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"$ref":"#/headers/example1"}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeReferencedHeaderAsV3JsonWithoutReferenceWorks_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeReferencedHeaderAsV3JsonWithoutReferenceWorks_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..8234610e0
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeReferencedHeaderAsV3JsonWithoutReferenceWorks_produceTerseOutput=False.verified.txt
@@ -0,0 +1,7 @@
+{
+ "description": "sampleHeader",
+ "schema": {
+ "type": "integer",
+ "format": "int32"
+ }
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeReferencedHeaderAsV3JsonWithoutReferenceWorks_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeReferencedHeaderAsV3JsonWithoutReferenceWorks_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..37ebf2515
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeReferencedHeaderAsV3JsonWithoutReferenceWorks_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"description":"sampleHeader","schema":{"type":"integer","format":"int32"}}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeReferencedHeaderAsV3JsonWorks_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeReferencedHeaderAsV3JsonWorks_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..18045b9d2
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeReferencedHeaderAsV3JsonWorks_produceTerseOutput=False.verified.txt
@@ -0,0 +1,3 @@
+{
+ "$ref": "#/components/headers/example1"
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeReferencedHeaderAsV3JsonWorks_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeReferencedHeaderAsV3JsonWorks_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..8c4124b8d
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.SerializeReferencedHeaderAsV3JsonWorks_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"$ref":"#/components/headers/example1"}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.cs
index 5c2671e54..846d470ba 100644
--- a/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.cs
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.cs
@@ -3,15 +3,17 @@
using System.Globalization;
using System.IO;
-using FluentAssertions;
+using System.Threading.Tasks;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.Writers;
+using VerifyXunit;
using Xunit;
using Xunit.Abstractions;
namespace Microsoft.OpenApi.Tests.Models
{
[Collection("DefaultSettings")]
+ [UsesVerify]
public class OpenApiHeaderTests
{
public static OpenApiHeader AdvancedHeader = new OpenApiHeader
@@ -46,20 +48,14 @@ public OpenApiHeaderTests(ITestOutputHelper output)
_output = output;
}
- [Fact]
- public void SerializeAdvancedHeaderAsV3JsonWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeAdvancedHeaderAsV3JsonWorks(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""description"": ""sampleHeader"",
- ""schema"": {
- ""type"": ""integer"",
- ""format"": ""int32""
- }
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
AdvancedHeader.SerializeAsV3(writer);
@@ -67,21 +63,17 @@ public void SerializeAdvancedHeaderAsV3JsonWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeReferencedHeaderAsV3JsonWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeReferencedHeaderAsV3JsonWorks(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""$ref"": ""#/components/headers/example1""
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
ReferencedHeader.SerializeAsV3(writer);
@@ -89,25 +81,17 @@ public void SerializeReferencedHeaderAsV3JsonWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeReferencedHeaderAsV3JsonWithoutReferenceWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeReferencedHeaderAsV3JsonWithoutReferenceWorks(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""description"": ""sampleHeader"",
- ""schema"": {
- ""type"": ""integer"",
- ""format"": ""int32""
- }
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
ReferencedHeader.SerializeAsV3WithoutReference(writer);
@@ -115,23 +99,17 @@ public void SerializeReferencedHeaderAsV3JsonWithoutReferenceWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeAdvancedHeaderAsV2JsonWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeAdvancedHeaderAsV2JsonWorks(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""description"": ""sampleHeader"",
- ""type"": ""integer"",
- ""format"": ""int32""
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
AdvancedHeader.SerializeAsV2(writer);
@@ -139,21 +117,17 @@ public void SerializeAdvancedHeaderAsV2JsonWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeReferencedHeaderAsV2JsonWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeReferencedHeaderAsV2JsonWorks(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""$ref"": ""#/headers/example1""
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
ReferencedHeader.SerializeAsV2(writer);
@@ -161,23 +135,17 @@ public void SerializeReferencedHeaderAsV2JsonWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeReferencedHeaderAsV2JsonWithoutReferenceWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeReferencedHeaderAsV2JsonWithoutReferenceWorks(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""description"": ""sampleHeader"",
- ""type"": ""integer"",
- ""format"": ""int32""
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
ReferencedHeader.SerializeAsV2WithoutReference(writer);
@@ -185,9 +153,7 @@ public void SerializeReferencedHeaderAsV2JsonWithoutReferenceWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
}
}
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiLinkTests.SerializeAdvancedLinkAsV3JsonWorksAsync_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiLinkTests.SerializeAdvancedLinkAsV3JsonWorksAsync_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..2629e0b1c
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiLinkTests.SerializeAdvancedLinkAsV3JsonWorksAsync_produceTerseOutput=False.verified.txt
@@ -0,0 +1,13 @@
+{
+ "operationId": "operationId1",
+ "parameters": {
+ "parameter1": "$request.path.id"
+ },
+ "requestBody": {
+ "property1": true
+ },
+ "description": "description1",
+ "server": {
+ "description": "serverDescription1"
+ }
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiLinkTests.SerializeAdvancedLinkAsV3JsonWorksAsync_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiLinkTests.SerializeAdvancedLinkAsV3JsonWorksAsync_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..c9c1701b5
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiLinkTests.SerializeAdvancedLinkAsV3JsonWorksAsync_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"operationId":"operationId1","parameters":{"parameter1":"$request.path.id"},"requestBody":{"property1":true},"description":"description1","server":{"description":"serverDescription1"}}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiLinkTests.SerializeReferencedLinkAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiLinkTests.SerializeReferencedLinkAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..2629e0b1c
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiLinkTests.SerializeReferencedLinkAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt
@@ -0,0 +1,13 @@
+{
+ "operationId": "operationId1",
+ "parameters": {
+ "parameter1": "$request.path.id"
+ },
+ "requestBody": {
+ "property1": true
+ },
+ "description": "description1",
+ "server": {
+ "description": "serverDescription1"
+ }
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiLinkTests.SerializeReferencedLinkAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiLinkTests.SerializeReferencedLinkAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..c9c1701b5
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiLinkTests.SerializeReferencedLinkAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"operationId":"operationId1","parameters":{"parameter1":"$request.path.id"},"requestBody":{"property1":true},"description":"description1","server":{"description":"serverDescription1"}}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiLinkTests.SerializeReferencedLinkAsV3JsonWorksAsync_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiLinkTests.SerializeReferencedLinkAsV3JsonWorksAsync_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..26fe6229d
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiLinkTests.SerializeReferencedLinkAsV3JsonWorksAsync_produceTerseOutput=False.verified.txt
@@ -0,0 +1,3 @@
+{
+ "$ref": "#/components/links/example1"
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiLinkTests.SerializeReferencedLinkAsV3JsonWorksAsync_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiLinkTests.SerializeReferencedLinkAsV3JsonWorksAsync_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..2200957a3
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiLinkTests.SerializeReferencedLinkAsV3JsonWorksAsync_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"$ref":"#/components/links/example1"}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiLinkTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiLinkTests.cs
index ffcaa8804..4e439a2a8 100644
--- a/test/Microsoft.OpenApi.Tests/Models/OpenApiLinkTests.cs
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiLinkTests.cs
@@ -3,17 +3,19 @@
using System.Globalization;
using System.IO;
-using FluentAssertions;
+using System.Threading.Tasks;
using Microsoft.OpenApi.Any;
using Microsoft.OpenApi.Expressions;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.Writers;
+using VerifyXunit;
using Xunit;
using Xunit.Abstractions;
namespace Microsoft.OpenApi.Tests.Models
{
[Collection("DefaultSettings")]
+ [UsesVerify]
public class OpenApiLinkTests
{
public static OpenApiLink AdvancedLink = new OpenApiLink
@@ -76,26 +78,14 @@ public OpenApiLinkTests(ITestOutputHelper output)
_output = output;
}
- [Fact]
- public void SerializeAdvancedLinkAsV3JsonWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeAdvancedLinkAsV3JsonWorksAsync(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""operationId"": ""operationId1"",
- ""parameters"": {
- ""parameter1"": ""$request.path.id""
- },
- ""requestBody"": {
- ""property1"": true
- },
- ""description"": ""description1"",
- ""server"": {
- ""description"": ""serverDescription1""
- }
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
AdvancedLink.SerializeAsV3(writer);
@@ -103,21 +93,17 @@ public void SerializeAdvancedLinkAsV3JsonWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeReferencedLinkAsV3JsonWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeReferencedLinkAsV3JsonWorksAsync(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""$ref"": ""#/components/links/example1""
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
ReferencedLink.SerializeAsV3(writer);
@@ -125,31 +111,17 @@ public void SerializeReferencedLinkAsV3JsonWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeReferencedLinkAsV3JsonWithoutReferenceWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeReferencedLinkAsV3JsonWithoutReferenceWorksAsync(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""operationId"": ""operationId1"",
- ""parameters"": {
- ""parameter1"": ""$request.path.id""
- },
- ""requestBody"": {
- ""property1"": true
- },
- ""description"": ""description1"",
- ""server"": {
- ""description"": ""serverDescription1""
- }
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
ReferencedLink.SerializeAsV3WithoutReference(writer);
@@ -157,9 +129,7 @@ public void SerializeReferencedLinkAsV3JsonWithoutReferenceWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
}
}
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeParameterWithFormStyleAndExplodeFalseWorksAsync_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeParameterWithFormStyleAndExplodeFalseWorksAsync_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..1c8e22a01
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeParameterWithFormStyleAndExplodeFalseWorksAsync_produceTerseOutput=False.verified.txt
@@ -0,0 +1,16 @@
+{
+ "name": "name1",
+ "in": "query",
+ "description": "description1",
+ "style": "form",
+ "explode": false,
+ "schema": {
+ "type": "array",
+ "items": {
+ "enum": [
+ "value1",
+ "value2"
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeParameterWithFormStyleAndExplodeFalseWorksAsync_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeParameterWithFormStyleAndExplodeFalseWorksAsync_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..73c77d79f
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeParameterWithFormStyleAndExplodeFalseWorksAsync_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"name":"name1","in":"query","description":"description1","style":"form","explode":false,"schema":{"type":"array","items":{"enum":["value1","value2"]}}}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeParameterWithFormStyleAndExplodeTrueWorksAsync_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeParameterWithFormStyleAndExplodeTrueWorksAsync_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..651da1cce
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeParameterWithFormStyleAndExplodeTrueWorksAsync_produceTerseOutput=False.verified.txt
@@ -0,0 +1,15 @@
+{
+ "name": "name1",
+ "in": "query",
+ "description": "description1",
+ "style": "form",
+ "schema": {
+ "type": "array",
+ "items": {
+ "enum": [
+ "value1",
+ "value2"
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeParameterWithFormStyleAndExplodeTrueWorksAsync_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeParameterWithFormStyleAndExplodeTrueWorksAsync_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..579671130
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeParameterWithFormStyleAndExplodeTrueWorksAsync_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"name":"name1","in":"query","description":"description1","style":"form","schema":{"type":"array","items":{"enum":["value1","value2"]}}}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeParameterWithSchemaReferenceAsV2JsonWorksAsync_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeParameterWithSchemaReferenceAsV2JsonWorksAsync_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..0542c58ce
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeParameterWithSchemaReferenceAsV2JsonWorksAsync_produceTerseOutput=False.verified.txt
@@ -0,0 +1,7 @@
+{
+ "in": "header",
+ "name": "name1",
+ "description": "description1",
+ "required": true,
+ "type": "string"
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeParameterWithSchemaReferenceAsV2JsonWorksAsync_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeParameterWithSchemaReferenceAsV2JsonWorksAsync_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..b80b263d3
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeParameterWithSchemaReferenceAsV2JsonWorksAsync_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"in":"header","name":"name1","description":"description1","required":true,"type":"string"}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeParameterWithSchemaTypeObjectAsV2JsonWorksAsync_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeParameterWithSchemaTypeObjectAsV2JsonWorksAsync_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..0542c58ce
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeParameterWithSchemaTypeObjectAsV2JsonWorksAsync_produceTerseOutput=False.verified.txt
@@ -0,0 +1,7 @@
+{
+ "in": "header",
+ "name": "name1",
+ "description": "description1",
+ "required": true,
+ "type": "string"
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeParameterWithSchemaTypeObjectAsV2JsonWorksAsync_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeParameterWithSchemaTypeObjectAsV2JsonWorksAsync_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..b80b263d3
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeParameterWithSchemaTypeObjectAsV2JsonWorksAsync_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"in":"header","name":"name1","description":"description1","required":true,"type":"string"}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeReferencedParameterAsV2JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeReferencedParameterAsV2JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..4127038e5
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeReferencedParameterAsV2JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt
@@ -0,0 +1,4 @@
+{
+ "in": "path",
+ "name": "name1"
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeReferencedParameterAsV2JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeReferencedParameterAsV2JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..8677f0fad
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeReferencedParameterAsV2JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"in":"path","name":"name1"}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeReferencedParameterAsV2JsonWorksAsync_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeReferencedParameterAsV2JsonWorksAsync_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..a9154d617
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeReferencedParameterAsV2JsonWorksAsync_produceTerseOutput=False.verified.txt
@@ -0,0 +1,3 @@
+{
+ "$ref": "#/parameters/example1"
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeReferencedParameterAsV2JsonWorksAsync_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeReferencedParameterAsV2JsonWorksAsync_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..712d7ee78
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeReferencedParameterAsV2JsonWorksAsync_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"$ref":"#/parameters/example1"}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeReferencedParameterAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeReferencedParameterAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..5275532e8
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeReferencedParameterAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt
@@ -0,0 +1,4 @@
+{
+ "name": "name1",
+ "in": "path"
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeReferencedParameterAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeReferencedParameterAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..ec654beb0
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeReferencedParameterAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"name":"name1","in":"path"}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeReferencedParameterAsV3JsonWorksAsync_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeReferencedParameterAsV3JsonWorksAsync_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..654239535
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeReferencedParameterAsV3JsonWorksAsync_produceTerseOutput=False.verified.txt
@@ -0,0 +1,3 @@
+{
+ "$ref": "#/components/parameters/example1"
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeReferencedParameterAsV3JsonWorksAsync_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeReferencedParameterAsV3JsonWorksAsync_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..3d61cb3f8
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.SerializeReferencedParameterAsV3JsonWorksAsync_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"$ref":"#/components/parameters/example1"}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.cs
index b630f3126..5dffea57c 100644
--- a/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.cs
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.cs
@@ -4,17 +4,20 @@
using System.Collections.Generic;
using System.Globalization;
using System.IO;
+using System.Threading.Tasks;
using FluentAssertions;
using Microsoft.OpenApi.Any;
using Microsoft.OpenApi.Extensions;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.Writers;
+using VerifyXunit;
using Xunit;
using Xunit.Abstractions;
namespace Microsoft.OpenApi.Tests.Models
{
[Collection("DefaultSettings")]
+ [UsesVerify]
public class OpenApiParameterTests
{
public static OpenApiParameter BasicParameter = new OpenApiParameter
@@ -231,16 +234,14 @@ public void SerializeAdvancedParameterAsV3JsonWorks()
actual.Should().Be(expected);
}
- [Fact]
- public void SerializeReferencedParameterAsV3JsonWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeReferencedParameterAsV3JsonWorksAsync(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""$ref"": ""#/components/parameters/example1""
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
ReferencedParameter.SerializeAsV3(writer);
@@ -248,22 +249,17 @@ public void SerializeReferencedParameterAsV3JsonWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeReferencedParameterAsV3JsonWithoutReferenceWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeReferencedParameterAsV3JsonWithoutReferenceWorksAsync(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""name"": ""name1"",
- ""in"": ""path""
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
ReferencedParameter.SerializeAsV3WithoutReference(writer);
@@ -271,21 +267,17 @@ public void SerializeReferencedParameterAsV3JsonWithoutReferenceWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeReferencedParameterAsV2JsonWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeReferencedParameterAsV2JsonWorksAsync(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""$ref"": ""#/parameters/example1""
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
ReferencedParameter.SerializeAsV2(writer);
@@ -293,22 +285,17 @@ public void SerializeReferencedParameterAsV2JsonWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeReferencedParameterAsV2JsonWithoutReferenceWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeReferencedParameterAsV2JsonWithoutReferenceWorksAsync(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""in"": ""path"",
- ""name"": ""name1""
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
ReferencedParameter.SerializeAsV2WithoutReference(writer);
@@ -316,25 +303,17 @@ public void SerializeReferencedParameterAsV2JsonWithoutReferenceWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeParameterWithSchemaReferenceAsV2JsonWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeParameterWithSchemaReferenceAsV2JsonWorksAsync(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""in"": ""header"",
- ""name"": ""name1"",
- ""description"": ""description1"",
- ""required"": true,
- ""type"": ""string""
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
AdvancedHeaderParameterWithSchemaReference.SerializeAsV2(writer);
@@ -342,25 +321,17 @@ public void SerializeParameterWithSchemaReferenceAsV2JsonWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeParameterWithSchemaTypeObjectAsV2JsonWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeParameterWithSchemaTypeObjectAsV2JsonWorksAsync(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""in"": ""header"",
- ""name"": ""name1"",
- ""description"": ""description1"",
- ""required"": true,
- ""type"": ""string""
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
AdvancedHeaderParameterWithSchemaTypeObject.SerializeAsV2(writer);
@@ -368,34 +339,17 @@ public void SerializeParameterWithSchemaTypeObjectAsV2JsonWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeParameterWithFormStyleAndExplodeFalseWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeParameterWithFormStyleAndExplodeFalseWorksAsync(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""name"": ""name1"",
- ""in"": ""query"",
- ""description"": ""description1"",
- ""style"": ""form"",
- ""explode"": false,
- ""schema"": {
- ""type"": ""array"",
- ""items"": {
- ""enum"": [
- ""value1"",
- ""value2""
- ]
- }
- }
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
ParameterWithFormStyleAndExplodeFalse.SerializeAsV3WithoutReference(writer);
@@ -403,33 +357,17 @@ public void SerializeParameterWithFormStyleAndExplodeFalseWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeParameterWithFormStyleAndExplodeTrueWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeParameterWithFormStyleAndExplodeTrueWorksAsync(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""name"": ""name1"",
- ""in"": ""query"",
- ""description"": ""description1"",
- ""style"": ""form"",
- ""schema"": {
- ""type"": ""array"",
- ""items"": {
- ""enum"": [
- ""value1"",
- ""value2""
- ]
- }
- }
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
ParameterWithFormStyleAndExplodeTrue.SerializeAsV3WithoutReference(writer);
@@ -437,9 +375,7 @@ public void SerializeParameterWithFormStyleAndExplodeTrueWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
}
}
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiReferenceTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiReferenceTests.cs
index c251814db..b9edd2a32 100644
--- a/test/Microsoft.OpenApi.Tests/Models/OpenApiReferenceTests.cs
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiReferenceTests.cs
@@ -37,30 +37,54 @@ public void SettingInternalReferenceForComponentsStyleReferenceShouldSucceed(
}
[Theory]
- [InlineData("Pet.json", "Pet.json", null)]
- [InlineData("Pet.yaml", "Pet.yaml", null)]
- [InlineData("abc", "abc", null)]
- [InlineData("Pet.json#/Pet", "Pet.json", "Pet")]
- [InlineData("Pet.yaml#/Pet", "Pet.yaml", "Pet")]
- [InlineData("abc#/Pet", "abc", "Pet")]
- public void SettingExternalReferenceShouldSucceed(string expected, string externalResource, string id)
+ [InlineData("Pet.json", "Pet.json", null, null)]
+ [InlineData("Pet.yaml", "Pet.yaml", null, null)]
+ [InlineData("abc", "abc", null, null)]
+ [InlineData("Pet.json#/components/schemas/Pet", "Pet.json", "Pet", ReferenceType.Schema)]
+ [InlineData("Pet.yaml#/components/schemas/Pet", "Pet.yaml", "Pet", ReferenceType.Schema)]
+ [InlineData("abc#/components/schemas/Pet", "abc", "Pet", ReferenceType.Schema)]
+ public void SettingExternalReferenceV3ShouldSucceed(string expected, string externalResource, string id, ReferenceType? type)
{
// Arrange & Act
var reference = new OpenApiReference
{
ExternalResource = externalResource,
+ Type = type,
Id = id
};
// Assert
reference.ExternalResource.Should().Be(externalResource);
- reference.Type.Should().BeNull();
reference.Id.Should().Be(id);
reference.ReferenceV3.Should().Be(expected);
+ }
+
+ [Theory]
+ [InlineData("Pet.json", "Pet.json", null, null)]
+ [InlineData("Pet.yaml", "Pet.yaml", null, null)]
+ [InlineData("abc", "abc", null, null)]
+ [InlineData("Pet.json#/definitions/Pet", "Pet.json", "Pet", ReferenceType.Schema)]
+ [InlineData("Pet.yaml#/definitions/Pet", "Pet.yaml", "Pet", ReferenceType.Schema)]
+ [InlineData("abc#/definitions/Pet", "abc", "Pet", ReferenceType.Schema)]
+ public void SettingExternalReferenceV2ShouldSucceed(string expected, string externalResource, string id, ReferenceType? type)
+ {
+ // Arrange & Act
+ var reference = new OpenApiReference
+ {
+ ExternalResource = externalResource,
+ Type = type,
+ Id = id
+ };
+
+ // Assert
+ reference.ExternalResource.Should().Be(externalResource);
+ reference.Id.Should().Be(id);
+
reference.ReferenceV2.Should().Be(expected);
}
+
[Fact]
public void SerializeSchemaReferenceAsJsonV3Works()
{
@@ -144,11 +168,12 @@ public void SerializeExternalReferenceAsJsonV2Works()
var reference = new OpenApiReference
{
ExternalResource = "main.json",
+ Type= ReferenceType.Schema,
Id = "Pets"
};
var expected = @"{
- ""$ref"": ""main.json#/Pets""
+ ""$ref"": ""main.json#/definitions/Pets""
}";
// Act
@@ -167,9 +192,10 @@ public void SerializeExternalReferenceAsYamlV2Works()
var reference = new OpenApiReference
{
ExternalResource = "main.json",
+ Type = ReferenceType.Schema,
Id = "Pets"
};
- var expected = @"$ref: main.json#/Pets";
+ var expected = @"$ref: main.json#/definitions/Pets";
// Act
var actual = reference.SerializeAsYaml(OpenApiSpecVersion.OpenApi2_0);
@@ -182,10 +208,10 @@ public void SerializeExternalReferenceAsYamlV2Works()
public void SerializeExternalReferenceAsJsonV3Works()
{
// Arrange
- var reference = new OpenApiReference { ExternalResource = "main.json", Id = "Pets" };
+ var reference = new OpenApiReference { ExternalResource = "main.json", Type = ReferenceType.Schema,Id = "Pets" };
var expected = @"{
- ""$ref"": ""main.json#/Pets""
+ ""$ref"": ""main.json#/components/schemas/Pets""
}";
// Act
@@ -201,8 +227,8 @@ public void SerializeExternalReferenceAsJsonV3Works()
public void SerializeExternalReferenceAsYamlV3Works()
{
// Arrange
- var reference = new OpenApiReference { ExternalResource = "main.json", Id = "Pets" };
- var expected = @"$ref: main.json#/Pets";
+ var reference = new OpenApiReference { ExternalResource = "main.json", Type = ReferenceType.Schema, Id = "Pets" };
+ var expected = @"$ref: main.json#/components/schemas/Pets";
// Act
var actual = reference.SerializeAsYaml(OpenApiSpecVersion.OpenApi3_0);
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiRequestBodyTests.SerializeAdvancedRequestBodyAsV3JsonWorksAsync_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiRequestBodyTests.SerializeAdvancedRequestBodyAsV3JsonWorksAsync_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..ccc8d3725
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiRequestBodyTests.SerializeAdvancedRequestBodyAsV3JsonWorksAsync_produceTerseOutput=False.verified.txt
@@ -0,0 +1,11 @@
+{
+ "description": "description",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "required": true
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiRequestBodyTests.SerializeAdvancedRequestBodyAsV3JsonWorksAsync_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiRequestBodyTests.SerializeAdvancedRequestBodyAsV3JsonWorksAsync_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..31161c2f5
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiRequestBodyTests.SerializeAdvancedRequestBodyAsV3JsonWorksAsync_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"description":"description","content":{"application/json":{"schema":{"type":"string"}}},"required":true}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiRequestBodyTests.SerializeReferencedRequestBodyAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiRequestBodyTests.SerializeReferencedRequestBodyAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..ccc8d3725
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiRequestBodyTests.SerializeReferencedRequestBodyAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt
@@ -0,0 +1,11 @@
+{
+ "description": "description",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "required": true
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiRequestBodyTests.SerializeReferencedRequestBodyAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiRequestBodyTests.SerializeReferencedRequestBodyAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..31161c2f5
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiRequestBodyTests.SerializeReferencedRequestBodyAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"description":"description","content":{"application/json":{"schema":{"type":"string"}}},"required":true}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiRequestBodyTests.SerializeReferencedRequestBodyAsV3JsonWorksAsync_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiRequestBodyTests.SerializeReferencedRequestBodyAsV3JsonWorksAsync_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..ca9bb966e
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiRequestBodyTests.SerializeReferencedRequestBodyAsV3JsonWorksAsync_produceTerseOutput=False.verified.txt
@@ -0,0 +1,3 @@
+{
+ "$ref": "#/components/requestBodies/example1"
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiRequestBodyTests.SerializeReferencedRequestBodyAsV3JsonWorksAsync_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiRequestBodyTests.SerializeReferencedRequestBodyAsV3JsonWorksAsync_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..443812023
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiRequestBodyTests.SerializeReferencedRequestBodyAsV3JsonWorksAsync_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"$ref":"#/components/requestBodies/example1"}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiRequestBodyTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiRequestBodyTests.cs
index b225417fc..d8bdacae4 100644
--- a/test/Microsoft.OpenApi.Tests/Models/OpenApiRequestBodyTests.cs
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiRequestBodyTests.cs
@@ -3,15 +3,17 @@
using System.Globalization;
using System.IO;
-using FluentAssertions;
+using System.Threading.Tasks;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.Writers;
+using VerifyXunit;
using Xunit;
using Xunit.Abstractions;
namespace Microsoft.OpenApi.Tests.Models
{
[Collection("DefaultSettings")]
+ [UsesVerify]
public class OpenApiRequestBodyTests
{
public static OpenApiRequestBody AdvancedRequestBody = new OpenApiRequestBody
@@ -58,24 +60,14 @@ public OpenApiRequestBodyTests(ITestOutputHelper output)
_output = output;
}
- [Fact]
- public void SerializeAdvancedRequestBodyAsV3JsonWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeAdvancedRequestBodyAsV3JsonWorksAsync(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""description"": ""description"",
- ""content"": {
- ""application/json"": {
- ""schema"": {
- ""type"": ""string""
- }
- }
- },
- ""required"": true
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
AdvancedRequestBody.SerializeAsV3(writer);
@@ -83,21 +75,17 @@ public void SerializeAdvancedRequestBodyAsV3JsonWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeReferencedRequestBodyAsV3JsonWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeReferencedRequestBodyAsV3JsonWorksAsync(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""$ref"": ""#/components/requestBodies/example1""
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
ReferencedRequestBody.SerializeAsV3(writer);
@@ -105,29 +93,17 @@ public void SerializeReferencedRequestBodyAsV3JsonWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeReferencedRequestBodyAsV3JsonWithoutReferenceWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeReferencedRequestBodyAsV3JsonWithoutReferenceWorksAsync(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""description"": ""description"",
- ""content"": {
- ""application/json"": {
- ""schema"": {
- ""type"": ""string""
- }
- }
- },
- ""required"": true
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
ReferencedRequestBody.SerializeAsV3WithoutReference(writer);
@@ -135,9 +111,7 @@ public void SerializeReferencedRequestBodyAsV3JsonWithoutReferenceWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
}
}
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.SerializeReferencedResponseAsV2JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.SerializeReferencedResponseAsV2JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..af5ce3ea5
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.SerializeReferencedResponseAsV2JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt
@@ -0,0 +1,19 @@
+{
+ "description": "A complex object array response",
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/customType"
+ }
+ },
+ "headers": {
+ "X-Rate-Limit-Limit": {
+ "description": "The number of allowed requests in the current period",
+ "type": "integer"
+ },
+ "X-Rate-Limit-Reset": {
+ "description": "The number of seconds left in the current period",
+ "type": "integer"
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.SerializeReferencedResponseAsV2JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.SerializeReferencedResponseAsV2JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..f9a3f9d5f
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.SerializeReferencedResponseAsV2JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"description":"A complex object array response","schema":{"type":"array","items":{"$ref":"#/definitions/customType"}},"headers":{"X-Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","type":"integer"},"X-Rate-Limit-Reset":{"description":"The number of seconds left in the current period","type":"integer"}}}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.SerializeReferencedResponseAsV2JsonWorksAsync_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.SerializeReferencedResponseAsV2JsonWorksAsync_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..ea5aa0d40
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.SerializeReferencedResponseAsV2JsonWorksAsync_produceTerseOutput=False.verified.txt
@@ -0,0 +1,3 @@
+{
+ "$ref": "#/responses/example1"
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.SerializeReferencedResponseAsV2JsonWorksAsync_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.SerializeReferencedResponseAsV2JsonWorksAsync_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..b2058cfd8
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.SerializeReferencedResponseAsV2JsonWorksAsync_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"$ref":"#/responses/example1"}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.SerializeReferencedResponseAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.SerializeReferencedResponseAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..55bad289b
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.SerializeReferencedResponseAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt
@@ -0,0 +1,27 @@
+{
+ "description": "A complex object array response",
+ "headers": {
+ "X-Rate-Limit-Limit": {
+ "description": "The number of allowed requests in the current period",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ "X-Rate-Limit-Reset": {
+ "description": "The number of seconds left in the current period",
+ "schema": {
+ "type": "integer"
+ }
+ }
+ },
+ "content": {
+ "text/plain": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/customType"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.SerializeReferencedResponseAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.SerializeReferencedResponseAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..612fbe919
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.SerializeReferencedResponseAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"description":"A complex object array response","headers":{"X-Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"X-Rate-Limit-Reset":{"description":"The number of seconds left in the current period","schema":{"type":"integer"}}},"content":{"text/plain":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/customType"}}}}}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.SerializeReferencedResponseAsV3JsonWorksAsync_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.SerializeReferencedResponseAsV3JsonWorksAsync_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..115ec60a6
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.SerializeReferencedResponseAsV3JsonWorksAsync_produceTerseOutput=False.verified.txt
@@ -0,0 +1,3 @@
+{
+ "$ref": "#/components/responses/example1"
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.SerializeReferencedResponseAsV3JsonWorksAsync_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.SerializeReferencedResponseAsV3JsonWorksAsync_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..e65264a36
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.SerializeReferencedResponseAsV3JsonWorksAsync_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"$ref":"#/components/responses/example1"}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.cs
index 9b86a6d51..a5555ddd9 100644
--- a/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.cs
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.cs
@@ -4,18 +4,21 @@
using System.Collections.Generic;
using System.Globalization;
using System.IO;
+using System.Threading.Tasks;
using FluentAssertions;
using Microsoft.OpenApi.Any;
using Microsoft.OpenApi.Extensions;
using Microsoft.OpenApi.Interfaces;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.Writers;
+using VerifyXunit;
using Xunit;
using Xunit.Abstractions;
namespace Microsoft.OpenApi.Tests.Models
{
[Collection("DefaultSettings")]
+ [UsesVerify]
public class OpenApiResponseTests
{
public static OpenApiResponse BasicResponse = new OpenApiResponse();
@@ -279,16 +282,14 @@ public void SerializeAdvancedResponseAsV2YamlWorks()
actual.Should().Be(expected);
}
- [Fact]
- public void SerializeReferencedResponseAsV3JsonWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeReferencedResponseAsV3JsonWorksAsync(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""$ref"": ""#/components/responses/example1""
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
ReferencedResponse.SerializeAsV3(writer);
@@ -296,45 +297,17 @@ public void SerializeReferencedResponseAsV3JsonWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeReferencedResponseAsV3JsonWithoutReferenceWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeReferencedResponseAsV3JsonWithoutReferenceWorksAsync(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""description"": ""A complex object array response"",
- ""headers"": {
- ""X-Rate-Limit-Limit"": {
- ""description"": ""The number of allowed requests in the current period"",
- ""schema"": {
- ""type"": ""integer""
- }
- },
- ""X-Rate-Limit-Reset"": {
- ""description"": ""The number of seconds left in the current period"",
- ""schema"": {
- ""type"": ""integer""
- }
- }
- },
- ""content"": {
- ""text/plain"": {
- ""schema"": {
- ""type"": ""array"",
- ""items"": {
- ""$ref"": ""#/components/schemas/customType""
- }
- }
- }
- }
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
ReferencedResponse.SerializeAsV3WithoutReference(writer);
@@ -342,21 +315,17 @@ public void SerializeReferencedResponseAsV3JsonWithoutReferenceWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeReferencedResponseAsV2JsonWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeReferencedResponseAsV2JsonWorksAsync(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""$ref"": ""#/responses/example1""
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
ReferencedResponse.SerializeAsV2(writer);
@@ -364,37 +333,17 @@ public void SerializeReferencedResponseAsV2JsonWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeReferencedResponseAsV2JsonWithoutReferenceWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeReferencedResponseAsV2JsonWithoutReferenceWorksAsync(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""description"": ""A complex object array response"",
- ""schema"": {
- ""type"": ""array"",
- ""items"": {
- ""$ref"": ""#/definitions/customType""
- }
- },
- ""headers"": {
- ""X-Rate-Limit-Limit"": {
- ""description"": ""The number of allowed requests in the current period"",
- ""type"": ""integer""
- },
- ""X-Rate-Limit-Reset"": {
- ""description"": ""The number of seconds left in the current period"",
- ""type"": ""integer""
- }
- }
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
ReferencedResponse.SerializeAsV2WithoutReference(writer);
@@ -402,9 +351,7 @@ public void SerializeReferencedResponseAsV2JsonWithoutReferenceWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
}
}
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.SerializeReferencedSchemaAsV3JsonWorksAsync_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.SerializeReferencedSchemaAsV3JsonWorksAsync_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..19773c717
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.SerializeReferencedSchemaAsV3JsonWorksAsync_produceTerseOutput=False.verified.txt
@@ -0,0 +1,3 @@
+{
+ "$ref": "#/components/schemas/schemaObject1"
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.SerializeReferencedSchemaAsV3JsonWorksAsync_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.SerializeReferencedSchemaAsV3JsonWorksAsync_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..34a933101
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.SerializeReferencedSchemaAsV3JsonWorksAsync_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"$ref":"#/components/schemas/schemaObject1"}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.SerializeReferencedSchemaAsV3WithoutReferenceJsonWorksAsync_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.SerializeReferencedSchemaAsV3WithoutReferenceJsonWorksAsync_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..7a3aa9ce8
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.SerializeReferencedSchemaAsV3WithoutReferenceJsonWorksAsync_produceTerseOutput=False.verified.txt
@@ -0,0 +1,13 @@
+{
+ "title": "title1",
+ "multipleOf": 3,
+ "maximum": 42,
+ "minimum": 10,
+ "exclusiveMinimum": true,
+ "type": "integer",
+ "default": 15,
+ "nullable": true,
+ "externalDocs": {
+ "url": "http://example.com/externalDocs"
+ }
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.SerializeReferencedSchemaAsV3WithoutReferenceJsonWorksAsync_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.SerializeReferencedSchemaAsV3WithoutReferenceJsonWorksAsync_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..f3407133d
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.SerializeReferencedSchemaAsV3WithoutReferenceJsonWorksAsync_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"title":"title1","multipleOf":3,"maximum":42,"minimum":10,"exclusiveMinimum":true,"type":"integer","default":15,"nullable":true,"externalDocs":{"url":"http://example.com/externalDocs"}}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.SerializeSchemaWRequiredPropertiesAsV2JsonWorksAsync_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.SerializeSchemaWRequiredPropertiesAsV2JsonWorksAsync_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..49aece921
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.SerializeSchemaWRequiredPropertiesAsV2JsonWorksAsync_produceTerseOutput=False.verified.txt
@@ -0,0 +1,41 @@
+{
+ "title": "title1",
+ "required": [
+ "property1"
+ ],
+ "properties": {
+ "property1": {
+ "required": [
+ "property3"
+ ],
+ "properties": {
+ "property2": {
+ "type": "integer"
+ },
+ "property3": {
+ "maxLength": 15,
+ "type": "string"
+ }
+ }
+ },
+ "property4": {
+ "properties": {
+ "property5": {
+ "properties": {
+ "property6": {
+ "type": "boolean"
+ }
+ }
+ },
+ "property7": {
+ "minLength": 2,
+ "type": "string"
+ }
+ },
+ "readOnly": true
+ }
+ },
+ "externalDocs": {
+ "url": "http://example.com/externalDocs"
+ }
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.SerializeSchemaWRequiredPropertiesAsV2JsonWorksAsync_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.SerializeSchemaWRequiredPropertiesAsV2JsonWorksAsync_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..4777a425c
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.SerializeSchemaWRequiredPropertiesAsV2JsonWorksAsync_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"title":"title1","required":["property1"],"properties":{"property1":{"required":["property3"],"properties":{"property2":{"type":"integer"},"property3":{"maxLength":15,"type":"string"}}},"property4":{"properties":{"property5":{"properties":{"property6":{"type":"boolean"}}},"property7":{"minLength":2,"type":"string"}},"readOnly":true}},"externalDocs":{"url":"http://example.com/externalDocs"}}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.cs
index 4f9510132..ae13944e6 100644
--- a/test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.cs
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.cs
@@ -5,17 +5,20 @@
using System.Collections.Generic;
using System.Globalization;
using System.IO;
+using System.Threading.Tasks;
using FluentAssertions;
using Microsoft.OpenApi.Any;
using Microsoft.OpenApi.Extensions;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.Writers;
+using VerifyXunit;
using Xunit;
using Xunit.Abstractions;
namespace Microsoft.OpenApi.Tests.Models
{
[Collection("DefaultSettings")]
+ [UsesVerify]
public class OpenApiSchemaTests
{
public static OpenApiSchema BasicSchema = new OpenApiSchema();
@@ -365,26 +368,15 @@ public void SerializeAdvancedSchemaWithAllOfAsV3JsonWorks()
actual.Should().Be(expected);
}
- [Fact]
- public void SerializeReferencedSchemaAsV3WithoutReferenceJsonWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeReferencedSchemaAsV3WithoutReferenceJsonWorksAsync(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
- var expected = @"{
- ""title"": ""title1"",
- ""multipleOf"": 3,
- ""maximum"": 42,
- ""minimum"": 10,
- ""exclusiveMinimum"": true,
- ""type"": ""integer"",
- ""default"": 15,
- ""nullable"": true,
- ""externalDocs"": {
- ""url"": ""http://example.com/externalDocs""
- }
-}";
// Act
ReferencedSchema.SerializeAsV3WithoutReference(writer);
@@ -392,21 +384,17 @@ public void SerializeReferencedSchemaAsV3WithoutReferenceJsonWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeReferencedSchemaAsV3JsonWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeReferencedSchemaAsV3JsonWorksAsync(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
-
- var expected = @"{
- ""$ref"": ""#/components/schemas/schemaObject1""
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
ReferencedSchema.SerializeAsV3(writer);
@@ -414,58 +402,17 @@ public void SerializeReferencedSchemaAsV3JsonWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeSchemaWRequiredPropertiesAsV2JsonWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeSchemaWRequiredPropertiesAsV2JsonWorksAsync(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected = @"{
- ""title"": ""title1"",
- ""required"": [
- ""property1""
- ],
- ""properties"": {
- ""property1"": {
- ""required"": [
- ""property3""
- ],
- ""properties"": {
- ""property2"": {
- ""type"": ""integer""
- },
- ""property3"": {
- ""maxLength"": 15,
- ""type"": ""string""
- }
- }
- },
- ""property4"": {
- ""properties"": {
- ""property5"": {
- ""properties"": {
- ""property6"": {
- ""type"": ""boolean""
- }
- }
- },
- ""property7"": {
- ""minLength"": 2,
- ""type"": ""string""
- }
- },
- ""readOnly"": true
- }
- },
- ""externalDocs"": {
- ""url"": ""http://example.com/externalDocs""
- }
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
AdvancedSchemaWithRequiredPropertiesObject.SerializeAsV2(writer);
@@ -473,9 +420,7 @@ public void SerializeSchemaWRequiredPropertiesAsV2JsonWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
}
}
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiSecuritySchemeTests.SerializeReferencedSecuritySchemeAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiSecuritySchemeTests.SerializeReferencedSecuritySchemeAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..1de104df5
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiSecuritySchemeTests.SerializeReferencedSecuritySchemeAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt
@@ -0,0 +1,5 @@
+{
+ "type": "openIdConnect",
+ "description": "description1",
+ "openIdConnectUrl": "https://example.com/openIdConnect"
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiSecuritySchemeTests.SerializeReferencedSecuritySchemeAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiSecuritySchemeTests.SerializeReferencedSecuritySchemeAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..5e7183dc8
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiSecuritySchemeTests.SerializeReferencedSecuritySchemeAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"type":"openIdConnect","description":"description1","openIdConnectUrl":"https://example.com/openIdConnect"}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiSecuritySchemeTests.SerializeReferencedSecuritySchemeAsV3JsonWorksAsync_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiSecuritySchemeTests.SerializeReferencedSecuritySchemeAsV3JsonWorksAsync_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..e2f0188e6
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiSecuritySchemeTests.SerializeReferencedSecuritySchemeAsV3JsonWorksAsync_produceTerseOutput=False.verified.txt
@@ -0,0 +1,3 @@
+{
+ "sampleSecurityScheme": null
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiSecuritySchemeTests.SerializeReferencedSecuritySchemeAsV3JsonWorksAsync_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiSecuritySchemeTests.SerializeReferencedSecuritySchemeAsV3JsonWorksAsync_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..d74ff6ddf
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiSecuritySchemeTests.SerializeReferencedSecuritySchemeAsV3JsonWorksAsync_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"sampleSecurityScheme":null}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiSecuritySchemeTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiSecuritySchemeTests.cs
index 5fb99cb95..1294f0f48 100644
--- a/test/Microsoft.OpenApi.Tests/Models/OpenApiSecuritySchemeTests.cs
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiSecuritySchemeTests.cs
@@ -5,16 +5,19 @@
using System.Collections.Generic;
using System.Globalization;
using System.IO;
+using System.Threading.Tasks;
using FluentAssertions;
using Microsoft.OpenApi.Extensions;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.Writers;
+using VerifyXunit;
using Xunit;
using Xunit.Abstractions;
namespace Microsoft.OpenApi.Tests.Models
{
[Collection("DefaultSettings")]
+ [UsesVerify]
public class OpenApiSecuritySchemeTests
{
public static OpenApiSecurityScheme ApiKeySecurityScheme = new OpenApiSecurityScheme
@@ -29,15 +32,16 @@ public class OpenApiSecuritySchemeTests
{
Description = "description1",
Type = SecuritySchemeType.Http,
- Scheme = "basic",
+ Scheme = OpenApiConstants.Basic
+
};
public static OpenApiSecurityScheme HttpBearerSecurityScheme = new OpenApiSecurityScheme
{
Description = "description1",
Type = SecuritySchemeType.Http,
- Scheme = "bearer",
- BearerFormat = "JWT",
+ Scheme = OpenApiConstants.Bearer,
+ BearerFormat = OpenApiConstants.Jwt
};
public static OpenApiSecurityScheme OAuth2SingleFlowSecurityScheme = new OpenApiSecurityScheme
@@ -100,7 +104,7 @@ public class OpenApiSecuritySchemeTests
{
Description = "description1",
Type = SecuritySchemeType.OpenIdConnect,
- Scheme = "openIdConnectUrl",
+ Scheme = OpenApiConstants.Bearer,
OpenIdConnectUrl = new Uri("https://example.com/openIdConnect")
};
@@ -108,7 +112,7 @@ public class OpenApiSecuritySchemeTests
{
Description = "description1",
Type = SecuritySchemeType.OpenIdConnect,
- Scheme = "openIdConnectUrl",
+ Scheme = OpenApiConstants.Bearer,
OpenIdConnectUrl = new Uri("https://example.com/openIdConnect"),
Reference = new OpenApiReference
{
@@ -297,16 +301,14 @@ public void SerializeOpenIdConnectSecuritySchemeAsV3JsonWorks()
actual.Should().Be(expected);
}
- [Fact]
- public void SerializeReferencedSecuritySchemeAsV3JsonWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeReferencedSecuritySchemeAsV3JsonWorksAsync(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""sampleSecurityScheme"": null
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
// Add dummy start object, value, and end object to allow SerializeAsV3 to output security scheme
@@ -319,23 +321,17 @@ public void SerializeReferencedSecuritySchemeAsV3JsonWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeReferencedSecuritySchemeAsV3JsonWithoutReferenceWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeReferencedSecuritySchemeAsV3JsonWithoutReferenceWorksAsync(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""type"": ""openIdConnect"",
- ""description"": ""description1"",
- ""openIdConnectUrl"": ""https://example.com/openIdConnect""
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
ReferencedSecurityScheme.SerializeAsV3WithoutReference(writer);
@@ -343,9 +339,7 @@ public void SerializeReferencedSecuritySchemeAsV3JsonWithoutReferenceWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
}
}
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV2JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV2JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..4e4df0f3b
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV2JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt
@@ -0,0 +1,9 @@
+{
+ "name": "pet",
+ "description": "Pets operations",
+ "externalDocs": {
+ "description": "Find more info here",
+ "url": "https://example.com"
+ },
+ "x-tag-extension": null
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV2JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV2JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..269fd9e7f
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV2JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"name":"pet","description":"Pets operations","externalDocs":{"description":"Find more info here","url":"https://example.com"},"x-tag-extension":null}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV2JsonWorksAsync_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV2JsonWorksAsync_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..8c38cc78d
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV2JsonWorksAsync_produceTerseOutput=False.verified.txt
@@ -0,0 +1 @@
+"pet"
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV2JsonWorksAsync_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV2JsonWorksAsync_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..8c38cc78d
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV2JsonWorksAsync_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+"pet"
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..4e4df0f3b
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt
@@ -0,0 +1,9 @@
+{
+ "name": "pet",
+ "description": "Pets operations",
+ "externalDocs": {
+ "description": "Find more info here",
+ "url": "https://example.com"
+ },
+ "x-tag-extension": null
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..269fd9e7f
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{"name":"pet","description":"Pets operations","externalDocs":{"description":"Find more info here","url":"https://example.com"},"x-tag-extension":null}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV3JsonWorksAsync_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV3JsonWorksAsync_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..8c38cc78d
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV3JsonWorksAsync_produceTerseOutput=False.verified.txt
@@ -0,0 +1 @@
+"pet"
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV3JsonWorksAsync_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV3JsonWorksAsync_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..8c38cc78d
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV3JsonWorksAsync_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+"pet"
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeBasicTagAsV2JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeBasicTagAsV2JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..6f31cf5a2
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeBasicTagAsV2JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt
@@ -0,0 +1 @@
+{ }
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeBasicTagAsV2JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeBasicTagAsV2JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..9e26dfeeb
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeBasicTagAsV2JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeBasicTagAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeBasicTagAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..6f31cf5a2
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeBasicTagAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt
@@ -0,0 +1 @@
+{ }
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeBasicTagAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeBasicTagAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..9e26dfeeb
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeBasicTagAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeReferencedTagAsV2JsonWorksAsync_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeReferencedTagAsV2JsonWorksAsync_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..8c38cc78d
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeReferencedTagAsV2JsonWorksAsync_produceTerseOutput=False.verified.txt
@@ -0,0 +1 @@
+"pet"
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeReferencedTagAsV2JsonWorksAsync_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeReferencedTagAsV2JsonWorksAsync_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..8c38cc78d
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeReferencedTagAsV2JsonWorksAsync_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+"pet"
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeReferencedTagAsV3JsonWorksAsync_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeReferencedTagAsV3JsonWorksAsync_produceTerseOutput=False.verified.txt
new file mode 100644
index 000000000..8c38cc78d
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeReferencedTagAsV3JsonWorksAsync_produceTerseOutput=False.verified.txt
@@ -0,0 +1 @@
+"pet"
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeReferencedTagAsV3JsonWorksAsync_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeReferencedTagAsV3JsonWorksAsync_produceTerseOutput=True.verified.txt
new file mode 100644
index 000000000..8c38cc78d
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeReferencedTagAsV3JsonWorksAsync_produceTerseOutput=True.verified.txt
@@ -0,0 +1 @@
+"pet"
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.cs
index 4920e165d..7e837bd52 100644
--- a/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.cs
+++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.cs
@@ -4,16 +4,19 @@
using System.Collections.Generic;
using System.Globalization;
using System.IO;
+using System.Threading.Tasks;
using FluentAssertions;
using Microsoft.OpenApi.Any;
using Microsoft.OpenApi.Interfaces;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.Writers;
+using VerifyXunit;
using Xunit;
namespace Microsoft.OpenApi.Tests.Models
{
[Collection("DefaultSettings")]
+ [UsesVerify]
public class OpenApiTagTests
{
public static OpenApiTag BasicTag = new OpenApiTag();
@@ -45,13 +48,14 @@ public class OpenApiTagTests
}
};
- [Fact]
- public void SerializeBasicTagAsV3JsonWithoutReferenceWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeBasicTagAsV3JsonWithoutReferenceWorksAsync(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected = "{ }";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
BasicTag.SerializeAsV3WithoutReference(writer);
@@ -59,18 +63,17 @@ public void SerializeBasicTagAsV3JsonWithoutReferenceWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeBasicTagAsV2JsonWithoutReferenceWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeBasicTagAsV2JsonWithoutReferenceWorksAsync(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected = "{ }";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
BasicTag.SerializeAsV2WithoutReference(writer);
@@ -78,9 +81,7 @@ public void SerializeBasicTagAsV2JsonWithoutReferenceWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
[Fact]
@@ -120,22 +121,14 @@ public void SerializeBasicTagAsV2YamlWithoutReferenceWorks()
actual.Should().Be(expected);
}
- [Fact]
- public void SerializeAdvancedTagAsV3JsonWithoutReferenceWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeAdvancedTagAsV3JsonWithoutReferenceWorksAsync(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""name"": ""pet"",
- ""description"": ""Pets operations"",
- ""externalDocs"": {
- ""description"": ""Find more info here"",
- ""url"": ""https://example.com""
- },
- ""x-tag-extension"": null
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
AdvancedTag.SerializeAsV3WithoutReference(writer);
@@ -143,27 +136,17 @@ public void SerializeAdvancedTagAsV3JsonWithoutReferenceWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeAdvancedTagAsV2JsonWithoutReferenceWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeAdvancedTagAsV2JsonWithoutReferenceWorksAsync(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
- var expected =
- @"{
- ""name"": ""pet"",
- ""description"": ""Pets operations"",
- ""externalDocs"": {
- ""description"": ""Find more info here"",
- ""url"": ""https://example.com""
- },
- ""x-tag-extension"": null
-}";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
AdvancedTag.SerializeAsV2WithoutReference(writer);
@@ -171,9 +154,7 @@ public void SerializeAdvancedTagAsV2JsonWithoutReferenceWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
[Fact]
@@ -226,14 +207,14 @@ public void SerializeAdvancedTagAsV2YamlWithoutReferenceWorks()
actual.Should().Be(expected);
}
- [Fact]
- public void SerializeAdvancedTagAsV3JsonWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeAdvancedTagAsV3JsonWorksAsync(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
-
- var expected = @"""pet""";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
AdvancedTag.SerializeAsV3(writer);
@@ -241,19 +222,17 @@ public void SerializeAdvancedTagAsV3JsonWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeAdvancedTagAsV2JsonWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeAdvancedTagAsV2JsonWorksAsync(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
-
- var expected = @"""pet""";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
AdvancedTag.SerializeAsV2(writer);
@@ -261,9 +240,7 @@ public void SerializeAdvancedTagAsV2JsonWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
[Fact]
@@ -306,14 +283,14 @@ public void SerializeAdvancedTagAsV2YamlWorks()
actual.Should().Be(expected);
}
- [Fact]
- public void SerializeReferencedTagAsV3JsonWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeReferencedTagAsV3JsonWorksAsync(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
-
- var expected = @"""pet""";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
ReferencedTag.SerializeAsV3(writer);
@@ -321,19 +298,17 @@ public void SerializeReferencedTagAsV3JsonWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
- [Fact]
- public void SerializeReferencedTagAsV2JsonWorks()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task SerializeReferencedTagAsV2JsonWorksAsync(bool produceTerseOutput)
{
// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
- var writer = new OpenApiJsonWriter(outputStringWriter);
-
- var expected = @"""pet""";
+ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput });
// Act
ReferencedTag.SerializeAsV2(writer);
@@ -341,9 +316,7 @@ public void SerializeReferencedTagAsV2JsonWorks()
var actual = outputStringWriter.GetStringBuilder().ToString();
// Assert
- actual = actual.MakeLineBreaksEnvironmentNeutral();
- expected = expected.MakeLineBreaksEnvironmentNeutral();
- actual.Should().Be(expected);
+ await Verifier.Verify(actual).UseParameters(produceTerseOutput);
}
[Fact]
diff --git a/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt b/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt
index d5a89e586..02400ddd7 100755
--- a/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt
+++ b/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt
@@ -271,6 +271,11 @@ namespace Microsoft.OpenApi.Extensions
}
namespace Microsoft.OpenApi.Interfaces
{
+ public interface IEffective
+ where T : class, Microsoft.OpenApi.Interfaces.IOpenApiElement
+ {
+ T GetEffective(Microsoft.OpenApi.Models.OpenApiDocument document);
+ }
public interface IOpenApiElement { }
public interface IOpenApiExtensible : Microsoft.OpenApi.Interfaces.IOpenApiElement
{
@@ -315,7 +320,7 @@ namespace Microsoft.OpenApi
}
namespace Microsoft.OpenApi.Models
{
- public class OpenApiCallback : Microsoft.OpenApi.Interfaces.IOpenApiElement, Microsoft.OpenApi.Interfaces.IOpenApiExtensible, Microsoft.OpenApi.Interfaces.IOpenApiReferenceable, Microsoft.OpenApi.Interfaces.IOpenApiSerializable
+ public class OpenApiCallback : Microsoft.OpenApi.Interfaces.IEffective, Microsoft.OpenApi.Interfaces.IOpenApiElement, Microsoft.OpenApi.Interfaces.IOpenApiExtensible, Microsoft.OpenApi.Interfaces.IOpenApiReferenceable, Microsoft.OpenApi.Interfaces.IOpenApiSerializable
{
public OpenApiCallback() { }
public System.Collections.Generic.IDictionary Extensions { get; set; }
@@ -323,6 +328,7 @@ namespace Microsoft.OpenApi.Models
public Microsoft.OpenApi.Models.OpenApiReference Reference { get; set; }
public bool UnresolvedReference { get; set; }
public void AddPathItem(Microsoft.OpenApi.Expressions.RuntimeExpression expression, Microsoft.OpenApi.Models.OpenApiPathItem pathItem) { }
+ public Microsoft.OpenApi.Models.OpenApiCallback GetEffective(Microsoft.OpenApi.Models.OpenApiDocument doc) { }
public void SerializeAsV2(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
public void SerializeAsV2WithoutReference(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
public void SerializeAsV3(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
@@ -358,6 +364,7 @@ namespace Microsoft.OpenApi.Models
public const string AuthorizationUrl = "authorizationUrl";
public const string BasePath = "basePath";
public const string Basic = "basic";
+ public const string Bearer = "bearer";
public const string BearerFormat = "bearerFormat";
public const string BodyName = "x-bodyName";
public const string Callbacks = "callbacks";
@@ -400,6 +407,7 @@ namespace Microsoft.OpenApi.Models
public const string In = "in";
public const string Info = "info";
public const string Items = "items";
+ public const string Jwt = "JWT";
public const string License = "license";
public const string Links = "links";
public const string Mapping = "mapping";
@@ -501,8 +509,7 @@ namespace Microsoft.OpenApi.Models
public System.Collections.Generic.IList Tags { get; set; }
public Microsoft.OpenApi.Services.OpenApiWorkspace Workspace { get; set; }
public Microsoft.OpenApi.Interfaces.IOpenApiReferenceable ResolveReference(Microsoft.OpenApi.Models.OpenApiReference reference) { }
- public Microsoft.OpenApi.Interfaces.IOpenApiReferenceable ResolveReference(Microsoft.OpenApi.Models.OpenApiReference reference, bool useExternal) { }
- public System.Collections.Generic.IEnumerable ResolveReferences(bool useExternal = false) { }
+ public System.Collections.Generic.IEnumerable ResolveReferences() { }
public void SerializeAsV2(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
public void SerializeAsV3(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
}
@@ -526,7 +533,7 @@ namespace Microsoft.OpenApi.Models
public string Pointer { get; set; }
public override string ToString() { }
}
- public class OpenApiExample : Microsoft.OpenApi.Interfaces.IOpenApiElement, Microsoft.OpenApi.Interfaces.IOpenApiExtensible, Microsoft.OpenApi.Interfaces.IOpenApiReferenceable, Microsoft.OpenApi.Interfaces.IOpenApiSerializable
+ public class OpenApiExample : Microsoft.OpenApi.Interfaces.IEffective, Microsoft.OpenApi.Interfaces.IOpenApiElement, Microsoft.OpenApi.Interfaces.IOpenApiExtensible, Microsoft.OpenApi.Interfaces.IOpenApiReferenceable, Microsoft.OpenApi.Interfaces.IOpenApiSerializable
{
public OpenApiExample() { }
public string Description { get; set; }
@@ -536,6 +543,7 @@ namespace Microsoft.OpenApi.Models
public string Summary { get; set; }
public bool UnresolvedReference { get; set; }
public Microsoft.OpenApi.Any.IOpenApiAny Value { get; set; }
+ public Microsoft.OpenApi.Models.OpenApiExample GetEffective(Microsoft.OpenApi.Models.OpenApiDocument doc) { }
public void SerializeAsV2(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
public void SerializeAsV2WithoutReference(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
public void SerializeAsV3(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
@@ -558,7 +566,7 @@ namespace Microsoft.OpenApi.Models
public void SerializeAsV2(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
public void SerializeAsV3(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
}
- public class OpenApiHeader : Microsoft.OpenApi.Interfaces.IOpenApiElement, Microsoft.OpenApi.Interfaces.IOpenApiExtensible, Microsoft.OpenApi.Interfaces.IOpenApiReferenceable, Microsoft.OpenApi.Interfaces.IOpenApiSerializable
+ public class OpenApiHeader : Microsoft.OpenApi.Interfaces.IEffective, Microsoft.OpenApi.Interfaces.IOpenApiElement, Microsoft.OpenApi.Interfaces.IOpenApiExtensible, Microsoft.OpenApi.Interfaces.IOpenApiReferenceable, Microsoft.OpenApi.Interfaces.IOpenApiSerializable
{
public OpenApiHeader() { }
public bool AllowEmptyValue { get; set; }
@@ -575,6 +583,7 @@ namespace Microsoft.OpenApi.Models
public Microsoft.OpenApi.Models.OpenApiSchema Schema { get; set; }
public Microsoft.OpenApi.Models.ParameterStyle? Style { get; set; }
public bool UnresolvedReference { get; set; }
+ public Microsoft.OpenApi.Models.OpenApiHeader GetEffective(Microsoft.OpenApi.Models.OpenApiDocument doc) { }
public void SerializeAsV2(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
public void SerializeAsV2WithoutReference(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
public void SerializeAsV3(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
@@ -602,7 +611,7 @@ namespace Microsoft.OpenApi.Models
public void SerializeAsV2(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
public void SerializeAsV3(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
}
- public class OpenApiLink : Microsoft.OpenApi.Interfaces.IOpenApiElement, Microsoft.OpenApi.Interfaces.IOpenApiExtensible, Microsoft.OpenApi.Interfaces.IOpenApiReferenceable, Microsoft.OpenApi.Interfaces.IOpenApiSerializable
+ public class OpenApiLink : Microsoft.OpenApi.Interfaces.IEffective, Microsoft.OpenApi.Interfaces.IOpenApiElement, Microsoft.OpenApi.Interfaces.IOpenApiExtensible, Microsoft.OpenApi.Interfaces.IOpenApiReferenceable, Microsoft.OpenApi.Interfaces.IOpenApiSerializable
{
public OpenApiLink() { }
public string Description { get; set; }
@@ -614,6 +623,7 @@ namespace Microsoft.OpenApi.Models
public Microsoft.OpenApi.Models.RuntimeExpressionAnyWrapper RequestBody { get; set; }
public Microsoft.OpenApi.Models.OpenApiServer Server { get; set; }
public bool UnresolvedReference { get; set; }
+ public Microsoft.OpenApi.Models.OpenApiLink GetEffective(Microsoft.OpenApi.Models.OpenApiDocument doc) { }
public void SerializeAsV2(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
public void SerializeAsV2WithoutReference(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
public void SerializeAsV3(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
@@ -672,7 +682,7 @@ namespace Microsoft.OpenApi.Models
public void SerializeAsV2(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
public void SerializeAsV3(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
}
- public class OpenApiParameter : Microsoft.OpenApi.Interfaces.IOpenApiElement, Microsoft.OpenApi.Interfaces.IOpenApiExtensible, Microsoft.OpenApi.Interfaces.IOpenApiReferenceable, Microsoft.OpenApi.Interfaces.IOpenApiSerializable
+ public class OpenApiParameter : Microsoft.OpenApi.Interfaces.IEffective, Microsoft.OpenApi.Interfaces.IOpenApiElement, Microsoft.OpenApi.Interfaces.IOpenApiExtensible, Microsoft.OpenApi.Interfaces.IOpenApiReferenceable, Microsoft.OpenApi.Interfaces.IOpenApiSerializable
{
public OpenApiParameter() { }
public bool AllowEmptyValue { get; set; }
@@ -691,12 +701,13 @@ namespace Microsoft.OpenApi.Models
public Microsoft.OpenApi.Models.OpenApiSchema Schema { get; set; }
public Microsoft.OpenApi.Models.ParameterStyle? Style { get; set; }
public bool UnresolvedReference { get; set; }
+ public Microsoft.OpenApi.Models.OpenApiParameter GetEffective(Microsoft.OpenApi.Models.OpenApiDocument doc) { }
public void SerializeAsV2(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
public void SerializeAsV2WithoutReference(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
public void SerializeAsV3(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
public void SerializeAsV3WithoutReference(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
}
- public class OpenApiPathItem : Microsoft.OpenApi.Interfaces.IOpenApiElement, Microsoft.OpenApi.Interfaces.IOpenApiExtensible, Microsoft.OpenApi.Interfaces.IOpenApiReferenceable, Microsoft.OpenApi.Interfaces.IOpenApiSerializable
+ public class OpenApiPathItem : Microsoft.OpenApi.Interfaces.IEffective, Microsoft.OpenApi.Interfaces.IOpenApiElement, Microsoft.OpenApi.Interfaces.IOpenApiExtensible, Microsoft.OpenApi.Interfaces.IOpenApiReferenceable, Microsoft.OpenApi.Interfaces.IOpenApiSerializable
{
public OpenApiPathItem() { }
public string Description { get; set; }
@@ -708,6 +719,7 @@ namespace Microsoft.OpenApi.Models
public string Summary { get; set; }
public bool UnresolvedReference { get; set; }
public void AddOperation(Microsoft.OpenApi.Models.OperationType operationType, Microsoft.OpenApi.Models.OpenApiOperation operation) { }
+ public Microsoft.OpenApi.Models.OpenApiPathItem GetEffective(Microsoft.OpenApi.Models.OpenApiDocument doc) { }
public void SerializeAsV2(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
public void SerializeAsV2WithoutReference(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
public void SerializeAsV3(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
@@ -721,6 +733,7 @@ namespace Microsoft.OpenApi.Models
{
public OpenApiReference() { }
public string ExternalResource { get; set; }
+ public Microsoft.OpenApi.Models.OpenApiDocument HostDocument { get; set; }
public string Id { get; set; }
public bool IsExternal { get; }
public bool IsLocal { get; }
@@ -730,7 +743,7 @@ namespace Microsoft.OpenApi.Models
public void SerializeAsV2(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
public void SerializeAsV3(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
}
- public class OpenApiRequestBody : Microsoft.OpenApi.Interfaces.IOpenApiElement, Microsoft.OpenApi.Interfaces.IOpenApiExtensible, Microsoft.OpenApi.Interfaces.IOpenApiReferenceable, Microsoft.OpenApi.Interfaces.IOpenApiSerializable
+ public class OpenApiRequestBody : Microsoft.OpenApi.Interfaces.IEffective, Microsoft.OpenApi.Interfaces.IOpenApiElement, Microsoft.OpenApi.Interfaces.IOpenApiExtensible, Microsoft.OpenApi.Interfaces.IOpenApiReferenceable, Microsoft.OpenApi.Interfaces.IOpenApiSerializable
{
public OpenApiRequestBody() { }
public System.Collections.Generic.IDictionary Content { get; set; }
@@ -739,12 +752,13 @@ namespace Microsoft.OpenApi.Models
public Microsoft.OpenApi.Models.OpenApiReference Reference { get; set; }
public bool Required { get; set; }
public bool UnresolvedReference { get; set; }
+ public Microsoft.OpenApi.Models.OpenApiRequestBody GetEffective(Microsoft.OpenApi.Models.OpenApiDocument doc) { }
public void SerializeAsV2(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
public void SerializeAsV2WithoutReference(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
public void SerializeAsV3(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
public void SerializeAsV3WithoutReference(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
}
- public class OpenApiResponse : Microsoft.OpenApi.Interfaces.IOpenApiElement, Microsoft.OpenApi.Interfaces.IOpenApiExtensible, Microsoft.OpenApi.Interfaces.IOpenApiReferenceable, Microsoft.OpenApi.Interfaces.IOpenApiSerializable
+ public class OpenApiResponse : Microsoft.OpenApi.Interfaces.IEffective, Microsoft.OpenApi.Interfaces.IOpenApiElement, Microsoft.OpenApi.Interfaces.IOpenApiExtensible, Microsoft.OpenApi.Interfaces.IOpenApiReferenceable, Microsoft.OpenApi.Interfaces.IOpenApiSerializable
{
public OpenApiResponse() { }
public System.Collections.Generic.IDictionary Content { get; set; }
@@ -754,6 +768,7 @@ namespace Microsoft.OpenApi.Models
public System.Collections.Generic.IDictionary Links { get; set; }
public Microsoft.OpenApi.Models.OpenApiReference Reference { get; set; }
public bool UnresolvedReference { get; set; }
+ public Microsoft.OpenApi.Models.OpenApiResponse GetEffective(Microsoft.OpenApi.Models.OpenApiDocument doc) { }
public void SerializeAsV2(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
public void SerializeAsV2WithoutReference(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
public void SerializeAsV3(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
@@ -763,7 +778,7 @@ namespace Microsoft.OpenApi.Models
{
public OpenApiResponses() { }
}
- public class OpenApiSchema : Microsoft.OpenApi.Interfaces.IOpenApiElement, Microsoft.OpenApi.Interfaces.IOpenApiExtensible, Microsoft.OpenApi.Interfaces.IOpenApiReferenceable, Microsoft.OpenApi.Interfaces.IOpenApiSerializable
+ public class OpenApiSchema : Microsoft.OpenApi.Interfaces.IEffective, Microsoft.OpenApi.Interfaces.IOpenApiElement, Microsoft.OpenApi.Interfaces.IOpenApiExtensible, Microsoft.OpenApi.Interfaces.IOpenApiReferenceable, Microsoft.OpenApi.Interfaces.IOpenApiSerializable
{
public OpenApiSchema() { }
public Microsoft.OpenApi.Models.OpenApiSchema AdditionalProperties { get; set; }
@@ -805,6 +820,7 @@ namespace Microsoft.OpenApi.Models
public bool UnresolvedReference { get; set; }
public bool WriteOnly { get; set; }
public Microsoft.OpenApi.Models.OpenApiXml Xml { get; set; }
+ public Microsoft.OpenApi.Models.OpenApiSchema GetEffective(Microsoft.OpenApi.Models.OpenApiDocument doc) { }
public void SerializeAsV2(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
public void SerializeAsV2WithoutReference(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
public void SerializeAsV3(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { }
@@ -954,6 +970,12 @@ namespace Microsoft.OpenApi.Services
public string Response { get; set; }
public string ServerVariable { get; }
}
+ public static class OpenApiFilterService
+ {
+ public static Microsoft.OpenApi.Models.OpenApiDocument CreateFilteredDocument(Microsoft.OpenApi.Models.OpenApiDocument source, System.Func predicate) { }
+ public static Microsoft.OpenApi.Services.OpenApiUrlTreeNode CreateOpenApiUrlTreeNode(System.Collections.Generic.Dictionary sources) { }
+ public static System.Func CreatePredicate(string operationIds = null, string tags = null, System.Collections.Generic.Dictionary> requestUrls = null, Microsoft.OpenApi.Models.OpenApiDocument source = null) { }
+ }
public class OpenApiReferenceError : Microsoft.OpenApi.Models.OpenApiError
{
public OpenApiReferenceError(Microsoft.OpenApi.Exceptions.OpenApiException exception) { }
@@ -979,8 +1001,8 @@ namespace Microsoft.OpenApi.Services
protected OpenApiVisitorBase() { }
public Microsoft.OpenApi.Services.CurrentKeys CurrentKeys { get; }
public string PathString { get; }
- public void Enter(string segment) { }
- public void Exit() { }
+ public virtual void Enter(string segment) { }
+ public virtual void Exit() { }
public virtual void Visit(Microsoft.OpenApi.Interfaces.IOpenApiExtensible openApiExtensible) { }
public virtual void Visit(Microsoft.OpenApi.Interfaces.IOpenApiExtension openApiExtension) { }
public virtual void Visit(Microsoft.OpenApi.Interfaces.IOpenApiReferenceable referenceable) { }
@@ -1044,6 +1066,19 @@ namespace Microsoft.OpenApi.Services
public System.IO.Stream GetArtifact(string location) { }
public Microsoft.OpenApi.Interfaces.IOpenApiReferenceable ResolveReference(Microsoft.OpenApi.Models.OpenApiReference reference) { }
}
+ public class OperationSearch : Microsoft.OpenApi.Services.OpenApiVisitorBase
+ {
+ public OperationSearch(System.Func predicate) { }
+ public System.Collections.Generic.IList SearchResults { get; }
+ public override void Visit(Microsoft.OpenApi.Models.OpenApiOperation operation) { }
+ public override void Visit(System.Collections.Generic.IList parameters) { }
+ }
+ public class SearchResult
+ {
+ public SearchResult() { }
+ public Microsoft.OpenApi.Services.CurrentKeys CurrentKeys { get; set; }
+ public Microsoft.OpenApi.Models.OpenApiOperation Operation { get; set; }
+ }
}
namespace Microsoft.OpenApi.Validations
{
@@ -1051,6 +1086,7 @@ namespace Microsoft.OpenApi.Validations
{
string PathString { get; }
void AddError(Microsoft.OpenApi.Validations.OpenApiValidatorError error);
+ void AddWarning(Microsoft.OpenApi.Validations.OpenApiValidatorWarning warning);
void Enter(string segment);
void Exit();
}
@@ -1058,7 +1094,9 @@ namespace Microsoft.OpenApi.Validations
{
public OpenApiValidator(Microsoft.OpenApi.Validations.ValidationRuleSet ruleSet) { }
public System.Collections.Generic.IEnumerable Errors { get; }
+ public System.Collections.Generic.IEnumerable Warnings { get; }
public void AddError(Microsoft.OpenApi.Validations.OpenApiValidatorError error) { }
+ public void AddWarning(Microsoft.OpenApi.Validations.OpenApiValidatorWarning warning) { }
public override void Visit(Microsoft.OpenApi.Interfaces.IOpenApiExtensible item) { }
public override void Visit(Microsoft.OpenApi.Interfaces.IOpenApiExtension item) { }
public override void Visit(Microsoft.OpenApi.Models.OpenApiCallback item) { }
@@ -1085,9 +1123,15 @@ namespace Microsoft.OpenApi.Validations
public OpenApiValidatorError(string ruleName, string pointer, string message) { }
public string RuleName { get; set; }
}
+ public class OpenApiValidatorWarning : Microsoft.OpenApi.Models.OpenApiError
+ {
+ public OpenApiValidatorWarning(string ruleName, string pointer, string message) { }
+ public string RuleName { get; set; }
+ }
public static class ValidationContextExtensions
{
public static void CreateError(this Microsoft.OpenApi.Validations.IValidationContext context, string ruleName, string message) { }
+ public static void CreateWarning(this Microsoft.OpenApi.Validations.IValidationContext context, string ruleName, string message) { }
}
public abstract class ValidationRule
{
@@ -1154,6 +1198,7 @@ namespace Microsoft.OpenApi.Validations.Rules
{
public static Microsoft.OpenApi.Validations.ValidationRule LicenseRequiredFields { get; }
}
+ [Microsoft.OpenApi.Validations.Rules.OpenApiRule]
public static class OpenApiMediaTypeRules
{
public static Microsoft.OpenApi.Validations.ValidationRule MediaTypeMismatchedDataType { get; }
@@ -1187,7 +1232,7 @@ namespace Microsoft.OpenApi.Validations.Rules
public static Microsoft.OpenApi.Validations.ValidationRule ResponsesMustBeIdentifiedByDefaultOrStatusCode { get; }
public static Microsoft.OpenApi.Validations.ValidationRule ResponsesMustContainAtLeastOneResponse { get; }
}
- [System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.All, AllowMultiple=false, Inherited=false)]
+ [System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=false)]
public class OpenApiRuleAttribute : System.Attribute
{
public OpenApiRuleAttribute() { }
@@ -1235,10 +1280,12 @@ namespace Microsoft.OpenApi.Writers
public class OpenApiJsonWriter : Microsoft.OpenApi.Writers.OpenApiWriterBase
{
public OpenApiJsonWriter(System.IO.TextWriter textWriter) { }
- public OpenApiJsonWriter(System.IO.TextWriter textWriter, Microsoft.OpenApi.Writers.OpenApiWriterSettings settings) { }
+ public OpenApiJsonWriter(System.IO.TextWriter textWriter, Microsoft.OpenApi.Writers.OpenApiJsonWriterSettings settings) { }
+ public OpenApiJsonWriter(System.IO.TextWriter textWriter, Microsoft.OpenApi.Writers.OpenApiWriterSettings settings, bool terseOutput = false) { }
protected override int BaseIndentation { get; }
public override void WriteEndArray() { }
public override void WriteEndObject() { }
+ public override void WriteIndentation() { }
public override void WriteNull() { }
public override void WritePropertyName(string name) { }
public override void WriteRaw(string value) { }
@@ -1247,6 +1294,11 @@ namespace Microsoft.OpenApi.Writers
public override void WriteValue(string value) { }
protected override void WriteValueSeparator() { }
}
+ public class OpenApiJsonWriterSettings : Microsoft.OpenApi.Writers.OpenApiWriterSettings
+ {
+ public OpenApiJsonWriterSettings() { }
+ public bool Terse { get; set; }
+ }
public static class OpenApiWriterAnyExtensions
{
public static void WriteAny(this Microsoft.OpenApi.Writers.IOpenApiWriter writer, T any)
@@ -1323,6 +1375,9 @@ namespace Microsoft.OpenApi.Writers
public class OpenApiWriterSettings
{
public OpenApiWriterSettings() { }
+ public bool InlineExternalReferences { get; set; }
+ public bool InlineLocalReferences { get; set; }
+ [System.Obsolete("Use InlineLocalReference and InlineExternalReference settings instead")]
public Microsoft.OpenApi.Writers.ReferenceInlineSetting ReferenceInline { get; set; }
}
public class OpenApiYamlWriter : Microsoft.OpenApi.Writers.OpenApiWriterBase
@@ -1341,6 +1396,7 @@ namespace Microsoft.OpenApi.Writers
public override void WriteValue(string value) { }
protected override void WriteValueSeparator() { }
}
+ [System.Obsolete("Use InlineLocalReference and InlineExternalReference settings instead")]
public enum ReferenceInlineSetting
{
DoNotInlineReferences = 0,
diff --git a/test/Microsoft.OpenApi.Tests/Services/OpenApiFilterServiceTests.cs b/test/Microsoft.OpenApi.Tests/Services/OpenApiFilterServiceTests.cs
new file mode 100644
index 000000000..29cb684d2
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Services/OpenApiFilterServiceTests.cs
@@ -0,0 +1,139 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT license.
+
+using System;
+using System.IO;
+using Microsoft.Extensions.Logging;
+using Microsoft.OpenApi.Hidi;
+using Microsoft.OpenApi.Models;
+using Microsoft.OpenApi.Services;
+using Microsoft.OpenApi.Tests.UtilityFiles;
+using Moq;
+using Xunit;
+
+namespace Microsoft.OpenApi.Tests.Services
+{
+ public class OpenApiFilterServiceTests
+ {
+ private readonly OpenApiDocument _openApiDocumentMock;
+ private readonly Mock> _mockLogger;
+ private readonly ILogger _logger;
+
+ public OpenApiFilterServiceTests()
+ {
+ _openApiDocumentMock = OpenApiDocumentMock.CreateOpenApiDocument();
+ _mockLogger = new Mock>();
+ _logger = _mockLogger.Object;
+ }
+
+ [Theory]
+ [InlineData("users.user.ListUser", null, 1)]
+ [InlineData("users.user.GetUser", null, 1)]
+ [InlineData("users.user.ListUser,users.user.GetUser", null, 2)]
+ [InlineData("*", null, 12)]
+ [InlineData("administrativeUnits.restore", null, 1)]
+ [InlineData("graphService.GetGraphService", null, 1)]
+ [InlineData(null, "users.user,applications.application", 3)]
+ [InlineData(null, "^users\\.", 3)]
+ [InlineData(null, "users.user", 2)]
+ [InlineData(null, "applications.application", 1)]
+ [InlineData(null, "reports.Functions", 2)]
+ public void ReturnFilteredOpenApiDocumentBasedOnOperationIdsAndTags(string operationIds, string tags, int expectedPathCount)
+ {
+ // Act
+ var predicate = OpenApiFilterService.CreatePredicate(operationIds, tags);
+ var subsetOpenApiDocument = OpenApiFilterService.CreateFilteredDocument(_openApiDocumentMock, predicate);
+
+ // Assert
+ Assert.NotNull(subsetOpenApiDocument);
+ Assert.NotEmpty(subsetOpenApiDocument.Paths);
+ Assert.Equal(expectedPathCount, subsetOpenApiDocument.Paths.Count);
+ }
+
+ [Fact]
+ public void ReturnFilteredOpenApiDocumentBasedOnPostmanCollection()
+ {
+ // Arrange
+ var filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "UtilityFiles\\postmanCollection_ver2.json");
+ var fileInput = new FileInfo(filePath);
+ var stream = fileInput.OpenRead();
+
+ // Act
+ var requestUrls = OpenApiService.ParseJsonCollectionFile(stream, _logger);
+ var predicate = OpenApiFilterService.CreatePredicate(requestUrls: requestUrls, source: _openApiDocumentMock);
+ var subsetOpenApiDocument = OpenApiFilterService.CreateFilteredDocument(_openApiDocumentMock, predicate);
+
+ // Assert
+ Assert.NotNull(subsetOpenApiDocument);
+ Assert.NotEmpty(subsetOpenApiDocument.Paths);
+ Assert.Equal(3, subsetOpenApiDocument.Paths.Count);
+ }
+
+ [Fact]
+ public void ShouldParseNestedPostmanCollection()
+ {
+ // Arrange
+ var filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "UtilityFiles\\postmanCollection_ver3.json");
+ var fileInput = new FileInfo(filePath);
+ var stream = fileInput.OpenRead();
+
+ // Act
+ var requestUrls = OpenApiService.ParseJsonCollectionFile(stream, _logger);
+ var pathCount = requestUrls.Count;
+
+ // Assert
+ Assert.NotNull(requestUrls);
+ Assert.Equal(30, pathCount);
+ }
+
+ [Fact]
+ public void ThrowsExceptionWhenUrlsInCollectionAreMissingFromSourceDocument()
+ {
+ // Arrange
+ var filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "UtilityFiles\\postmanCollection_ver1.json");
+ var fileInput = new FileInfo(filePath);
+ var stream = fileInput.OpenRead();
+
+ // Act
+ var requestUrls = OpenApiService.ParseJsonCollectionFile(stream, _logger);
+
+ // Assert
+ var message = Assert.Throws(() =>
+ OpenApiFilterService.CreatePredicate(requestUrls: requestUrls, source: _openApiDocumentMock)).Message;
+ Assert.Equal("The urls in the Postman collection supplied could not be found.", message);
+ }
+
+ [Fact]
+ public void ContinueProcessingWhenUrlsInCollectionAreMissingFromSourceDocument()
+ {
+ // Arrange
+ var filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "UtilityFiles\\postmanCollection_ver4.json");
+ var fileInput = new FileInfo(filePath);
+ var stream = fileInput.OpenRead();
+
+ // Act
+ var requestUrls = OpenApiService.ParseJsonCollectionFile(stream, _logger);
+ var pathCount = requestUrls.Count;
+ var predicate = OpenApiFilterService.CreatePredicate(requestUrls: requestUrls, source: _openApiDocumentMock);
+ var subsetOpenApiDocument = OpenApiFilterService.CreateFilteredDocument(_openApiDocumentMock, predicate);
+ var subsetPathCount = subsetOpenApiDocument.Paths.Count;
+
+ // Assert
+ Assert.NotNull(subsetOpenApiDocument);
+ Assert.NotEmpty(subsetOpenApiDocument.Paths);
+ Assert.Equal(2, subsetPathCount);
+ Assert.NotEqual(pathCount, subsetPathCount);
+ }
+
+ [Fact]
+ public void ThrowsInvalidOperationExceptionInCreatePredicateWhenInvalidArgumentsArePassed()
+ {
+ // Act and Assert
+ var message1 = Assert.Throws(() => OpenApiFilterService.CreatePredicate(null, null)).Message;
+ Assert.Equal("Either operationId(s),tag(s) or Postman collection need to be specified.", message1);
+
+ var message2 = Assert.Throws(() => OpenApiFilterService.CreatePredicate("users.user.ListUser", "users.user")).Message;
+ Assert.Equal("Cannot specify both operationIds and tags at the same time.", message2);
+ }
+ }
+}
diff --git a/test/Microsoft.OpenApi.Tests/Services/OpenApiServiceTests.cs b/test/Microsoft.OpenApi.Tests/Services/OpenApiServiceTests.cs
new file mode 100644
index 000000000..af5437aa1
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Services/OpenApiServiceTests.cs
@@ -0,0 +1,55 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT license.
+
+using System;
+using System.IO;
+using System.Threading.Tasks;
+using Microsoft.OpenApi.Hidi;
+using Microsoft.OpenApi.Services;
+using Xunit;
+
+namespace Microsoft.OpenApi.Tests.Services
+{
+ public class OpenApiServiceTests
+ {
+ [Fact]
+ public async Task ReturnConvertedCSDLFile()
+ {
+ // Arrange
+ var filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "UtilityFiles\\Todo.xml");
+ var fileInput = new FileInfo(filePath);
+ var csdlStream = fileInput.OpenRead();
+
+ // Act
+ var openApiDoc = await OpenApiService.ConvertCsdlToOpenApi(csdlStream);
+ var expectedPathCount = 5;
+
+ // Assert
+ Assert.NotNull(openApiDoc);
+ Assert.NotEmpty(openApiDoc.Paths);
+ Assert.Equal(expectedPathCount, openApiDoc.Paths.Count);
+ }
+
+ [Theory]
+ [InlineData("Todos.Todo.UpdateTodo",null, 1)]
+ [InlineData("Todos.Todo.ListTodo",null, 1)]
+ [InlineData(null, "Todos.Todo", 4)]
+ public async Task ReturnFilteredOpenApiDocBasedOnOperationIdsAndInputCsdlDocument(string operationIds, string tags, int expectedPathCount)
+ {
+ // Arrange
+ var filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "UtilityFiles\\Todo.xml");
+ var fileInput = new FileInfo(filePath);
+ var csdlStream = fileInput.OpenRead();
+
+ // Act
+ var openApiDoc = await OpenApiService.ConvertCsdlToOpenApi(csdlStream);
+ var predicate = OpenApiFilterService.CreatePredicate(operationIds, tags);
+ var subsetOpenApiDocument = OpenApiFilterService.CreateFilteredDocument(openApiDoc, predicate);
+
+ // Assert
+ Assert.NotNull(subsetOpenApiDocument);
+ Assert.NotEmpty(subsetOpenApiDocument.Paths);
+ Assert.Equal(expectedPathCount, subsetOpenApiDocument.Paths.Count);
+ }
+ }
+}
diff --git a/test/Microsoft.OpenApi.Tests/UtilityFiles/OpenApiDocumentMock.cs b/test/Microsoft.OpenApi.Tests/UtilityFiles/OpenApiDocumentMock.cs
new file mode 100644
index 000000000..d21fccb9a
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/UtilityFiles/OpenApiDocumentMock.cs
@@ -0,0 +1,737 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT license.
+
+using System.Collections.Generic;
+using System.Security.Policy;
+using Microsoft.OpenApi.Any;
+using Microsoft.OpenApi.Interfaces;
+using Microsoft.OpenApi.Models;
+
+namespace Microsoft.OpenApi.Tests.UtilityFiles
+{
+ ///
+ /// Mock class that creates a sample OpenAPI document.
+ ///
+ public static class OpenApiDocumentMock
+ {
+ ///
+ /// Creates an OpenAPI document.
+ ///
+ /// Instance of an OpenApi document
+ public static OpenApiDocument CreateOpenApiDocument()
+ {
+ var applicationJsonMediaType = "application/json";
+
+ var document = new OpenApiDocument()
+ {
+ Info = new OpenApiInfo()
+ {
+ Title = "People",
+ Version = "v1.0"
+ },
+ Servers = new List
+ {
+ new OpenApiServer
+ {
+ Url = "https://graph.microsoft.com/v1.0"
+ }
+ },
+ Paths = new OpenApiPaths()
+ {
+ ["/"] = new OpenApiPathItem() // root path
+ {
+ Operations = new Dictionary
+ {
+ {
+ OperationType.Get, new OpenApiOperation
+ {
+ OperationId = "graphService.GetGraphService",
+ Responses = new OpenApiResponses()
+ {
+ {
+ "200",new OpenApiResponse()
+ {
+ Description = "OK"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ ["/reports/microsoft.graph.getTeamsUserActivityCounts(period={period})"] = new OpenApiPathItem()
+ {
+ Operations = new Dictionary
+ {
+ {
+ OperationType.Get, new OpenApiOperation
+ {
+ Tags = new List
+ {
+ {
+ new OpenApiTag()
+ {
+ Name = "reports.Functions"
+ }
+ }
+ },
+ OperationId = "reports.getTeamsUserActivityCounts",
+ Summary = "Invoke function getTeamsUserActivityUserCounts",
+ Parameters = new List
+ {
+ {
+ new OpenApiParameter()
+ {
+ Name = "period",
+ In = ParameterLocation.Path,
+ Required = true,
+ Schema = new OpenApiSchema()
+ {
+ Type = "string"
+ }
+ }
+ }
+ },
+ Responses = new OpenApiResponses()
+ {
+ {
+ "200", new OpenApiResponse()
+ {
+ Description = "Success",
+ Content = new Dictionary
+ {
+ {
+ applicationJsonMediaType,
+ new OpenApiMediaType
+ {
+ Schema = new OpenApiSchema
+ {
+ Type = "array"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ ["/reports/microsoft.graph.getTeamsUserActivityUserDetail(date={date})"] = new OpenApiPathItem()
+ {
+ Operations = new Dictionary
+ {
+ {
+ OperationType.Get, new OpenApiOperation
+ {
+ Tags = new List
+ {
+ {
+ new OpenApiTag()
+ {
+ Name = "reports.Functions"
+ }
+ }
+ },
+ OperationId = "reports.getTeamsUserActivityUserDetail-a3f1",
+ Summary = "Invoke function getTeamsUserActivityUserDetail",
+ Parameters = new List
+ {
+ {
+ new OpenApiParameter()
+ {
+ Name = "period",
+ In = ParameterLocation.Path,
+ Required = true,
+ Schema = new OpenApiSchema()
+ {
+ Type = "string"
+ }
+ }
+ }
+ },
+ Responses = new OpenApiResponses()
+ {
+ {
+ "200", new OpenApiResponse()
+ {
+ Description = "Success",
+ Content = new Dictionary
+ {
+ {
+ applicationJsonMediaType,
+ new OpenApiMediaType
+ {
+ Schema = new OpenApiSchema
+ {
+ Type = "array"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ ["/users"] = new OpenApiPathItem()
+ {
+ Operations = new Dictionary
+ {
+ {
+ OperationType.Get, new OpenApiOperation
+ {
+ Tags = new List
+ {
+ {
+ new OpenApiTag()
+ {
+ Name = "users.user"
+ }
+ }
+ },
+ OperationId = "users.user.ListUser",
+ Summary = "Get entities from users",
+ Responses = new OpenApiResponses()
+ {
+ {
+ "200", new OpenApiResponse()
+ {
+ Description = "Retrieved entities",
+ Content = new Dictionary
+ {
+ {
+ applicationJsonMediaType,
+ new OpenApiMediaType
+ {
+ Schema = new OpenApiSchema
+ {
+ Title = "Collection of user",
+ Type = "object",
+ Properties = new Dictionary
+ {
+ {
+ "value",
+ new OpenApiSchema
+ {
+ Type = "array",
+ Items = new OpenApiSchema
+ {
+ Reference = new OpenApiReference
+ {
+ Type = ReferenceType.Schema,
+ Id = "microsoft.graph.user"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ ["/users/{user-id}"] = new OpenApiPathItem()
+ {
+ Operations = new Dictionary
+ {
+ {
+ OperationType.Get, new OpenApiOperation
+ {
+ Tags = new List
+ {
+ {
+ new OpenApiTag()
+ {
+ Name = "users.user"
+ }
+ }
+ },
+ OperationId = "users.user.GetUser",
+ Summary = "Get entity from users by key",
+ Responses = new OpenApiResponses()
+ {
+ {
+ "200", new OpenApiResponse()
+ {
+ Description = "Retrieved entity",
+ Content = new Dictionary
+ {
+ {
+ applicationJsonMediaType,
+ new OpenApiMediaType
+ {
+ Schema = new OpenApiSchema
+ {
+ Reference = new OpenApiReference
+ {
+ Type = ReferenceType.Schema,
+ Id = "microsoft.graph.user"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ OperationType.Patch, new OpenApiOperation
+ {
+ Tags = new List
+ {
+ {
+ new OpenApiTag()
+ {
+ Name = "users.user"
+ }
+ }
+ },
+ OperationId = "users.user.UpdateUser",
+ Summary = "Update entity in users",
+ Responses = new OpenApiResponses()
+ {
+ {
+ "204", new OpenApiResponse()
+ {
+ Description = "Success"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ ["/users/{user-id}/messages/{message-id}"] = new OpenApiPathItem()
+ {
+ Operations = new Dictionary
+ {
+ {
+ OperationType.Get, new OpenApiOperation
+ {
+ Tags = new List
+ {
+ {
+ new OpenApiTag()
+ {
+ Name = "users.message"
+ }
+ }
+ },
+ OperationId = "users.GetMessages",
+ Summary = "Get messages from users",
+ Description = "The messages in a mailbox or folder. Read-only. Nullable.",
+ Parameters = new List
+ {
+ new OpenApiParameter()
+ {
+ Name = "$select",
+ In = ParameterLocation.Query,
+ Required = true,
+ Description = "Select properties to be returned",
+ Schema = new OpenApiSchema()
+ {
+ Type = "array"
+ }
+ // missing explode parameter
+ }
+ },
+ Responses = new OpenApiResponses()
+ {
+ {
+ "200", new OpenApiResponse()
+ {
+ Description = "Retrieved navigation property",
+ Content = new Dictionary
+ {
+ {
+ applicationJsonMediaType,
+ new OpenApiMediaType
+ {
+ Schema = new OpenApiSchema
+ {
+ Reference = new OpenApiReference
+ {
+ Type = ReferenceType.Schema,
+ Id = "microsoft.graph.message"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ ["/administrativeUnits/{administrativeUnit-id}/microsoft.graph.restore"] = new OpenApiPathItem()
+ {
+ Operations = new Dictionary
+ {
+ {
+ OperationType.Post, new OpenApiOperation
+ {
+ Tags = new List
+ {
+ {
+ new OpenApiTag()
+ {
+ Name = "administrativeUnits.Actions"
+ }
+ }
+ },
+ OperationId = "administrativeUnits.restore",
+ Summary = "Invoke action restore",
+ Parameters = new List
+ {
+ {
+ new OpenApiParameter()
+ {
+ Name = "administrativeUnit-id",
+ In = ParameterLocation.Path,
+ Required = true,
+ Description = "key: id of administrativeUnit",
+ Schema = new OpenApiSchema()
+ {
+ Type = "string"
+ }
+ }
+ }
+ },
+ Responses = new OpenApiResponses()
+ {
+ {
+ "200", new OpenApiResponse()
+ {
+ Description = "Success",
+ Content = new Dictionary
+ {
+ {
+ applicationJsonMediaType,
+ new OpenApiMediaType
+ {
+ Schema = new OpenApiSchema
+ {
+ AnyOf = new List
+ {
+ new OpenApiSchema
+ {
+ Type = "string"
+ }
+ },
+ Nullable = true
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ ["/applications/{application-id}/logo"] = new OpenApiPathItem()
+ {
+ Operations = new Dictionary
+ {
+ {
+ OperationType.Put, new OpenApiOperation
+ {
+ Tags = new List
+ {
+ {
+ new OpenApiTag()
+ {
+ Name = "applications.application"
+ }
+ }
+ },
+ OperationId = "applications.application.UpdateLogo",
+ Summary = "Update media content for application in applications",
+ Responses = new OpenApiResponses()
+ {
+ {
+ "204", new OpenApiResponse()
+ {
+ Description = "Success"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ ["/security/hostSecurityProfiles"] = new OpenApiPathItem()
+ {
+ Operations = new Dictionary
+ {
+ {
+ OperationType.Get, new OpenApiOperation
+ {
+ Tags = new List
+ {
+ {
+ new OpenApiTag()
+ {
+ Name = "security.hostSecurityProfile"
+ }
+ }
+ },
+ OperationId = "security.ListHostSecurityProfiles",
+ Summary = "Get hostSecurityProfiles from security",
+ Responses = new OpenApiResponses()
+ {
+ {
+ "200", new OpenApiResponse()
+ {
+ Description = "Retrieved navigation property",
+ Content = new Dictionary
+ {
+ {
+ applicationJsonMediaType,
+ new OpenApiMediaType
+ {
+ Schema = new OpenApiSchema
+ {
+ Title = "Collection of hostSecurityProfile",
+ Type = "object",
+ Properties = new Dictionary
+ {
+ {
+ "value",
+ new OpenApiSchema
+ {
+ Type = "array",
+ Items = new OpenApiSchema
+ {
+ Reference = new OpenApiReference
+ {
+ Type = ReferenceType.Schema,
+ Id = "microsoft.graph.networkInterface"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ ["/communications/calls/{call-id}/microsoft.graph.keepAlive"] = new OpenApiPathItem()
+ {
+ Operations = new Dictionary
+ {
+ {
+ OperationType.Post, new OpenApiOperation
+ {
+ Tags = new List
+ {
+ {
+ new OpenApiTag()
+ {
+ Name = "communications.Actions"
+ }
+ }
+ },
+ OperationId = "communications.calls.call.keepAlive",
+ Summary = "Invoke action keepAlive",
+ Parameters = new List
+ {
+ new OpenApiParameter()
+ {
+ Name = "call-id",
+ In = ParameterLocation.Path,
+ Description = "key: id of call",
+ Required = true,
+ Schema = new OpenApiSchema()
+ {
+ Type = "string"
+ },
+ Extensions = new Dictionary
+ {
+ {
+ "x-ms-docs-key-type", new OpenApiString("call")
+ }
+ }
+ }
+ },
+ Responses = new OpenApiResponses()
+ {
+ {
+ "204", new OpenApiResponse()
+ {
+ Description = "Success"
+ }
+ }
+ },
+ Extensions = new Dictionary
+ {
+ {
+ "x-ms-docs-operation-type", new OpenApiString("action")
+ }
+ }
+ }
+ }
+ }
+ },
+ ["/groups/{group-id}/events/{event-id}/calendar/events/microsoft.graph.delta"] = new OpenApiPathItem()
+ {
+ Operations = new Dictionary
+ {
+ {
+ OperationType.Get, new OpenApiOperation
+ {
+ Tags = new List
+ {
+ new OpenApiTag()
+ {
+ Name = "groups.Functions"
+ }
+ },
+ OperationId = "groups.group.events.event.calendar.events.delta",
+ Summary = "Invoke function delta",
+ Parameters = new List
+ {
+ new OpenApiParameter()
+ {
+ Name = "group-id",
+ In = ParameterLocation.Path,
+ Description = "key: id of group",
+ Required = true,
+ Schema = new OpenApiSchema()
+ {
+ Type = "string"
+ },
+ Extensions = new Dictionary
+ {
+ {
+ "x-ms-docs-key-type", new OpenApiString("group")
+ }
+ }
+ },
+ new OpenApiParameter()
+ {
+ Name = "event-id",
+ In = ParameterLocation.Path,
+ Description = "key: id of event",
+ Required = true,
+ Schema = new OpenApiSchema()
+ {
+ Type = "string"
+ },
+ Extensions = new Dictionary
+ {
+ {
+ "x-ms-docs-key-type", new OpenApiString("event")
+ }
+ }
+ }
+ },
+ Responses = new OpenApiResponses()
+ {
+ {
+ "200", new OpenApiResponse()
+ {
+ Description = "Success",
+ Content = new Dictionary
+ {
+ {
+ applicationJsonMediaType,
+ new OpenApiMediaType
+ {
+ Schema = new OpenApiSchema
+ {
+ Type = "array",
+ Reference = new OpenApiReference
+ {
+ Type = ReferenceType.Schema,
+ Id = "microsoft.graph.event"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ Extensions = new Dictionary
+ {
+ {
+ "x-ms-docs-operation-type", new OpenApiString("function")
+ }
+ }
+ }
+ }
+ }
+ },
+ ["/applications/{application-id}/createdOnBehalfOf/$ref"] = new OpenApiPathItem()
+ {
+ Operations = new Dictionary
+ {
+ {
+ OperationType.Get, new OpenApiOperation
+ {
+ Tags = new List
+ {
+ new OpenApiTag()
+ {
+ Name = "applications.directoryObject"
+ }
+ },
+ OperationId = "applications.GetRefCreatedOnBehalfOf",
+ Summary = "Get ref of createdOnBehalfOf from applications"
+ }
+ }
+ }
+ }
+ },
+ Components = new OpenApiComponents
+ {
+ Schemas = new Dictionary
+ {
+ {
+ "microsoft.graph.networkInterface", new OpenApiSchema
+ {
+ Title = "networkInterface",
+ Type = "object",
+ Properties = new Dictionary
+ {
+ {
+ "description", new OpenApiSchema
+ {
+ Type = "string",
+ Description = "Description of the NIC (e.g. Ethernet adapter, Wireless LAN adapter Local Area Connection <#>, etc.).",
+ Nullable = true
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+ return document;
+ }
+ }
+}
diff --git a/test/Microsoft.OpenApi.Tests/UtilityFiles/Todo.xml b/test/Microsoft.OpenApi.Tests/UtilityFiles/Todo.xml
new file mode 100644
index 000000000..b3b07debf
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/UtilityFiles/Todo.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/Microsoft.OpenApi.Tests/UtilityFiles/postmanCollection_ver1.json b/test/Microsoft.OpenApi.Tests/UtilityFiles/postmanCollection_ver1.json
new file mode 100644
index 000000000..151d184e1
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/UtilityFiles/postmanCollection_ver1.json
@@ -0,0 +1,102 @@
+{
+ "info": {
+ "_postman_id": "0017059134807617005",
+ "name": "Graph-Collection",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
+ },
+ "item": [
+ {
+ "name": "agreementAcceptances-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/agreementAcceptances",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "agreementAcceptances"
+ ]
+ }
+ }
+ },
+ {
+ "name": "agreementAcceptances-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/agreementAcceptances",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "agreementAcceptances"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{agreementAcceptance-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/agreementAcceptances/{agreementAcceptance-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "agreementAcceptances",
+ "{agreementAcceptance-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{agreementAcceptance-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/agreementAcceptances/{agreementAcceptance-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "agreementAcceptances",
+ "{agreementAcceptance-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{agreementAcceptance-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/agreementAcceptances/{agreementAcceptance-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "agreementAcceptances",
+ "{agreementAcceptance-id}"
+ ]
+ }
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/UtilityFiles/postmanCollection_ver2.json b/test/Microsoft.OpenApi.Tests/UtilityFiles/postmanCollection_ver2.json
new file mode 100644
index 000000000..003577738
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/UtilityFiles/postmanCollection_ver2.json
@@ -0,0 +1,23698 @@
+{
+ "info": {
+ "_postman_id": "43402ca3-f018-7c9b-2315-f176d9b171a3",
+ "name": "Graph-Collection",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
+ },
+ "item": [
+ {
+ "name": "users-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users"
+ ]
+ }
+ }
+ },
+ {
+ "name": "users-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{user-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{user-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{user-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "activities-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/activities",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "activities"
+ ]
+ }
+ }
+ },
+ {
+ "name": "activities-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/activities",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "activities"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{userActivity-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/activities/{userActivity-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "activities",
+ "{userActivity-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{userActivity-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/activities/{userActivity-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "activities",
+ "{userActivity-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{userActivity-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/activities/{userActivity-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "activities",
+ "{userActivity-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "historyItems-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/activities/{userActivity-id}/historyItems",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "activities",
+ "{userActivity-id}",
+ "historyItems"
+ ]
+ }
+ }
+ },
+ {
+ "name": "historyItems-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/activities/{userActivity-id}/historyItems",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "activities",
+ "{userActivity-id}",
+ "historyItems"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{activityHistoryItem-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/activities/{userActivity-id}/historyItems/{activityHistoryItem-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "activities",
+ "{userActivity-id}",
+ "historyItems",
+ "{activityHistoryItem-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{activityHistoryItem-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/activities/{userActivity-id}/historyItems/{activityHistoryItem-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "activities",
+ "{userActivity-id}",
+ "historyItems",
+ "{activityHistoryItem-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{activityHistoryItem-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/activities/{userActivity-id}/historyItems/{activityHistoryItem-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "activities",
+ "{userActivity-id}",
+ "historyItems",
+ "{activityHistoryItem-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "activity-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/activities/{userActivity-id}/historyItems/{activityHistoryItem-id}/activity",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "activities",
+ "{userActivity-id}",
+ "historyItems",
+ "{activityHistoryItem-id}",
+ "activity"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/activities/{userActivity-id}/historyItems/{activityHistoryItem-id}/activity/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "activities",
+ "{userActivity-id}",
+ "historyItems",
+ "{activityHistoryItem-id}",
+ "activity",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-PUT",
+ "request": {
+ "method": "PUT",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/activities/{userActivity-id}/historyItems/{activityHistoryItem-id}/activity/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "activities",
+ "{userActivity-id}",
+ "historyItems",
+ "{activityHistoryItem-id}",
+ "activity",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/activities/{userActivity-id}/historyItems/{activityHistoryItem-id}/activity/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "activities",
+ "{userActivity-id}",
+ "historyItems",
+ "{activityHistoryItem-id}",
+ "activity",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "agreementAcceptances-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/agreementAcceptances",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "agreementAcceptances"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/agreementAcceptances/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "agreementAcceptances",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/agreementAcceptances/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "agreementAcceptances",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "appRoleAssignments-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/appRoleAssignments",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "appRoleAssignments"
+ ]
+ }
+ }
+ },
+ {
+ "name": "appRoleAssignments-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/appRoleAssignments",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "appRoleAssignments"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{appRoleAssignment-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/appRoleAssignments/{appRoleAssignment-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "appRoleAssignments",
+ "{appRoleAssignment-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{appRoleAssignment-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/appRoleAssignments/{appRoleAssignment-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "appRoleAssignments",
+ "{appRoleAssignment-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{appRoleAssignment-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/appRoleAssignments/{appRoleAssignment-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "appRoleAssignments",
+ "{appRoleAssignment-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "authentication-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/authentication",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "authentication"
+ ]
+ }
+ }
+ },
+ {
+ "name": "authentication-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/authentication",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "authentication"
+ ]
+ }
+ }
+ },
+ {
+ "name": "authentication-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/authentication",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "authentication"
+ ]
+ }
+ }
+ },
+ {
+ "name": "fido2Methods-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/authentication/fido2Methods",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "authentication",
+ "fido2Methods"
+ ]
+ }
+ }
+ },
+ {
+ "name": "fido2Methods-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/authentication/fido2Methods",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "authentication",
+ "fido2Methods"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{fido2AuthenticationMethod-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/authentication/fido2Methods/{fido2AuthenticationMethod-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "authentication",
+ "fido2Methods",
+ "{fido2AuthenticationMethod-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{fido2AuthenticationMethod-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/authentication/fido2Methods/{fido2AuthenticationMethod-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "authentication",
+ "fido2Methods",
+ "{fido2AuthenticationMethod-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{fido2AuthenticationMethod-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/authentication/fido2Methods/{fido2AuthenticationMethod-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "authentication",
+ "fido2Methods",
+ "{fido2AuthenticationMethod-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "methods-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/authentication/methods",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "authentication",
+ "methods"
+ ]
+ }
+ }
+ },
+ {
+ "name": "methods-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/authentication/methods",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "authentication",
+ "methods"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{authenticationMethod-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/authentication/methods/{authenticationMethod-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "authentication",
+ "methods",
+ "{authenticationMethod-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{authenticationMethod-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/authentication/methods/{authenticationMethod-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "authentication",
+ "methods",
+ "{authenticationMethod-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{authenticationMethod-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/authentication/methods/{authenticationMethod-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "authentication",
+ "methods",
+ "{authenticationMethod-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "microsoftAuthenticatorMethods-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/authentication/microsoftAuthenticatorMethods",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "authentication",
+ "microsoftAuthenticatorMethods"
+ ]
+ }
+ }
+ },
+ {
+ "name": "microsoftAuthenticatorMethods-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/authentication/microsoftAuthenticatorMethods",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "authentication",
+ "microsoftAuthenticatorMethods"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{microsoftAuthenticatorAuthenticationMethod-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/authentication/microsoftAuthenticatorMethods/{microsoftAuthenticatorAuthenticationMethod-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "authentication",
+ "microsoftAuthenticatorMethods",
+ "{microsoftAuthenticatorAuthenticationMethod-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{microsoftAuthenticatorAuthenticationMethod-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/authentication/microsoftAuthenticatorMethods/{microsoftAuthenticatorAuthenticationMethod-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "authentication",
+ "microsoftAuthenticatorMethods",
+ "{microsoftAuthenticatorAuthenticationMethod-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{microsoftAuthenticatorAuthenticationMethod-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/authentication/microsoftAuthenticatorMethods/{microsoftAuthenticatorAuthenticationMethod-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "authentication",
+ "microsoftAuthenticatorMethods",
+ "{microsoftAuthenticatorAuthenticationMethod-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "device-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/authentication/microsoftAuthenticatorMethods/{microsoftAuthenticatorAuthenticationMethod-id}/device",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "authentication",
+ "microsoftAuthenticatorMethods",
+ "{microsoftAuthenticatorAuthenticationMethod-id}",
+ "device"
+ ]
+ }
+ }
+ },
+ {
+ "name": "device-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/authentication/microsoftAuthenticatorMethods/{microsoftAuthenticatorAuthenticationMethod-id}/device",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "authentication",
+ "microsoftAuthenticatorMethods",
+ "{microsoftAuthenticatorAuthenticationMethod-id}",
+ "device"
+ ]
+ }
+ }
+ },
+ {
+ "name": "device-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/authentication/microsoftAuthenticatorMethods/{microsoftAuthenticatorAuthenticationMethod-id}/device",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "authentication",
+ "microsoftAuthenticatorMethods",
+ "{microsoftAuthenticatorAuthenticationMethod-id}",
+ "device"
+ ]
+ }
+ }
+ },
+ {
+ "name": "windowsHelloForBusinessMethods-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/authentication/windowsHelloForBusinessMethods",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "authentication",
+ "windowsHelloForBusinessMethods"
+ ]
+ }
+ }
+ },
+ {
+ "name": "windowsHelloForBusinessMethods-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/authentication/windowsHelloForBusinessMethods",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "authentication",
+ "windowsHelloForBusinessMethods"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{windowsHelloForBusinessAuthenticationMethod-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/authentication/windowsHelloForBusinessMethods/{windowsHelloForBusinessAuthenticationMethod-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "authentication",
+ "windowsHelloForBusinessMethods",
+ "{windowsHelloForBusinessAuthenticationMethod-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{windowsHelloForBusinessAuthenticationMethod-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/authentication/windowsHelloForBusinessMethods/{windowsHelloForBusinessAuthenticationMethod-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "authentication",
+ "windowsHelloForBusinessMethods",
+ "{windowsHelloForBusinessAuthenticationMethod-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{windowsHelloForBusinessAuthenticationMethod-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/authentication/windowsHelloForBusinessMethods/{windowsHelloForBusinessAuthenticationMethod-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "authentication",
+ "windowsHelloForBusinessMethods",
+ "{windowsHelloForBusinessAuthenticationMethod-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "device-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/authentication/windowsHelloForBusinessMethods/{windowsHelloForBusinessAuthenticationMethod-id}/device",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "authentication",
+ "windowsHelloForBusinessMethods",
+ "{windowsHelloForBusinessAuthenticationMethod-id}",
+ "device"
+ ]
+ }
+ }
+ },
+ {
+ "name": "device-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/authentication/windowsHelloForBusinessMethods/{windowsHelloForBusinessAuthenticationMethod-id}/device",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "authentication",
+ "windowsHelloForBusinessMethods",
+ "{windowsHelloForBusinessAuthenticationMethod-id}",
+ "device"
+ ]
+ }
+ }
+ },
+ {
+ "name": "device-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/authentication/windowsHelloForBusinessMethods/{windowsHelloForBusinessAuthenticationMethod-id}/device",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "authentication",
+ "windowsHelloForBusinessMethods",
+ "{windowsHelloForBusinessAuthenticationMethod-id}",
+ "device"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendar-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendar-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendar-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendarPermissions-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarPermissions",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarPermissions"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendarPermissions-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarPermissions",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarPermissions"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{calendarPermission-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarPermissions/{calendarPermission-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarPermissions",
+ "{calendarPermission-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{calendarPermission-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarPermissions/{calendarPermission-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarPermissions",
+ "{calendarPermission-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{calendarPermission-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarPermissions/{calendarPermission-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarPermissions",
+ "{calendarPermission-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendarView-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarView",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarView"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendarView-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarView",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarView"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarView/{event-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarView",
+ "{event-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarView/{event-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarView",
+ "{event-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarView/{event-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarView",
+ "{event-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "attachments-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarView/{event-id}/attachments",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarView",
+ "{event-id}",
+ "attachments"
+ ]
+ }
+ }
+ },
+ {
+ "name": "attachments-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarView/{event-id}/attachments",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarView",
+ "{event-id}",
+ "attachments"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{attachment-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarView/{event-id}/attachments/{attachment-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarView",
+ "{event-id}",
+ "attachments",
+ "{attachment-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{attachment-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarView/{event-id}/attachments/{attachment-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarView",
+ "{event-id}",
+ "attachments",
+ "{attachment-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{attachment-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarView/{event-id}/attachments/{attachment-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarView",
+ "{event-id}",
+ "attachments",
+ "{attachment-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendar-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarView/{event-id}/calendar",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarView",
+ "{event-id}",
+ "calendar"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendar-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarView/{event-id}/calendar",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarView",
+ "{event-id}",
+ "calendar"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendar-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarView/{event-id}/calendar",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarView",
+ "{event-id}",
+ "calendar"
+ ]
+ }
+ }
+ },
+ {
+ "name": "extensions-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarView/{event-id}/extensions",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarView",
+ "{event-id}",
+ "extensions"
+ ]
+ }
+ }
+ },
+ {
+ "name": "extensions-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarView/{event-id}/extensions",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarView",
+ "{event-id}",
+ "extensions"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{extension-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarView/{event-id}/extensions/{extension-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarView",
+ "{event-id}",
+ "extensions",
+ "{extension-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{extension-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarView/{event-id}/extensions/{extension-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarView",
+ "{event-id}",
+ "extensions",
+ "{extension-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{extension-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarView/{event-id}/extensions/{extension-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarView",
+ "{event-id}",
+ "extensions",
+ "{extension-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "instances-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarView/{event-id}/instances",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarView",
+ "{event-id}",
+ "instances"
+ ]
+ }
+ }
+ },
+ {
+ "name": "instances-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarView/{event-id}/instances",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarView",
+ "{event-id}",
+ "instances"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id1}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarView/{event-id}/instances/{event-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarView",
+ "{event-id}",
+ "instances",
+ "{event-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id1}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarView/{event-id}/instances/{event-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarView",
+ "{event-id}",
+ "instances",
+ "{event-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id1}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarView/{event-id}/instances/{event-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarView",
+ "{event-id}",
+ "instances",
+ "{event-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "multiValueExtendedProperties-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarView/{event-id}/multiValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarView",
+ "{event-id}",
+ "multiValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "multiValueExtendedProperties-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarView/{event-id}/multiValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarView",
+ "{event-id}",
+ "multiValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{multiValueLegacyExtendedProperty-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarView/{event-id}/multiValueExtendedProperties/{multiValueLegacyExtendedProperty-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarView",
+ "{event-id}",
+ "multiValueExtendedProperties",
+ "{multiValueLegacyExtendedProperty-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{multiValueLegacyExtendedProperty-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarView/{event-id}/multiValueExtendedProperties/{multiValueLegacyExtendedProperty-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarView",
+ "{event-id}",
+ "multiValueExtendedProperties",
+ "{multiValueLegacyExtendedProperty-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{multiValueLegacyExtendedProperty-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarView/{event-id}/multiValueExtendedProperties/{multiValueLegacyExtendedProperty-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarView",
+ "{event-id}",
+ "multiValueExtendedProperties",
+ "{multiValueLegacyExtendedProperty-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "singleValueExtendedProperties-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarView/{event-id}/singleValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarView",
+ "{event-id}",
+ "singleValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "singleValueExtendedProperties-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarView/{event-id}/singleValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarView",
+ "{event-id}",
+ "singleValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{singleValueLegacyExtendedProperty-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarView/{event-id}/singleValueExtendedProperties/{singleValueLegacyExtendedProperty-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarView",
+ "{event-id}",
+ "singleValueExtendedProperties",
+ "{singleValueLegacyExtendedProperty-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{singleValueLegacyExtendedProperty-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarView/{event-id}/singleValueExtendedProperties/{singleValueLegacyExtendedProperty-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarView",
+ "{event-id}",
+ "singleValueExtendedProperties",
+ "{singleValueLegacyExtendedProperty-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{singleValueLegacyExtendedProperty-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/calendarView/{event-id}/singleValueExtendedProperties/{singleValueLegacyExtendedProperty-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "calendarView",
+ "{event-id}",
+ "singleValueExtendedProperties",
+ "{singleValueLegacyExtendedProperty-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "events-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/events",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "events"
+ ]
+ }
+ }
+ },
+ {
+ "name": "events-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/events",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "events"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/events/{event-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "events",
+ "{event-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/events/{event-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "events",
+ "{event-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/events/{event-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "events",
+ "{event-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "multiValueExtendedProperties-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/multiValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "multiValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "multiValueExtendedProperties-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/multiValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "multiValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{multiValueLegacyExtendedProperty-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/multiValueExtendedProperties/{multiValueLegacyExtendedProperty-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "multiValueExtendedProperties",
+ "{multiValueLegacyExtendedProperty-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{multiValueLegacyExtendedProperty-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/multiValueExtendedProperties/{multiValueLegacyExtendedProperty-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "multiValueExtendedProperties",
+ "{multiValueLegacyExtendedProperty-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{multiValueLegacyExtendedProperty-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/multiValueExtendedProperties/{multiValueLegacyExtendedProperty-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "multiValueExtendedProperties",
+ "{multiValueLegacyExtendedProperty-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "singleValueExtendedProperties-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/singleValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "singleValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "singleValueExtendedProperties-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/singleValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "singleValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{singleValueLegacyExtendedProperty-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/singleValueExtendedProperties/{singleValueLegacyExtendedProperty-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "singleValueExtendedProperties",
+ "{singleValueLegacyExtendedProperty-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{singleValueLegacyExtendedProperty-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/singleValueExtendedProperties/{singleValueLegacyExtendedProperty-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "singleValueExtendedProperties",
+ "{singleValueLegacyExtendedProperty-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{singleValueLegacyExtendedProperty-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendar/singleValueExtendedProperties/{singleValueLegacyExtendedProperty-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendar",
+ "singleValueExtendedProperties",
+ "{singleValueLegacyExtendedProperty-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendarGroups-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendarGroups-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{calendarGroup-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{calendarGroup-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{calendarGroup-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendars-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendars-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{calendar-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{calendar-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{calendar-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendarPermissions-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarPermissions",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarPermissions"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendarPermissions-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarPermissions",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarPermissions"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{calendarPermission-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarPermissions/{calendarPermission-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarPermissions",
+ "{calendarPermission-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{calendarPermission-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarPermissions/{calendarPermission-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarPermissions",
+ "{calendarPermission-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{calendarPermission-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarPermissions/{calendarPermission-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarPermissions",
+ "{calendarPermission-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendarView-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarView",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendarView-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarView",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarView/{event-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarView/{event-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarView/{event-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "attachments-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarView/{event-id}/attachments",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "attachments"
+ ]
+ }
+ }
+ },
+ {
+ "name": "attachments-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarView/{event-id}/attachments",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "attachments"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{attachment-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarView/{event-id}/attachments/{attachment-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "attachments",
+ "{attachment-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{attachment-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarView/{event-id}/attachments/{attachment-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "attachments",
+ "{attachment-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{attachment-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarView/{event-id}/attachments/{attachment-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "attachments",
+ "{attachment-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendar-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarView/{event-id}/calendar",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "calendar"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendar-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarView/{event-id}/calendar",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "calendar"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendar-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarView/{event-id}/calendar",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "calendar"
+ ]
+ }
+ }
+ },
+ {
+ "name": "extensions-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarView/{event-id}/extensions",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "extensions"
+ ]
+ }
+ }
+ },
+ {
+ "name": "extensions-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarView/{event-id}/extensions",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "extensions"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{extension-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarView/{event-id}/extensions/{extension-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "extensions",
+ "{extension-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{extension-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarView/{event-id}/extensions/{extension-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "extensions",
+ "{extension-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{extension-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarView/{event-id}/extensions/{extension-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "extensions",
+ "{extension-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "instances-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarView/{event-id}/instances",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "instances"
+ ]
+ }
+ }
+ },
+ {
+ "name": "instances-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarView/{event-id}/instances",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "instances"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id1}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarView/{event-id}/instances/{event-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "instances",
+ "{event-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id1}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarView/{event-id}/instances/{event-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "instances",
+ "{event-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id1}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarView/{event-id}/instances/{event-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "instances",
+ "{event-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "multiValueExtendedProperties-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarView/{event-id}/multiValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "multiValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "multiValueExtendedProperties-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarView/{event-id}/multiValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "multiValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{multiValueLegacyExtendedProperty-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarView/{event-id}/multiValueExtendedProperties/{multiValueLegacyExtendedProperty-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "multiValueExtendedProperties",
+ "{multiValueLegacyExtendedProperty-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{multiValueLegacyExtendedProperty-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarView/{event-id}/multiValueExtendedProperties/{multiValueLegacyExtendedProperty-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "multiValueExtendedProperties",
+ "{multiValueLegacyExtendedProperty-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{multiValueLegacyExtendedProperty-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarView/{event-id}/multiValueExtendedProperties/{multiValueLegacyExtendedProperty-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "multiValueExtendedProperties",
+ "{multiValueLegacyExtendedProperty-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "singleValueExtendedProperties-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarView/{event-id}/singleValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "singleValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "singleValueExtendedProperties-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarView/{event-id}/singleValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "singleValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{singleValueLegacyExtendedProperty-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarView/{event-id}/singleValueExtendedProperties/{singleValueLegacyExtendedProperty-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "singleValueExtendedProperties",
+ "{singleValueLegacyExtendedProperty-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{singleValueLegacyExtendedProperty-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarView/{event-id}/singleValueExtendedProperties/{singleValueLegacyExtendedProperty-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "singleValueExtendedProperties",
+ "{singleValueLegacyExtendedProperty-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{singleValueLegacyExtendedProperty-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/calendarView/{event-id}/singleValueExtendedProperties/{singleValueLegacyExtendedProperty-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "singleValueExtendedProperties",
+ "{singleValueLegacyExtendedProperty-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "events-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/events",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "events"
+ ]
+ }
+ }
+ },
+ {
+ "name": "events-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/events",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "events"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/events/{event-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "events",
+ "{event-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/events/{event-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "events",
+ "{event-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/events/{event-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "events",
+ "{event-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "multiValueExtendedProperties-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/multiValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "multiValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "multiValueExtendedProperties-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/multiValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "multiValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{multiValueLegacyExtendedProperty-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/multiValueExtendedProperties/{multiValueLegacyExtendedProperty-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "multiValueExtendedProperties",
+ "{multiValueLegacyExtendedProperty-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{multiValueLegacyExtendedProperty-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/multiValueExtendedProperties/{multiValueLegacyExtendedProperty-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "multiValueExtendedProperties",
+ "{multiValueLegacyExtendedProperty-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{multiValueLegacyExtendedProperty-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/multiValueExtendedProperties/{multiValueLegacyExtendedProperty-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "multiValueExtendedProperties",
+ "{multiValueLegacyExtendedProperty-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "singleValueExtendedProperties-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/singleValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "singleValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "singleValueExtendedProperties-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/singleValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "singleValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{singleValueLegacyExtendedProperty-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/singleValueExtendedProperties/{singleValueLegacyExtendedProperty-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "singleValueExtendedProperties",
+ "{singleValueLegacyExtendedProperty-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{singleValueLegacyExtendedProperty-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/singleValueExtendedProperties/{singleValueLegacyExtendedProperty-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "singleValueExtendedProperties",
+ "{singleValueLegacyExtendedProperty-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{singleValueLegacyExtendedProperty-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarGroups/{calendarGroup-id}/calendars/{calendar-id}/singleValueExtendedProperties/{singleValueLegacyExtendedProperty-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarGroups",
+ "{calendarGroup-id}",
+ "calendars",
+ "{calendar-id}",
+ "singleValueExtendedProperties",
+ "{singleValueLegacyExtendedProperty-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendars-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendars-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{calendar-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{calendar-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{calendar-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendarPermissions-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/calendarPermissions",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarPermissions"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendarPermissions-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/calendarPermissions",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarPermissions"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{calendarPermission-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/calendarPermissions/{calendarPermission-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarPermissions",
+ "{calendarPermission-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{calendarPermission-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/calendarPermissions/{calendarPermission-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarPermissions",
+ "{calendarPermission-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{calendarPermission-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/calendarPermissions/{calendarPermission-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarPermissions",
+ "{calendarPermission-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendarView-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/calendarView",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendarView-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/calendarView",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/calendarView/{event-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/calendarView/{event-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/calendarView/{event-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "attachments-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/calendarView/{event-id}/attachments",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "attachments"
+ ]
+ }
+ }
+ },
+ {
+ "name": "attachments-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/calendarView/{event-id}/attachments",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "attachments"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{attachment-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/calendarView/{event-id}/attachments/{attachment-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "attachments",
+ "{attachment-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{attachment-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/calendarView/{event-id}/attachments/{attachment-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "attachments",
+ "{attachment-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{attachment-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/calendarView/{event-id}/attachments/{attachment-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "attachments",
+ "{attachment-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendar-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/calendarView/{event-id}/calendar",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "calendar"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendar-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/calendarView/{event-id}/calendar",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "calendar"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendar-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/calendarView/{event-id}/calendar",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "calendar"
+ ]
+ }
+ }
+ },
+ {
+ "name": "extensions-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/calendarView/{event-id}/extensions",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "extensions"
+ ]
+ }
+ }
+ },
+ {
+ "name": "extensions-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/calendarView/{event-id}/extensions",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "extensions"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{extension-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/calendarView/{event-id}/extensions/{extension-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "extensions",
+ "{extension-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{extension-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/calendarView/{event-id}/extensions/{extension-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "extensions",
+ "{extension-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{extension-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/calendarView/{event-id}/extensions/{extension-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "extensions",
+ "{extension-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "instances-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/calendarView/{event-id}/instances",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "instances"
+ ]
+ }
+ }
+ },
+ {
+ "name": "instances-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/calendarView/{event-id}/instances",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "instances"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id1}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/calendarView/{event-id}/instances/{event-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "instances",
+ "{event-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id1}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/calendarView/{event-id}/instances/{event-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "instances",
+ "{event-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id1}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/calendarView/{event-id}/instances/{event-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "instances",
+ "{event-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "multiValueExtendedProperties-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/calendarView/{event-id}/multiValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "multiValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "multiValueExtendedProperties-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/calendarView/{event-id}/multiValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "multiValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "singleValueExtendedProperties-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/calendarView/{event-id}/singleValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "singleValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "singleValueExtendedProperties-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/calendarView/{event-id}/singleValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "calendarView",
+ "{event-id}",
+ "singleValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "events-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/events",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "events"
+ ]
+ }
+ }
+ },
+ {
+ "name": "events-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/events",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "events"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/events/{event-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "events",
+ "{event-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/events/{event-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "events",
+ "{event-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/events/{event-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "events",
+ "{event-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "multiValueExtendedProperties-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/multiValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "multiValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "multiValueExtendedProperties-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/multiValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "multiValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{multiValueLegacyExtendedProperty-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/multiValueExtendedProperties/{multiValueLegacyExtendedProperty-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "multiValueExtendedProperties",
+ "{multiValueLegacyExtendedProperty-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{multiValueLegacyExtendedProperty-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/multiValueExtendedProperties/{multiValueLegacyExtendedProperty-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "multiValueExtendedProperties",
+ "{multiValueLegacyExtendedProperty-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{multiValueLegacyExtendedProperty-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/multiValueExtendedProperties/{multiValueLegacyExtendedProperty-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "multiValueExtendedProperties",
+ "{multiValueLegacyExtendedProperty-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "singleValueExtendedProperties-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/singleValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "singleValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "singleValueExtendedProperties-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/singleValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "singleValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{singleValueLegacyExtendedProperty-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/singleValueExtendedProperties/{singleValueLegacyExtendedProperty-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "singleValueExtendedProperties",
+ "{singleValueLegacyExtendedProperty-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{singleValueLegacyExtendedProperty-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/singleValueExtendedProperties/{singleValueLegacyExtendedProperty-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "singleValueExtendedProperties",
+ "{singleValueLegacyExtendedProperty-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{singleValueLegacyExtendedProperty-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/singleValueExtendedProperties/{singleValueLegacyExtendedProperty-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendars",
+ "{calendar-id}",
+ "singleValueExtendedProperties",
+ "{singleValueLegacyExtendedProperty-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendarView-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendarView-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "attachments-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/attachments",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "attachments"
+ ]
+ }
+ }
+ },
+ {
+ "name": "attachments-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/attachments",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "attachments"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{attachment-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/attachments/{attachment-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "attachments",
+ "{attachment-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{attachment-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/attachments/{attachment-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "attachments",
+ "{attachment-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{attachment-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/attachments/{attachment-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "attachments",
+ "{attachment-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendar-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/calendar",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "calendar"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendar-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/calendar",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "calendar"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendar-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/calendar",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "calendar"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendarPermissions-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/calendar/calendarPermissions",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "calendar",
+ "calendarPermissions"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendarPermissions-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/calendar/calendarPermissions",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "calendar",
+ "calendarPermissions"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{calendarPermission-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/calendar/calendarPermissions/{calendarPermission-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "calendar",
+ "calendarPermissions",
+ "{calendarPermission-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{calendarPermission-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/calendar/calendarPermissions/{calendarPermission-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "calendar",
+ "calendarPermissions",
+ "{calendarPermission-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{calendarPermission-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/calendar/calendarPermissions/{calendarPermission-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "calendar",
+ "calendarPermissions",
+ "{calendarPermission-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendarView-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/calendar/calendarView",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "calendar",
+ "calendarView"
+ ]
+ }
+ }
+ },
+ {
+ "name": "calendarView-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/calendar/calendarView",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "calendar",
+ "calendarView"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id1}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/calendar/calendarView/{event-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "calendar",
+ "calendarView",
+ "{event-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id1}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/calendar/calendarView/{event-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "calendar",
+ "calendarView",
+ "{event-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id1}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/calendar/calendarView/{event-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "calendar",
+ "calendarView",
+ "{event-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "events-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/calendar/events",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "calendar",
+ "events"
+ ]
+ }
+ }
+ },
+ {
+ "name": "events-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/calendar/events",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "calendar",
+ "events"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id1}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/calendar/events/{event-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "calendar",
+ "events",
+ "{event-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id1}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/calendar/events/{event-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "calendar",
+ "events",
+ "{event-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id1}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/calendar/events/{event-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "calendar",
+ "events",
+ "{event-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "multiValueExtendedProperties-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/calendar/multiValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "calendar",
+ "multiValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "multiValueExtendedProperties-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/calendar/multiValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "calendar",
+ "multiValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "singleValueExtendedProperties-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/calendar/singleValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "calendar",
+ "singleValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "singleValueExtendedProperties-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/calendar/singleValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "calendar",
+ "singleValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "extensions-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/extensions",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "extensions"
+ ]
+ }
+ }
+ },
+ {
+ "name": "extensions-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/extensions",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "extensions"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{extension-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/extensions/{extension-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "extensions",
+ "{extension-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{extension-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/extensions/{extension-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "extensions",
+ "{extension-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{extension-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/extensions/{extension-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "extensions",
+ "{extension-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "instances-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/instances",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "instances"
+ ]
+ }
+ }
+ },
+ {
+ "name": "instances-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/instances",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "instances"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id1}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/instances/{event-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "instances",
+ "{event-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id1}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/instances/{event-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "instances",
+ "{event-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id1}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/instances/{event-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "instances",
+ "{event-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "multiValueExtendedProperties-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/multiValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "multiValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "multiValueExtendedProperties-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/multiValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "multiValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "singleValueExtendedProperties-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/singleValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "singleValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "singleValueExtendedProperties-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/calendarView/{event-id}/singleValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "calendarView",
+ "{event-id}",
+ "singleValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "chats-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/chats",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "chats"
+ ]
+ }
+ }
+ },
+ {
+ "name": "chats-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/chats",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "chats"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{chat-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/chats/{chat-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "chats",
+ "{chat-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{chat-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/chats/{chat-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "chats",
+ "{chat-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{chat-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/chats/{chat-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "chats",
+ "{chat-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "contactFolders-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contactFolders",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contactFolders"
+ ]
+ }
+ }
+ },
+ {
+ "name": "contactFolders-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contactFolders",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contactFolders"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{contactFolder-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contactFolders/{contactFolder-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contactFolders",
+ "{contactFolder-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{contactFolder-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contactFolders/{contactFolder-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contactFolders",
+ "{contactFolder-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{contactFolder-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contactFolders/{contactFolder-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contactFolders",
+ "{contactFolder-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "childFolders-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contactFolders/{contactFolder-id}/childFolders",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contactFolders",
+ "{contactFolder-id}",
+ "childFolders"
+ ]
+ }
+ }
+ },
+ {
+ "name": "childFolders-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contactFolders/{contactFolder-id}/childFolders",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contactFolders",
+ "{contactFolder-id}",
+ "childFolders"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{contactFolder-id1}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contactFolders/{contactFolder-id}/childFolders/{contactFolder-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contactFolders",
+ "{contactFolder-id}",
+ "childFolders",
+ "{contactFolder-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{contactFolder-id1}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contactFolders/{contactFolder-id}/childFolders/{contactFolder-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contactFolders",
+ "{contactFolder-id}",
+ "childFolders",
+ "{contactFolder-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{contactFolder-id1}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contactFolders/{contactFolder-id}/childFolders/{contactFolder-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contactFolders",
+ "{contactFolder-id}",
+ "childFolders",
+ "{contactFolder-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "contacts-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contactFolders/{contactFolder-id}/contacts",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contactFolders",
+ "{contactFolder-id}",
+ "contacts"
+ ]
+ }
+ }
+ },
+ {
+ "name": "contacts-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contactFolders/{contactFolder-id}/contacts",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contactFolders",
+ "{contactFolder-id}",
+ "contacts"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{contact-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contactFolders/{contactFolder-id}/contacts/{contact-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contactFolders",
+ "{contactFolder-id}",
+ "contacts",
+ "{contact-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{contact-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contactFolders/{contactFolder-id}/contacts/{contact-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contactFolders",
+ "{contactFolder-id}",
+ "contacts",
+ "{contact-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{contact-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contactFolders/{contactFolder-id}/contacts/{contact-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contactFolders",
+ "{contactFolder-id}",
+ "contacts",
+ "{contact-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "extensions-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contactFolders/{contactFolder-id}/contacts/{contact-id}/extensions",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contactFolders",
+ "{contactFolder-id}",
+ "contacts",
+ "{contact-id}",
+ "extensions"
+ ]
+ }
+ }
+ },
+ {
+ "name": "extensions-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contactFolders/{contactFolder-id}/contacts/{contact-id}/extensions",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contactFolders",
+ "{contactFolder-id}",
+ "contacts",
+ "{contact-id}",
+ "extensions"
+ ]
+ }
+ }
+ },
+ {
+ "name": "multiValueExtendedProperties-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contactFolders/{contactFolder-id}/contacts/{contact-id}/multiValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contactFolders",
+ "{contactFolder-id}",
+ "contacts",
+ "{contact-id}",
+ "multiValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "multiValueExtendedProperties-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contactFolders/{contactFolder-id}/contacts/{contact-id}/multiValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contactFolders",
+ "{contactFolder-id}",
+ "contacts",
+ "{contact-id}",
+ "multiValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "photo-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contactFolders/{contactFolder-id}/contacts/{contact-id}/photo",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contactFolders",
+ "{contactFolder-id}",
+ "contacts",
+ "{contact-id}",
+ "photo"
+ ]
+ }
+ }
+ },
+ {
+ "name": "photo-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contactFolders/{contactFolder-id}/contacts/{contact-id}/photo",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contactFolders",
+ "{contactFolder-id}",
+ "contacts",
+ "{contact-id}",
+ "photo"
+ ]
+ }
+ }
+ },
+ {
+ "name": "photo-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contactFolders/{contactFolder-id}/contacts/{contact-id}/photo",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contactFolders",
+ "{contactFolder-id}",
+ "contacts",
+ "{contact-id}",
+ "photo"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$value-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contactFolders/{contactFolder-id}/contacts/{contact-id}/photo/$value",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contactFolders",
+ "{contactFolder-id}",
+ "contacts",
+ "{contact-id}",
+ "photo",
+ "$value"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$value-PUT",
+ "request": {
+ "method": "PUT",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contactFolders/{contactFolder-id}/contacts/{contact-id}/photo/$value",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contactFolders",
+ "{contactFolder-id}",
+ "contacts",
+ "{contact-id}",
+ "photo",
+ "$value"
+ ]
+ }
+ }
+ },
+ {
+ "name": "singleValueExtendedProperties-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contactFolders/{contactFolder-id}/contacts/{contact-id}/singleValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contactFolders",
+ "{contactFolder-id}",
+ "contacts",
+ "{contact-id}",
+ "singleValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "singleValueExtendedProperties-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contactFolders/{contactFolder-id}/contacts/{contact-id}/singleValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contactFolders",
+ "{contactFolder-id}",
+ "contacts",
+ "{contact-id}",
+ "singleValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "multiValueExtendedProperties-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contactFolders/{contactFolder-id}/multiValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contactFolders",
+ "{contactFolder-id}",
+ "multiValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "multiValueExtendedProperties-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contactFolders/{contactFolder-id}/multiValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contactFolders",
+ "{contactFolder-id}",
+ "multiValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "singleValueExtendedProperties-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contactFolders/{contactFolder-id}/singleValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contactFolders",
+ "{contactFolder-id}",
+ "singleValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "singleValueExtendedProperties-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contactFolders/{contactFolder-id}/singleValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contactFolders",
+ "{contactFolder-id}",
+ "singleValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "contacts-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contacts",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contacts"
+ ]
+ }
+ }
+ },
+ {
+ "name": "contacts-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contacts",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contacts"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{contact-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contacts/{contact-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contacts",
+ "{contact-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{contact-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contacts/{contact-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contacts",
+ "{contact-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{contact-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contacts/{contact-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contacts",
+ "{contact-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "extensions-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contacts/{contact-id}/extensions",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contacts",
+ "{contact-id}",
+ "extensions"
+ ]
+ }
+ }
+ },
+ {
+ "name": "extensions-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contacts/{contact-id}/extensions",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contacts",
+ "{contact-id}",
+ "extensions"
+ ]
+ }
+ }
+ },
+ {
+ "name": "multiValueExtendedProperties-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contacts/{contact-id}/multiValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contacts",
+ "{contact-id}",
+ "multiValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "multiValueExtendedProperties-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contacts/{contact-id}/multiValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contacts",
+ "{contact-id}",
+ "multiValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "photo-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contacts/{contact-id}/photo",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contacts",
+ "{contact-id}",
+ "photo"
+ ]
+ }
+ }
+ },
+ {
+ "name": "photo-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contacts/{contact-id}/photo",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contacts",
+ "{contact-id}",
+ "photo"
+ ]
+ }
+ }
+ },
+ {
+ "name": "photo-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contacts/{contact-id}/photo",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contacts",
+ "{contact-id}",
+ "photo"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$value-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contacts/{contact-id}/photo/$value",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contacts",
+ "{contact-id}",
+ "photo",
+ "$value"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$value-PUT",
+ "request": {
+ "method": "PUT",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contacts/{contact-id}/photo/$value",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contacts",
+ "{contact-id}",
+ "photo",
+ "$value"
+ ]
+ }
+ }
+ },
+ {
+ "name": "singleValueExtendedProperties-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contacts/{contact-id}/singleValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contacts",
+ "{contact-id}",
+ "singleValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "singleValueExtendedProperties-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/contacts/{contact-id}/singleValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "contacts",
+ "{contact-id}",
+ "singleValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "createdObjects-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/createdObjects",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "createdObjects"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/createdObjects/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "createdObjects",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/createdObjects/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "createdObjects",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "deviceManagementTroubleshootingEvents-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/deviceManagementTroubleshootingEvents",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "deviceManagementTroubleshootingEvents"
+ ]
+ }
+ }
+ },
+ {
+ "name": "deviceManagementTroubleshootingEvents-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/deviceManagementTroubleshootingEvents",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "deviceManagementTroubleshootingEvents"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{deviceManagementTroubleshootingEvent-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/deviceManagementTroubleshootingEvents/{deviceManagementTroubleshootingEvent-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "deviceManagementTroubleshootingEvents",
+ "{deviceManagementTroubleshootingEvent-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{deviceManagementTroubleshootingEvent-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/deviceManagementTroubleshootingEvents/{deviceManagementTroubleshootingEvent-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "deviceManagementTroubleshootingEvents",
+ "{deviceManagementTroubleshootingEvent-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{deviceManagementTroubleshootingEvent-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/deviceManagementTroubleshootingEvents/{deviceManagementTroubleshootingEvent-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "deviceManagementTroubleshootingEvents",
+ "{deviceManagementTroubleshootingEvent-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "directReports-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/directReports",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "directReports"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/directReports/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "directReports",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/directReports/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "directReports",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "drive-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/drive",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "drive"
+ ]
+ }
+ }
+ },
+ {
+ "name": "drive-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/drive",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "drive"
+ ]
+ }
+ }
+ },
+ {
+ "name": "drive-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/drive",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "drive"
+ ]
+ }
+ }
+ },
+ {
+ "name": "drives-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/drives",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "drives"
+ ]
+ }
+ }
+ },
+ {
+ "name": "drives-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/drives",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "drives"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{drive-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/drives/{drive-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "drives",
+ "{drive-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{drive-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/drives/{drive-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "drives",
+ "{drive-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{drive-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/drives/{drive-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "drives",
+ "{drive-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "events-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/events",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "events"
+ ]
+ }
+ }
+ },
+ {
+ "name": "events-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/events",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "events"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/events/{event-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "events",
+ "{event-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/events/{event-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "events",
+ "{event-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{event-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/events/{event-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "events",
+ "{event-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "extensions-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/extensions",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "extensions"
+ ]
+ }
+ }
+ },
+ {
+ "name": "extensions-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/extensions",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "extensions"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{extension-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/extensions/{extension-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "extensions",
+ "{extension-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{extension-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/extensions/{extension-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "extensions",
+ "{extension-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{extension-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/extensions/{extension-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "extensions",
+ "{extension-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "followedSites-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/followedSites",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "followedSites"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/followedSites/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "followedSites",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/followedSites/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "followedSites",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "inferenceClassification-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/inferenceClassification",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "inferenceClassification"
+ ]
+ }
+ }
+ },
+ {
+ "name": "inferenceClassification-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/inferenceClassification",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "inferenceClassification"
+ ]
+ }
+ }
+ },
+ {
+ "name": "inferenceClassification-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/inferenceClassification",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "inferenceClassification"
+ ]
+ }
+ }
+ },
+ {
+ "name": "overrides-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/inferenceClassification/overrides",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "inferenceClassification",
+ "overrides"
+ ]
+ }
+ }
+ },
+ {
+ "name": "overrides-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/inferenceClassification/overrides",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "inferenceClassification",
+ "overrides"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{inferenceClassificationOverride-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/inferenceClassification/overrides/{inferenceClassificationOverride-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "inferenceClassification",
+ "overrides",
+ "{inferenceClassificationOverride-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{inferenceClassificationOverride-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/inferenceClassification/overrides/{inferenceClassificationOverride-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "inferenceClassification",
+ "overrides",
+ "{inferenceClassificationOverride-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{inferenceClassificationOverride-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/inferenceClassification/overrides/{inferenceClassificationOverride-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "inferenceClassification",
+ "overrides",
+ "{inferenceClassificationOverride-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "insights-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/insights",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "insights"
+ ]
+ }
+ }
+ },
+ {
+ "name": "insights-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/insights",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "insights"
+ ]
+ }
+ }
+ },
+ {
+ "name": "insights-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/insights",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "insights"
+ ]
+ }
+ }
+ },
+ {
+ "name": "shared-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/insights/shared",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "insights",
+ "shared"
+ ]
+ }
+ }
+ },
+ {
+ "name": "shared-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/insights/shared",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "insights",
+ "shared"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sharedInsight-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/insights/shared/{sharedInsight-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "insights",
+ "shared",
+ "{sharedInsight-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sharedInsight-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/insights/shared/{sharedInsight-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "insights",
+ "shared",
+ "{sharedInsight-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sharedInsight-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/insights/shared/{sharedInsight-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "insights",
+ "shared",
+ "{sharedInsight-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "lastSharedMethod-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/insights/shared/{sharedInsight-id}/lastSharedMethod",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "insights",
+ "shared",
+ "{sharedInsight-id}",
+ "lastSharedMethod"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/insights/shared/{sharedInsight-id}/lastSharedMethod/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "insights",
+ "shared",
+ "{sharedInsight-id}",
+ "lastSharedMethod",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-PUT",
+ "request": {
+ "method": "PUT",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/insights/shared/{sharedInsight-id}/lastSharedMethod/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "insights",
+ "shared",
+ "{sharedInsight-id}",
+ "lastSharedMethod",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/insights/shared/{sharedInsight-id}/lastSharedMethod/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "insights",
+ "shared",
+ "{sharedInsight-id}",
+ "lastSharedMethod",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "resource-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/insights/shared/{sharedInsight-id}/resource",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "insights",
+ "shared",
+ "{sharedInsight-id}",
+ "resource"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/insights/shared/{sharedInsight-id}/resource/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "insights",
+ "shared",
+ "{sharedInsight-id}",
+ "resource",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-PUT",
+ "request": {
+ "method": "PUT",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/insights/shared/{sharedInsight-id}/resource/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "insights",
+ "shared",
+ "{sharedInsight-id}",
+ "resource",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/insights/shared/{sharedInsight-id}/resource/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "insights",
+ "shared",
+ "{sharedInsight-id}",
+ "resource",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "trending-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/insights/trending",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "insights",
+ "trending"
+ ]
+ }
+ }
+ },
+ {
+ "name": "trending-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/insights/trending",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "insights",
+ "trending"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{trending-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/insights/trending/{trending-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "insights",
+ "trending",
+ "{trending-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{trending-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/insights/trending/{trending-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "insights",
+ "trending",
+ "{trending-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{trending-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/insights/trending/{trending-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "insights",
+ "trending",
+ "{trending-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "resource-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/insights/trending/{trending-id}/resource",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "insights",
+ "trending",
+ "{trending-id}",
+ "resource"
+ ]
+ }
+ }
+ },
+ {
+ "name": "used-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/insights/used",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "insights",
+ "used"
+ ]
+ }
+ }
+ },
+ {
+ "name": "used-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/insights/used",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "insights",
+ "used"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{usedInsight-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/insights/used/{usedInsight-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "insights",
+ "used",
+ "{usedInsight-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{usedInsight-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/insights/used/{usedInsight-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "insights",
+ "used",
+ "{usedInsight-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{usedInsight-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/insights/used/{usedInsight-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "insights",
+ "used",
+ "{usedInsight-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "resource-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/insights/used/{usedInsight-id}/resource",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "insights",
+ "used",
+ "{usedInsight-id}",
+ "resource"
+ ]
+ }
+ }
+ },
+ {
+ "name": "joinedTeams-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/joinedTeams",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "joinedTeams"
+ ]
+ }
+ }
+ },
+ {
+ "name": "joinedTeams-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/joinedTeams",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "joinedTeams"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{team-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/joinedTeams/{team-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "joinedTeams",
+ "{team-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{team-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/joinedTeams/{team-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "joinedTeams",
+ "{team-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{team-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/joinedTeams/{team-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "joinedTeams",
+ "{team-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "licenseDetails-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/licenseDetails",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "licenseDetails"
+ ]
+ }
+ }
+ },
+ {
+ "name": "licenseDetails-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/licenseDetails",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "licenseDetails"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{licenseDetails-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/licenseDetails/{licenseDetails-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "licenseDetails",
+ "{licenseDetails-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{licenseDetails-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/licenseDetails/{licenseDetails-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "licenseDetails",
+ "{licenseDetails-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{licenseDetails-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/licenseDetails/{licenseDetails-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "licenseDetails",
+ "{licenseDetails-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "mailFolders-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "mailFolders"
+ ]
+ }
+ }
+ },
+ {
+ "name": "mailFolders-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "mailFolders"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{mailFolder-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders/{mailFolder-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "mailFolders",
+ "{mailFolder-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{mailFolder-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders/{mailFolder-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "mailFolders",
+ "{mailFolder-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{mailFolder-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders/{mailFolder-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "mailFolders",
+ "{mailFolder-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "childFolders-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders/{mailFolder-id}/childFolders",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "mailFolders",
+ "{mailFolder-id}",
+ "childFolders"
+ ]
+ }
+ }
+ },
+ {
+ "name": "childFolders-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders/{mailFolder-id}/childFolders",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "mailFolders",
+ "{mailFolder-id}",
+ "childFolders"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{mailFolder-id1}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders/{mailFolder-id}/childFolders/{mailFolder-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "mailFolders",
+ "{mailFolder-id}",
+ "childFolders",
+ "{mailFolder-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{mailFolder-id1}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders/{mailFolder-id}/childFolders/{mailFolder-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "mailFolders",
+ "{mailFolder-id}",
+ "childFolders",
+ "{mailFolder-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{mailFolder-id1}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders/{mailFolder-id}/childFolders/{mailFolder-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "mailFolders",
+ "{mailFolder-id}",
+ "childFolders",
+ "{mailFolder-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "messageRules-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders/{mailFolder-id}/messageRules",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "mailFolders",
+ "{mailFolder-id}",
+ "messageRules"
+ ]
+ }
+ }
+ },
+ {
+ "name": "messageRules-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders/{mailFolder-id}/messageRules",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "mailFolders",
+ "{mailFolder-id}",
+ "messageRules"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{messageRule-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders/{mailFolder-id}/messageRules/{messageRule-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "mailFolders",
+ "{mailFolder-id}",
+ "messageRules",
+ "{messageRule-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{messageRule-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders/{mailFolder-id}/messageRules/{messageRule-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "mailFolders",
+ "{mailFolder-id}",
+ "messageRules",
+ "{messageRule-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{messageRule-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders/{mailFolder-id}/messageRules/{messageRule-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "mailFolders",
+ "{mailFolder-id}",
+ "messageRules",
+ "{messageRule-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "messages-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders/{mailFolder-id}/messages",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "mailFolders",
+ "{mailFolder-id}",
+ "messages"
+ ]
+ }
+ }
+ },
+ {
+ "name": "messages-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders/{mailFolder-id}/messages",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "mailFolders",
+ "{mailFolder-id}",
+ "messages"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{message-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders/{mailFolder-id}/messages/{message-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "mailFolders",
+ "{mailFolder-id}",
+ "messages",
+ "{message-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{message-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders/{mailFolder-id}/messages/{message-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "mailFolders",
+ "{mailFolder-id}",
+ "messages",
+ "{message-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{message-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders/{mailFolder-id}/messages/{message-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "mailFolders",
+ "{mailFolder-id}",
+ "messages",
+ "{message-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$value-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders/{mailFolder-id}/messages/{message-id}/$value",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "mailFolders",
+ "{mailFolder-id}",
+ "messages",
+ "{message-id}",
+ "$value"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$value-PUT",
+ "request": {
+ "method": "PUT",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders/{mailFolder-id}/messages/{message-id}/$value",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "mailFolders",
+ "{mailFolder-id}",
+ "messages",
+ "{message-id}",
+ "$value"
+ ]
+ }
+ }
+ },
+ {
+ "name": "attachments-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders/{mailFolder-id}/messages/{message-id}/attachments",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "mailFolders",
+ "{mailFolder-id}",
+ "messages",
+ "{message-id}",
+ "attachments"
+ ]
+ }
+ }
+ },
+ {
+ "name": "attachments-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders/{mailFolder-id}/messages/{message-id}/attachments",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "mailFolders",
+ "{mailFolder-id}",
+ "messages",
+ "{message-id}",
+ "attachments"
+ ]
+ }
+ }
+ },
+ {
+ "name": "extensions-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders/{mailFolder-id}/messages/{message-id}/extensions",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "mailFolders",
+ "{mailFolder-id}",
+ "messages",
+ "{message-id}",
+ "extensions"
+ ]
+ }
+ }
+ },
+ {
+ "name": "extensions-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders/{mailFolder-id}/messages/{message-id}/extensions",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "mailFolders",
+ "{mailFolder-id}",
+ "messages",
+ "{message-id}",
+ "extensions"
+ ]
+ }
+ }
+ },
+ {
+ "name": "multiValueExtendedProperties-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders/{mailFolder-id}/messages/{message-id}/multiValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "mailFolders",
+ "{mailFolder-id}",
+ "messages",
+ "{message-id}",
+ "multiValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "multiValueExtendedProperties-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders/{mailFolder-id}/messages/{message-id}/multiValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "mailFolders",
+ "{mailFolder-id}",
+ "messages",
+ "{message-id}",
+ "multiValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "singleValueExtendedProperties-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders/{mailFolder-id}/messages/{message-id}/singleValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "mailFolders",
+ "{mailFolder-id}",
+ "messages",
+ "{message-id}",
+ "singleValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "singleValueExtendedProperties-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders/{mailFolder-id}/messages/{message-id}/singleValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "mailFolders",
+ "{mailFolder-id}",
+ "messages",
+ "{message-id}",
+ "singleValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "multiValueExtendedProperties-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders/{mailFolder-id}/multiValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "mailFolders",
+ "{mailFolder-id}",
+ "multiValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "multiValueExtendedProperties-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders/{mailFolder-id}/multiValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "mailFolders",
+ "{mailFolder-id}",
+ "multiValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "singleValueExtendedProperties-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders/{mailFolder-id}/singleValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "mailFolders",
+ "{mailFolder-id}",
+ "singleValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "singleValueExtendedProperties-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders/{mailFolder-id}/singleValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "mailFolders",
+ "{mailFolder-id}",
+ "singleValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "managedAppRegistrations-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/managedAppRegistrations",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "managedAppRegistrations"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/managedAppRegistrations/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "managedAppRegistrations",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/managedAppRegistrations/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "managedAppRegistrations",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "managedDevices-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/managedDevices",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "managedDevices"
+ ]
+ }
+ }
+ },
+ {
+ "name": "managedDevices-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/managedDevices",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "managedDevices"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{managedDevice-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/managedDevices/{managedDevice-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "managedDevices",
+ "{managedDevice-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{managedDevice-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/managedDevices/{managedDevice-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "managedDevices",
+ "{managedDevice-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{managedDevice-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/managedDevices/{managedDevice-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "managedDevices",
+ "{managedDevice-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "deviceCategory-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/managedDevices/{managedDevice-id}/deviceCategory",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "managedDevices",
+ "{managedDevice-id}",
+ "deviceCategory"
+ ]
+ }
+ }
+ },
+ {
+ "name": "deviceCategory-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/managedDevices/{managedDevice-id}/deviceCategory",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "managedDevices",
+ "{managedDevice-id}",
+ "deviceCategory"
+ ]
+ }
+ }
+ },
+ {
+ "name": "deviceCategory-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/managedDevices/{managedDevice-id}/deviceCategory",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "managedDevices",
+ "{managedDevice-id}",
+ "deviceCategory"
+ ]
+ }
+ }
+ },
+ {
+ "name": "deviceCompliancePolicyStates-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/managedDevices/{managedDevice-id}/deviceCompliancePolicyStates",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "managedDevices",
+ "{managedDevice-id}",
+ "deviceCompliancePolicyStates"
+ ]
+ }
+ }
+ },
+ {
+ "name": "deviceCompliancePolicyStates-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/managedDevices/{managedDevice-id}/deviceCompliancePolicyStates",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "managedDevices",
+ "{managedDevice-id}",
+ "deviceCompliancePolicyStates"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{deviceCompliancePolicyState-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/managedDevices/{managedDevice-id}/deviceCompliancePolicyStates/{deviceCompliancePolicyState-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "managedDevices",
+ "{managedDevice-id}",
+ "deviceCompliancePolicyStates",
+ "{deviceCompliancePolicyState-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{deviceCompliancePolicyState-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/managedDevices/{managedDevice-id}/deviceCompliancePolicyStates/{deviceCompliancePolicyState-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "managedDevices",
+ "{managedDevice-id}",
+ "deviceCompliancePolicyStates",
+ "{deviceCompliancePolicyState-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{deviceCompliancePolicyState-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/managedDevices/{managedDevice-id}/deviceCompliancePolicyStates/{deviceCompliancePolicyState-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "managedDevices",
+ "{managedDevice-id}",
+ "deviceCompliancePolicyStates",
+ "{deviceCompliancePolicyState-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "deviceConfigurationStates-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/managedDevices/{managedDevice-id}/deviceConfigurationStates",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "managedDevices",
+ "{managedDevice-id}",
+ "deviceConfigurationStates"
+ ]
+ }
+ }
+ },
+ {
+ "name": "deviceConfigurationStates-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/managedDevices/{managedDevice-id}/deviceConfigurationStates",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "managedDevices",
+ "{managedDevice-id}",
+ "deviceConfigurationStates"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{deviceConfigurationState-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/managedDevices/{managedDevice-id}/deviceConfigurationStates/{deviceConfigurationState-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "managedDevices",
+ "{managedDevice-id}",
+ "deviceConfigurationStates",
+ "{deviceConfigurationState-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{deviceConfigurationState-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/managedDevices/{managedDevice-id}/deviceConfigurationStates/{deviceConfigurationState-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "managedDevices",
+ "{managedDevice-id}",
+ "deviceConfigurationStates",
+ "{deviceConfigurationState-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{deviceConfigurationState-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/managedDevices/{managedDevice-id}/deviceConfigurationStates/{deviceConfigurationState-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "managedDevices",
+ "{managedDevice-id}",
+ "deviceConfigurationStates",
+ "{deviceConfigurationState-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "manager-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/manager",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "manager"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/manager/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "manager",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-PUT",
+ "request": {
+ "method": "PUT",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/manager/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "manager",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/manager/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "manager",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "memberOf-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/memberOf",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "memberOf"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/memberOf/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "memberOf",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/memberOf/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "memberOf",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "messages-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/messages",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "messages"
+ ]
+ }
+ }
+ },
+ {
+ "name": "messages-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/messages",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "messages"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{message-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/messages/{message-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "messages",
+ "{message-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{message-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/messages/{message-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "messages",
+ "{message-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{message-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/messages/{message-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "messages",
+ "{message-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$value-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/messages/{message-id}/$value",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "messages",
+ "{message-id}",
+ "$value"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$value-PUT",
+ "request": {
+ "method": "PUT",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/messages/{message-id}/$value",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "messages",
+ "{message-id}",
+ "$value"
+ ]
+ }
+ }
+ },
+ {
+ "name": "attachments-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/messages/{message-id}/attachments",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "messages",
+ "{message-id}",
+ "attachments"
+ ]
+ }
+ }
+ },
+ {
+ "name": "attachments-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/messages/{message-id}/attachments",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "messages",
+ "{message-id}",
+ "attachments"
+ ]
+ }
+ }
+ },
+ {
+ "name": "extensions-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/messages/{message-id}/extensions",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "messages",
+ "{message-id}",
+ "extensions"
+ ]
+ }
+ }
+ },
+ {
+ "name": "extensions-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/messages/{message-id}/extensions",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "messages",
+ "{message-id}",
+ "extensions"
+ ]
+ }
+ }
+ },
+ {
+ "name": "multiValueExtendedProperties-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/messages/{message-id}/multiValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "messages",
+ "{message-id}",
+ "multiValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "multiValueExtendedProperties-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/messages/{message-id}/multiValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "messages",
+ "{message-id}",
+ "multiValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "singleValueExtendedProperties-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/messages/{message-id}/singleValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "messages",
+ "{message-id}",
+ "singleValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "singleValueExtendedProperties-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/messages/{message-id}/singleValueExtendedProperties",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "messages",
+ "{message-id}",
+ "singleValueExtendedProperties"
+ ]
+ }
+ }
+ },
+ {
+ "name": "oauth2PermissionGrants-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/oauth2PermissionGrants",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "oauth2PermissionGrants"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/oauth2PermissionGrants/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "oauth2PermissionGrants",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/oauth2PermissionGrants/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "oauth2PermissionGrants",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "onenote-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote"
+ ]
+ }
+ }
+ },
+ {
+ "name": "onenote-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote"
+ ]
+ }
+ }
+ },
+ {
+ "name": "onenote-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote"
+ ]
+ }
+ }
+ },
+ {
+ "name": "notebooks-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks"
+ ]
+ }
+ }
+ },
+ {
+ "name": "notebooks-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{notebook-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{notebook-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{notebook-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sectionGroups-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sectionGroups-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sectionGroups-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/sectionGroups",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sectionGroups"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sectionGroups-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/sectionGroups",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sectionGroups"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id1}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/sectionGroups/{sectionGroup-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sectionGroups",
+ "{sectionGroup-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id1}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/sectionGroups/{sectionGroup-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sectionGroups",
+ "{sectionGroup-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id1}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/sectionGroups/{sectionGroup-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sectionGroups",
+ "{sectionGroup-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sections-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/sections",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sections-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/sections",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteSection-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteSection-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteSection-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "pages-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/pages",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages"
+ ]
+ }
+ }
+ },
+ {
+ "name": "pages-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/pages",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenotePage-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/pages/{onenotePage-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenotePage-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/pages/{onenotePage-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenotePage-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/pages/{onenotePage-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "content-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/pages/{onenotePage-id}/content",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "content"
+ ]
+ }
+ }
+ },
+ {
+ "name": "content-PUT",
+ "request": {
+ "method": "PUT",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/pages/{onenotePage-id}/content",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "content"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSection-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentSection",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSection-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentSection",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSection-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentSection",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sections-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sections-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteSection-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteSection-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteSection-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "pages-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/pages",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages"
+ ]
+ }
+ }
+ },
+ {
+ "name": "pages-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/pages",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenotePage-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/pages/{onenotePage-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenotePage-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/pages/{onenotePage-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenotePage-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/pages/{onenotePage-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "content-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/pages/{onenotePage-id}/content",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "content"
+ ]
+ }
+ }
+ },
+ {
+ "name": "content-PUT",
+ "request": {
+ "method": "PUT",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/pages/{onenotePage-id}/content",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "content"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSection-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentSection",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSection-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentSection",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSection-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentSection",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/parentSectionGroup/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/parentSectionGroup/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/parentSectionGroup/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/parentSectionGroup/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/parentSectionGroup/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/parentSectionGroup/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sectionGroups-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/parentSectionGroup/sectionGroups",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "sectionGroups"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sectionGroups-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/parentSectionGroup/sectionGroups",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "sectionGroups"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/parentSectionGroup/sectionGroups/{sectionGroup-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "sectionGroups",
+ "{sectionGroup-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/parentSectionGroup/sectionGroups/{sectionGroup-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "sectionGroups",
+ "{sectionGroup-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/parentSectionGroup/sectionGroups/{sectionGroup-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "sectionGroups",
+ "{sectionGroup-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sections-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/parentSectionGroup/sections",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "sections"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sections-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/parentSectionGroup/sections",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "sections"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteSection-id1}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/parentSectionGroup/sections/{onenoteSection-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "sections",
+ "{onenoteSection-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteSection-id1}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/parentSectionGroup/sections/{onenoteSection-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "sections",
+ "{onenoteSection-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteSection-id1}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/notebooks/{notebook-id}/sections/{onenoteSection-id}/parentSectionGroup/sections/{onenoteSection-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "notebooks",
+ "{notebook-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "sections",
+ "{onenoteSection-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "operations-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/operations",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "operations"
+ ]
+ }
+ }
+ },
+ {
+ "name": "operations-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/operations",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "operations"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteOperation-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/operations/{onenoteOperation-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "operations",
+ "{onenoteOperation-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteOperation-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/operations/{onenoteOperation-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "operations",
+ "{onenoteOperation-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteOperation-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/operations/{onenoteOperation-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "operations",
+ "{onenoteOperation-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "pages-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages"
+ ]
+ }
+ }
+ },
+ {
+ "name": "pages-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenotePage-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenotePage-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenotePage-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "content-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/content",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "content"
+ ]
+ }
+ }
+ },
+ {
+ "name": "content-PUT",
+ "request": {
+ "method": "PUT",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/content",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "content"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sectionGroups-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sectionGroups",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sectionGroups-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sectionGroups",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sectionGroups-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/sectionGroups",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sectionGroups"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sectionGroups-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/sectionGroups",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sectionGroups"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id1}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/sectionGroups/{sectionGroup-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sectionGroups",
+ "{sectionGroup-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id1}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/sectionGroups/{sectionGroup-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sectionGroups",
+ "{sectionGroup-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id1}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/sectionGroups/{sectionGroup-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sectionGroups",
+ "{sectionGroup-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sections-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/sections",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sections-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/sections",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteSection-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteSection-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteSection-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "pages-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/pages",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages"
+ ]
+ }
+ }
+ },
+ {
+ "name": "pages-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/pages",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenotePage-id1}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/pages/{onenotePage-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenotePage-id1}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/pages/{onenotePage-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenotePage-id1}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/pages/{onenotePage-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "content-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/pages/{onenotePage-id1}/content",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id1}",
+ "content"
+ ]
+ }
+ }
+ },
+ {
+ "name": "content-PUT",
+ "request": {
+ "method": "PUT",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/pages/{onenotePage-id1}/content",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id1}",
+ "content"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sections-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sections",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sections-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sections",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteSection-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteSection-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteSection-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "pages-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id}/pages",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "pages"
+ ]
+ }
+ }
+ },
+ {
+ "name": "pages-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id}/pages",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "pages"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenotePage-id1}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id}/pages/{onenotePage-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenotePage-id1}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id}/pages/{onenotePage-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenotePage-id1}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id}/pages/{onenotePage-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "content-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id}/pages/{onenotePage-id1}/content",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id1}",
+ "content"
+ ]
+ }
+ }
+ },
+ {
+ "name": "content-PUT",
+ "request": {
+ "method": "PUT",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id}/pages/{onenotePage-id1}/content",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id1}",
+ "content"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id}/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id}/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id}/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id}/parentSectionGroup/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id}/parentSectionGroup/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id}/parentSectionGroup/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id}/parentSectionGroup/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id}/parentSectionGroup/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id}/parentSectionGroup/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sectionGroups-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id}/parentSectionGroup/sectionGroups",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "sectionGroups"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sectionGroups-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id}/parentSectionGroup/sectionGroups",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "sectionGroups"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id}/parentSectionGroup/sectionGroups/{sectionGroup-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "sectionGroups",
+ "{sectionGroup-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id}/parentSectionGroup/sectionGroups/{sectionGroup-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "sectionGroups",
+ "{sectionGroup-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id}/parentSectionGroup/sectionGroups/{sectionGroup-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "sectionGroups",
+ "{sectionGroup-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sections-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id}/parentSectionGroup/sections",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "sections"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sections-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id}/parentSectionGroup/sections",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "sections"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteSection-id1}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id}/parentSectionGroup/sections/{onenoteSection-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "sections",
+ "{onenoteSection-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteSection-id1}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id}/parentSectionGroup/sections/{onenoteSection-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "sections",
+ "{onenoteSection-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteSection-id1}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id}/parentSectionGroup/sections/{onenoteSection-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "sections",
+ "{onenoteSection-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSection-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSection-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSection-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection"
+ ]
+ }
+ }
+ },
+ {
+ "name": "pages-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/pages",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "pages"
+ ]
+ }
+ }
+ },
+ {
+ "name": "pages-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/pages",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "pages"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenotePage-id1}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/pages/{onenotePage-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "pages",
+ "{onenotePage-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenotePage-id1}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/pages/{onenotePage-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "pages",
+ "{onenotePage-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenotePage-id1}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/pages/{onenotePage-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "pages",
+ "{onenotePage-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "content-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/pages/{onenotePage-id1}/content",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "pages",
+ "{onenotePage-id1}",
+ "content"
+ ]
+ }
+ }
+ },
+ {
+ "name": "content-PUT",
+ "request": {
+ "method": "PUT",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/pages/{onenotePage-id1}/content",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "pages",
+ "{onenotePage-id1}",
+ "content"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sectionGroups-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentNotebook/sectionGroups",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentNotebook",
+ "sectionGroups"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sectionGroups-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentNotebook/sectionGroups",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentNotebook",
+ "sectionGroups"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentNotebook/sectionGroups/{sectionGroup-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentNotebook/sectionGroups/{sectionGroup-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentNotebook/sectionGroups/{sectionGroup-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentNotebook/sectionGroups/{sectionGroup-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentNotebook/sectionGroups/{sectionGroup-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentNotebook/sectionGroups/{sectionGroup-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentNotebook/sectionGroups/{sectionGroup-id}/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentNotebook/sectionGroups/{sectionGroup-id}/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentNotebook/sectionGroups/{sectionGroup-id}/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sectionGroups-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentNotebook/sectionGroups/{sectionGroup-id}/sectionGroups",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sectionGroups"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sectionGroups-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentNotebook/sectionGroups/{sectionGroup-id}/sectionGroups",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sectionGroups"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id1}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentNotebook/sectionGroups/{sectionGroup-id}/sectionGroups/{sectionGroup-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sectionGroups",
+ "{sectionGroup-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id1}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentNotebook/sectionGroups/{sectionGroup-id}/sectionGroups/{sectionGroup-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sectionGroups",
+ "{sectionGroup-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id1}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentNotebook/sectionGroups/{sectionGroup-id}/sectionGroups/{sectionGroup-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sectionGroups",
+ "{sectionGroup-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sections-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentNotebook/sectionGroups/{sectionGroup-id}/sections",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sections-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentNotebook/sectionGroups/{sectionGroup-id}/sections",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteSection-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentNotebook/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteSection-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentNotebook/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteSection-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentNotebook/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sections-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentNotebook/sections",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentNotebook",
+ "sections"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sections-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentNotebook/sections",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentNotebook",
+ "sections"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentSectionGroup/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentSectionGroup",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentSectionGroup/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentSectionGroup",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentSectionGroup/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentSectionGroup",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sectionGroups-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentSectionGroup/parentNotebook/sectionGroups",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentSectionGroup",
+ "parentNotebook",
+ "sectionGroups"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sectionGroups-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentSectionGroup/parentNotebook/sectionGroups",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentSectionGroup",
+ "parentNotebook",
+ "sectionGroups"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sections-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentSectionGroup/parentNotebook/sections",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentSectionGroup",
+ "parentNotebook",
+ "sections"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sections-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentSectionGroup/parentNotebook/sections",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentSectionGroup",
+ "parentNotebook",
+ "sections"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentSectionGroup/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentSectionGroup",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentSectionGroup/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentSectionGroup",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentSectionGroup/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentSectionGroup",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sectionGroups-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentSectionGroup/sectionGroups",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentSectionGroup",
+ "sectionGroups"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sectionGroups-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentSectionGroup/sectionGroups",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentSectionGroup",
+ "sectionGroups"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sections-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentSectionGroup/sections",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentSectionGroup",
+ "sections"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sections-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/pages/{onenotePage-id}/parentSection/parentSectionGroup/sections",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection",
+ "parentSectionGroup",
+ "sections"
+ ]
+ }
+ }
+ },
+ {
+ "name": "resources-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/resources",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "resources"
+ ]
+ }
+ }
+ },
+ {
+ "name": "resources-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/resources",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "resources"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteResource-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/resources/{onenoteResource-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "resources",
+ "{onenoteResource-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteResource-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/resources/{onenoteResource-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "resources",
+ "{onenoteResource-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteResource-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/resources/{onenoteResource-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "resources",
+ "{onenoteResource-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "content-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/resources/{onenoteResource-id}/content",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "resources",
+ "{onenoteResource-id}",
+ "content"
+ ]
+ }
+ }
+ },
+ {
+ "name": "content-PUT",
+ "request": {
+ "method": "PUT",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/resources/{onenoteResource-id}/content",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "resources",
+ "{onenoteResource-id}",
+ "content"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sectionGroups-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sectionGroups-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id1}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/parentNotebook/sectionGroups/{sectionGroup-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id1}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/parentNotebook/sectionGroups/{sectionGroup-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id1}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/parentNotebook/sectionGroups/{sectionGroup-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenotePage-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/parentNotebook/sections/{onenoteSection-id}/pages/{onenotePage-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenotePage-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/parentNotebook/sections/{onenoteSection-id}/pages/{onenotePage-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenotePage-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/parentNotebook/sections/{onenoteSection-id}/pages/{onenotePage-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "content-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/parentNotebook/sections/{onenoteSection-id}/pages/{onenotePage-id}/content",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "content"
+ ]
+ }
+ }
+ },
+ {
+ "name": "content-PUT",
+ "request": {
+ "method": "PUT",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/parentNotebook/sections/{onenoteSection-id}/pages/{onenotePage-id}/content",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "content"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/parentNotebook/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/parentNotebook/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/parentNotebook/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSection-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/parentNotebook/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentSection",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSection-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/parentNotebook/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentSection",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSection-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/parentNotebook/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentSection",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sectionGroups-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/sectionGroups",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sectionGroups"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sectionGroups-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/sectionGroups",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sectionGroups"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id1}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/sectionGroups/{sectionGroup-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sectionGroups",
+ "{sectionGroup-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id1}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/sectionGroups/{sectionGroup-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sectionGroups",
+ "{sectionGroup-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id1}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/sectionGroups/{sectionGroup-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sectionGroups",
+ "{sectionGroup-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sections-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/sections",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sections-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/sections",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sectionGroups-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentNotebook/sectionGroups",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sectionGroups-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentNotebook/sectionGroups",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id1}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id1}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{sectionGroup-id1}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sections-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentNotebook/sections",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sections-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentNotebook/sections",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteSection-id1}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteSection-id1}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteSection-id1}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sectionGroups/{sectionGroup-id}/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentNotebook/sections/{onenoteSection-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sections-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sections-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteSection-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteSection-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteSection-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "pages-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/pages",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "pages"
+ ]
+ }
+ }
+ },
+ {
+ "name": "pages-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/pages",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "pages"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenotePage-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/pages/{onenotePage-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenotePage-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/pages/{onenotePage-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenotePage-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/pages/{onenotePage-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "content-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/pages/{onenotePage-id}/content",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "content"
+ ]
+ }
+ }
+ },
+ {
+ "name": "content-PUT",
+ "request": {
+ "method": "PUT",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/pages/{onenotePage-id}/content",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "content"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sectionGroups-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/sectionGroups",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sectionGroups"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sectionGroups-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/sectionGroups",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sectionGroups"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sections-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/sections",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sections-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentNotebook/sectionGroups/{sectionGroup-id}/sections",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentNotebook",
+ "sectionGroups",
+ "{sectionGroup-id}",
+ "sections"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSection-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentSection",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSection-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentSection",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSection-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/pages/{onenotePage-id}/parentSection",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "pages",
+ "{onenotePage-id}",
+ "parentSection"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteSection-id1}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/parentNotebook/sections/{onenoteSection-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteSection-id1}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/parentNotebook/sections/{onenoteSection-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteSection-id1}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/parentNotebook/sections/{onenoteSection-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/parentSectionGroup/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/parentSectionGroup/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentNotebook-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/parentSectionGroup/parentNotebook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "parentNotebook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteSection-id1}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/parentSectionGroup/parentNotebook/sections/{onenoteSection-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteSection-id1}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/parentSectionGroup/parentNotebook/sections/{onenoteSection-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onenoteSection-id1}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/parentSectionGroup/parentNotebook/sections/{onenoteSection-id1}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "parentNotebook",
+ "sections",
+ "{onenoteSection-id1}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/parentSectionGroup/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/parentSectionGroup/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "parentSectionGroup-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/parentSectionGroup/parentSectionGroup",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "parentSectionGroup"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sectionGroups-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/parentSectionGroup/sectionGroups",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "sectionGroups"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sectionGroups-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/parentSectionGroup/sectionGroups",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "sectionGroups"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sections-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/parentSectionGroup/sections",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "sections"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sections-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onenote/sections/{onenoteSection-id}/parentSectionGroup/sections",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onenote",
+ "sections",
+ "{onenoteSection-id}",
+ "parentSectionGroup",
+ "sections"
+ ]
+ }
+ }
+ },
+ {
+ "name": "onlineMeetings-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onlineMeetings",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onlineMeetings"
+ ]
+ }
+ }
+ },
+ {
+ "name": "onlineMeetings-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onlineMeetings",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onlineMeetings"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onlineMeeting-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onlineMeetings/{onlineMeeting-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onlineMeetings",
+ "{onlineMeeting-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onlineMeeting-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onlineMeetings/{onlineMeeting-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onlineMeetings",
+ "{onlineMeeting-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{onlineMeeting-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onlineMeetings/{onlineMeeting-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onlineMeetings",
+ "{onlineMeeting-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "attendeeReport-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onlineMeetings/{onlineMeeting-id}/attendeeReport",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onlineMeetings",
+ "{onlineMeeting-id}",
+ "attendeeReport"
+ ]
+ }
+ }
+ },
+ {
+ "name": "attendeeReport-PUT",
+ "request": {
+ "method": "PUT",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/onlineMeetings/{onlineMeeting-id}/attendeeReport",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "onlineMeetings",
+ "{onlineMeeting-id}",
+ "attendeeReport"
+ ]
+ }
+ }
+ },
+ {
+ "name": "outlook-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/outlook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "outlook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "outlook-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/outlook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "outlook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "outlook-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/outlook",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "outlook"
+ ]
+ }
+ }
+ },
+ {
+ "name": "masterCategories-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/outlook/masterCategories",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "outlook",
+ "masterCategories"
+ ]
+ }
+ }
+ },
+ {
+ "name": "masterCategories-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/outlook/masterCategories",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "outlook",
+ "masterCategories"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{outlookCategory-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/outlook/masterCategories/{outlookCategory-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "outlook",
+ "masterCategories",
+ "{outlookCategory-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{outlookCategory-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/outlook/masterCategories/{outlookCategory-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "outlook",
+ "masterCategories",
+ "{outlookCategory-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{outlookCategory-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/outlook/masterCategories/{outlookCategory-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "outlook",
+ "masterCategories",
+ "{outlookCategory-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "ownedDevices-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/ownedDevices",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "ownedDevices"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/ownedDevices/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "ownedDevices",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/ownedDevices/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "ownedDevices",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "ownedObjects-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/ownedObjects",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "ownedObjects"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/ownedObjects/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "ownedObjects",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/ownedObjects/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "ownedObjects",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "people-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/people",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "people"
+ ]
+ }
+ }
+ },
+ {
+ "name": "people-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/people",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "people"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{person-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/people/{person-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "people",
+ "{person-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{person-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/people/{person-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "people",
+ "{person-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{person-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/people/{person-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "people",
+ "{person-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "photo-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/photo",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "photo"
+ ]
+ }
+ }
+ },
+ {
+ "name": "photo-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/photo",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "photo"
+ ]
+ }
+ }
+ },
+ {
+ "name": "photo-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/photo",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "photo"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$value-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/photo/$value",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "photo",
+ "$value"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$value-PUT",
+ "request": {
+ "method": "PUT",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/photo/$value",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "photo",
+ "$value"
+ ]
+ }
+ }
+ },
+ {
+ "name": "photos-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/photos",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "photos"
+ ]
+ }
+ }
+ },
+ {
+ "name": "photos-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/photos",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "photos"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{profilePhoto-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/photos/{profilePhoto-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "photos",
+ "{profilePhoto-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{profilePhoto-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/photos/{profilePhoto-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "photos",
+ "{profilePhoto-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{profilePhoto-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/photos/{profilePhoto-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "photos",
+ "{profilePhoto-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$value-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/photos/{profilePhoto-id}/$value",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "photos",
+ "{profilePhoto-id}",
+ "$value"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$value-PUT",
+ "request": {
+ "method": "PUT",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/photos/{profilePhoto-id}/$value",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "photos",
+ "{profilePhoto-id}",
+ "$value"
+ ]
+ }
+ }
+ },
+ {
+ "name": "planner-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner"
+ ]
+ }
+ }
+ },
+ {
+ "name": "planner-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner"
+ ]
+ }
+ }
+ },
+ {
+ "name": "planner-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner"
+ ]
+ }
+ }
+ },
+ {
+ "name": "plans-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans"
+ ]
+ }
+ }
+ },
+ {
+ "name": "plans-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{plannerPlan-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{plannerPlan-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{plannerPlan-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "buckets-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/buckets",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "buckets"
+ ]
+ }
+ }
+ },
+ {
+ "name": "buckets-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/buckets",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "buckets"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{plannerBucket-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/buckets/{plannerBucket-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "buckets",
+ "{plannerBucket-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{plannerBucket-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/buckets/{plannerBucket-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "buckets",
+ "{plannerBucket-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{plannerBucket-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/buckets/{plannerBucket-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "buckets",
+ "{plannerBucket-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "tasks-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/buckets/{plannerBucket-id}/tasks",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "buckets",
+ "{plannerBucket-id}",
+ "tasks"
+ ]
+ }
+ }
+ },
+ {
+ "name": "tasks-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/buckets/{plannerBucket-id}/tasks",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "buckets",
+ "{plannerBucket-id}",
+ "tasks"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{plannerTask-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/buckets/{plannerBucket-id}/tasks/{plannerTask-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "buckets",
+ "{plannerBucket-id}",
+ "tasks",
+ "{plannerTask-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{plannerTask-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/buckets/{plannerBucket-id}/tasks/{plannerTask-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "buckets",
+ "{plannerBucket-id}",
+ "tasks",
+ "{plannerTask-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{plannerTask-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/buckets/{plannerBucket-id}/tasks/{plannerTask-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "buckets",
+ "{plannerBucket-id}",
+ "tasks",
+ "{plannerTask-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "assignedToTaskBoardFormat-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/buckets/{plannerBucket-id}/tasks/{plannerTask-id}/assignedToTaskBoardFormat",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "buckets",
+ "{plannerBucket-id}",
+ "tasks",
+ "{plannerTask-id}",
+ "assignedToTaskBoardFormat"
+ ]
+ }
+ }
+ },
+ {
+ "name": "assignedToTaskBoardFormat-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/buckets/{plannerBucket-id}/tasks/{plannerTask-id}/assignedToTaskBoardFormat",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "buckets",
+ "{plannerBucket-id}",
+ "tasks",
+ "{plannerTask-id}",
+ "assignedToTaskBoardFormat"
+ ]
+ }
+ }
+ },
+ {
+ "name": "assignedToTaskBoardFormat-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/buckets/{plannerBucket-id}/tasks/{plannerTask-id}/assignedToTaskBoardFormat",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "buckets",
+ "{plannerBucket-id}",
+ "tasks",
+ "{plannerTask-id}",
+ "assignedToTaskBoardFormat"
+ ]
+ }
+ }
+ },
+ {
+ "name": "bucketTaskBoardFormat-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/buckets/{plannerBucket-id}/tasks/{plannerTask-id}/bucketTaskBoardFormat",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "buckets",
+ "{plannerBucket-id}",
+ "tasks",
+ "{plannerTask-id}",
+ "bucketTaskBoardFormat"
+ ]
+ }
+ }
+ },
+ {
+ "name": "bucketTaskBoardFormat-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/buckets/{plannerBucket-id}/tasks/{plannerTask-id}/bucketTaskBoardFormat",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "buckets",
+ "{plannerBucket-id}",
+ "tasks",
+ "{plannerTask-id}",
+ "bucketTaskBoardFormat"
+ ]
+ }
+ }
+ },
+ {
+ "name": "bucketTaskBoardFormat-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/buckets/{plannerBucket-id}/tasks/{plannerTask-id}/bucketTaskBoardFormat",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "buckets",
+ "{plannerBucket-id}",
+ "tasks",
+ "{plannerTask-id}",
+ "bucketTaskBoardFormat"
+ ]
+ }
+ }
+ },
+ {
+ "name": "details-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/buckets/{plannerBucket-id}/tasks/{plannerTask-id}/details",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "buckets",
+ "{plannerBucket-id}",
+ "tasks",
+ "{plannerTask-id}",
+ "details"
+ ]
+ }
+ }
+ },
+ {
+ "name": "details-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/buckets/{plannerBucket-id}/tasks/{plannerTask-id}/details",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "buckets",
+ "{plannerBucket-id}",
+ "tasks",
+ "{plannerTask-id}",
+ "details"
+ ]
+ }
+ }
+ },
+ {
+ "name": "details-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/buckets/{plannerBucket-id}/tasks/{plannerTask-id}/details",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "buckets",
+ "{plannerBucket-id}",
+ "tasks",
+ "{plannerTask-id}",
+ "details"
+ ]
+ }
+ }
+ },
+ {
+ "name": "progressTaskBoardFormat-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/buckets/{plannerBucket-id}/tasks/{plannerTask-id}/progressTaskBoardFormat",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "buckets",
+ "{plannerBucket-id}",
+ "tasks",
+ "{plannerTask-id}",
+ "progressTaskBoardFormat"
+ ]
+ }
+ }
+ },
+ {
+ "name": "progressTaskBoardFormat-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/buckets/{plannerBucket-id}/tasks/{plannerTask-id}/progressTaskBoardFormat",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "buckets",
+ "{plannerBucket-id}",
+ "tasks",
+ "{plannerTask-id}",
+ "progressTaskBoardFormat"
+ ]
+ }
+ }
+ },
+ {
+ "name": "progressTaskBoardFormat-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/buckets/{plannerBucket-id}/tasks/{plannerTask-id}/progressTaskBoardFormat",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "buckets",
+ "{plannerBucket-id}",
+ "tasks",
+ "{plannerTask-id}",
+ "progressTaskBoardFormat"
+ ]
+ }
+ }
+ },
+ {
+ "name": "details-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/details",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "details"
+ ]
+ }
+ }
+ },
+ {
+ "name": "details-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/details",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "details"
+ ]
+ }
+ }
+ },
+ {
+ "name": "details-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/details",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "details"
+ ]
+ }
+ }
+ },
+ {
+ "name": "tasks-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/tasks",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "tasks"
+ ]
+ }
+ }
+ },
+ {
+ "name": "tasks-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/tasks",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "tasks"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{plannerTask-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/tasks/{plannerTask-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "tasks",
+ "{plannerTask-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{plannerTask-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/tasks/{plannerTask-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "tasks",
+ "{plannerTask-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{plannerTask-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/tasks/{plannerTask-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "tasks",
+ "{plannerTask-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "assignedToTaskBoardFormat-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/tasks/{plannerTask-id}/assignedToTaskBoardFormat",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "tasks",
+ "{plannerTask-id}",
+ "assignedToTaskBoardFormat"
+ ]
+ }
+ }
+ },
+ {
+ "name": "assignedToTaskBoardFormat-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/tasks/{plannerTask-id}/assignedToTaskBoardFormat",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "tasks",
+ "{plannerTask-id}",
+ "assignedToTaskBoardFormat"
+ ]
+ }
+ }
+ },
+ {
+ "name": "assignedToTaskBoardFormat-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/tasks/{plannerTask-id}/assignedToTaskBoardFormat",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "tasks",
+ "{plannerTask-id}",
+ "assignedToTaskBoardFormat"
+ ]
+ }
+ }
+ },
+ {
+ "name": "bucketTaskBoardFormat-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/tasks/{plannerTask-id}/bucketTaskBoardFormat",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "tasks",
+ "{plannerTask-id}",
+ "bucketTaskBoardFormat"
+ ]
+ }
+ }
+ },
+ {
+ "name": "bucketTaskBoardFormat-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/tasks/{plannerTask-id}/bucketTaskBoardFormat",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "tasks",
+ "{plannerTask-id}",
+ "bucketTaskBoardFormat"
+ ]
+ }
+ }
+ },
+ {
+ "name": "bucketTaskBoardFormat-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/tasks/{plannerTask-id}/bucketTaskBoardFormat",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "tasks",
+ "{plannerTask-id}",
+ "bucketTaskBoardFormat"
+ ]
+ }
+ }
+ },
+ {
+ "name": "details-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/tasks/{plannerTask-id}/details",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "tasks",
+ "{plannerTask-id}",
+ "details"
+ ]
+ }
+ }
+ },
+ {
+ "name": "details-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/tasks/{plannerTask-id}/details",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "tasks",
+ "{plannerTask-id}",
+ "details"
+ ]
+ }
+ }
+ },
+ {
+ "name": "details-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/tasks/{plannerTask-id}/details",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "tasks",
+ "{plannerTask-id}",
+ "details"
+ ]
+ }
+ }
+ },
+ {
+ "name": "progressTaskBoardFormat-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/tasks/{plannerTask-id}/progressTaskBoardFormat",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "tasks",
+ "{plannerTask-id}",
+ "progressTaskBoardFormat"
+ ]
+ }
+ }
+ },
+ {
+ "name": "progressTaskBoardFormat-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/tasks/{plannerTask-id}/progressTaskBoardFormat",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "tasks",
+ "{plannerTask-id}",
+ "progressTaskBoardFormat"
+ ]
+ }
+ }
+ },
+ {
+ "name": "progressTaskBoardFormat-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/plans/{plannerPlan-id}/tasks/{plannerTask-id}/progressTaskBoardFormat",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "plans",
+ "{plannerPlan-id}",
+ "tasks",
+ "{plannerTask-id}",
+ "progressTaskBoardFormat"
+ ]
+ }
+ }
+ },
+ {
+ "name": "tasks-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/tasks",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "tasks"
+ ]
+ }
+ }
+ },
+ {
+ "name": "tasks-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/tasks",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "tasks"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{plannerTask-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/tasks/{plannerTask-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "tasks",
+ "{plannerTask-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{plannerTask-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/tasks/{plannerTask-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "tasks",
+ "{plannerTask-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{plannerTask-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/tasks/{plannerTask-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "tasks",
+ "{plannerTask-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "assignedToTaskBoardFormat-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/tasks/{plannerTask-id}/assignedToTaskBoardFormat",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "tasks",
+ "{plannerTask-id}",
+ "assignedToTaskBoardFormat"
+ ]
+ }
+ }
+ },
+ {
+ "name": "assignedToTaskBoardFormat-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/tasks/{plannerTask-id}/assignedToTaskBoardFormat",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "tasks",
+ "{plannerTask-id}",
+ "assignedToTaskBoardFormat"
+ ]
+ }
+ }
+ },
+ {
+ "name": "assignedToTaskBoardFormat-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/tasks/{plannerTask-id}/assignedToTaskBoardFormat",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "tasks",
+ "{plannerTask-id}",
+ "assignedToTaskBoardFormat"
+ ]
+ }
+ }
+ },
+ {
+ "name": "bucketTaskBoardFormat-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/tasks/{plannerTask-id}/bucketTaskBoardFormat",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "tasks",
+ "{plannerTask-id}",
+ "bucketTaskBoardFormat"
+ ]
+ }
+ }
+ },
+ {
+ "name": "bucketTaskBoardFormat-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/tasks/{plannerTask-id}/bucketTaskBoardFormat",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "tasks",
+ "{plannerTask-id}",
+ "bucketTaskBoardFormat"
+ ]
+ }
+ }
+ },
+ {
+ "name": "bucketTaskBoardFormat-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/tasks/{plannerTask-id}/bucketTaskBoardFormat",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "tasks",
+ "{plannerTask-id}",
+ "bucketTaskBoardFormat"
+ ]
+ }
+ }
+ },
+ {
+ "name": "details-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/tasks/{plannerTask-id}/details",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "tasks",
+ "{plannerTask-id}",
+ "details"
+ ]
+ }
+ }
+ },
+ {
+ "name": "details-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/tasks/{plannerTask-id}/details",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "tasks",
+ "{plannerTask-id}",
+ "details"
+ ]
+ }
+ }
+ },
+ {
+ "name": "details-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/tasks/{plannerTask-id}/details",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "tasks",
+ "{plannerTask-id}",
+ "details"
+ ]
+ }
+ }
+ },
+ {
+ "name": "progressTaskBoardFormat-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/tasks/{plannerTask-id}/progressTaskBoardFormat",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "tasks",
+ "{plannerTask-id}",
+ "progressTaskBoardFormat"
+ ]
+ }
+ }
+ },
+ {
+ "name": "progressTaskBoardFormat-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/tasks/{plannerTask-id}/progressTaskBoardFormat",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "tasks",
+ "{plannerTask-id}",
+ "progressTaskBoardFormat"
+ ]
+ }
+ }
+ },
+ {
+ "name": "progressTaskBoardFormat-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/planner/tasks/{plannerTask-id}/progressTaskBoardFormat",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "planner",
+ "tasks",
+ "{plannerTask-id}",
+ "progressTaskBoardFormat"
+ ]
+ }
+ }
+ },
+ {
+ "name": "presence-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/presence",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "presence"
+ ]
+ }
+ }
+ },
+ {
+ "name": "presence-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/presence",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "presence"
+ ]
+ }
+ }
+ },
+ {
+ "name": "presence-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/presence",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "presence"
+ ]
+ }
+ }
+ },
+ {
+ "name": "registeredDevices-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/registeredDevices",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "registeredDevices"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/registeredDevices/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "registeredDevices",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/registeredDevices/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "registeredDevices",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "scopedRoleMemberOf-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/scopedRoleMemberOf",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "scopedRoleMemberOf"
+ ]
+ }
+ }
+ },
+ {
+ "name": "scopedRoleMemberOf-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/scopedRoleMemberOf",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "scopedRoleMemberOf"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{scopedRoleMembership-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/scopedRoleMemberOf/{scopedRoleMembership-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "scopedRoleMemberOf",
+ "{scopedRoleMembership-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{scopedRoleMembership-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/scopedRoleMemberOf/{scopedRoleMembership-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "scopedRoleMemberOf",
+ "{scopedRoleMembership-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{scopedRoleMembership-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/scopedRoleMemberOf/{scopedRoleMembership-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "scopedRoleMemberOf",
+ "{scopedRoleMembership-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "settings-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/settings",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "settings"
+ ]
+ }
+ }
+ },
+ {
+ "name": "settings-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/settings",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "settings"
+ ]
+ }
+ }
+ },
+ {
+ "name": "settings-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/settings",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "settings"
+ ]
+ }
+ }
+ },
+ {
+ "name": "shiftPreferences-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/settings/shiftPreferences",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "settings",
+ "shiftPreferences"
+ ]
+ }
+ }
+ },
+ {
+ "name": "shiftPreferences-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/settings/shiftPreferences",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "settings",
+ "shiftPreferences"
+ ]
+ }
+ }
+ },
+ {
+ "name": "shiftPreferences-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/settings/shiftPreferences",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "settings",
+ "shiftPreferences"
+ ]
+ }
+ }
+ },
+ {
+ "name": "teamwork-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/teamwork",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "teamwork"
+ ]
+ }
+ }
+ },
+ {
+ "name": "teamwork-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/teamwork",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "teamwork"
+ ]
+ }
+ }
+ },
+ {
+ "name": "teamwork-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/teamwork",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "teamwork"
+ ]
+ }
+ }
+ },
+ {
+ "name": "installedApps-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/teamwork/installedApps",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "teamwork",
+ "installedApps"
+ ]
+ }
+ }
+ },
+ {
+ "name": "installedApps-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/teamwork/installedApps",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "teamwork",
+ "installedApps"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{userScopeTeamsAppInstallation-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/teamwork/installedApps/{userScopeTeamsAppInstallation-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "teamwork",
+ "installedApps",
+ "{userScopeTeamsAppInstallation-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{userScopeTeamsAppInstallation-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/teamwork/installedApps/{userScopeTeamsAppInstallation-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "teamwork",
+ "installedApps",
+ "{userScopeTeamsAppInstallation-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{userScopeTeamsAppInstallation-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/teamwork/installedApps/{userScopeTeamsAppInstallation-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "teamwork",
+ "installedApps",
+ "{userScopeTeamsAppInstallation-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "chat-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/teamwork/installedApps/{userScopeTeamsAppInstallation-id}/chat",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "teamwork",
+ "installedApps",
+ "{userScopeTeamsAppInstallation-id}",
+ "chat"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/teamwork/installedApps/{userScopeTeamsAppInstallation-id}/chat/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "teamwork",
+ "installedApps",
+ "{userScopeTeamsAppInstallation-id}",
+ "chat",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-PUT",
+ "request": {
+ "method": "PUT",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/teamwork/installedApps/{userScopeTeamsAppInstallation-id}/chat/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "teamwork",
+ "installedApps",
+ "{userScopeTeamsAppInstallation-id}",
+ "chat",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/teamwork/installedApps/{userScopeTeamsAppInstallation-id}/chat/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "teamwork",
+ "installedApps",
+ "{userScopeTeamsAppInstallation-id}",
+ "chat",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "todo-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/todo",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "todo"
+ ]
+ }
+ }
+ },
+ {
+ "name": "todo-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/todo",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "todo"
+ ]
+ }
+ }
+ },
+ {
+ "name": "todo-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/todo",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "todo"
+ ]
+ }
+ }
+ },
+ {
+ "name": "lists-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/todo/lists",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "todo",
+ "lists"
+ ]
+ }
+ }
+ },
+ {
+ "name": "lists-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/todo/lists",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "todo",
+ "lists"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{todoTaskList-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/todo/lists/{todoTaskList-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "todo",
+ "lists",
+ "{todoTaskList-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{todoTaskList-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/todo/lists/{todoTaskList-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "todo",
+ "lists",
+ "{todoTaskList-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{todoTaskList-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/todo/lists/{todoTaskList-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "todo",
+ "lists",
+ "{todoTaskList-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "extensions-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/todo/lists/{todoTaskList-id}/extensions",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "todo",
+ "lists",
+ "{todoTaskList-id}",
+ "extensions"
+ ]
+ }
+ }
+ },
+ {
+ "name": "extensions-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/todo/lists/{todoTaskList-id}/extensions",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "todo",
+ "lists",
+ "{todoTaskList-id}",
+ "extensions"
+ ]
+ }
+ }
+ },
+ {
+ "name": "tasks-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/todo/lists/{todoTaskList-id}/tasks",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "todo",
+ "lists",
+ "{todoTaskList-id}",
+ "tasks"
+ ]
+ }
+ }
+ },
+ {
+ "name": "tasks-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/todo/lists/{todoTaskList-id}/tasks",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "todo",
+ "lists",
+ "{todoTaskList-id}",
+ "tasks"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{todoTask-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/todo/lists/{todoTaskList-id}/tasks/{todoTask-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "todo",
+ "lists",
+ "{todoTaskList-id}",
+ "tasks",
+ "{todoTask-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{todoTask-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/todo/lists/{todoTaskList-id}/tasks/{todoTask-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "todo",
+ "lists",
+ "{todoTaskList-id}",
+ "tasks",
+ "{todoTask-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{todoTask-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/todo/lists/{todoTaskList-id}/tasks/{todoTask-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "todo",
+ "lists",
+ "{todoTaskList-id}",
+ "tasks",
+ "{todoTask-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "extensions-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/todo/lists/{todoTaskList-id}/tasks/{todoTask-id}/extensions",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "todo",
+ "lists",
+ "{todoTaskList-id}",
+ "tasks",
+ "{todoTask-id}",
+ "extensions"
+ ]
+ }
+ }
+ },
+ {
+ "name": "extensions-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/todo/lists/{todoTaskList-id}/tasks/{todoTask-id}/extensions",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "todo",
+ "lists",
+ "{todoTaskList-id}",
+ "tasks",
+ "{todoTask-id}",
+ "extensions"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{extension-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/todo/lists/{todoTaskList-id}/tasks/{todoTask-id}/extensions/{extension-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "todo",
+ "lists",
+ "{todoTaskList-id}",
+ "tasks",
+ "{todoTask-id}",
+ "extensions",
+ "{extension-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{extension-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/todo/lists/{todoTaskList-id}/tasks/{todoTask-id}/extensions/{extension-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "todo",
+ "lists",
+ "{todoTaskList-id}",
+ "tasks",
+ "{todoTask-id}",
+ "extensions",
+ "{extension-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{extension-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/todo/lists/{todoTaskList-id}/tasks/{todoTask-id}/extensions/{extension-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "todo",
+ "lists",
+ "{todoTaskList-id}",
+ "tasks",
+ "{todoTask-id}",
+ "extensions",
+ "{extension-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "linkedResources-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/todo/lists/{todoTaskList-id}/tasks/{todoTask-id}/linkedResources",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "todo",
+ "lists",
+ "{todoTaskList-id}",
+ "tasks",
+ "{todoTask-id}",
+ "linkedResources"
+ ]
+ }
+ }
+ },
+ {
+ "name": "linkedResources-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/todo/lists/{todoTaskList-id}/tasks/{todoTask-id}/linkedResources",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "todo",
+ "lists",
+ "{todoTaskList-id}",
+ "tasks",
+ "{todoTask-id}",
+ "linkedResources"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{linkedResource-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/todo/lists/{todoTaskList-id}/tasks/{todoTask-id}/linkedResources/{linkedResource-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "todo",
+ "lists",
+ "{todoTaskList-id}",
+ "tasks",
+ "{todoTask-id}",
+ "linkedResources",
+ "{linkedResource-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{linkedResource-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/todo/lists/{todoTaskList-id}/tasks/{todoTask-id}/linkedResources/{linkedResource-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "todo",
+ "lists",
+ "{todoTaskList-id}",
+ "tasks",
+ "{todoTask-id}",
+ "linkedResources",
+ "{linkedResource-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{linkedResource-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/todo/lists/{todoTaskList-id}/tasks/{todoTask-id}/linkedResources/{linkedResource-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "todo",
+ "lists",
+ "{todoTaskList-id}",
+ "tasks",
+ "{todoTask-id}",
+ "linkedResources",
+ "{linkedResource-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "transitiveMemberOf-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/transitiveMemberOf",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "transitiveMemberOf"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/transitiveMemberOf/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "transitiveMemberOf",
+ "$ref"
+ ]
+ }
+ }
+ },
+ {
+ "name": "$ref-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}/transitiveMemberOf/$ref",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}",
+ "transitiveMemberOf",
+ "$ref"
+ ]
+ }
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/UtilityFiles/postmanCollection_ver3.json b/test/Microsoft.OpenApi.Tests/UtilityFiles/postmanCollection_ver3.json
new file mode 100644
index 000000000..2c7637ed7
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/UtilityFiles/postmanCollection_ver3.json
@@ -0,0 +1,1382 @@
+{
+ "info": {
+ "_postman_id": "6281bdba-62b8-2276-a5d6-268e87f48c89",
+ "name": "Graph-Collection",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
+ },
+ "item": [
+ {
+ "name": "admin",
+ "item": [
+ {
+ "name": "/admin",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/healthOverviews",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/healthOverviews",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "healthOverviews"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/healthOverviews",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/healthOverviews",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "healthOverviews"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/healthOverviews/{serviceHealth-id}",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/healthOverviews/{serviceHealth-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "healthOverviews",
+ "{serviceHealth-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/healthOverviews/{serviceHealth-id}",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/healthOverviews/{serviceHealth-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "healthOverviews",
+ "{serviceHealth-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/healthOverviews/{serviceHealth-id}",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/healthOverviews/{serviceHealth-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "healthOverviews",
+ "{serviceHealth-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/healthOverviews/{serviceHealth-id}/issues",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/healthOverviews/{serviceHealth-id}/issues",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "healthOverviews",
+ "{serviceHealth-id}",
+ "issues"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/healthOverviews/{serviceHealth-id}/issues",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/healthOverviews/{serviceHealth-id}/issues",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "healthOverviews",
+ "{serviceHealth-id}",
+ "issues"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/healthOverviews/{serviceHealth-id}/issues/{serviceHealthIssue-id}",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/healthOverviews/{serviceHealth-id}/issues/{serviceHealthIssue-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "healthOverviews",
+ "{serviceHealth-id}",
+ "issues",
+ "{serviceHealthIssue-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/healthOverviews/{serviceHealth-id}/issues/{serviceHealthIssue-id}",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/healthOverviews/{serviceHealth-id}/issues/{serviceHealthIssue-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "healthOverviews",
+ "{serviceHealth-id}",
+ "issues",
+ "{serviceHealthIssue-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/healthOverviews/{serviceHealth-id}/issues/{serviceHealthIssue-id}",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/healthOverviews/{serviceHealth-id}/issues/{serviceHealthIssue-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "healthOverviews",
+ "{serviceHealth-id}",
+ "issues",
+ "{serviceHealthIssue-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/healthOverviews/{serviceHealth-id}/issues/{serviceHealthIssue-id}/microsoft.graph.incidentReport()",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/healthOverviews/{serviceHealth-id}/issues/{serviceHealthIssue-id}/microsoft.graph.incidentReport()",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "healthOverviews",
+ "{serviceHealth-id}",
+ "issues",
+ "{serviceHealthIssue-id}",
+ "microsoft.graph.incidentReport()"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/issues",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/issues",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "issues"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/issues",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/issues",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "issues"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/issues/{serviceHealthIssue-id}",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/issues/{serviceHealthIssue-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "issues",
+ "{serviceHealthIssue-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/issues/{serviceHealthIssue-id}",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/issues/{serviceHealthIssue-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "issues",
+ "{serviceHealthIssue-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/issues/{serviceHealthIssue-id}",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/issues/{serviceHealthIssue-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "issues",
+ "{serviceHealthIssue-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/issues/{serviceHealthIssue-id}/microsoft.graph.incidentReport()",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/issues/{serviceHealthIssue-id}/microsoft.graph.incidentReport()",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "issues",
+ "{serviceHealthIssue-id}",
+ "microsoft.graph.incidentReport()"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/messages",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/messages",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "messages"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/messages",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/messages",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "messages"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/messages/microsoft.graph.archive",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/messages/microsoft.graph.archive",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "messages",
+ "microsoft.graph.archive"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/messages/microsoft.graph.favorite",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/messages/microsoft.graph.favorite",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "messages",
+ "microsoft.graph.favorite"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/messages/microsoft.graph.markRead",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/messages/microsoft.graph.markRead",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "messages",
+ "microsoft.graph.markRead"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/messages/microsoft.graph.markUnread",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/messages/microsoft.graph.markUnread",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "messages",
+ "microsoft.graph.markUnread"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/messages/microsoft.graph.unarchive",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/messages/microsoft.graph.unarchive",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "messages",
+ "microsoft.graph.unarchive"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/messages/microsoft.graph.unfavorite",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/messages/microsoft.graph.unfavorite",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "messages",
+ "microsoft.graph.unfavorite"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/messages/{serviceUpdateMessage-id}",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/messages/{serviceUpdateMessage-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "messages",
+ "{serviceUpdateMessage-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/messages/{serviceUpdateMessage-id}",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/messages/{serviceUpdateMessage-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "messages",
+ "{serviceUpdateMessage-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/messages/{serviceUpdateMessage-id}",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/messages/{serviceUpdateMessage-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "messages",
+ "{serviceUpdateMessage-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/messages/{serviceUpdateMessage-id}/attachments",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/messages/{serviceUpdateMessage-id}/attachments",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "messages",
+ "{serviceUpdateMessage-id}",
+ "attachments"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/messages/{serviceUpdateMessage-id}/attachments",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/messages/{serviceUpdateMessage-id}/attachments",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "messages",
+ "{serviceUpdateMessage-id}",
+ "attachments"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/messages/{serviceUpdateMessage-id}/attachments/{serviceAnnouncementAttachment-id}",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/messages/{serviceUpdateMessage-id}/attachments/{serviceAnnouncementAttachment-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "messages",
+ "{serviceUpdateMessage-id}",
+ "attachments",
+ "{serviceAnnouncementAttachment-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/messages/{serviceUpdateMessage-id}/attachments/{serviceAnnouncementAttachment-id}",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/messages/{serviceUpdateMessage-id}/attachments/{serviceAnnouncementAttachment-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "messages",
+ "{serviceUpdateMessage-id}",
+ "attachments",
+ "{serviceAnnouncementAttachment-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/messages/{serviceUpdateMessage-id}/attachments/{serviceAnnouncementAttachment-id}",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/messages/{serviceUpdateMessage-id}/attachments/{serviceAnnouncementAttachment-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "messages",
+ "{serviceUpdateMessage-id}",
+ "attachments",
+ "{serviceAnnouncementAttachment-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/messages/{serviceUpdateMessage-id}/attachments/{serviceAnnouncementAttachment-id}/content",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/messages/{serviceUpdateMessage-id}/attachments/{serviceAnnouncementAttachment-id}/content",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "messages",
+ "{serviceUpdateMessage-id}",
+ "attachments",
+ "{serviceAnnouncementAttachment-id}",
+ "content"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/messages/{serviceUpdateMessage-id}/attachments/{serviceAnnouncementAttachment-id}/content",
+ "request": {
+ "method": "PUT",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/messages/{serviceUpdateMessage-id}/attachments/{serviceAnnouncementAttachment-id}/content",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "messages",
+ "{serviceUpdateMessage-id}",
+ "attachments",
+ "{serviceAnnouncementAttachment-id}",
+ "content"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/messages/{serviceUpdateMessage-id}/attachmentsArchive",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/messages/{serviceUpdateMessage-id}/attachmentsArchive",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "messages",
+ "{serviceUpdateMessage-id}",
+ "attachmentsArchive"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/admin/serviceAnnouncement/messages/{serviceUpdateMessage-id}/attachmentsArchive",
+ "request": {
+ "method": "PUT",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/messages/{serviceUpdateMessage-id}/attachmentsArchive",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "admin",
+ "serviceAnnouncement",
+ "messages",
+ "{serviceUpdateMessage-id}",
+ "attachmentsArchive"
+ ]
+ }
+ }
+ }
+ ]
+ },
+ {
+ "name": "agreementAcceptances",
+ "item": [
+ {
+ "name": "/agreementAcceptances",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/agreementAcceptances",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "agreementAcceptances"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/agreementAcceptances",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/agreementAcceptances",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "agreementAcceptances"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/agreementAcceptances/{agreementAcceptance-id}",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/agreementAcceptances/{agreementAcceptance-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "agreementAcceptances",
+ "{agreementAcceptance-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/agreementAcceptances/{agreementAcceptance-id}",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/agreementAcceptances/{agreementAcceptance-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "agreementAcceptances",
+ "{agreementAcceptance-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/agreementAcceptances/{agreementAcceptance-id}",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/agreementAcceptances/{agreementAcceptance-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "agreementAcceptances",
+ "{agreementAcceptance-id}"
+ ]
+ }
+ }
+ }
+ ]
+ },
+ {
+ "name": "appCatalogs",
+ "item": [
+ {
+ "name": "/appCatalogs",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/appCatalogs",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "appCatalogs"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/appCatalogs",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/appCatalogs",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "appCatalogs"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/appCatalogs/teamsApps",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "appCatalogs",
+ "teamsApps"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/appCatalogs/teamsApps",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "appCatalogs",
+ "teamsApps"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/appCatalogs/teamsApps/{teamsApp-id}",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/{teamsApp-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "appCatalogs",
+ "teamsApps",
+ "{teamsApp-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/appCatalogs/teamsApps/{teamsApp-id}",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/{teamsApp-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "appCatalogs",
+ "teamsApps",
+ "{teamsApp-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/appCatalogs/teamsApps/{teamsApp-id}",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/{teamsApp-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "appCatalogs",
+ "teamsApps",
+ "{teamsApp-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/appCatalogs/teamsApps/{teamsApp-id}/appDefinitions",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/{teamsApp-id}/appDefinitions",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "appCatalogs",
+ "teamsApps",
+ "{teamsApp-id}",
+ "appDefinitions"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/appCatalogs/teamsApps/{teamsApp-id}/appDefinitions",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/{teamsApp-id}/appDefinitions",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "appCatalogs",
+ "teamsApps",
+ "{teamsApp-id}",
+ "appDefinitions"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/appCatalogs/teamsApps/{teamsApp-id}/appDefinitions/{teamsAppDefinition-id}",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/{teamsApp-id}/appDefinitions/{teamsAppDefinition-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "appCatalogs",
+ "teamsApps",
+ "{teamsApp-id}",
+ "appDefinitions",
+ "{teamsAppDefinition-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/appCatalogs/teamsApps/{teamsApp-id}/appDefinitions/{teamsAppDefinition-id}",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/{teamsApp-id}/appDefinitions/{teamsAppDefinition-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "appCatalogs",
+ "teamsApps",
+ "{teamsApp-id}",
+ "appDefinitions",
+ "{teamsAppDefinition-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/appCatalogs/teamsApps/{teamsApp-id}/appDefinitions/{teamsAppDefinition-id}",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/{teamsApp-id}/appDefinitions/{teamsAppDefinition-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "appCatalogs",
+ "teamsApps",
+ "{teamsApp-id}",
+ "appDefinitions",
+ "{teamsAppDefinition-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/appCatalogs/teamsApps/{teamsApp-id}/appDefinitions/{teamsAppDefinition-id}/bot",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/{teamsApp-id}/appDefinitions/{teamsAppDefinition-id}/bot",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "appCatalogs",
+ "teamsApps",
+ "{teamsApp-id}",
+ "appDefinitions",
+ "{teamsAppDefinition-id}",
+ "bot"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/appCatalogs/teamsApps/{teamsApp-id}/appDefinitions/{teamsAppDefinition-id}/bot",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/{teamsApp-id}/appDefinitions/{teamsAppDefinition-id}/bot",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "appCatalogs",
+ "teamsApps",
+ "{teamsApp-id}",
+ "appDefinitions",
+ "{teamsAppDefinition-id}",
+ "bot"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/appCatalogs/teamsApps/{teamsApp-id}/appDefinitions/{teamsAppDefinition-id}/bot",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/{teamsApp-id}/appDefinitions/{teamsAppDefinition-id}/bot",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "appCatalogs",
+ "teamsApps",
+ "{teamsApp-id}",
+ "appDefinitions",
+ "{teamsAppDefinition-id}",
+ "bot"
+ ]
+ }
+ }
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/UtilityFiles/postmanCollection_ver4.json b/test/Microsoft.OpenApi.Tests/UtilityFiles/postmanCollection_ver4.json
new file mode 100644
index 000000000..edafeb0bd
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/UtilityFiles/postmanCollection_ver4.json
@@ -0,0 +1,145 @@
+{
+ "info": {
+ "_postman_id": "43402ca3-f018-7c9b-2315-f176d9b171a3",
+ "name": "Graph-Collection",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
+ },
+ "item": [
+ {
+ "name": "users-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users"
+ ]
+ }
+ }
+ },
+ {
+ "name": "users-POST",
+ "request": {
+ "method": "POST",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/appCatalogs",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/appCatalogs",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "appCatalogs"
+ ]
+ }
+ }
+ },
+ {
+ "name": "/agreementAcceptances",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/agreementAcceptances",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "agreementAcceptances"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{user-id}-GET",
+ "request": {
+ "method": "GET",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{user-id}-PATCH",
+ "request": {
+ "method": "PATCH",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}"
+ ]
+ }
+ }
+ },
+ {
+ "name": "{user-id}-DELETE",
+ "request": {
+ "method": "DELETE",
+ "url": {
+ "raw": "https://graph.microsoft.com/v1.0/users/{user-id}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "v1.0",
+ "users",
+ "{user-id}"
+ ]
+ }
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/test/Microsoft.OpenApi.Tests/Validations/OpenApiHeaderValidationTests.cs b/test/Microsoft.OpenApi.Tests/Validations/OpenApiHeaderValidationTests.cs
index 62fc2d1ce..6a082ec0f 100644
--- a/test/Microsoft.OpenApi.Tests/Validations/OpenApiHeaderValidationTests.cs
+++ b/test/Microsoft.OpenApi.Tests/Validations/OpenApiHeaderValidationTests.cs
@@ -38,15 +38,16 @@ public void ValidateExampleShouldNotHaveDataTypeMismatchForSimpleSchema()
walker.Walk(header);
errors = validator.Errors;
- bool result = !errors.Any();
+ var warnings = validator.Warnings;
+ bool result = !warnings.Any();
// Assert
result.Should().BeFalse();
- errors.Select(e => e.Message).Should().BeEquivalentTo(new[]
+ warnings.Select(e => e.Message).Should().BeEquivalentTo(new[]
{
RuleHelpers.DataTypeMismatchedErrorMessage
});
- errors.Select(e => e.Pointer).Should().BeEquivalentTo(new[]
+ warnings.Select(e => e.Pointer).Should().BeEquivalentTo(new[]
{
"#/example",
});
@@ -56,7 +57,7 @@ public void ValidateExampleShouldNotHaveDataTypeMismatchForSimpleSchema()
public void ValidateExamplesShouldNotHaveDataTypeMismatchForSimpleSchema()
{
// Arrange
- IEnumerable errors;
+ IEnumerable warnings;
var header = new OpenApiHeader()
{
@@ -108,18 +109,18 @@ public void ValidateExamplesShouldNotHaveDataTypeMismatchForSimpleSchema()
var walker = new OpenApiWalker(validator);
walker.Walk(header);
- errors = validator.Errors;
- bool result = !errors.Any();
+ warnings = validator.Warnings;
+ bool result = !warnings.Any();
// Assert
result.Should().BeFalse();
- errors.Select(e => e.Message).Should().BeEquivalentTo(new[]
+ warnings.Select(e => e.Message).Should().BeEquivalentTo(new[]
{
RuleHelpers.DataTypeMismatchedErrorMessage,
RuleHelpers.DataTypeMismatchedErrorMessage,
RuleHelpers.DataTypeMismatchedErrorMessage,
});
- errors.Select(e => e.Pointer).Should().BeEquivalentTo(new[]
+ warnings.Select(e => e.Pointer).Should().BeEquivalentTo(new[]
{
// #enum/0 is not an error since the spec allows
// representing an object using a string.
diff --git a/test/Microsoft.OpenApi.Tests/Validations/OpenApiMediaTypeValidationTests.cs b/test/Microsoft.OpenApi.Tests/Validations/OpenApiMediaTypeValidationTests.cs
index fe36bb8c2..bdffaff28 100644
--- a/test/Microsoft.OpenApi.Tests/Validations/OpenApiMediaTypeValidationTests.cs
+++ b/test/Microsoft.OpenApi.Tests/Validations/OpenApiMediaTypeValidationTests.cs
@@ -21,7 +21,7 @@ public class OpenApiMediaTypeValidationTests
public void ValidateExampleShouldNotHaveDataTypeMismatchForSimpleSchema()
{
// Arrange
- IEnumerable errors;
+ IEnumerable warnings;
var mediaType = new OpenApiMediaType()
{
Example = new OpenApiInteger(55),
@@ -33,21 +33,20 @@ public void ValidateExampleShouldNotHaveDataTypeMismatchForSimpleSchema()
// Act
var ruleset = ValidationRuleSet.GetDefaultRuleSet();
- ruleset.Add(OpenApiMediaTypeRules.MediaTypeMismatchedDataType);
var validator = new OpenApiValidator(ruleset);
var walker = new OpenApiWalker(validator);
walker.Walk(mediaType);
- errors = validator.Errors;
- bool result = !errors.Any();
+ warnings = validator.Warnings;
+ bool result = !warnings.Any();
// Assert
result.Should().BeFalse();
- errors.Select(e => e.Message).Should().BeEquivalentTo(new[]
+ warnings.Select(e => e.Message).Should().BeEquivalentTo(new[]
{
RuleHelpers.DataTypeMismatchedErrorMessage
});
- errors.Select(e => e.Pointer).Should().BeEquivalentTo(new[]
+ warnings.Select(e => e.Pointer).Should().BeEquivalentTo(new[]
{
"#/example",
});
@@ -57,7 +56,7 @@ public void ValidateExampleShouldNotHaveDataTypeMismatchForSimpleSchema()
public void ValidateExamplesShouldNotHaveDataTypeMismatchForSimpleSchema()
{
// Arrange
- IEnumerable errors;
+ IEnumerable warnings;
var mediaType = new OpenApiMediaType()
{
@@ -105,23 +104,22 @@ public void ValidateExamplesShouldNotHaveDataTypeMismatchForSimpleSchema()
// Act
var ruleset = ValidationRuleSet.GetDefaultRuleSet();
- ruleset.Add(OpenApiMediaTypeRules.MediaTypeMismatchedDataType);
var validator = new OpenApiValidator(ruleset);
var walker = new OpenApiWalker(validator);
walker.Walk(mediaType);
- errors = validator.Errors;
- bool result = !errors.Any();
+ warnings = validator.Warnings;
+ bool result = !warnings.Any();
// Assert
result.Should().BeFalse();
- errors.Select(e => e.Message).Should().BeEquivalentTo(new[]
+ warnings.Select(e => e.Message).Should().BeEquivalentTo(new[]
{
RuleHelpers.DataTypeMismatchedErrorMessage,
RuleHelpers.DataTypeMismatchedErrorMessage,
RuleHelpers.DataTypeMismatchedErrorMessage,
});
- errors.Select(e => e.Pointer).Should().BeEquivalentTo(new[]
+ warnings.Select(e => e.Pointer).Should().BeEquivalentTo(new[]
{
// #enum/0 is not an error since the spec allows
// representing an object using a string.
diff --git a/test/Microsoft.OpenApi.Tests/Validations/OpenApiParameterValidationTests.cs b/test/Microsoft.OpenApi.Tests/Validations/OpenApiParameterValidationTests.cs
index 41a9a6ab0..89be676c5 100644
--- a/test/Microsoft.OpenApi.Tests/Validations/OpenApiParameterValidationTests.cs
+++ b/test/Microsoft.OpenApi.Tests/Validations/OpenApiParameterValidationTests.cs
@@ -65,7 +65,7 @@ public void ValidateRequiredIsTrueWhenInIsPathInParameter()
public void ValidateExampleShouldNotHaveDataTypeMismatchForSimpleSchema()
{
// Arrange
- IEnumerable errors;
+ IEnumerable warnings;
var parameter = new OpenApiParameter()
{
Name = "parameter1",
@@ -84,16 +84,16 @@ public void ValidateExampleShouldNotHaveDataTypeMismatchForSimpleSchema()
var walker = new OpenApiWalker(validator);
walker.Walk(parameter);
- errors = validator.Errors;
- bool result = !errors.Any();
+ warnings = validator.Warnings;
+ bool result = !warnings.Any();
// Assert
result.Should().BeFalse();
- errors.Select(e => e.Message).Should().BeEquivalentTo(new[]
+ warnings.Select(e => e.Message).Should().BeEquivalentTo(new[]
{
RuleHelpers.DataTypeMismatchedErrorMessage
});
- errors.Select(e => e.Pointer).Should().BeEquivalentTo(new[]
+ warnings.Select(e => e.Pointer).Should().BeEquivalentTo(new[]
{
"#/{parameter1}/example",
});
@@ -103,7 +103,7 @@ public void ValidateExampleShouldNotHaveDataTypeMismatchForSimpleSchema()
public void ValidateExamplesShouldNotHaveDataTypeMismatchForSimpleSchema()
{
// Arrange
- IEnumerable errors;
+ IEnumerable warnings;
var parameter = new OpenApiParameter()
{
@@ -158,18 +158,18 @@ public void ValidateExamplesShouldNotHaveDataTypeMismatchForSimpleSchema()
var walker = new OpenApiWalker(validator);
walker.Walk(parameter);
- errors = validator.Errors;
- bool result = !errors.Any();
+ warnings = validator.Warnings;
+ bool result = !warnings.Any();
// Assert
result.Should().BeFalse();
- errors.Select(e => e.Message).Should().BeEquivalentTo(new[]
+ warnings.Select(e => e.Message).Should().BeEquivalentTo(new[]
{
RuleHelpers.DataTypeMismatchedErrorMessage,
RuleHelpers.DataTypeMismatchedErrorMessage,
RuleHelpers.DataTypeMismatchedErrorMessage,
});
- errors.Select(e => e.Pointer).Should().BeEquivalentTo(new[]
+ warnings.Select(e => e.Pointer).Should().BeEquivalentTo(new[]
{
// #enum/0 is not an error since the spec allows
// representing an object using a string.
@@ -218,7 +218,7 @@ public void PathParameterNotInThePathShouldReturnAnError()
}
[Fact]
- public void PathParameterInThePastShouldBeOk()
+ public void PathParameterInThePathShouldBeOk()
{
// Arrange
IEnumerable errors;
diff --git a/test/Microsoft.OpenApi.Tests/Validations/OpenApiSchemaValidationTests.cs b/test/Microsoft.OpenApi.Tests/Validations/OpenApiSchemaValidationTests.cs
index 91b1643fa..d239e15a1 100644
--- a/test/Microsoft.OpenApi.Tests/Validations/OpenApiSchemaValidationTests.cs
+++ b/test/Microsoft.OpenApi.Tests/Validations/OpenApiSchemaValidationTests.cs
@@ -21,7 +21,7 @@ public class OpenApiSchemaValidationTests
public void ValidateDefaultShouldNotHaveDataTypeMismatchForSimpleSchema()
{
// Arrange
- IEnumerable errors;
+ IEnumerable warnings;
var schema = new OpenApiSchema()
{
Default = new OpenApiInteger(55),
@@ -33,16 +33,16 @@ public void ValidateDefaultShouldNotHaveDataTypeMismatchForSimpleSchema()
var walker = new OpenApiWalker(validator);
walker.Walk(schema);
- errors = validator.Errors;
- bool result = !errors.Any();
+ warnings = validator.Warnings;
+ bool result = !warnings.Any();
// Assert
result.Should().BeFalse();
- errors.Select(e => e.Message).Should().BeEquivalentTo(new[]
+ warnings.Select(e => e.Message).Should().BeEquivalentTo(new[]
{
RuleHelpers.DataTypeMismatchedErrorMessage
});
- errors.Select(e => e.Pointer).Should().BeEquivalentTo(new[]
+ warnings.Select(e => e.Pointer).Should().BeEquivalentTo(new[]
{
"#/default",
});
@@ -52,7 +52,7 @@ public void ValidateDefaultShouldNotHaveDataTypeMismatchForSimpleSchema()
public void ValidateExampleAndDefaultShouldNotHaveDataTypeMismatchForSimpleSchema()
{
// Arrange
- IEnumerable errors;
+ IEnumerable warnings;
var schema = new OpenApiSchema()
{
Example = new OpenApiLong(55),
@@ -65,17 +65,17 @@ public void ValidateExampleAndDefaultShouldNotHaveDataTypeMismatchForSimpleSchem
var walker = new OpenApiWalker(validator);
walker.Walk(schema);
- errors = validator.Errors;
- bool result = !errors.Any();
+ warnings = validator.Warnings;
+ bool result = !warnings.Any();
// Assert
result.Should().BeFalse();
- errors.Select(e => e.Message).Should().BeEquivalentTo(new[]
+ warnings.Select(e => e.Message).Should().BeEquivalentTo(new[]
{
RuleHelpers.DataTypeMismatchedErrorMessage,
RuleHelpers.DataTypeMismatchedErrorMessage
});
- errors.Select(e => e.Pointer).Should().BeEquivalentTo(new[]
+ warnings.Select(e => e.Pointer).Should().BeEquivalentTo(new[]
{
"#/default",
"#/example",
@@ -86,7 +86,7 @@ public void ValidateExampleAndDefaultShouldNotHaveDataTypeMismatchForSimpleSchem
public void ValidateEnumShouldNotHaveDataTypeMismatchForSimpleSchema()
{
// Arrange
- IEnumerable errors;
+ IEnumerable warnings;
var schema = new OpenApiSchema()
{
Enum =
@@ -120,18 +120,18 @@ public void ValidateEnumShouldNotHaveDataTypeMismatchForSimpleSchema()
var walker = new OpenApiWalker(validator);
walker.Walk(schema);
- errors = validator.Errors;
- bool result = !errors.Any();
+ warnings = validator.Warnings;
+ bool result = !warnings.Any();
// Assert
result.Should().BeFalse();
- errors.Select(e => e.Message).Should().BeEquivalentTo(new[]
+ warnings.Select(e => e.Message).Should().BeEquivalentTo(new[]
{
RuleHelpers.DataTypeMismatchedErrorMessage,
RuleHelpers.DataTypeMismatchedErrorMessage,
RuleHelpers.DataTypeMismatchedErrorMessage,
});
- errors.Select(e => e.Pointer).Should().BeEquivalentTo(new[]
+ warnings.Select(e => e.Pointer).Should().BeEquivalentTo(new[]
{
// #enum/0 is not an error since the spec allows
// representing an object using a string.
@@ -145,7 +145,7 @@ public void ValidateEnumShouldNotHaveDataTypeMismatchForSimpleSchema()
public void ValidateDefaultShouldNotHaveDataTypeMismatchForComplexSchema()
{
// Arrange
- IEnumerable errors;
+ IEnumerable warnings;
var schema = new OpenApiSchema()
{
Type = "object",
@@ -210,12 +210,12 @@ public void ValidateDefaultShouldNotHaveDataTypeMismatchForComplexSchema()
var walker = new OpenApiWalker(validator);
walker.Walk(schema);
- errors = validator.Errors;
- bool result = !errors.Any();
+ warnings = validator.Warnings;
+ bool result = !warnings.Any();
// Assert
result.Should().BeFalse();
- errors.Select(e => e.Message).Should().BeEquivalentTo(new[]
+ warnings.Select(e => e.Message).Should().BeEquivalentTo(new[]
{
RuleHelpers.DataTypeMismatchedErrorMessage,
RuleHelpers.DataTypeMismatchedErrorMessage,
@@ -223,7 +223,7 @@ public void ValidateDefaultShouldNotHaveDataTypeMismatchForComplexSchema()
RuleHelpers.DataTypeMismatchedErrorMessage,
RuleHelpers.DataTypeMismatchedErrorMessage,
});
- errors.Select(e => e.Pointer).Should().BeEquivalentTo(new[]
+ warnings.Select(e => e.Pointer).Should().BeEquivalentTo(new[]
{
"#/default/property1/0",
"#/default/property1/2",
diff --git a/test/Microsoft.OpenApi.Tests/Validations/ValidationRuleSetTests.cs b/test/Microsoft.OpenApi.Tests/Validations/ValidationRuleSetTests.cs
index af259cf1b..8153e6054 100644
--- a/test/Microsoft.OpenApi.Tests/Validations/ValidationRuleSetTests.cs
+++ b/test/Microsoft.OpenApi.Tests/Validations/ValidationRuleSetTests.cs
@@ -43,7 +43,7 @@ public void DefaultRuleSetPropertyReturnsTheCorrectRules()
Assert.NotEmpty(rules);
// Update the number if you add new default rule(s).
- Assert.Equal(21, rules.Count);
+ Assert.Equal(22, rules.Count);
}
}
}
diff --git a/test/Microsoft.OpenApi.Tests/Visitors/InheritanceTests.cs b/test/Microsoft.OpenApi.Tests/Visitors/InheritanceTests.cs
new file mode 100644
index 000000000..102100019
--- /dev/null
+++ b/test/Microsoft.OpenApi.Tests/Visitors/InheritanceTests.cs
@@ -0,0 +1,346 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Text;
+using System.Threading.Tasks;
+using Microsoft.OpenApi.Interfaces;
+using Microsoft.OpenApi.Models;
+using Microsoft.OpenApi.Services;
+using Xunit;
+
+namespace Microsoft.OpenApi.Tests.Visitors
+{
+ public class InheritanceTests
+ {
+ [Fact]
+ public void ExpectedVirtualsInvolved()
+ {
+ OpenApiVisitorBase visitor = null;
+
+ visitor = new TestVisitor();
+
+ visitor.Enter(default(string));
+ visitor.Visit(default(OpenApiDocument));
+ visitor.Visit(default(OpenApiInfo));
+ visitor.Visit(default(OpenApiContact));
+ visitor.Visit(default(OpenApiLicense));
+ visitor.Visit(default(IList));
+ visitor.Visit(default(OpenApiServer));
+ visitor.Visit(default(OpenApiPaths));
+ visitor.Visit(default(OpenApiPathItem));
+ visitor.Visit(default(OpenApiServerVariable));
+ visitor.Visit(default(IDictionary));
+ visitor.Visit(default(OpenApiOperation));
+ visitor.Visit(default(IList));
+ visitor.Visit(default(OpenApiParameter));
+ visitor.Visit(default(OpenApiRequestBody));
+ visitor.Visit(default(IDictionary));
+ visitor.Visit(default(IDictionary));
+ visitor.Visit(default(OpenApiResponse));
+ visitor.Visit(default(OpenApiResponses));
+ visitor.Visit(default(IDictionary));
+ visitor.Visit(default(OpenApiMediaType));
+ visitor.Visit(default(OpenApiEncoding));
+ visitor.Visit(default(IDictionary));
+ visitor.Visit(default(OpenApiComponents));
+ visitor.Visit(default(OpenApiExternalDocs));
+ visitor.Visit(default(OpenApiSchema));
+ visitor.Visit(default(IDictionary));
+ visitor.Visit(default(OpenApiLink));
+ visitor.Visit(default(OpenApiCallback));
+ visitor.Visit(default(OpenApiTag));
+ visitor.Visit(default(OpenApiHeader));
+ visitor.Visit(default(OpenApiOAuthFlow));
+ visitor.Visit(default(OpenApiSecurityRequirement));
+ visitor.Visit(default(OpenApiSecurityScheme));
+ visitor.Visit(default(OpenApiExample));
+ visitor.Visit(default(IList));
+ visitor.Visit(default(IList));
+ visitor.Visit(default(IOpenApiExtensible));
+ visitor.Visit(default(IOpenApiExtension));
+ visitor.Visit(default(IList));
+ visitor.Visit(default(IDictionary));
+ visitor.Visit(default(IDictionary));
+ visitor.Visit(default(IOpenApiReferenceable));
+ visitor.Exit();
+ Assert.True(42 < ((TestVisitor)visitor).CallStack.Count());
+ }
+
+ internal protected class TestVisitor : OpenApiVisitorBase
+ {
+ public Stack CallStack { get; } = new Stack();
+
+ private string EncodeCall([CallerMemberName] string name="", [CallerLineNumber]int lineNumber = 0)
+ {
+ var encoding = $"{name}:{lineNumber}";
+ CallStack.Push(encoding);
+ return encoding;
+ }
+
+ public override void Enter(string segment)
+ {
+ EncodeCall();
+ base.Enter(segment);
+ }
+
+ public override void Exit()
+ {
+ EncodeCall();
+ base.Exit();
+ }
+
+ public override void Visit(OpenApiDocument doc)
+ {
+ EncodeCall();
+ base.Visit(doc);
+ }
+
+ public override void Visit(OpenApiInfo info)
+ {
+ EncodeCall();
+ base.Visit(info);
+ }
+
+ public override void Visit(OpenApiContact contact)
+ {
+ EncodeCall();
+ base.Visit(contact);
+ }
+
+ public override void Visit(OpenApiLicense license)
+ {
+ EncodeCall();
+ base.Visit(license);
+ }
+
+ public override void Visit(IList servers)
+ {
+ EncodeCall();
+ base.Visit(servers);
+ }
+
+ public override void Visit(OpenApiServer server)
+ {
+ EncodeCall();
+ base.Visit(server);
+ }
+
+ public override void Visit(OpenApiPaths paths)
+ {
+ EncodeCall();
+ base.Visit(paths);
+ }
+
+ public override void Visit(OpenApiPathItem pathItem)
+ {
+ EncodeCall();
+ base.Visit(pathItem);
+ }
+
+ public override void Visit(OpenApiServerVariable serverVariable)
+ {
+ EncodeCall();
+ base.Visit(serverVariable);
+ }
+
+ public override void Visit(IDictionary operations)
+ {
+ EncodeCall();
+ base.Visit(operations);
+ }
+
+ public override void Visit(OpenApiOperation operation)
+ {
+ EncodeCall();
+ base.Visit(operation);
+ }
+
+ public override void Visit(IList parameters)
+ {
+ EncodeCall();
+ base.Visit(parameters);
+ }
+
+ public override void Visit(OpenApiParameter parameter)
+ {
+ EncodeCall();
+ base.Visit(parameter);
+ }
+
+ public override void Visit(OpenApiRequestBody requestBody)
+ {
+ EncodeCall();
+ base.Visit(requestBody);
+ }
+
+ public override void Visit(IDictionary headers)
+ {
+ EncodeCall();
+ base.Visit(headers);
+ }
+
+ public override void Visit(IDictionary callbacks)
+ {
+ EncodeCall();
+ base.Visit(callbacks);
+ }
+
+ public override void Visit(OpenApiResponse response)
+ {
+ EncodeCall();
+ base.Visit(response);
+ }
+
+ public override void Visit(OpenApiResponses response)
+ {
+ EncodeCall();
+ base.Visit(response);
+ }
+
+ public override void Visit(IDictionary content)
+ {
+ EncodeCall();
+ base.Visit(content);
+ }
+
+ public override void Visit(OpenApiMediaType mediaType)
+ {
+ EncodeCall();
+ base.Visit(mediaType);
+ }
+
+ public override void Visit(OpenApiEncoding encoding)
+ {
+ EncodeCall();
+ base.Visit(encoding);
+ }
+
+ public override void Visit(IDictionary examples)
+ {
+ EncodeCall();
+ base.Visit(examples);
+ }
+
+ public override void Visit(OpenApiComponents components)
+ {
+ EncodeCall();
+ base.Visit(components);
+ }
+
+ public override void Visit(OpenApiExternalDocs externalDocs)
+ {
+ EncodeCall();
+ base.Visit(externalDocs);
+ }
+
+ public override void Visit(OpenApiSchema schema)
+ {
+ EncodeCall();
+ base.Visit(schema);
+ }
+
+ public override void Visit(IDictionary links)
+ {
+ EncodeCall();
+ base.Visit(links);
+ }
+
+ public override void Visit(OpenApiLink link)
+ {
+ EncodeCall();
+ base.Visit(link);
+ }
+
+ public override void Visit(OpenApiCallback callback)
+ {
+ EncodeCall();
+ base.Visit(callback);
+ }
+
+ public override void Visit(OpenApiTag tag)
+ {
+ EncodeCall();
+ base.Visit(tag);
+ }
+
+ public override void Visit(OpenApiHeader tag)
+ {
+ EncodeCall();
+ base.Visit(tag);
+ }
+
+ public override void Visit(OpenApiOAuthFlow openApiOAuthFlow)
+ {
+ EncodeCall();
+ base.Visit(openApiOAuthFlow);
+ }
+
+ public override void Visit(OpenApiSecurityRequirement securityRequirement)
+ {
+ EncodeCall();
+ base.Visit(securityRequirement);
+ }
+
+ public override void Visit(OpenApiSecurityScheme securityScheme)
+ {
+ EncodeCall();
+ base.Visit(securityScheme);
+ }
+
+ public override void Visit(OpenApiExample example)
+ {
+ EncodeCall();
+ base.Visit(example);
+ }
+
+ public override void Visit(IList openApiTags)
+ {
+ EncodeCall();
+ base.Visit(openApiTags);
+ }
+
+ public override void Visit(IList openApiSecurityRequirements)
+ {
+ EncodeCall();
+ base.Visit(openApiSecurityRequirements);
+ }
+
+ public override void Visit(IOpenApiExtensible openApiExtensible)
+ {
+ EncodeCall();
+ base.Visit(openApiExtensible);
+ }
+
+ public override void Visit(IOpenApiExtension openApiExtension)
+ {
+ EncodeCall();
+ base.Visit(openApiExtension);
+ }
+
+ public override void Visit(IList example)
+ {
+ EncodeCall();
+ base.Visit(example);
+ }
+
+ public override void Visit(IDictionary serverVariables)
+ {
+ EncodeCall();
+ base.Visit(serverVariables);
+ }
+
+ public override void Visit(IDictionary encodings)
+ {
+ EncodeCall();
+ base.Visit(encodings);
+ }
+
+ public override void Visit(IOpenApiReferenceable referenceable)
+ {
+ EncodeCall();
+ base.Visit(referenceable);
+ }
+ }
+ }
+}
diff --git a/test/Microsoft.OpenApi.Tests/Workspaces/OpenApiWorkspaceTests.cs b/test/Microsoft.OpenApi.Tests/Workspaces/OpenApiWorkspaceTests.cs
index b82327a5d..63045847b 100644
--- a/test/Microsoft.OpenApi.Tests/Workspaces/OpenApiWorkspaceTests.cs
+++ b/test/Microsoft.OpenApi.Tests/Workspaces/OpenApiWorkspaceTests.cs
@@ -1,5 +1,5 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT license.
+// Licensed under the MIT license.
using System;
using System.Collections.Generic;
@@ -12,7 +12,7 @@
namespace Microsoft.OpenApi.Tests
{
-
+
public class OpenApiWorkspaceTests
{
[Fact]
@@ -61,7 +61,7 @@ public void OpenApiWorkspacesAllowDocumentsToReferenceEachOther()
}
}
}
- }
+ }
}
});
workspace.AddDocument("common", new OpenApiDocument() {
@@ -111,7 +111,7 @@ public void OpenApiWorkspacesAllowDocumentsToReferenceEachOther_short()
re.CreateContent("application/json", co =>
co.Schema = new OpenApiSchema()
{
- Reference = new OpenApiReference() // Reference
+ Reference = new OpenApiReference() // Reference
{
Id = "test",
Type = ReferenceType.Schema,
@@ -126,11 +126,12 @@ public void OpenApiWorkspacesAllowDocumentsToReferenceEachOther_short()
workspace.AddDocument("root", doc);
workspace.AddDocument("common", CreateCommonDocument());
- var errors = doc.ResolveReferences(true);
+ var errors = doc.ResolveReferences();
Assert.Empty(errors);
var schema = doc.Paths["/"].Operations[OperationType.Get].Responses["200"].Content["application/json"].Schema;
- Assert.False(schema.UnresolvedReference);
+ var effectiveSchema = schema.GetEffective(doc);
+ Assert.False(effectiveSchema.UnresolvedReference);
}
[Fact]
@@ -150,7 +151,7 @@ public void OpenApiWorkspacesShouldNormalizeDocumentLocations()
// Enable Workspace to load from any reader, not just streams.
// Test fragments
- public void OpenApiWorkspacesShouldLoadDocumentFragments()
+ internal void OpenApiWorkspacesShouldLoadDocumentFragments()
{
Assert.True(false);
}
diff --git a/test/Microsoft.OpenApi.Tests/Writers/OpenApiJsonWriterTests.cs b/test/Microsoft.OpenApi.Tests/Writers/OpenApiJsonWriterTests.cs
index 06d95c9ad..44d1be55b 100644
--- a/test/Microsoft.OpenApi.Tests/Writers/OpenApiJsonWriterTests.cs
+++ b/test/Microsoft.OpenApi.Tests/Writers/OpenApiJsonWriterTests.cs
@@ -6,6 +6,7 @@
using System.Collections.Generic;
using System.Globalization;
using System.IO;
+using System.Linq;
using FluentAssertions;
using Microsoft.OpenApi.Writers;
using Newtonsoft.Json;
@@ -24,36 +25,36 @@ public OpenApiJsonWriterTests(ITestOutputHelper output)
_output = output;
}
+ static bool[] shouldProduceTerseOutputValues = new[] { true, false };
+
public static IEnumerable