|
| 1 | +# Sample OData schema change analyzer |
| 2 | + |
| 3 | +Sample analyzer that lists changes between original and updated OData schema using the `IEdmModel`. This can be useful for detecting breaking changes between API versions. |
| 4 | + |
| 5 | +```cli |
| 6 | +Detected changes: |
| 7 | +
|
| 8 | +StructuredTypePropertyAdded { Property = Microsoft.OData.Edm.Csdl.CsdlSemantics.CsdlSemanticsProperty, NewType = Microsoft.OData.SampleService.Models.TripPin.AirportLocation, OriginalType = Microsoft.OData.SampleService.Models.TripPin.AirportLocation, Target = Microsoft.OData.SampleService.Models.TripPin.AirportLocation, ChangeKind = Modification } |
| 9 | +At line: 22 pos: 5 |
| 10 | +
|
| 11 | +SchemaElementAdded { Target = Microsoft.OData.SampleService.Models.TripPin.Picture, ChangeKind = Addition } |
| 12 | +At line: 26 pos: 5 |
| 13 | +
|
| 14 | +StructuredTypeChangedFromOpenToClose { Target = Microsoft.OData.SampleService.Models.TripPin.Person, Original = Microsoft.OData.SampleService.Models.TripPin.Person, ChangeKind = Modification } |
| 15 | +At line: 42 pos: 5 |
| 16 | +
|
| 17 | +StructuredTypePropertyChangedToNonNullable { NewProperty = Microsoft.OData.Edm.Csdl.CsdlSemantics.CsdlSemanticsProperty, OldProperty = Microsoft.OData.Edm.Csdl.CsdlSemantics.CsdlSemanticsProperty, NewType = Microsoft.OData.SampleService.Models.TripPin.Person, OriginalType = Microsoft.OData.SampleService.Models.TripPin.Person, Target = Microsoft.OData.SampleService.Models.TripPin.Person, ChangeKind = Modification } |
| 18 | +At line: 42 pos: 5 |
| 19 | +
|
| 20 | +StructuredTypePropertyAdded { Property = Microsoft.OData.Edm.Csdl.CsdlSemantics.CsdlSemanticsProperty, NewType = Microsoft.OData.SampleService.Models.TripPin.Airline, OriginalType = Microsoft.OData.SampleService.Models.TripPin.Airline, Target = Microsoft.OData.SampleService.Models.TripPin.Airline, ChangeKind = Modification } |
| 21 | +At line: 63 pos: 5 |
| 22 | +
|
| 23 | +StructuredTypePropertyAddedToKey { NewProperty = Microsoft.OData.Edm.Csdl.CsdlSemantics.CsdlSemanticsProperty, OldProperty = Microsoft.OData.Edm.Csdl.CsdlSemantics.CsdlSemanticsProperty, NewType = Microsoft.OData.SampleService.Models.TripPin.Airline, OriginalType = Microsoft.OData.SampleService.Models.TripPin.Airline, Target = Microsoft.OData.SampleService.Models.TripPin.Airline, ChangeKind = Modification } |
| 24 | +At line: 63 pos: 5 |
| 25 | +
|
| 26 | +StructuredTypePropertyTypeChanged { NewProperty = Microsoft.OData.Edm.Csdl.CsdlSemantics.CsdlSemanticsProperty, OldProperty = Microsoft.OData.Edm.Csdl.CsdlSemantics.CsdlSemanticsProperty, NewType = Microsoft.OData.SampleService.Models.TripPin.Airport, OriginalType = Microsoft.OData.SampleService.Models.TripPin.Airport, Target = Microsoft.OData.SampleService.Models.TripPin.Airport, ChangeKind = Modification } |
| 27 | +At line: 75 pos: 5 |
| 28 | +
|
| 29 | +StructuredTypePropertyRemoved { Property = Microsoft.OData.Edm.Csdl.CsdlSemantics.CsdlSemanticsProperty, OriginalType = Microsoft.OData.SampleService.Models.TripPin.Airport, NewType = Microsoft.OData.SampleService.Models.TripPin.Airport, Target = Microsoft.OData.SampleService.Models.TripPin.Airport, ChangeKind = Modification } |
| 30 | +At line: 75 pos: 5 |
| 31 | +
|
| 32 | +StructuredTypePropertyAdded { Property = Microsoft.OData.Edm.Csdl.CsdlSemantics.CsdlSemanticsProperty, NewType = Microsoft.OData.SampleService.Models.TripPin.PlanItem, OriginalType = Microsoft.OData.SampleService.Models.TripPin.PlanItem, Target = Microsoft.OData.SampleService.Models.TripPin.PlanItem, ChangeKind = Modification } |
| 33 | +At line: 89 pos: 5 |
| 34 | +
|
| 35 | +StructuredTypePropertyAdded { Property = Microsoft.OData.Edm.Csdl.CsdlSemantics.CsdlSemanticsProperty, NewType = Microsoft.OData.SampleService.Models.TripPin.PublicTransportation, OriginalType = Microsoft.OData.SampleService.Models.TripPin.PublicTransportation, Target = Microsoft.OData.SampleService.Models.TripPin.PublicTransportation, ChangeKind = Modification } |
| 36 | +At line: 104 pos: 5 |
| 37 | +
|
| 38 | +StructuredTypePropertyAdded { Property = Microsoft.OData.Edm.Csdl.CsdlSemantics.CsdlSemanticsProperty, NewType = Microsoft.OData.SampleService.Models.TripPin.Flight, OriginalType = Microsoft.OData.SampleService.Models.TripPin.Flight, Target = Microsoft.OData.SampleService.Models.TripPin.Flight, ChangeKind = Modification } |
| 39 | +At line: 107 pos: 5 |
| 40 | +
|
| 41 | +StructuredTypePropertyDeclaringTypeChanged { NewProperty = Microsoft.OData.Edm.Csdl.CsdlSemantics.CsdlSemanticsProperty, OldProperty = Microsoft.OData.Edm.Csdl.CsdlSemantics.CsdlSemanticsProperty, NewType = Microsoft.OData.SampleService.Models.TripPin.Event, OriginalType = Microsoft.OData.SampleService.Models.TripPin.Event, Target = Microsoft.OData.SampleService.Models.TripPin.Event, ChangeKind = Modification } |
| 42 | +At line: 113 pos: 5 |
| 43 | +
|
| 44 | +SchemaElementRemoved { Target = Microsoft.OData.SampleService.Models.TripPin.Photo, ChangeKind = Deletion } |
| 45 | +At line: 25 pos: 5 |
| 46 | +
|
| 47 | +
|
| 48 | +Found 13 changes. |
| 49 | +``` |
0 commit comments