diff --git a/src/Microsoft.OpenApi.OData.Reader/Microsoft.OpenAPI.OData.Reader.csproj b/src/Microsoft.OpenApi.OData.Reader/Microsoft.OpenAPI.OData.Reader.csproj index 09da523b..0a3a7d06 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Microsoft.OpenAPI.OData.Reader.csproj +++ b/src/Microsoft.OpenApi.OData.Reader/Microsoft.OpenAPI.OData.Reader.csproj @@ -30,7 +30,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V2.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V2.json index d5e7cd42..14188e91 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V2.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V2.json @@ -1066,6 +1066,20 @@ } } }, + "example": { + "UserName": "string (identifier)", + "HomeAddress": { + "@odata.type": "DefaultNs.Address" + }, + "WorkAddress": { + "@odata.type": "DefaultNs.Address" + }, + "Addresses": [ + { + "@odata.type": "DefaultNs.Address" + } + ] + }, "example": { "UserName": "string (identifier)", "HomeAddress": { @@ -1089,6 +1103,9 @@ "type": "string" } }, + "example": { + "Name": "string (identifier)" + }, "example": { "Name": "string (identifier)" } @@ -1101,6 +1118,9 @@ "type": "string" } }, + "example": { + "Name": "string (identifier)" + }, "example": { "Name": "string (identifier)" } @@ -1119,6 +1139,12 @@ "$ref": "#/definitions/DefaultNs.City" } }, + "example": { + "Id": 0, + "City": { + "@odata.type": "DefaultNs.City" + } + }, "example": { "Id": 0, "City": { @@ -1141,6 +1167,15 @@ } } ], + "example": { + "Id": 0, + "City": { + "@odata.type": "DefaultNs.City" + }, + "CountryOrRegion": { + "@odata.type": "DefaultNs.CountryOrRegion" + } + }, "example": { "Id": 0, "City": { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V2.yaml b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V2.yaml index c4bf24aa..e025d6ff 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V2.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Basic.OpenApi.V2.yaml @@ -712,6 +712,14 @@ definitions: '@odata.type': DefaultNs.Address Addresses: - '@odata.type': DefaultNs.Address + example: + UserName: string (identifier) + HomeAddress: + '@odata.type': DefaultNs.Address + WorkAddress: + '@odata.type': DefaultNs.Address + Addresses: + - '@odata.type': DefaultNs.Address DefaultNs.City: type: object title: City @@ -720,6 +728,8 @@ definitions: type: string example: Name: string (identifier) + example: + Name: string (identifier) DefaultNs.CountryOrRegion: type: object title: CountryOrRegion @@ -728,6 +738,8 @@ definitions: type: string example: Name: string (identifier) + example: + Name: string (identifier) DefaultNs.Address: type: object title: Address @@ -743,6 +755,10 @@ definitions: Id: 0 City: '@odata.type': DefaultNs.City + example: + Id: 0 + City: + '@odata.type': DefaultNs.City DefaultNs.WorkAddress: allOf: - $ref: '#/definitions/DefaultNs.Address' @@ -757,6 +773,12 @@ definitions: '@odata.type': DefaultNs.City CountryOrRegion: '@odata.type': DefaultNs.CountryOrRegion + example: + Id: 0 + City: + '@odata.type': DefaultNs.City + CountryOrRegion: + '@odata.type': DefaultNs.CountryOrRegion DefaultNs.PersonCollectionResponse: type: object title: Collection of Person diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V2.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V2.json index 33379332..df486234 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V2.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V2.json @@ -4557,6 +4557,27 @@ "x-ms-navigationProperty": true } }, + "example": { + "Id": 0, + "Name": "string", + "Description": "string", + "Filename": "string", + "NumberOfRevisions": "string", + "Suffix": "string", + "DomainId": 0, + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModifiedBy": 0, + "Tags": [ + { + "@odata.type": "Siterra.Documents.App.DTO.DocumentTagRelDto" + } + ], + "Revisions": [ + { + "@odata.type": "Siterra.Documents.App.DTO.RevisionDto" + } + ] + }, "example": { "Id": 0, "Name": "string", @@ -4670,6 +4691,28 @@ "x-ms-navigationProperty": true } }, + "example": { + "Id": 0, + "Name": "string", + "Number": "string", + "Description": "string", + "LibraryTemplateId": 0, + "ParentTypeId": 0, + "ParentId": 0, + "AllowMultiple": true, + "AutoCreate": true, + "TypeId": 0, + "DomainId": 0, + "CreatedBy": 0, + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModifiedBy": 0, + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "Documents": [ + { + "@odata.type": "Siterra.Documents.App.DTO.DocumentDto" + } + ] + }, "example": { "Id": 0, "Name": "string", @@ -4793,6 +4836,28 @@ "$ref": "#/definitions/Siterra.Documents.BusinessLogic.Entities.Document.Document" } }, + "example": { + "Id": 0, + "Number": 0, + "DocumentId": 0, + "DocumentName": "string", + "DocumentDescription": "string", + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "CreatedBy": 0, + "IsReviewed": true, + "ReviewedBy": 0, + "ReviewedDate": "0001-01-01T00:00:00.0000000+00:00", + "IsApproved": true, + "ApprovedBy": 0, + "ApprovedDate": "0001-01-01T00:00:00.0000000+00:00", + "IsRejected": true, + "RejectedBy": 0, + "RejectedDate": "0001-01-01T00:00:00.0000000+00:00", + "DomainId": 0, + "Document": { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" + } + }, "example": { "Id": 0, "Number": 0, @@ -4851,6 +4916,14 @@ "minimum": -2147483648 } }, + "example": { + "Id": 0, + "Name": "string", + "Description": "string", + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "DomainId": 0 + }, "example": { "Id": 0, "Name": "string", @@ -4869,6 +4942,9 @@ "x-nullable": true } }, + "example": { + "Name": "string" + }, "example": { "Name": "string" } @@ -5153,6 +5229,81 @@ "x-ms-navigationProperty": true } }, + "example": { + "Id": 0, + "Name": "string", + "Description": "string", + "StatusId": 0, + "TypeId": 0, + "Keywords": "string", + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "CreatedBy": 0, + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModifiedBy": 0, + "DomainId": 0, + "LibraryId": 0, + "OwnerUserId": 0, + "StatusDate": "0001-01-01T00:00:00.0000000+00:00", + "LastRevisionId": 0, + "CheckoutDate": "0001-01-01T00:00:00.0000000+00:00", + "CheckoutPath": "string", + "CheckoutUserId": 0, + "Number": "string", + "OriginalDate": "0001-01-01T00:00:00.0000000+00:00", + "FileSized": 0, + "FileClientPath": "string", + "LastRevisionFileId": 0, + "IsDeleted": 0, + "IsNa": 0, + "IsRejected": 0, + "IsReviewed": 0, + "NaDescription": "string", + "NaReason": "string", + "RejectedDescription": "string", + "RejectedReason": "string", + "ReviewDescription": "string", + "SourceDocumentId": 0, + "ScraperMapId": 0, + "LastDownloadedDate": "0001-01-01T00:00:00.0000000+00:00", + "SmsId": 0, + "IsApprovedOld": 0, + "Suffix": "string", + "ScrapeResultId": 0, + "IsApproved": 0, + "CategoryId": 0, + "SectionId": 0, + "VersionCount": 0, + "LastFileName": "string", + "DocumentClasses": [ + { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.DocumentClass" + } + ], + "Tags": [ + { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel" + } + ], + "Library": { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.Library" + }, + "LastRevisionFile": { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.DocumentFile.DocumentFile" + }, + "SourceDocument": { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" + }, + "SourceDocumentChildren": [ + { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" + } + ], + "Revisions": [ + { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Revision.Revision" + } + ] + }, "example": { "Id": 0, "Name": "string", @@ -5280,6 +5431,19 @@ "$ref": "#/definitions/Siterra.Documents.BusinessLogic.Entities.Document.Document" } }, + "example": { + "ClassInstance": 0, + "ClassId": 0, + "DocumentId": 0, + "CreatedBy": 0, + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModifiedBy": 0, + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "IsPrimary": true, + "Document": { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" + } + }, "example": { "ClassInstance": 0, "ClassId": 0, @@ -5345,6 +5509,21 @@ "$ref": "#/definitions/Siterra.Documents.BusinessLogic.Entities.Tags.Tag" } }, + "example": { + "DocumentId": 0, + "TagId": 0, + "DomainId": 0, + "CreatedBy": 0, + "ModifiedBy": 0, + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "Document": { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" + }, + "Tag": { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Tags.Tag" + } + }, "example": { "DocumentId": 0, "TagId": 0, @@ -5612,6 +5791,69 @@ "x-ms-navigationProperty": true } }, + "example": { + "Id": 0, + "DomainId": 0, + "Name": "string", + "ParentFolderId": 0, + "Number": "string", + "TypeId": 0, + "OwnerUserId": 0, + "TotalSize": 0, + "FilesCounter": 0, + "FoldersCounter": 0, + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModifiedBy": 0, + "CreatedBy": 0, + "ProjectId": 0, + "SearchRingId": 0, + "SiteId": 0, + "AssetId": 0, + "AllowMultiple": true, + "AutoCreate": true, + "Description": "string", + "IsTemplate": true, + "ProgramId": 0, + "SourceFolderId": 0, + "TemplateClassId": 0, + "TemplateSubType": 0, + "IsHidden": true, + "IsDeleted": 0, + "StatusId": 0, + "SmsId": 0, + "ContractId": 0, + "VendorId": 0, + "OrganizationUnitId": 0, + "IncidentId": 0, + "EventId": 0, + "ClassInstance": 0, + "ClassId": 0, + "LibraryParent": { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.Library" + }, + "Type": { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.LibraryType" + }, + "SourceFolder": { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.Library" + }, + "Documents": [ + { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" + } + ], + "LibraryChildren": [ + { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.Library" + } + ], + "SourceLibraryChildren": [ + { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.Library" + } + ] + }, "example": { "Id": 0, "DomainId": 0, @@ -5778,6 +6020,38 @@ "x-ms-navigationProperty": true } }, + "example": { + "Id": 0, + "Name": "string", + "ModifiedBy": 0, + "CreatedBy": 0, + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "DomainId": 0, + "Description": "string", + "XmlName": "string", + "MasterId": 0, + "Number": 0, + "ClassId": 0, + "ParentId": 0, + "HasChanged": true, + "MasterLibraryType": { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.LibraryType" + }, + "ParentLibraryTypes": { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.LibraryType" + }, + "MasterLibraryTypeChildren": [ + { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.LibraryType" + } + ], + "ChildrenLibraryTypes": [ + { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Library.LibraryType" + } + ] + }, "example": { "Id": 0, "Name": "string", @@ -5914,6 +6188,30 @@ "x-ms-navigationProperty": true } }, + "example": { + "Id": 0, + "Name": "string", + "Path": "string", + "ModifiedBy": 0, + "CreatedBy": 0, + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "Sized": 0, + "ActualName": "string", + "DomainId": 0, + "SourceClassId": 0, + "ContentTypeId": 0, + "ClientPath": "string", + "IsSelfHosted": 0, + "SmsId": 0, + "Latitude": 0, + "Longitude": 0, + "Documents": [ + { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" + } + ] + }, "example": { "Id": 0, "Name": "string", @@ -5986,6 +6284,16 @@ "pattern": "^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$" } }, + "example": { + "Id": 0, + "DomainId": 0, + "Name": "string", + "Description": "string", + "CreatedBy": 0, + "ModifiedBy": 0, + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00" + }, "example": { "Id": 0, "DomainId": 0, @@ -6015,6 +6323,21 @@ } } ], + "example": { + "Id": 0, + "DomainId": 0, + "Name": "string", + "Description": "string", + "CreatedBy": 0, + "ModifiedBy": 0, + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "Documents": [ + { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel" + } + ] + }, "example": { "Id": 0, "DomainId": 0, @@ -6050,6 +6373,21 @@ } } ], + "example": { + "Id": 0, + "DomainId": 0, + "Name": "string", + "Description": "string", + "CreatedBy": 0, + "ModifiedBy": 0, + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "Documents": [ + { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" + } + ] + }, "example": { "Id": 0, "DomainId": 0, @@ -6085,6 +6423,21 @@ } } ], + "example": { + "Id": 0, + "DomainId": 0, + "Name": "string", + "Description": "string", + "CreatedBy": 0, + "ModifiedBy": 0, + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "Documents": [ + { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" + } + ] + }, "example": { "Id": 0, "DomainId": 0, @@ -6271,6 +6624,43 @@ "$ref": "#/definitions/Siterra.Documents.BusinessLogic.Entities.Document.Document" } }, + "example": { + "Id": 0, + "Number": 0, + "DocumentId": 0, + "ModificationDate": "0001-01-01T00:00:00.0000000+00:00", + "CreationDate": "0001-01-01T00:00:00.0000000+00:00", + "ModifiedBy": 0, + "CreatedBy": 0, + "Remarks": "string", + "FileId": 0, + "DocumentOwnerContact": 0, + "DocumentDescription": "string", + "DocumentStatusDate": "0001-01-01T00:00:00.0000000+00:00", + "DocumentFolder": "string", + "DocumentKeywords": "string", + "DocumentStatus": "string", + "DocumentType": "string", + "DocumentName": "string", + "DocumentNumber": "string", + "DomainId": 0, + "IsDeleted": 0, + "IsReviewed": true, + "ReviewDescription": "string", + "ReviewedBy": 0, + "IsRejected": true, + "RejectedReason": "string", + "RejectedDescription": "string", + "RejectedBy": 0, + "IsApproved": true, + "ApprovedBy": 0, + "ReviewedDate": "0001-01-01T00:00:00.0000000+00:00", + "RejectedDate": "0001-01-01T00:00:00.0000000+00:00", + "ApprovedDate": "0001-01-01T00:00:00.0000000+00:00", + "Document": { + "@odata.type": "Siterra.Documents.BusinessLogic.Entities.Document.Document" + } + }, "example": { "Id": 0, "Number": 0, diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V2.yaml b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V2.yaml index 981a2e20..dd12171a 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V2.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.V2.yaml @@ -3235,6 +3235,20 @@ definitions: - '@odata.type': Siterra.Documents.App.DTO.DocumentTagRelDto Revisions: - '@odata.type': Siterra.Documents.App.DTO.RevisionDto + example: + Id: 0 + Name: string + Description: string + Filename: string + NumberOfRevisions: string + Suffix: string + DomainId: 0 + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + ModifiedBy: 0 + Tags: + - '@odata.type': Siterra.Documents.App.DTO.DocumentTagRelDto + Revisions: + - '@odata.type': Siterra.Documents.App.DTO.RevisionDto Siterra.Documents.App.DTO.LibraryDto: type: object title: LibraryDto @@ -3326,6 +3340,24 @@ definitions: ModificationDate: '0001-01-01T00:00:00.0000000+00:00' Documents: - '@odata.type': Siterra.Documents.App.DTO.DocumentDto + example: + Id: 0 + Name: string + Number: string + Description: string + LibraryTemplateId: 0 + ParentTypeId: 0 + ParentId: 0 + AllowMultiple: true + AutoCreate: true + TypeId: 0 + DomainId: 0 + CreatedBy: 0 + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModifiedBy: 0 + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + Documents: + - '@odata.type': Siterra.Documents.App.DTO.DocumentDto Siterra.Documents.App.DTO.RevisionDto: type: object title: RevisionDto @@ -3427,6 +3459,26 @@ definitions: DomainId: 0 Document: '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document + example: + Id: 0 + Number: 0 + DocumentId: 0 + DocumentName: string + DocumentDescription: string + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + CreatedBy: 0 + IsReviewed: true + ReviewedBy: 0 + ReviewedDate: '0001-01-01T00:00:00.0000000+00:00' + IsApproved: true + ApprovedBy: 0 + ApprovedDate: '0001-01-01T00:00:00.0000000+00:00' + IsRejected: true + RejectedBy: 0 + RejectedDate: '0001-01-01T00:00:00.0000000+00:00' + DomainId: 0 + Document: + '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document Siterra.Documents.App.DTO.CategoryDto: type: object title: CategoryDto @@ -3462,6 +3514,13 @@ definitions: CreationDate: '0001-01-01T00:00:00.0000000+00:00' ModificationDate: '0001-01-01T00:00:00.0000000+00:00' DomainId: 0 + example: + Id: 0 + Name: string + Description: string + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + DomainId: 0 Siterra.Documents.App.DTO.DocumentTagRelDto: type: object title: DocumentTagRelDto @@ -3471,6 +3530,8 @@ definitions: x-nullable: true example: Name: string + example: + Name: string Siterra.Documents.BusinessLogic.Entities.Document.Document: type: object title: Document @@ -3754,6 +3815,65 @@ definitions: - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document Revisions: - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Revision.Revision + example: + Id: 0 + Name: string + Description: string + StatusId: 0 + TypeId: 0 + Keywords: string + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + CreatedBy: 0 + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + ModifiedBy: 0 + DomainId: 0 + LibraryId: 0 + OwnerUserId: 0 + StatusDate: '0001-01-01T00:00:00.0000000+00:00' + LastRevisionId: 0 + CheckoutDate: '0001-01-01T00:00:00.0000000+00:00' + CheckoutPath: string + CheckoutUserId: 0 + Number: string + OriginalDate: '0001-01-01T00:00:00.0000000+00:00' + FileSized: 0 + FileClientPath: string + LastRevisionFileId: 0 + IsDeleted: 0 + IsNa: 0 + IsRejected: 0 + IsReviewed: 0 + NaDescription: string + NaReason: string + RejectedDescription: string + RejectedReason: string + ReviewDescription: string + SourceDocumentId: 0 + ScraperMapId: 0 + LastDownloadedDate: '0001-01-01T00:00:00.0000000+00:00' + SmsId: 0 + IsApprovedOld: 0 + Suffix: string + ScrapeResultId: 0 + IsApproved: 0 + CategoryId: 0 + SectionId: 0 + VersionCount: 0 + LastFileName: string + DocumentClasses: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.DocumentClass + Tags: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel + Library: + '@odata.type': Siterra.Documents.BusinessLogic.Entities.Library.Library + LastRevisionFile: + '@odata.type': Siterra.Documents.BusinessLogic.Entities.DocumentFile.DocumentFile + SourceDocument: + '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document + SourceDocumentChildren: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document + Revisions: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Revision.Revision Siterra.Documents.BusinessLogic.Entities.Document.DocumentClass: type: object title: DocumentClass @@ -3806,6 +3926,17 @@ definitions: IsPrimary: true Document: '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document + example: + ClassInstance: 0 + ClassId: 0 + DocumentId: 0 + CreatedBy: 0 + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModifiedBy: 0 + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + IsPrimary: true + Document: + '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel: type: object title: DocumentTagRel @@ -3859,6 +3990,18 @@ definitions: '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document Tag: '@odata.type': Siterra.Documents.BusinessLogic.Entities.Tags.Tag + example: + DocumentId: 0 + TagId: 0 + DomainId: 0 + CreatedBy: 0 + ModifiedBy: 0 + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + Document: + '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document + Tag: + '@odata.type': Siterra.Documents.BusinessLogic.Entities.Tags.Tag Siterra.Documents.BusinessLogic.Entities.Library.Library: type: object title: Library @@ -4113,6 +4256,56 @@ definitions: - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Library.Library SourceLibraryChildren: - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Library.Library + example: + Id: 0 + DomainId: 0 + Name: string + ParentFolderId: 0 + Number: string + TypeId: 0 + OwnerUserId: 0 + TotalSize: 0 + FilesCounter: 0 + FoldersCounter: 0 + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + ModifiedBy: 0 + CreatedBy: 0 + ProjectId: 0 + SearchRingId: 0 + SiteId: 0 + AssetId: 0 + AllowMultiple: true + AutoCreate: true + Description: string + IsTemplate: true + ProgramId: 0 + SourceFolderId: 0 + TemplateClassId: 0 + TemplateSubType: 0 + IsHidden: true + IsDeleted: 0 + StatusId: 0 + SmsId: 0 + ContractId: 0 + VendorId: 0 + OrganizationUnitId: 0 + IncidentId: 0 + EventId: 0 + ClassInstance: 0 + ClassId: 0 + LibraryParent: + '@odata.type': Siterra.Documents.BusinessLogic.Entities.Library.Library + Type: + '@odata.type': Siterra.Documents.BusinessLogic.Entities.Library.LibraryType + SourceFolder: + '@odata.type': Siterra.Documents.BusinessLogic.Entities.Library.Library + Documents: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document + LibraryChildren: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Library.Library + SourceLibraryChildren: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Library.Library Siterra.Documents.BusinessLogic.Entities.Library.LibraryType: type: object title: LibraryType @@ -4217,6 +4410,29 @@ definitions: - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Library.LibraryType ChildrenLibraryTypes: - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Library.LibraryType + example: + Id: 0 + Name: string + ModifiedBy: 0 + CreatedBy: 0 + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + DomainId: 0 + Description: string + XmlName: string + MasterId: 0 + Number: 0 + ClassId: 0 + ParentId: 0 + HasChanged: true + MasterLibraryType: + '@odata.type': Siterra.Documents.BusinessLogic.Entities.Library.LibraryType + ParentLibraryTypes: + '@odata.type': Siterra.Documents.BusinessLogic.Entities.Library.LibraryType + MasterLibraryTypeChildren: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Library.LibraryType + ChildrenLibraryTypes: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Library.LibraryType Siterra.Documents.BusinessLogic.Entities.DocumentFile.DocumentFile: type: object title: DocumentFile @@ -4320,6 +4536,26 @@ definitions: Longitude: 0 Documents: - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document + example: + Id: 0 + Name: string + Path: string + ModifiedBy: 0 + CreatedBy: 0 + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + Sized: 0 + ActualName: string + DomainId: 0 + SourceClassId: 0 + ContentTypeId: 0 + ClientPath: string + IsSelfHosted: 0 + SmsId: 0 + Latitude: 0 + Longitude: 0 + Documents: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document Siterra.Documents.BusinessLogic.Entities.Tags.Tag: type: object title: Tag @@ -4367,6 +4603,15 @@ definitions: ModifiedBy: 0 CreationDate: '0001-01-01T00:00:00.0000000+00:00' ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + example: + Id: 0 + DomainId: 0 + Name: string + Description: string + CreatedBy: 0 + ModifiedBy: 0 + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' Siterra.Documents.BusinessLogic.Entities.Tags.UserDefinedTag: allOf: - $ref: '#/definitions/Siterra.Documents.BusinessLogic.Entities.Tags.Tag' @@ -4388,6 +4633,17 @@ definitions: ModificationDate: '0001-01-01T00:00:00.0000000+00:00' Documents: - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel + example: + Id: 0 + DomainId: 0 + Name: string + Description: string + CreatedBy: 0 + ModifiedBy: 0 + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + Documents: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.DocumentTagRel Siterra.Documents.BusinessLogic.Entities.Tags.Section: allOf: - $ref: '#/definitions/Siterra.Documents.BusinessLogic.Entities.Tags.Tag' @@ -4410,6 +4666,17 @@ definitions: ModificationDate: '0001-01-01T00:00:00.0000000+00:00' Documents: - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document + example: + Id: 0 + DomainId: 0 + Name: string + Description: string + CreatedBy: 0 + ModifiedBy: 0 + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + Documents: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document Siterra.Documents.BusinessLogic.Entities.Tags.Category: allOf: - $ref: '#/definitions/Siterra.Documents.BusinessLogic.Entities.Tags.Tag' @@ -4432,6 +4699,17 @@ definitions: ModificationDate: '0001-01-01T00:00:00.0000000+00:00' Documents: - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document + example: + Id: 0 + DomainId: 0 + Name: string + Description: string + CreatedBy: 0 + ModifiedBy: 0 + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + Documents: + - '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document Siterra.Documents.BusinessLogic.Entities.Revision.Revision: type: object title: Revision @@ -4603,6 +4881,41 @@ definitions: ApprovedDate: '0001-01-01T00:00:00.0000000+00:00' Document: '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document + example: + Id: 0 + Number: 0 + DocumentId: 0 + ModificationDate: '0001-01-01T00:00:00.0000000+00:00' + CreationDate: '0001-01-01T00:00:00.0000000+00:00' + ModifiedBy: 0 + CreatedBy: 0 + Remarks: string + FileId: 0 + DocumentOwnerContact: 0 + DocumentDescription: string + DocumentStatusDate: '0001-01-01T00:00:00.0000000+00:00' + DocumentFolder: string + DocumentKeywords: string + DocumentStatus: string + DocumentType: string + DocumentName: string + DocumentNumber: string + DomainId: 0 + IsDeleted: 0 + IsReviewed: true + ReviewDescription: string + ReviewedBy: 0 + IsRejected: true + RejectedReason: string + RejectedDescription: string + RejectedBy: 0 + IsApproved: true + ApprovedBy: 0 + ReviewedDate: '0001-01-01T00:00:00.0000000+00:00' + RejectedDate: '0001-01-01T00:00:00.0000000+00:00' + ApprovedDate: '0001-01-01T00:00:00.0000000+00:00' + Document: + '@odata.type': Siterra.Documents.BusinessLogic.Entities.Document.Document Siterra.Documents.App.DTO.DocumentDtoCollectionResponse: type: object title: Collection of DocumentDto diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.json index b00992a6..4f9050a4 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.json @@ -5018,7 +5018,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "x-ms-navigationProperty": true @@ -5368,7 +5369,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "x-ms-navigationProperty": true @@ -5381,7 +5383,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "x-ms-navigationProperty": true @@ -5394,7 +5397,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "x-ms-navigationProperty": true @@ -5545,7 +5549,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "x-ms-navigationProperty": true @@ -5617,7 +5622,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "x-ms-navigationProperty": true @@ -5630,7 +5636,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "x-ms-navigationProperty": true @@ -5880,7 +5887,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "x-ms-navigationProperty": true @@ -5893,7 +5901,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "x-ms-navigationProperty": true @@ -5906,7 +5915,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "x-ms-navigationProperty": true @@ -6086,7 +6096,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "x-ms-navigationProperty": true @@ -6099,7 +6110,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "x-ms-navigationProperty": true @@ -6616,7 +6628,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "x-ms-navigationProperty": true @@ -7512,4 +7525,4 @@ "x-ms-docs-toc-type": "page" } ] -} +} \ No newline at end of file diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.yaml b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.yaml index 715d8e71..1f32eb54 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/Multiple.Schema.OpenApi.yaml @@ -3530,6 +3530,7 @@ components: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' - enum: - null + nullable: true x-ms-navigationProperty: true example: Id: 0 @@ -3808,18 +3809,21 @@ components: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library' - enum: - null + nullable: true x-ms-navigationProperty: true LastRevisionFile: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.DocumentFile.DocumentFile' - enum: - null + nullable: true x-ms-navigationProperty: true SourceDocument: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' - enum: - null + nullable: true x-ms-navigationProperty: true SourceDocumentChildren: type: array @@ -3934,6 +3938,7 @@ components: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' - enum: - null + nullable: true x-ms-navigationProperty: true example: ClassInstance: 0 @@ -3988,12 +3993,14 @@ components: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' - enum: - null + nullable: true x-ms-navigationProperty: true Tag: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Tags.Tag' - enum: - null + nullable: true x-ms-navigationProperty: true example: DocumentId: 0 @@ -4195,18 +4202,21 @@ components: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library' - enum: - null + nullable: true x-ms-navigationProperty: true Type: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType' - enum: - null + nullable: true x-ms-navigationProperty: true SourceFolder: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.Library' - enum: - null + nullable: true x-ms-navigationProperty: true Documents: type: array @@ -4345,12 +4355,14 @@ components: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType' - enum: - null + nullable: true x-ms-navigationProperty: true ParentLibraryTypes: anyOf: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Library.LibraryType' - enum: - null + nullable: true x-ms-navigationProperty: true MasterLibraryTypeChildren: type: array @@ -4739,6 +4751,7 @@ components: - $ref: '#/components/schemas/Siterra.Documents.BusinessLogic.Entities.Document.Document' - enum: - null + nullable: true x-ms-navigationProperty: true example: Id: 0 @@ -5372,4 +5385,4 @@ tags: - name: Tasks.RevisionDto x-ms-docs-toc-type: page - name: Tasks.DocumentTagRelDto - x-ms-docs-toc-type: page + x-ms-docs-toc-type: page \ No newline at end of file diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.json b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.json index 33b971d7..039f814e 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.json +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.json @@ -1420,7 +1420,8 @@ { "enum": [ null - ] + ], + "nullable": true } ] } @@ -1456,7 +1457,8 @@ { "enum": [ null - ] + ], + "nullable": true } ] } @@ -11693,7 +11695,8 @@ { "enum": [ null - ] + ], + "nullable": true } ] } @@ -16971,7 +16974,8 @@ { "enum": [ null - ] + ], + "nullable": true } ] } @@ -30723,7 +30727,8 @@ { "enum": [ null - ] + ], + "nullable": true } ] } @@ -33743,7 +33748,8 @@ { "enum": [ null - ] + ], + "nullable": true } ] }, @@ -33777,7 +33783,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "description": "The best friend.", @@ -33829,7 +33836,8 @@ { "enum": [ null - ] + ], + "nullable": true } ] } @@ -33851,7 +33859,8 @@ { "enum": [ null - ] + ], + "nullable": true } ] } @@ -33895,7 +33904,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "description": "The person to contact in case of a crisis at this location.", @@ -34040,7 +34050,8 @@ { "enum": [ null - ] + ], + "nullable": true } ] }, @@ -34090,7 +34101,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "x-ms-navigationProperty": true @@ -34103,7 +34115,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "x-ms-navigationProperty": true @@ -34116,7 +34129,8 @@ { "enum": [ null - ] + ], + "nullable": true } ], "x-ms-navigationProperty": true @@ -34188,7 +34202,8 @@ { "enum": [ null - ] + ], + "nullable": true } ] }, @@ -34533,7 +34548,8 @@ { "enum": [ null - ] + ], + "nullable": true } ] } @@ -35101,4 +35117,4 @@ "x-ms-docs-toc-type": "container" } ] -} +} \ No newline at end of file diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.yaml b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.yaml index c7eb92a8..61a79ba0 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.yaml +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.yaml @@ -914,6 +914,7 @@ paths: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport' - enum: - null + nullable: true default: $ref: '#/components/responses/error' x-ms-docs-operation-type: functionImport @@ -935,6 +936,7 @@ paths: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - enum: - null + nullable: true default: $ref: '#/components/responses/error' x-ms-docs-operation-type: functionImport @@ -7782,6 +7784,7 @@ paths: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - enum: - null + nullable: true responses: '204': description: Success @@ -11292,6 +11295,7 @@ paths: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - enum: - null + nullable: true responses: '204': description: Success @@ -20530,6 +20534,7 @@ paths: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - enum: - null + nullable: true responses: '204': description: Success @@ -22565,6 +22570,7 @@ components: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' - enum: - null + nullable: true FavoriteFeature: $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature' Features: @@ -22586,6 +22592,7 @@ components: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - enum: - null + nullable: true description: The best friend. x-ms-navigationProperty: true Trips: @@ -22620,6 +22627,7 @@ components: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation' - enum: - null + nullable: true Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location: title: Location type: object @@ -22632,6 +22640,7 @@ components: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.City' - enum: - null + nullable: true Microsoft.OData.Service.Sample.TrippinInMemory.Models.City: title: City type: object @@ -22658,6 +22667,7 @@ components: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - enum: - null + nullable: true description: The person to contact in case of a crisis at this location. x-ms-navigationProperty: true Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation: @@ -22753,6 +22763,7 @@ components: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' - enum: - null + nullable: true Description: type: string nullable: true @@ -22779,18 +22790,21 @@ components: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline' - enum: - null + nullable: true x-ms-navigationProperty: true From: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport' - enum: - null + nullable: true x-ms-navigationProperty: true To: anyOf: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport' - enum: - null + nullable: true x-ms-navigationProperty: true Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee: allOf: @@ -22828,6 +22842,7 @@ components: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' - enum: - null + nullable: true DirectReports: type: array items: @@ -23046,6 +23061,7 @@ components: - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline' - enum: - null + nullable: true GetFriendsTripsResponse: description: Success content: @@ -23400,4 +23416,4 @@ tags: - name: People.Person.Actions x-ms-docs-toc-type: container - name: ResetDataSource - x-ms-docs-toc-type: container + x-ms-docs-toc-type: container \ No newline at end of file