Skip to content

Commit

Permalink
Merge pull request #1166 from microsoftgraph/dev
Browse files Browse the repository at this point in the history
Merges dev into master
  • Loading branch information
MaggieKimani1 authored Sep 1, 2022
2 parents b097da4 + a51b7ce commit e1ec4a4
Show file tree
Hide file tree
Showing 21 changed files with 360 additions and 80 deletions.
2 changes: 1 addition & 1 deletion ChangesService.Test/ChangesService.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.1" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" />
<PackageReference Include="coverlet.collector" Version="3.1.2" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.1.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.1" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PrivateAssets>all</PrivateAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.1" />
<PackageReference Include="moq" Version="4.18.2" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
Expand Down
2 changes: 1 addition & 1 deletion ExceptionMiddleware/ExceptionMiddleware.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.1" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
Expand Down
2 changes: 1 addition & 1 deletion FileService.Test/FileService.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.1" />
<PackageReference Include="Moq" Version="4.18.2" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
Expand Down
3 changes: 2 additions & 1 deletion GraphWebApi/Middleware/ExceptionMiddleware.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ------------------------------------------------------------------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------------------------------------------------------------------------------

Expand Down Expand Up @@ -52,6 +52,7 @@ private static Task HandleGlobalExceptionAsync(HttpContext context, Exception ex
ArgumentNullException => StatusCodes.Status400BadRequest,
InvalidOperationException => StatusCodes.Status400BadRequest,
ArgumentException => StatusCodes.Status404NotFound,
EntryPointNotFoundException => StatusCodes.Status404NotFound,
Exception => StatusCodes.Status500InternalServerError
};

Expand Down
2 changes: 1 addition & 1 deletion KnownIssuesService.Test/KnownIssuesService.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="6.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.1" />
<PackageReference Include="Moq" Version="4.18.2" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
Expand Down
230 changes: 228 additions & 2 deletions OpenAPIService.Test/OpenAPIDocumentCreatorMock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,46 @@ private OpenApiDocument CreateOpenApiDocument()
}
}
}
},
Links = new Dictionary<string, OpenApiLink>
{
{
"link-1", new OpenApiLink
{
Reference = new OpenApiReference
{
Type = ReferenceType.Link,
Id = "link-1"
}
}
}
}
}
}
},
Parameters = new List<OpenApiParameter>
{
new OpenApiParameter
{
Reference = new OpenApiReference
{
Type = ReferenceType.Header,
Id = "ConsistencyLevel"
},
Examples = new Dictionary<string, OpenApiExample>
{
{
"eventual-consistency-example", new OpenApiExample
{
Reference = new OpenApiReference
{
Type = ReferenceType.Example,
Id = "eventual-consistency-example"
}
}
}
}
}
}
}
}
Expand Down Expand Up @@ -917,7 +954,7 @@ private OpenApiDocument CreateOpenApiDocument()
}
}
},
["/applications/{application-id}/createdOnBehalfOf/$ref"] = new OpenApiPathItem()
["/applications/{application-id}/createdOnBehalfOf/$ref"] = new OpenApiPathItem
{
Operations = new Dictionary<OperationType, OpenApiOperation>
{
Expand All @@ -932,7 +969,59 @@ private OpenApiDocument CreateOpenApiDocument()
}
},
OperationId = "applications.GetRefCreatedOnBehalfOf",
Summary = "Get ref of createdOnBehalfOf from applications"
Summary = "Get ref of createdOnBehalfOf from applications",
Parameters = new List<OpenApiParameter>
{
new OpenApiParameter
{
Reference = new OpenApiReference
{
Type = ReferenceType.Parameter,
Id = "top"
}
}
},
Responses = new OpenApiResponses
{
{
"200", new OpenApiResponse
{
Reference = new OpenApiReference
{
Type = ReferenceType.Response,
Id = "StringCollectionResponse"
}
}
}
}
}
}
}
},
["/applications/{application-id}/owners/$ref"] = new OpenApiPathItem
{
Operations = new Dictionary<OperationType, OpenApiOperation>
{
{
OperationType.Post, new OpenApiOperation
{
Tags = new List<OpenApiTag>
{
new OpenApiTag()
{
Name = "applications.directoryObject"
}
},
OperationId = "applications.CreateRefOwners",
Summary = "Create new navigation property ref to owners for applications",
RequestBody = new OpenApiRequestBody
{
Reference = new OpenApiReference
{
Type = ReferenceType.RequestBody,
Id = "refPostBody"
}
}
}
}
}
Expand All @@ -959,6 +1048,143 @@ private OpenApiDocument CreateOpenApiDocument()
}
}
}
},
{
"ReferenceCreate", new OpenApiSchema
{
Type = "object",
Properties = new Dictionary<string, OpenApiSchema>
{
{
"@odata.id", new OpenApiSchema
{
Type = "string"
}
}
}
}
},
{
"StringCollectionResponse", new OpenApiSchema
{
Type = "object",
Properties = new Dictionary<string, OpenApiSchema>
{
{
"value", new OpenApiSchema
{
Type = "array",
Items = new OpenApiSchema
{
Type = "string"
}
}
}
}
}
}
},
RequestBodies = new Dictionary<string, OpenApiRequestBody>
{
{
"refPostBody", new OpenApiRequestBody
{
Content = new Dictionary<string, OpenApiMediaType>
{
{
"application/json", new OpenApiMediaType
{
Schema = new OpenApiSchema
{
Reference = new OpenApiReference
{
Type = ReferenceType.Schema,
Id = "ReferenceCreate"
}
}
}
}
}
}
}
},
Parameters = new Dictionary<string, OpenApiParameter>
{
{
"top", new OpenApiParameter
{
Name = "$top",
In = ParameterLocation.Query,
Schema = new OpenApiSchema
{
Minimum = 0,
Type = "integer"
}
}
}
},
Responses = new Dictionary<string, OpenApiResponse>
{
{
"StringCollectionResponse", new OpenApiResponse
{
Content = new Dictionary<string, OpenApiMediaType>
{
{
"application/json", new OpenApiMediaType
{
Schema = new OpenApiSchema
{
Reference = new OpenApiReference
{
Type = ReferenceType.Schema,
Id = "StringCollectionResponse"
}
}
}
}
}
}
}
},
Examples = new Dictionary<string, OpenApiExample>
{
{
"eventual-consistency-example", new OpenApiExample
{
Summary = "ConsistencyLevel header",
Description = "Set the ConsistencyLevel HTTP header to 'eventual'."
}
}
},
Headers = new Dictionary<string, OpenApiHeader>
{
{
"ConsistencyLevel", new OpenApiHeader
{
Schema = new OpenApiSchema
{
Type = "string"
}
}
}
},
SecuritySchemes = new Dictionary<string, OpenApiSecurityScheme>
{
{
"azureaadv2", new OpenApiSecurityScheme
{
Type = SecuritySchemeType.OAuth2
}
}
},
Links = new Dictionary<string, OpenApiLink>
{
{
"link-1", new OpenApiLink
{
OperationId = "users.user.ListUser"
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion OpenAPIService.Test/OpenAPIService.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.1" />
<PackageReference Include="Microsoft.OpenApi" Version="1.3.1-preview5" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
Expand Down
Loading

0 comments on commit e1ec4a4

Please sign in to comment.