Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.OData.Edm" Version="8.4.3" />
<PackageReference Include="Microsoft.OpenApi" Version="3.0.3" />
<PackageReference Include="Microsoft.OpenApi" Version="3.1.1" />
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.14.15">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,75 +368,71 @@ public async Task CreateStructuredTypePropertiesSchemaWithCustomAttributeReturns

// Assert
Assert.NotNull(json);
Assert.True(JsonObject.DeepEquals(JsonObject.Parse(@"{
""allOf"": [
Assert.True(JsonNode.DeepEquals(JsonNode.Parse(
"""
{
"allOf": [
{
""$ref"": ""#/components/schemas/microsoft.graph.entity""
"$ref": "#/components/schemas/microsoft.graph.entity"
},
{
""title"": ""userSettings"",
""type"": ""object"",
""properties"": {
""contributionToContentDiscoveryAsOrganizationDisabled"": {
""type"": ""boolean"",
""description"": ""Reflects the Office Delve organization level setting. When set to true, the organization doesn't have access to Office Delve. This setting is read-only and can only be changed by administrators in the SharePoint admin center.""
"title": "userSettings",
"type": "object",
"properties": {
"contributionToContentDiscoveryAsOrganizationDisabled": {
"type": "boolean",
"description": "Reflects the Office Delve organization level setting. When set to true, the organization doesn't have access to Office Delve. This setting is read-only and can only be changed by administrators in the SharePoint admin center."
},
""contributionToContentDiscoveryDisabled"": {
""type"": ""boolean"",
""description"": ""When set to true, documents in the user's Office Delve are disabled. Users can control this setting in Office Delve.""
"contributionToContentDiscoveryDisabled": {
"type": "boolean",
"description": "When set to true, documents in the user's Office Delve are disabled. Users can control this setting in Office Delve."
},
""itemInsights"": {
""anyOf"": [
"itemInsights": {
"anyOf": [
{
""$ref"": ""#/components/schemas/microsoft.graph.userInsightsSettings""
},
{
""nullable"": true
"$ref": "#/components/schemas/microsoft.graph.userInsightsSettings"
}
],
""description"": ""The user's settings for the visibility of meeting hour insights, and insights derived between a user and other items in Microsoft 365, such as documents or sites. Get userInsightsSettings through this navigation property."",
""x-ms-navigationProperty"": true
"description": "The user's settings for the visibility of meeting hour insights, and insights derived between a user and other items in Microsoft 365, such as documents or sites. Get userInsightsSettings through this navigation property.",
"nullable": true,
"x-ms-navigationProperty": true
},
""contactMergeSuggestions"": {
""anyOf"": [
"contactMergeSuggestions": {
"anyOf": [
{
""$ref"": ""#/components/schemas/microsoft.graph.contactMergeSuggestions""
},
{
""nullable"": true
"$ref": "#/components/schemas/microsoft.graph.contactMergeSuggestions"
}
],
""description"": ""The user's settings for the visibility of merge suggestion for the duplicate contacts in the user's contact list."",
""x-ms-navigationProperty"": true
"description": "The user's settings for the visibility of merge suggestion for the duplicate contacts in the user's contact list.",
"nullable": true,
"x-ms-navigationProperty": true
},
""regionalAndLanguageSettings"": {
""anyOf"": [
{
""$ref"": ""#/components/schemas/microsoft.graph.regionalAndLanguageSettings""
},
"regionalAndLanguageSettings": {
"anyOf": [
{
""nullable"": true
"$ref": "#/components/schemas/microsoft.graph.regionalAndLanguageSettings"
}
],
""description"": ""The user's preferences for languages, regional locale and date/time formatting."",
""x-ms-navigationProperty"": true
"description": "The user's preferences for languages, regional locale and date/time formatting.",
"nullable": true,
"x-ms-navigationProperty": true
},
""shiftPreferences"": {
""anyOf"": [
{
""$ref"": ""#/components/schemas/microsoft.graph.shiftPreferences""
},
"shiftPreferences": {
"anyOf": [
{
""nullable"": true
"$ref": "#/components/schemas/microsoft.graph.shiftPreferences"
}
],
""description"": ""The shift preferences for the user."",
""x-ms-navigationProperty"": true
"description": "The shift preferences for the user.",
"nullable": true,
"x-ms-navigationProperty": true
}
}
}
]
}"), JsonObject.Parse(json)));
}
"""
), JsonNode.Parse(json)));
}

[Fact]
Expand Down Expand Up @@ -920,12 +916,10 @@ public async Task CreatePropertySchemaForNullableEnumPropertyReturnSchema(OpenAp
"anyOf": [
{
"$ref": "#/components/schemas/DefaultNs.Color"
},
{
"nullable": true
}
],
"default": "yellow"
"default": "yellow",
"nullable": true
}
""",
OpenApiSpecVersion.OpenApi3_1 =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5017,14 +5017,13 @@
"format": "int32"
},
"Document": {
"type": "object",
"anyOf": [
{
"$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document"
},
{
"nullable": true
}
],
"nullable": true,
"x-ms-navigationProperty": true
}
},
Expand Down Expand Up @@ -5365,36 +5364,33 @@
}
},
"Library": {
"type": "object",
"anyOf": [
{
"$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library"
},
{
"nullable": true
}
],
"nullable": true,
"x-ms-navigationProperty": true
},
"LastRevisionFile": {
"type": "object",
"anyOf": [
{
"$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.DocumentFile.DocumentFile"
},
{
"nullable": true
}
],
"nullable": true,
"x-ms-navigationProperty": true
},
"SourceDocument": {
"type": "object",
"anyOf": [
{
"$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document"
},
{
"nullable": true
}
],
"nullable": true,
"x-ms-navigationProperty": true
},
"SourceDocumentChildren": {
Expand Down Expand Up @@ -5536,14 +5532,13 @@
"type": "boolean"
},
"Document": {
"type": "object",
"anyOf": [
{
"$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document"
},
{
"nullable": true
}
],
"nullable": true,
"x-ms-navigationProperty": true
}
},
Expand Down Expand Up @@ -5606,25 +5601,23 @@
"format": "date-time"
},
"Document": {
"type": "object",
"anyOf": [
{
"$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document"
},
{
"nullable": true
}
],
"nullable": true,
"x-ms-navigationProperty": true
},
"Tag": {
"type": "object",
"anyOf": [
{
"$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Tags.Tag"
},
{
"nullable": true
}
],
"nullable": true,
"x-ms-navigationProperty": true
}
},
Expand Down Expand Up @@ -5865,36 +5858,33 @@
"format": "int32"
},
"LibraryParent": {
"type": "object",
"anyOf": [
{
"$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library"
},
{
"nullable": true
}
],
"nullable": true,
"x-ms-navigationProperty": true
},
"Type": {
"type": "object",
"anyOf": [
{
"$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType"
},
{
"nullable": true
}
],
"nullable": true,
"x-ms-navigationProperty": true
},
"SourceFolder": {
"type": "object",
"anyOf": [
{
"$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library"
},
{
"nullable": true
}
],
"nullable": true,
"x-ms-navigationProperty": true
},
"Documents": {
Expand Down Expand Up @@ -6065,25 +6055,23 @@
"type": "boolean"
},
"MasterLibraryType": {
"type": "object",
"anyOf": [
{
"$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType"
},
{
"nullable": true
}
],
"nullable": true,
"x-ms-navigationProperty": true
},
"ParentLibraryTypes": {
"type": "object",
"anyOf": [
{
"$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType"
},
{
"nullable": true
}
],
"nullable": true,
"x-ms-navigationProperty": true
},
"MasterLibraryTypeChildren": {
Expand Down Expand Up @@ -6591,14 +6579,13 @@
"nullable": true
},
"Document": {
"type": "object",
"anyOf": [
{
"$ref": "#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document"
},
{
"nullable": true
}
],
"nullable": true,
"x-ms-navigationProperty": true
}
},
Expand Down
Loading
Loading