Allows schema examples to be optional (#73)

* Adds Links to EntitySet type response objects

* Adds links to the test OpenAPI docs.

* Refactor to use Utils class for nullability checks

* Modify link generator to handle all instances of IEdmEntityType

* Update arguments

* Add new Link properties

* Update test files with links properties

* Rename parameter

* Fix OpenAPI Link generation

* Reorder Parameters generation before Responses

This is important so that the parameters info can be used for Links generation

* Update test files to validate Link fixes

* Fix links and add optional setting

* Update test for Links

* Revert project PlatformTarget

* Add comment

* Add setting for enabling/disabling showing of schema examples

* Add setting to show schema examples to allow tests to pass

* Update test doc. to test disabling of showing of schema examples

* Refactor to remove unnecessary Link creation of collection of entities

* Revert platform target to default - AnyCPU

* Add helpful comment

* Grammar nit fix

Co-authored-by: Irvine Sunday <v-irsund@microsoft.com>
Co-authored-by: Irvine Sunday <irochand@microsoft.com>
This commit is contained in:
Irvine Sunday 2020-07-21 17:54:50 +03:00 committed by GitHub
parent 9d44019639
commit 00ed4207fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 66 additions and 820 deletions

View file

@ -208,12 +208,18 @@ namespace Microsoft.OpenApi.OData.Generator
} }
} }
private static OpenApiSchema CreateStructuredTypeSchema(this ODataContext context, IEdmStructuredType structuredType, bool processBase, bool processExample, private static OpenApiSchema CreateStructuredTypeSchema(this ODataContext context, IEdmStructuredType structuredType, bool processBase, bool processExample,
IEnumerable<IEdmEntityType> derivedTypes = null) IEnumerable<IEdmEntityType> derivedTypes = null)
{ {
Debug.Assert(context != null); Debug.Assert(context != null);
Debug.Assert(structuredType != null); Debug.Assert(structuredType != null);
IOpenApiAny example = null;
if (context.Settings.ShowSchemaExamples)
{
example = CreateStructuredTypePropertiesExample(context, structuredType);
}
if (context.Settings.EnableDiscriminatorValue && derivedTypes == null) if (context.Settings.EnableDiscriminatorValue && derivedTypes == null)
{ {
derivedTypes = context.Model.FindDirectlyDerivedTypes(structuredType).OfType<IEdmEntityType>(); derivedTypes = context.Model.FindDirectlyDerivedTypes(structuredType).OfType<IEdmEntityType>();
@ -256,7 +262,7 @@ namespace Microsoft.OpenApi.OData.Generator
AnyOf = null, AnyOf = null,
OneOf = null, OneOf = null,
Properties = null, Properties = null,
Example = CreateStructuredTypePropertiesExample(context, structuredType) Example = example
}; };
} }
else else
@ -305,7 +311,7 @@ namespace Microsoft.OpenApi.OData.Generator
if (processExample) if (processExample)
{ {
schema.Example = CreateStructuredTypePropertiesExample(context, structuredType); schema.Example = example;
} }
return schema; return schema;

View file

@ -125,6 +125,11 @@ namespace Microsoft.OpenApi.OData
/// </summary> /// </summary>
public bool ShowLinks { get; set; } = false; public bool ShowLinks { get; set; } = false;
/// <summary>
/// Gets/Sets a value indicating whether or not to show schema examples.
/// </summary>
public bool ShowSchemaExamples { get; set; } = false;
internal OpenApiConvertSettings Clone() internal OpenApiConvertSettings Clone()
{ {
var newSettings = new OpenApiConvertSettings var newSettings = new OpenApiConvertSettings
@ -150,7 +155,8 @@ namespace Microsoft.OpenApi.OData
EnableDerivedTypesReferencesForResponses = this.EnableDerivedTypesReferencesForResponses, EnableDerivedTypesReferencesForResponses = this.EnableDerivedTypesReferencesForResponses,
EnableDerivedTypesReferencesForRequestBody = this.EnableDerivedTypesReferencesForRequestBody, EnableDerivedTypesReferencesForRequestBody = this.EnableDerivedTypesReferencesForRequestBody,
PathPrefix = this.PathPrefix, PathPrefix = this.PathPrefix,
ShowLinks = this.ShowLinks ShowLinks = this.ShowLinks,
ShowSchemaExamples = this.ShowSchemaExamples
}; };
return newSettings; return newSettings;

View file

@ -88,8 +88,11 @@ namespace Microsoft.OpenApi.OData.Tests
{ {
// Arrange // Arrange
IEdmModel model = EdmModelHelper.BasicEdmModel; IEdmModel model = EdmModelHelper.BasicEdmModel;
var openApiConvertSettings = new OpenApiConvertSettings(); var openApiConvertSettings = new OpenApiConvertSettings
openApiConvertSettings.OpenApiSpecVersion = specVersion; {
OpenApiSpecVersion = specVersion,
ShowSchemaExamples = true // test for schema examples
};
// Act // Act
string json = WriteEdmModelAsOpenApi(model, OpenApiFormat.Json, openApiConvertSettings); string json = WriteEdmModelAsOpenApi(model, OpenApiFormat.Json, openApiConvertSettings);
@ -113,8 +116,11 @@ namespace Microsoft.OpenApi.OData.Tests
{ {
// Arrange // Arrange
IEdmModel model = EdmModelHelper.BasicEdmModel; IEdmModel model = EdmModelHelper.BasicEdmModel;
var openApiConvertSettings = new OpenApiConvertSettings(); var openApiConvertSettings = new OpenApiConvertSettings
openApiConvertSettings.OpenApiSpecVersion = specVersion; {
OpenApiSpecVersion = specVersion,
ShowSchemaExamples = true
};
// Act // Act
string yaml = WriteEdmModelAsOpenApi(model, OpenApiFormat.Yaml, openApiConvertSettings); string yaml = WriteEdmModelAsOpenApi(model, OpenApiFormat.Yaml, openApiConvertSettings);
@ -138,9 +144,12 @@ namespace Microsoft.OpenApi.OData.Tests
{ {
// Arrange // Arrange
IEdmModel model = EdmModelHelper.MultipleSchemasEdmModel; IEdmModel model = EdmModelHelper.MultipleSchemasEdmModel;
var openApiConvertSettings = new OpenApiConvertSettings(); var openApiConvertSettings = new OpenApiConvertSettings
openApiConvertSettings.OpenApiSpecVersion = specVersion; {
openApiConvertSettings.ShowLinks = true; // test Links OpenApiSpecVersion = specVersion,
ShowLinks = true, // test Links
ShowSchemaExamples = true
};
// Act // Act
string json = WriteEdmModelAsOpenApi(model, OpenApiFormat.Json, openApiConvertSettings); string json = WriteEdmModelAsOpenApi(model, OpenApiFormat.Json, openApiConvertSettings);
@ -164,9 +173,12 @@ namespace Microsoft.OpenApi.OData.Tests
{ {
// Arrange // Arrange
IEdmModel model = EdmModelHelper.MultipleSchemasEdmModel; IEdmModel model = EdmModelHelper.MultipleSchemasEdmModel;
var openApiConvertSettings = new OpenApiConvertSettings(); var openApiConvertSettings = new OpenApiConvertSettings
openApiConvertSettings.OpenApiSpecVersion = specVersion; {
openApiConvertSettings.ShowLinks = true; // test Links OpenApiSpecVersion = specVersion,
ShowLinks = true, // test Links
ShowSchemaExamples = true
};
// Act // Act
string yaml = WriteEdmModelAsOpenApi(model, OpenApiFormat.Yaml, openApiConvertSettings); string yaml = WriteEdmModelAsOpenApi(model, OpenApiFormat.Yaml, openApiConvertSettings);

View file

@ -61,7 +61,10 @@ namespace Microsoft.OpenApi.OData.Tests
{ {
// Arrange // Arrange
IEdmModel model = EdmModelHelper.MultipleInheritanceEdmModel; IEdmModel model = EdmModelHelper.MultipleInheritanceEdmModel;
ODataContext context = new ODataContext(model); ODataContext context = new ODataContext(model, new OpenApiConvertSettings
{
ShowSchemaExamples = true
});
IEdmComplexType complex = model.SchemaElements.OfType<IEdmComplexType>().First(t => t.Name == "Address"); IEdmComplexType complex = model.SchemaElements.OfType<IEdmComplexType>().First(t => t.Name == "Address");
Assert.NotNull(complex); // Guard Assert.NotNull(complex); // Guard
@ -112,7 +115,8 @@ namespace Microsoft.OpenApi.OData.Tests
IEdmModel model = EdmModelHelper.MultipleInheritanceEdmModel; IEdmModel model = EdmModelHelper.MultipleInheritanceEdmModel;
ODataContext context = new ODataContext(model, new OpenApiConvertSettings ODataContext context = new ODataContext(model, new OpenApiConvertSettings
{ {
IEEE754Compatible = true IEEE754Compatible = true,
ShowSchemaExamples = true
}); });
IEdmComplexType complex = model.SchemaElements.OfType<IEdmComplexType>().First(t => t.Name == "Tree"); IEdmComplexType complex = model.SchemaElements.OfType<IEdmComplexType>().First(t => t.Name == "Tree");
Assert.NotNull(complex); // Guard Assert.NotNull(complex); // Guard
@ -201,7 +205,10 @@ namespace Microsoft.OpenApi.OData.Tests
{ {
// Arrange // Arrange
IEdmModel model = EdmModelHelper.MultipleInheritanceEdmModel; IEdmModel model = EdmModelHelper.MultipleInheritanceEdmModel;
ODataContext context = new ODataContext(model); ODataContext context = new ODataContext(model, new OpenApiConvertSettings
{
ShowSchemaExamples = true
});
IEdmEntityType entity = model.SchemaElements.OfType<IEdmEntityType>().First(t => t.Name == "Zoo"); IEdmEntityType entity = model.SchemaElements.OfType<IEdmEntityType>().First(t => t.Name == "Zoo");
Assert.NotNull(entity); // Guard Assert.NotNull(entity); // Guard
@ -258,7 +265,10 @@ namespace Microsoft.OpenApi.OData.Tests
{ {
// Arrange // Arrange
IEdmModel model = EdmModelHelper.MultipleInheritanceEdmModel; IEdmModel model = EdmModelHelper.MultipleInheritanceEdmModel;
ODataContext context = new ODataContext(model); ODataContext context = new ODataContext(model, new OpenApiConvertSettings
{
ShowSchemaExamples = true
});
IEdmEntityType entity = model.SchemaElements.OfType<IEdmEntityType>().First(t => t.Name == "Human"); IEdmEntityType entity = model.SchemaElements.OfType<IEdmEntityType>().First(t => t.Name == "Human");
Assert.NotNull(entity); // Guard Assert.NotNull(entity); // Guard

View file

@ -4818,48 +4818,6 @@
"$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip"
} }
} }
},
"example": {
"UserName": "string (identifier)",
"FirstName": "string",
"LastName": "string",
"MiddleName": "string",
"Gender": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender"
},
"Age": "int64",
"Emails": [
"string"
],
"AddressInfo": [
{
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location"
}
],
"HomeAddress": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location"
},
"FavoriteFeature": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature"
},
"Features": [
{
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature"
}
],
"Friends": [
{
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person"
}
],
"BestFriend": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person"
},
"Trips": [
{
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip"
}
]
} }
}, },
"Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline": { "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline": {
@ -4872,10 +4830,6 @@
"Name": { "Name": {
"type": "string" "type": "string"
} }
},
"example": {
"AirlineCode": "string (identifier)",
"Name": "string"
} }
}, },
"Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport": { "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport": {
@ -4894,14 +4848,6 @@
"Location": { "Location": {
"$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation" "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation"
} }
},
"example": {
"Name": "string",
"IcaoCode": "string (identifier)",
"IataCode": "string",
"Location": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation"
}
} }
}, },
"Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location": { "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location": {
@ -4914,12 +4860,6 @@
"City": { "City": {
"$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.City" "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.City"
} }
},
"example": {
"Address": "string",
"City": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.City"
}
} }
}, },
"Microsoft.OData.Service.Sample.TrippinInMemory.Models.City": { "Microsoft.OData.Service.Sample.TrippinInMemory.Models.City": {
@ -4935,11 +4875,6 @@
"Region": { "Region": {
"type": "string" "type": "string"
} }
},
"example": {
"Name": "string",
"CountryRegion": "string",
"Region": "string"
} }
}, },
"Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation": { "Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation": {
@ -4956,14 +4891,7 @@
} }
} }
} }
], ]
"example": {
"Address": "string",
"City": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.City"
},
"Loc": "Edm.GeographyPoint"
}
}, },
"Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { "Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": {
"allOf": [ "allOf": [
@ -4979,14 +4907,7 @@
} }
} }
} }
], ]
"example": {
"Address": "string",
"City": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.City"
},
"BuildingInfo": "string"
}
}, },
"Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip": { "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip": {
"title": "Trip", "title": "Trip",
@ -5034,23 +4955,6 @@
"$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem" "$ref": "#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem"
} }
} }
},
"example": {
"TripId": "integer (identifier)",
"ShareId": "string",
"Name": "string",
"Budget": "float",
"Description": "string",
"Tags": [
"string"
],
"StartsAt": "string (timestamp)",
"EndsAt": "string (timestamp)",
"PlanItems": [
{
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem"
}
]
} }
}, },
"Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem": { "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem": {
@ -5081,13 +4985,6 @@
"pattern": "^-?P([0-9]+D)?(T([0-9]+H)?([0-9]+M)?([0-9]+([.][0-9]+)?S)?)?$", "pattern": "^-?P([0-9]+D)?(T([0-9]+H)?([0-9]+M)?([0-9]+([.][0-9]+)?S)?)?$",
"type": "string" "type": "string"
} }
},
"example": {
"PlanItemId": "integer (identifier)",
"ConfirmationCode": "string",
"StartsAt": "string (timestamp)",
"EndsAt": "string (timestamp)",
"Duration": "string"
} }
}, },
"Microsoft.OData.Service.Sample.TrippinInMemory.Models.Event": { "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Event": {
@ -5107,18 +5004,7 @@
} }
} }
} }
], ]
"example": {
"PlanItemId": "integer (identifier)",
"ConfirmationCode": "string",
"StartsAt": "string (timestamp)",
"EndsAt": "string (timestamp)",
"Duration": "string",
"OccursAt": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation"
},
"Description": "string"
}
}, },
"Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportation": { "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportation": {
"allOf": [ "allOf": [
@ -5134,15 +5020,7 @@
} }
} }
} }
], ]
"example": {
"PlanItemId": "integer (identifier)",
"ConfirmationCode": "string",
"StartsAt": "string (timestamp)",
"EndsAt": "string (timestamp)",
"Duration": "string",
"SeatNumber": "string"
}
}, },
"Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight": { "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight": {
"allOf": [ "allOf": [
@ -5167,25 +5045,7 @@
} }
} }
} }
], ]
"example": {
"PlanItemId": "integer (identifier)",
"ConfirmationCode": "string",
"StartsAt": "string (timestamp)",
"EndsAt": "string (timestamp)",
"Duration": "string",
"SeatNumber": "string",
"FlightNumber": "string",
"Airline": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline"
},
"From": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport"
},
"To": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport"
}
}
}, },
"Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee": { "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee": {
"allOf": [ "allOf": [
@ -5207,55 +5067,7 @@
} }
} }
} }
], ]
"example": {
"UserName": "string (identifier)",
"FirstName": "string",
"LastName": "string",
"MiddleName": "string",
"Gender": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender"
},
"Age": "int64",
"Emails": [
"string"
],
"AddressInfo": [
{
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location"
}
],
"HomeAddress": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location"
},
"FavoriteFeature": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature"
},
"Features": [
{
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature"
}
],
"Friends": [
{
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person"
}
],
"BestFriend": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person"
},
"Trips": [
{
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip"
}
],
"Cost": "int64",
"Peers": [
{
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person"
}
]
}
}, },
"Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager": { "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager": {
"allOf": [ "allOf": [
@ -5280,58 +5092,7 @@
} }
} }
} }
], ]
"example": {
"UserName": "string (identifier)",
"FirstName": "string",
"LastName": "string",
"MiddleName": "string",
"Gender": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender"
},
"Age": "int64",
"Emails": [
"string"
],
"AddressInfo": [
{
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location"
}
],
"HomeAddress": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location"
},
"FavoriteFeature": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature"
},
"Features": [
{
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature"
}
],
"Friends": [
{
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person"
}
],
"BestFriend": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person"
},
"Trips": [
{
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip"
}
],
"Budget": "int64",
"BossOffice": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location"
},
"DirectReports": [
{
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person"
}
]
}
}, },
"Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender": { "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender": {
"title": "PersonGender", "title": "PersonGender",

View file

@ -3352,30 +3352,6 @@ definitions:
type: array type: array
items: items:
$ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip'
example:
UserName: string (identifier)
FirstName: string
LastName: string
MiddleName: string
Gender:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender
Age: int64
Emails:
- string
AddressInfo:
- '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location
HomeAddress:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location
FavoriteFeature:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature
Features:
- '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature
Friends:
- '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person
BestFriend:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person
Trips:
- '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip
Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline: Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline:
title: Airline title: Airline
type: object type: object
@ -3384,9 +3360,6 @@ definitions:
type: string type: string
Name: Name:
type: string type: string
example:
AirlineCode: string (identifier)
Name: string
Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport: Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport:
title: Airport title: Airport
type: object type: object
@ -3399,12 +3372,6 @@ definitions:
type: string type: string
Location: Location:
$ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation' $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation'
example:
Name: string
IcaoCode: string (identifier)
IataCode: string
Location:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation
Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location: Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location:
title: Location title: Location
type: object type: object
@ -3413,10 +3380,6 @@ definitions:
type: string type: string
City: City:
$ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.City' $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.City'
example:
Address: string
City:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.City
Microsoft.OData.Service.Sample.TrippinInMemory.Models.City: Microsoft.OData.Service.Sample.TrippinInMemory.Models.City:
title: City title: City
type: object type: object
@ -3427,10 +3390,6 @@ definitions:
type: string type: string
Region: Region:
type: string type: string
example:
Name: string
CountryRegion: string
Region: string
Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation: Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation:
allOf: allOf:
- $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' - $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location'
@ -3439,11 +3398,6 @@ definitions:
properties: properties:
Loc: Loc:
$ref: '#/definitions/Edm.GeographyPoint' $ref: '#/definitions/Edm.GeographyPoint'
example:
Address: string
City:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.City
Loc: Edm.GeographyPoint
Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation: Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation:
allOf: allOf:
- $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' - $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location'
@ -3452,11 +3406,6 @@ definitions:
properties: properties:
BuildingInfo: BuildingInfo:
type: string type: string
example:
Address: string
City:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.City
BuildingInfo: string
Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip: Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip:
title: Trip title: Trip
type: object type: object
@ -3492,18 +3441,6 @@ definitions:
type: array type: array
items: items:
$ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem' $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem'
example:
TripId: integer (identifier)
ShareId: string
Name: string
Budget: float
Description: string
Tags:
- string
StartsAt: string (timestamp)
EndsAt: string (timestamp)
PlanItems:
- '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem
Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem: Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem:
title: PlanItem title: PlanItem
type: object type: object
@ -3527,12 +3464,6 @@ definitions:
format: duration format: duration
pattern: '^-?P([0-9]+D)?(T([0-9]+H)?([0-9]+M)?([0-9]+([.][0-9]+)?S)?)?$' pattern: '^-?P([0-9]+D)?(T([0-9]+H)?([0-9]+M)?([0-9]+([.][0-9]+)?S)?)?$'
type: string type: string
example:
PlanItemId: integer (identifier)
ConfirmationCode: string
StartsAt: string (timestamp)
EndsAt: string (timestamp)
Duration: string
Microsoft.OData.Service.Sample.TrippinInMemory.Models.Event: Microsoft.OData.Service.Sample.TrippinInMemory.Models.Event:
allOf: allOf:
- $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem' - $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem'
@ -3543,15 +3474,6 @@ definitions:
$ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation' $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation'
Description: Description:
type: string type: string
example:
PlanItemId: integer (identifier)
ConfirmationCode: string
StartsAt: string (timestamp)
EndsAt: string (timestamp)
Duration: string
OccursAt:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation
Description: string
Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportation: Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportation:
allOf: allOf:
- $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem' - $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem'
@ -3560,13 +3482,6 @@ definitions:
properties: properties:
SeatNumber: SeatNumber:
type: string type: string
example:
PlanItemId: integer (identifier)
ConfirmationCode: string
StartsAt: string (timestamp)
EndsAt: string (timestamp)
Duration: string
SeatNumber: string
Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight: Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight:
allOf: allOf:
- $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportation' - $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportation'
@ -3581,20 +3496,6 @@ definitions:
$ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport' $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport'
To: To:
$ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport' $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport'
example:
PlanItemId: integer (identifier)
ConfirmationCode: string
StartsAt: string (timestamp)
EndsAt: string (timestamp)
Duration: string
SeatNumber: string
FlightNumber: string
Airline:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline
From:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport
To:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport
Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee: Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee:
allOf: allOf:
- $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person'
@ -3607,33 +3508,6 @@ definitions:
type: array type: array
items: items:
$ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person'
example:
UserName: string (identifier)
FirstName: string
LastName: string
MiddleName: string
Gender:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender
Age: int64
Emails:
- string
AddressInfo:
- '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location
HomeAddress:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location
FavoriteFeature:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature
Features:
- '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature
Friends:
- '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person
BestFriend:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person
Trips:
- '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip
Cost: int64
Peers:
- '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person
Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager: Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager:
allOf: allOf:
- $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person'
@ -3648,35 +3522,6 @@ definitions:
type: array type: array
items: items:
$ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' $ref: '#/definitions/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person'
example:
UserName: string (identifier)
FirstName: string
LastName: string
MiddleName: string
Gender:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender
Age: int64
Emails:
- string
AddressInfo:
- '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location
HomeAddress:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location
FavoriteFeature:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature
Features:
- '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature
Friends:
- '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person
BestFriend:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person
Trips:
- '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip
Budget: int64
BossOffice:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location
DirectReports:
- '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person
Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender: Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender:
title: PersonGender title: PersonGender
enum: enum:

View file

@ -5470,48 +5470,6 @@
"$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip" "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip"
} }
} }
},
"example": {
"UserName": "string (identifier)",
"FirstName": "string",
"LastName": "string",
"MiddleName": "string",
"Gender": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender"
},
"Age": "int64",
"Emails": [
"string"
],
"AddressInfo": [
{
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location"
}
],
"HomeAddress": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location"
},
"FavoriteFeature": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature"
},
"Features": [
{
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature"
}
],
"Friends": [
{
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person"
}
],
"BestFriend": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person"
},
"Trips": [
{
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip"
}
]
} }
}, },
"Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline": { "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline": {
@ -5525,10 +5483,6 @@
"type": "string", "type": "string",
"nullable": true "nullable": true
} }
},
"example": {
"AirlineCode": "string (identifier)",
"Name": "string"
} }
}, },
"Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport": { "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport": {
@ -5554,14 +5508,6 @@
], ],
"nullable": true "nullable": true
} }
},
"example": {
"Name": "string",
"IcaoCode": "string (identifier)",
"IataCode": "string",
"Location": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation"
}
} }
}, },
"Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location": { "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location": {
@ -5580,12 +5526,6 @@
], ],
"nullable": true "nullable": true
} }
},
"example": {
"Address": "string",
"City": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.City"
}
} }
}, },
"Microsoft.OData.Service.Sample.TrippinInMemory.Models.City": { "Microsoft.OData.Service.Sample.TrippinInMemory.Models.City": {
@ -5604,11 +5544,6 @@
"type": "string", "type": "string",
"nullable": true "nullable": true
} }
},
"example": {
"Name": "string",
"CountryRegion": "string",
"Region": "string"
} }
}, },
"Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation": { "Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation": {
@ -5625,14 +5560,7 @@
} }
} }
} }
], ]
"example": {
"Address": "string",
"City": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.City"
},
"Loc": "Edm.GeographyPoint"
}
}, },
"Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": { "Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation": {
"allOf": [ "allOf": [
@ -5649,14 +5577,7 @@
} }
} }
} }
], ]
"example": {
"Address": "string",
"City": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.City"
},
"BuildingInfo": "string"
}
}, },
"Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip": { "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip": {
"title": "Trip", "title": "Trip",
@ -5722,23 +5643,6 @@
"$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem" "$ref": "#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem"
} }
} }
},
"example": {
"TripId": "integer (identifier)",
"ShareId": "string",
"Name": "string",
"Budget": "float",
"Description": "string",
"Tags": [
"string"
],
"StartsAt": "string (timestamp)",
"EndsAt": "string (timestamp)",
"PlanItems": [
{
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem"
}
]
} }
}, },
"Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem": { "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem": {
@ -5770,13 +5674,6 @@
"type": "string", "type": "string",
"format": "duration" "format": "duration"
} }
},
"example": {
"PlanItemId": "integer (identifier)",
"ConfirmationCode": "string",
"StartsAt": "string (timestamp)",
"EndsAt": "string (timestamp)",
"Duration": "string"
} }
}, },
"Microsoft.OData.Service.Sample.TrippinInMemory.Models.Event": { "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Event": {
@ -5802,18 +5699,7 @@
} }
} }
} }
], ]
"example": {
"PlanItemId": "integer (identifier)",
"ConfirmationCode": "string",
"StartsAt": "string (timestamp)",
"EndsAt": "string (timestamp)",
"Duration": "string",
"OccursAt": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation"
},
"Description": "string"
}
}, },
"Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportation": { "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportation": {
"allOf": [ "allOf": [
@ -5830,15 +5716,7 @@
} }
} }
} }
], ]
"example": {
"PlanItemId": "integer (identifier)",
"ConfirmationCode": "string",
"StartsAt": "string (timestamp)",
"EndsAt": "string (timestamp)",
"Duration": "string",
"SeatNumber": "string"
}
}, },
"Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight": { "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight": {
"allOf": [ "allOf": [
@ -5879,25 +5757,7 @@
} }
} }
} }
], ]
"example": {
"PlanItemId": "integer (identifier)",
"ConfirmationCode": "string",
"StartsAt": "string (timestamp)",
"EndsAt": "string (timestamp)",
"Duration": "string",
"SeatNumber": "string",
"FlightNumber": "string",
"Airline": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline"
},
"From": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport"
},
"To": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport"
}
}
}, },
"Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee": { "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee": {
"allOf": [ "allOf": [
@ -5927,55 +5787,7 @@
} }
} }
} }
], ]
"example": {
"UserName": "string (identifier)",
"FirstName": "string",
"LastName": "string",
"MiddleName": "string",
"Gender": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender"
},
"Age": "int64",
"Emails": [
"string"
],
"AddressInfo": [
{
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location"
}
],
"HomeAddress": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location"
},
"FavoriteFeature": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature"
},
"Features": [
{
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature"
}
],
"Friends": [
{
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person"
}
],
"BestFriend": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person"
},
"Trips": [
{
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip"
}
],
"Cost": "int64",
"Peers": [
{
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person"
}
]
}
}, },
"Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager": { "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager": {
"allOf": [ "allOf": [
@ -6013,58 +5825,7 @@
} }
} }
} }
], ]
"example": {
"UserName": "string (identifier)",
"FirstName": "string",
"LastName": "string",
"MiddleName": "string",
"Gender": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender"
},
"Age": "int64",
"Emails": [
"string"
],
"AddressInfo": [
{
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location"
}
],
"HomeAddress": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location"
},
"FavoriteFeature": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature"
},
"Features": [
{
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature"
}
],
"Friends": [
{
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person"
}
],
"BestFriend": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person"
},
"Trips": [
{
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip"
}
],
"Budget": "int64",
"BossOffice": {
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location"
},
"DirectReports": [
{
"@odata.type": "Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person"
}
]
}
}, },
"Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender": { "Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender": {
"title": "PersonGender", "title": "PersonGender",

View file

@ -3719,30 +3719,6 @@ components:
type: array type: array
items: items:
$ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip' $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip'
example:
UserName: string (identifier)
FirstName: string
LastName: string
MiddleName: string
Gender:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender
Age: int64
Emails:
- string
AddressInfo:
- '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location
HomeAddress:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location
FavoriteFeature:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature
Features:
- '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature
Friends:
- '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person
BestFriend:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person
Trips:
- '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip
Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline: Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline:
title: Airline title: Airline
type: object type: object
@ -3752,9 +3728,6 @@ components:
Name: Name:
type: string type: string
nullable: true nullable: true
example:
AirlineCode: string (identifier)
Name: string
Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport: Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport:
title: Airport title: Airport
type: object type: object
@ -3771,12 +3744,6 @@ components:
anyOf: anyOf:
- $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation' - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation'
nullable: true nullable: true
example:
Name: string
IcaoCode: string (identifier)
IataCode: string
Location:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation
Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location: Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location:
title: Location title: Location
type: object type: object
@ -3788,10 +3755,6 @@ components:
anyOf: anyOf:
- $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.City' - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.City'
nullable: true nullable: true
example:
Address: string
City:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.City
Microsoft.OData.Service.Sample.TrippinInMemory.Models.City: Microsoft.OData.Service.Sample.TrippinInMemory.Models.City:
title: City title: City
type: object type: object
@ -3805,10 +3768,6 @@ components:
Region: Region:
type: string type: string
nullable: true nullable: true
example:
Name: string
CountryRegion: string
Region: string
Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation: Microsoft.OData.Service.Sample.TrippinInMemory.Models.AirportLocation:
allOf: allOf:
- $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location'
@ -3817,11 +3776,6 @@ components:
properties: properties:
Loc: Loc:
$ref: '#/components/schemas/Edm.GeographyPoint' $ref: '#/components/schemas/Edm.GeographyPoint'
example:
Address: string
City:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.City
Loc: Edm.GeographyPoint
Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation: Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation:
allOf: allOf:
- $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location' - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location'
@ -3831,11 +3785,6 @@ components:
BuildingInfo: BuildingInfo:
type: string type: string
nullable: true nullable: true
example:
Address: string
City:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.City
BuildingInfo: string
Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip: Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip:
title: Trip title: Trip
type: object type: object
@ -3881,18 +3830,6 @@ components:
type: array type: array
items: items:
$ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem' $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem'
example:
TripId: integer (identifier)
ShareId: string
Name: string
Budget: float
Description: string
Tags:
- string
StartsAt: string (timestamp)
EndsAt: string (timestamp)
PlanItems:
- '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem
Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem: Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem:
title: PlanItem title: PlanItem
type: object type: object
@ -3917,12 +3854,6 @@ components:
pattern: '^-?P([0-9]+D)?(T([0-9]+H)?([0-9]+M)?([0-9]+([.][0-9]+)?S)?)?$' pattern: '^-?P([0-9]+D)?(T([0-9]+H)?([0-9]+M)?([0-9]+([.][0-9]+)?S)?)?$'
type: string type: string
format: duration format: duration
example:
PlanItemId: integer (identifier)
ConfirmationCode: string
StartsAt: string (timestamp)
EndsAt: string (timestamp)
Duration: string
Microsoft.OData.Service.Sample.TrippinInMemory.Models.Event: Microsoft.OData.Service.Sample.TrippinInMemory.Models.Event:
allOf: allOf:
- $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem' - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem'
@ -3936,15 +3867,6 @@ components:
Description: Description:
type: string type: string
nullable: true nullable: true
example:
PlanItemId: integer (identifier)
ConfirmationCode: string
StartsAt: string (timestamp)
EndsAt: string (timestamp)
Duration: string
OccursAt:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.EventLocation
Description: string
Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportation: Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportation:
allOf: allOf:
- $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem' - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PlanItem'
@ -3954,13 +3876,6 @@ components:
SeatNumber: SeatNumber:
type: string type: string
nullable: true nullable: true
example:
PlanItemId: integer (identifier)
ConfirmationCode: string
StartsAt: string (timestamp)
EndsAt: string (timestamp)
Duration: string
SeatNumber: string
Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight: Microsoft.OData.Service.Sample.TrippinInMemory.Models.Flight:
allOf: allOf:
- $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportation' - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.PublicTransportation'
@ -3982,20 +3897,6 @@ components:
anyOf: anyOf:
- $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport' - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport'
nullable: true nullable: true
example:
PlanItemId: integer (identifier)
ConfirmationCode: string
StartsAt: string (timestamp)
EndsAt: string (timestamp)
Duration: string
SeatNumber: string
FlightNumber: string
Airline:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airline
From:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport
To:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Airport
Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee: Microsoft.OData.Service.Sample.TrippinInMemory.Models.Employee:
allOf: allOf:
- $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person'
@ -4011,33 +3912,6 @@ components:
type: array type: array
items: items:
$ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person'
example:
UserName: string (identifier)
FirstName: string
LastName: string
MiddleName: string
Gender:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender
Age: int64
Emails:
- string
AddressInfo:
- '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location
HomeAddress:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location
FavoriteFeature:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature
Features:
- '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature
Friends:
- '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person
BestFriend:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person
Trips:
- '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip
Cost: int64
Peers:
- '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person
Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager: Microsoft.OData.Service.Sample.TrippinInMemory.Models.Manager:
allOf: allOf:
- $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' - $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person'
@ -4057,35 +3931,6 @@ components:
type: array type: array
items: items:
$ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person' $ref: '#/components/schemas/Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person'
example:
UserName: string (identifier)
FirstName: string
LastName: string
MiddleName: string
Gender:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender
Age: int64
Emails:
- string
AddressInfo:
- '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location
HomeAddress:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location
FavoriteFeature:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature
Features:
- '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Feature
Friends:
- '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person
BestFriend:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person
Trips:
- '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Trip
Budget: int64
BossOffice:
'@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Location
DirectReports:
- '@odata.type': Microsoft.OData.Service.Sample.TrippinInMemory.Models.Person
Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender: Microsoft.OData.Service.Sample.TrippinInMemory.Models.PersonGender:
title: PersonGender title: PersonGender
enum: enum: