microsoft / openapi.net.odata Goto Github PK
View Code? Open in Web Editor NEWGenerates OpenAPI document from OData CSDL
License: MIT License
Generates OpenAPI document from OData CSDL
License: MIT License
Currently Graph has multiple namespaces and the types do not get generated correctly.
OpenAPI specification generated by Trippin sample service OData specification with default OpenApiConvertSettings
has some errors in editor.swagger.io.
Microsoft.OpenApi.OData v1.0.2
public static void GenerateOpenApiDescription()
{
IEdmModel model = GetEdmModel();
OpenApiDocument document = model.ConvertToOpenApi();
var outputJSON = document.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0);
System.IO.File.WriteAllText("openapi.json", outputJSON);
}
public static IEdmModel GetEdmModel()
{
string csdlFilePath = @"odata.xml"; // saved before
string csdl = System.IO.File.ReadAllText(csdlFilePath);
IEdmModel model = CsdlReader.Parse(XElement.Parse(csdl).CreateReader());
return model;
}
Generated OpenAPI specification has not any errors.
Generated OpenAPI specification has some errors.
Do we support the navigation property in complex type?
For example:
Entity Type (AddressInfo)
|- ID (Edm.Int32)
Complex Type (Address)
|- City (Edm.String)
|- Street (Edm.String)
|- AddressInfo (AddressInfo)
Entity Type (Customer)
-> ID (Edm.Int32)
-> Location (Address)
-> Locations (Collection(Address))
EntitySet (Customers -> Customer)
So, the path:
~/Customers/{ID}/Location/AddressInfo
should be valid.
~/Customers/{ID}/Locations/AddressInfo
should be invalid.
The OASIS OData to OpenApi v3.0 says:
4.2.1 Field title
The value of title is the value of the unqualified annotation Core.Description (see [OData-VocCore]) of the main schema or the entity container of the OData service.
If no Core.Description is present, a default title has to be provided as this is a required OpenAPI field.
4.2.2 Field version
The value of version is the value of the annotation Core.SchemaVersion (see [OData-VocCore]) of the main schema.
If no Core.SchemaVersion is present, a default version has to be provided as this is a required OpenAPI field.
4.2.3 Field description
The value of description is the value of the annotation Core.LongDescription (see [OData-VocCore]) of the main schema or the entity container.
While this field is optional, it prominently appears in OpenAPI exploration tools, so a default description should be provided if no Core.LongDescription annotation is present.
However, the ODL doesn't support "Core.Description" on main schema and Core.SchemaVersion. Once it supports, please update using the annotation.
Miss the function parameter in the parameters list
We need an updated readme that describes how this tool can be used.
It should describe all the available options such as nav prop depth, keys in path, etc.
Maybe we can have an extension middleware to expose the OpenAPI description for a certain OData service.
For example:
public class ODataOpenApiMiddleware
{
private readonly RequestDelegate next;
public ODataOpenApiMiddleware(RequestDelegate next)
{
this.next = next;
}
public async Task Invoke(HttpContext context)
{
// implementation here
}
}
Extension method:
public static IApplicationBuilder UseODataOpenApi(this IApplicationBuilder app)
{
return app.UseMiddleware<ODataOpenApiMiddleware>();
}
Configure the Middleware:
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
app.UseODataOpenApi();
app.UseRouting();
app.UseEndpoints(...);
}
Short summary (3-5 sentences) describing the issue.
It is not clear how you could perform the following:
Errors when using:
NuGet: Microsoft.Web.Http.Versioning
var oDataRoute = config.MapVersionedODataRoute(
routeName: "odata",
routePrefix: null,
model: EdmModelBuilder.GetEdmModel(),
apiVersion: ApiVersion.Default,
pathHandler: new DefaultODataPathHandler(),
routingConventions: conventions,
batchHandler: new DefaultODataBatchHandler(GlobalConfiguration.DefaultServer));
Which assemblies and versions are known to be affected?
Microsoft.OpenApi v1.1.3
Microsoft.OpenApi.OData v1.0.0-beta8
Microsoft.OData.Edm v7.6.0
Microsoft.OData.Core v7.6.0
Microsoft.AspNet.OData v6.0.0
Microsoft.AspNet.OData.Versioning v2.1.0
Microsoft.AspNet.WebApi v5.2.7
Microsoft.AspNet.WebApi.Client v5.2.7
The simplest set of steps to reproduce the issue. If possible, reference a commit that demonstrates the issue.
Documentation and usage examples lacking
What would happen if there wasn't a bug.
What is actually happening.
*Optional, details of the root cause if known.
We use multiple levels of inheritance in our model.
At this point, the generated anyOf() for responses or request bodies is missin gout all of our leaf types as they are not directly inherited from the type of a navigation property.
This doesn't work for us as the key types we can pass to an API are simply missing.
It appears that EdmModelHelper.GetDerivedTypesReferenceSchema needs to walk the full hierarchy rather than stopping at one level.
When PrefixEntityTypeNameBeforeKey setting is set to true
, attempting to generate an OpenAPI from CSDL throws an error.
master
branch
PrefixEntityTypeNameBeforeKey = true
OasGui
project.The CSDL should successfully be converted to an OpenAPI spec. in the output window.
The error is thrown due to this evaluation.
The following CSDL
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0">
<edmx:DataServices>
<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="microsoft.graph" >
<EntityContainer Name="TodoService">
<EntitySet Name="Todos" EntityType="microsoft.graph.Todo">
</EntitySet>
</EntityContainer>
<EntityType Name="Todo" HasStream="true">
<Key>
<PropertyRef Name="Id"/>
</Key>
<Property Name="Id" Type="Edm.String"/>
<Property Name="Logo" Type="Edm.Stream"/>
<Property Name="Description" Type="Edm.String"/>
</EntityType>
</Schema>
</edmx:DataServices>
</edmx:Edmx>
should create the following operations,
/Todos
/Todos/{Todo-Id}
/Todos/{Todo-Id}/$value (operationId = Todos_GetTodoContent)
/Todos/{Todo-Id}/Logo (operationId = Todos_GetTodoLogo)
Entities with HasStream=true should create a URL to the $value of the entity. Properties that are of type Stream should have an operation that allows directly accessing the property.
AB5155
Using extension with default generation settings for TripPinRESTierService OData service generates OpenAPI specification with few errors.
Microsoft.OpenApi.OData v1.0.5
Generate OpenAPI specification with default settings for TripPinRESTierService OData service.
There is no errors for generated OpenAPI specification.
There are few errors in editor.swagger.io:
Generated OpenAPI specification:
{
"openapi": "3.0.1",
"info": {
"title": "OData Service for namespace Trippin",
"description": "This OData service is located at http://localhost/",
"version": "1.0.1"
},
"servers": [
{
"url": "http://localhost/"
}
],
"paths": {
"/Airlines": {
"get": {
"tags": [
"Airlines.Airline"
],
"summary": "Get entities from Airlines",
"operationId": "Airlines.Airline.ListAirline",
"parameters": [
{
"$ref": "#/components/parameters/top/schema"
},
{
"$ref": "#/components/parameters/skip/schema"
},
{
"$ref": "#/components/parameters/search/schema"
},
{
"$ref": "#/components/parameters/filter/schema"
},
{
"$ref": "#/components/parameters/count/schema"
},
{
"name": "$orderby",
"in": "query",
"style": "form",
"description": "Order items by property values",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"AirlineCode",
"AirlineCode desc",
"Name",
"Name desc"
]
}
}
},
{
"name": "$select",
"in": "query",
"style": "form",
"description": "Select properties to be returned",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"AirlineCode",
"Name"
]
}
}
},
{
"name": "$expand",
"in": "query",
"style": "form",
"description": "Expand related entities",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"*"
]
}
}
}
],
"responses": {
"200": {
"description": "Retrieved entities",
"content": {
"application/json": {
"schema": {
"title": "Collection of Airline",
"type": "object",
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Trippin.Airline"
}
}
}
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
}
},
"post": {
"tags": [
"Airlines.Airline"
],
"summary": "Add new entity to Airlines",
"operationId": "Airlines.Airline.CreateAirline",
"requestBody": {
"description": "New entity",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Trippin.Airline"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "Created entity",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Trippin.Airline"
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
}
},
"/Airlines({AirlineCode})": {
"get": {
"tags": [
"Airlines.Airline"
],
"summary": "Get entity from Airlines by key",
"operationId": "Airlines.Airline.GetAirline",
"parameters": [
{
"name": "AirlineCode",
"in": "path",
"required": true,
"description": "key: AirlineCode of Airline",
"schema": {
"type": "string"
},
"x-ms-docs-key-type": "Airline"
},
{
"name": "$select",
"in": "query",
"style": "form",
"description": "Select properties to be returned",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"AirlineCode",
"Name"
]
}
}
},
{
"name": "$expand",
"in": "query",
"style": "form",
"description": "Expand related entities",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"*"
]
}
}
}
],
"responses": {
"200": {
"description": "Retrieved entity",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Trippin.Airline"
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
},
"patch": {
"tags": [
"Airlines.Airline"
],
"summary": "Update entity in Airlines",
"operationId": "Airlines.Airline.UpdateAirline",
"parameters": [
{
"name": "AirlineCode",
"in": "path",
"required": true,
"description": "key: AirlineCode of Airline",
"schema": {
"type": "string"
},
"x-ms-docs-key-type": "Airline"
}
],
"requestBody": {
"description": "New property values",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Trippin.Airline"
}
}
},
"required": true
},
"responses": {
"204": {
"description": "Success"
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
},
"delete": {
"tags": [
"Airlines.Airline"
],
"summary": "Delete entity from Airlines",
"operationId": "Airlines.Airline.DeleteAirline",
"parameters": [
{
"name": "AirlineCode",
"in": "path",
"required": true,
"description": "key: AirlineCode of Airline",
"schema": {
"type": "string"
},
"x-ms-docs-key-type": "Airline"
},
{
"name": "If-Match",
"in": "header",
"description": "ETag",
"schema": {
"type": "string"
}
}
],
"responses": {
"204": {
"description": "Success"
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
}
},
"/Airports": {
"get": {
"tags": [
"Airports.Airport"
],
"summary": "Get entities from Airports",
"operationId": "Airports.Airport.ListAirport",
"parameters": [
{
"$ref": "#/components/parameters/top/schema"
},
{
"$ref": "#/components/parameters/skip/schema"
},
{
"$ref": "#/components/parameters/search/schema"
},
{
"$ref": "#/components/parameters/filter/schema"
},
{
"$ref": "#/components/parameters/count/schema"
},
{
"name": "$orderby",
"in": "query",
"style": "form",
"description": "Order items by property values",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"Name",
"Name desc",
"IcaoCode",
"IcaoCode desc",
"IataCode",
"IataCode desc",
"Location",
"Location desc"
]
}
}
},
{
"name": "$select",
"in": "query",
"style": "form",
"description": "Select properties to be returned",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"Name",
"IcaoCode",
"IataCode",
"Location"
]
}
}
},
{
"name": "$expand",
"in": "query",
"style": "form",
"description": "Expand related entities",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"*"
]
}
}
}
],
"responses": {
"200": {
"description": "Retrieved entities",
"content": {
"application/json": {
"schema": {
"title": "Collection of Airport",
"type": "object",
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Trippin.Airport"
}
}
}
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
}
},
"post": {
"tags": [
"Airports.Airport"
],
"summary": "Add new entity to Airports",
"operationId": "Airports.Airport.CreateAirport",
"requestBody": {
"description": "New entity",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Trippin.Airport"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "Created entity",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Trippin.Airport"
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
}
},
"/Airports({IcaoCode})": {
"get": {
"tags": [
"Airports.Airport"
],
"summary": "Get entity from Airports by key",
"operationId": "Airports.Airport.GetAirport",
"parameters": [
{
"name": "IcaoCode",
"in": "path",
"required": true,
"description": "key: IcaoCode of Airport",
"schema": {
"type": "string"
},
"x-ms-docs-key-type": "Airport"
},
{
"name": "$select",
"in": "query",
"style": "form",
"description": "Select properties to be returned",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"Name",
"IcaoCode",
"IataCode",
"Location"
]
}
}
},
{
"name": "$expand",
"in": "query",
"style": "form",
"description": "Expand related entities",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"*"
]
}
}
}
],
"responses": {
"200": {
"description": "Retrieved entity",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Trippin.Airport"
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
},
"patch": {
"tags": [
"Airports.Airport"
],
"summary": "Update entity in Airports",
"operationId": "Airports.Airport.UpdateAirport",
"parameters": [
{
"name": "IcaoCode",
"in": "path",
"required": true,
"description": "key: IcaoCode of Airport",
"schema": {
"type": "string"
},
"x-ms-docs-key-type": "Airport"
}
],
"requestBody": {
"description": "New property values",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Trippin.Airport"
}
}
},
"required": true
},
"responses": {
"204": {
"description": "Success"
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
},
"delete": {
"tags": [
"Airports.Airport"
],
"summary": "Delete entity from Airports",
"operationId": "Airports.Airport.DeleteAirport",
"parameters": [
{
"name": "IcaoCode",
"in": "path",
"required": true,
"description": "key: IcaoCode of Airport",
"schema": {
"type": "string"
},
"x-ms-docs-key-type": "Airport"
},
{
"name": "If-Match",
"in": "header",
"description": "ETag",
"schema": {
"type": "string"
}
}
],
"responses": {
"204": {
"description": "Success"
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
}
},
"/GetNearestAirport(lat={lat},lon={lon})": {
"get": {
"tags": [
"Airports"
],
"summary": "Invoke functionImport GetNearestAirport",
"operationId": "FunctionImport.GetNearestAirport",
"parameters": [
{
"name": "lat",
"in": "path",
"required": true,
"schema": {
"format": "double",
"anyOf": [
{
"type": "number"
},
{
"type": "string"
},
{
"enum": [
"-INF",
"INF",
"NaN"
]
}
]
}
},
{
"name": "lon",
"in": "path",
"required": true,
"schema": {
"format": "double",
"anyOf": [
{
"type": "number"
},
{
"type": "string"
},
{
"enum": [
"-INF",
"INF",
"NaN"
]
}
]
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"nullable": true,
"anyOf": [
{
"$ref": "#/components/schemas/Trippin.Airport"
}
]
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "functionImport"
}
},
"/GetPersonWithMostFriends()": {
"get": {
"tags": [
"People"
],
"summary": "Invoke functionImport GetPersonWithMostFriends",
"operationId": "FunctionImport.GetPersonWithMostFriends",
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"nullable": true,
"anyOf": [
{
"$ref": "#/components/schemas/Trippin.Person"
}
]
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "functionImport"
}
},
"/Me": {
"get": {
"tags": [
"Me.Person"
],
"summary": "Get Me",
"operationId": "Me.Person.GetPerson",
"parameters": [
{
"name": "$select",
"in": "query",
"style": "form",
"description": "Select properties to be returned",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"UserName",
"FirstName",
"LastName",
"MiddleName",
"Gender",
"Age",
"Emails",
"AddressInfo",
"HomeAddress",
"FavoriteFeature",
"Features",
"Friends",
"BestFriend",
"Trips"
]
}
}
},
{
"name": "$expand",
"in": "query",
"style": "form",
"description": "Expand related entities",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"*",
"Friends",
"BestFriend",
"Trips"
]
}
}
}
],
"responses": {
"200": {
"description": "Retrieved entity",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Trippin.Person"
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
},
"patch": {
"tags": [
"Me.Person"
],
"summary": "Update Me",
"operationId": "Me.Person.UpdatePerson",
"requestBody": {
"description": "New property values",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Trippin.Person"
}
}
},
"required": true
},
"responses": {
"204": {
"description": "Success"
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
}
},
"/Me/BestFriend": {
"get": {
"tags": [
"Me.Person"
],
"summary": "Get BestFriend from Me",
"operationId": "Me.GetBestFriend",
"parameters": [
{
"name": "$select",
"in": "query",
"style": "form",
"description": "Select properties to be returned",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"UserName",
"FirstName",
"LastName",
"MiddleName",
"Gender",
"Age",
"Emails",
"AddressInfo",
"HomeAddress",
"FavoriteFeature",
"Features",
"Friends",
"BestFriend",
"Trips"
]
}
}
},
{
"name": "$expand",
"in": "query",
"style": "form",
"description": "Expand related entities",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"*",
"Friends",
"BestFriend",
"Trips"
]
}
}
}
],
"responses": {
"200": {
"description": "Retrieved navigation property",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Trippin.Person"
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
}
},
"/Me/BestFriend/$ref": {
"get": {
"tags": [
"Me.Person"
],
"summary": "Get ref of BestFriend from Me",
"operationId": "Me.GetRefBestFriend",
"responses": {
"200": {
"description": "Retrieved navigation property link",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
},
"put": {
"tags": [
"Me.Person"
],
"summary": "Update the ref of navigation property BestFriend in Me",
"operationId": "Me.UpdateRefBestFriend",
"requestBody": {
"description": "New navigation property ref values",
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": {
"type": "object"
}
}
}
},
"required": true
},
"responses": {
"204": {
"description": "Success"
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
},
"delete": {
"tags": [
"Me.Person"
],
"summary": "Delete ref of navigation property BestFriend for Me",
"operationId": "Me.DeleteRefBestFriend",
"parameters": [
{
"name": "If-Match",
"in": "header",
"description": "ETag",
"schema": {
"type": "string"
}
}
],
"responses": {
"204": {
"description": "Success"
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
}
},
"/Me/Friends": {
"get": {
"tags": [
"Me.Person"
],
"summary": "Get Friends from Me",
"operationId": "Me.ListFriends",
"parameters": [
{
"$ref": "#/components/parameters/top/schema"
},
{
"$ref": "#/components/parameters/skip/schema"
},
{
"$ref": "#/components/parameters/search/schema"
},
{
"$ref": "#/components/parameters/filter/schema"
},
{
"$ref": "#/components/parameters/count/schema"
},
{
"name": "$orderby",
"in": "query",
"style": "form",
"description": "Order items by property values",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"UserName",
"UserName desc",
"FirstName",
"FirstName desc",
"LastName",
"LastName desc",
"MiddleName",
"MiddleName desc",
"Gender",
"Gender desc",
"Age",
"Age desc",
"Emails",
"Emails desc",
"AddressInfo",
"AddressInfo desc",
"HomeAddress",
"HomeAddress desc",
"FavoriteFeature",
"FavoriteFeature desc",
"Features",
"Features desc"
]
}
}
},
{
"name": "$select",
"in": "query",
"style": "form",
"description": "Select properties to be returned",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"UserName",
"FirstName",
"LastName",
"MiddleName",
"Gender",
"Age",
"Emails",
"AddressInfo",
"HomeAddress",
"FavoriteFeature",
"Features",
"Friends",
"BestFriend",
"Trips"
]
}
}
},
{
"name": "$expand",
"in": "query",
"style": "form",
"description": "Expand related entities",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"*",
"Friends",
"BestFriend",
"Trips"
]
}
}
}
],
"responses": {
"200": {
"description": "Retrieved navigation property",
"content": {
"application/json": {
"schema": {
"title": "Collection of Person",
"type": "object",
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Trippin.Person"
}
}
}
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
}
},
"/Me/Friends/$ref": {
"get": {
"tags": [
"Me.Person"
],
"summary": "Get ref of Friends from Me",
"operationId": "Me.ListRefFriends",
"parameters": [
{
"$ref": "#/components/parameters/top/schema"
},
{
"$ref": "#/components/parameters/skip/schema"
},
{
"$ref": "#/components/parameters/search/schema"
},
{
"$ref": "#/components/parameters/filter/schema"
},
{
"$ref": "#/components/parameters/count/schema"
},
{
"name": "$orderby",
"in": "query",
"style": "form",
"description": "Order items by property values",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"UserName",
"UserName desc",
"FirstName",
"FirstName desc",
"LastName",
"LastName desc",
"MiddleName",
"MiddleName desc",
"Gender",
"Gender desc",
"Age",
"Age desc",
"Emails",
"Emails desc",
"AddressInfo",
"AddressInfo desc",
"HomeAddress",
"HomeAddress desc",
"FavoriteFeature",
"FavoriteFeature desc",
"Features",
"Features desc"
]
}
}
}
],
"responses": {
"200": {
"description": "Retrieved navigation property links",
"content": {
"application/json": {
"schema": {
"title": "Collection of links of Person",
"type": "object",
"properties": {
"value": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
},
"post": {
"tags": [
"Me.Person"
],
"summary": "Create new navigation property ref to Friends for Me",
"operationId": "Me.CreateRefFriends",
"requestBody": {
"description": "New navigation property ref value",
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": {
"type": "object"
}
}
}
},
"required": true
},
"responses": {
"201": {
"description": "Created navigation property link.",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
}
},
"/Me/Trippin.GetFavoriteAirline()": {
"get": {
"tags": [
"Me.Functions"
],
"summary": "Invoke function GetFavoriteAirline",
"operationId": "Me.GetFavoriteAirline",
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"nullable": true,
"anyOf": [
{
"$ref": "#/components/schemas/Trippin.Airline"
}
]
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "function"
}
},
"/Me/Trippin.GetFriendsTrips(userName={userName})": {
"get": {
"tags": [
"Me.Functions"
],
"summary": "Invoke function GetFriendsTrips",
"operationId": "Me.GetFriendsTrips",
"parameters": [
{
"name": "userName",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"nullable": true,
"anyOf": [
{
"$ref": "#/components/schemas/Trippin.Trip"
}
]
}
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "function"
}
},
"/Me/Trippin.ShareTrip": {
"post": {
"tags": [
"Me.Actions"
],
"summary": "Invoke action ShareTrip",
"operationId": "Me.ShareTrip",
"requestBody": {
"description": "Action parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"userName": {
"type": "string"
},
"tripId": {
"type": "integer",
"format": "int32",
"maximum": 2147483647.0,
"minimum": -2147483648.0
}
}
}
}
},
"required": true
},
"responses": {
"204": {
"description": "Success"
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "action"
}
},
"/Me/Trippin.UpdateLastName": {
"post": {
"tags": [
"Me.Actions"
],
"summary": "Invoke action UpdateLastName",
"operationId": "Me.UpdateLastName",
"requestBody": {
"description": "Action parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"lastName": {
"type": "string"
}
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "boolean",
"default": false
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "action"
}
},
"/Me/Trips": {
"get": {
"tags": [
"Me.Trip"
],
"summary": "Get Trips from Me",
"operationId": "Me.ListTrips",
"parameters": [
{
"$ref": "#/components/parameters/top/schema"
},
{
"$ref": "#/components/parameters/skip/schema"
},
{
"$ref": "#/components/parameters/search/schema"
},
{
"$ref": "#/components/parameters/filter/schema"
},
{
"$ref": "#/components/parameters/count/schema"
},
{
"name": "$orderby",
"in": "query",
"style": "form",
"description": "Order items by property values",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"TripId",
"TripId desc",
"ShareId",
"ShareId desc",
"Name",
"Name desc",
"Budget",
"Budget desc",
"Description",
"Description desc",
"Tags",
"Tags desc",
"StartsAt",
"StartsAt desc",
"EndsAt",
"EndsAt desc"
]
}
}
},
{
"name": "$select",
"in": "query",
"style": "form",
"description": "Select properties to be returned",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"TripId",
"ShareId",
"Name",
"Budget",
"Description",
"Tags",
"StartsAt",
"EndsAt",
"PlanItems"
]
}
}
},
{
"name": "$expand",
"in": "query",
"style": "form",
"description": "Expand related entities",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"*",
"PlanItems"
]
}
}
}
],
"responses": {
"200": {
"description": "Retrieved navigation property",
"content": {
"application/json": {
"schema": {
"title": "Collection of Trip",
"type": "object",
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Trippin.Trip"
}
}
}
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
}
},
"/Me/Trips/$ref": {
"get": {
"tags": [
"Me.Trip"
],
"summary": "Get ref of Trips from Me",
"operationId": "Me.ListRefTrips",
"parameters": [
{
"$ref": "#/components/parameters/top/schema"
},
{
"$ref": "#/components/parameters/skip/schema"
},
{
"$ref": "#/components/parameters/search/schema"
},
{
"$ref": "#/components/parameters/filter/schema"
},
{
"$ref": "#/components/parameters/count/schema"
},
{
"name": "$orderby",
"in": "query",
"style": "form",
"description": "Order items by property values",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"TripId",
"TripId desc",
"ShareId",
"ShareId desc",
"Name",
"Name desc",
"Budget",
"Budget desc",
"Description",
"Description desc",
"Tags",
"Tags desc",
"StartsAt",
"StartsAt desc",
"EndsAt",
"EndsAt desc"
]
}
}
}
],
"responses": {
"200": {
"description": "Retrieved navigation property links",
"content": {
"application/json": {
"schema": {
"title": "Collection of links of Trip",
"type": "object",
"properties": {
"value": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
},
"post": {
"tags": [
"Me.Trip"
],
"summary": "Create new navigation property ref to Trips for Me",
"operationId": "Me.CreateRefTrips",
"requestBody": {
"description": "New navigation property ref value",
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": {
"type": "object"
}
}
}
},
"required": true
},
"responses": {
"201": {
"description": "Created navigation property link.",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
}
},
"/People": {
"get": {
"tags": [
"People.Person"
],
"summary": "Get entities from People",
"operationId": "People.Person.ListPerson",
"parameters": [
{
"$ref": "#/components/parameters/top/schema"
},
{
"$ref": "#/components/parameters/skip/schema"
},
{
"$ref": "#/components/parameters/search/schema"
},
{
"$ref": "#/components/parameters/filter/schema"
},
{
"$ref": "#/components/parameters/count/schema"
},
{
"name": "$orderby",
"in": "query",
"style": "form",
"description": "Order items by property values",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"UserName",
"UserName desc",
"FirstName",
"FirstName desc",
"LastName",
"LastName desc",
"MiddleName",
"MiddleName desc",
"Gender",
"Gender desc",
"Age",
"Age desc",
"Emails",
"Emails desc",
"AddressInfo",
"AddressInfo desc",
"HomeAddress",
"HomeAddress desc",
"FavoriteFeature",
"FavoriteFeature desc",
"Features",
"Features desc"
]
}
}
},
{
"name": "$select",
"in": "query",
"style": "form",
"description": "Select properties to be returned",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"UserName",
"FirstName",
"LastName",
"MiddleName",
"Gender",
"Age",
"Emails",
"AddressInfo",
"HomeAddress",
"FavoriteFeature",
"Features",
"Friends",
"BestFriend",
"Trips"
]
}
}
},
{
"name": "$expand",
"in": "query",
"style": "form",
"description": "Expand related entities",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"*",
"Friends",
"BestFriend",
"Trips"
]
}
}
}
],
"responses": {
"200": {
"description": "Retrieved entities",
"content": {
"application/json": {
"schema": {
"title": "Collection of Person",
"type": "object",
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Trippin.Person"
}
}
}
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
}
},
"post": {
"tags": [
"People.Person"
],
"summary": "Add new entity to People",
"operationId": "People.Person.CreatePerson",
"requestBody": {
"description": "New entity",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Trippin.Person"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "Created entity",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Trippin.Person"
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
}
},
"/People({UserName})": {
"get": {
"tags": [
"People.Person"
],
"summary": "Get entity from People by key",
"operationId": "People.Person.GetPerson",
"parameters": [
{
"name": "UserName",
"in": "path",
"required": true,
"description": "key: UserName of Person",
"schema": {
"type": "string"
},
"x-ms-docs-key-type": "Person"
},
{
"name": "$select",
"in": "query",
"style": "form",
"description": "Select properties to be returned",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"UserName",
"FirstName",
"LastName",
"MiddleName",
"Gender",
"Age",
"Emails",
"AddressInfo",
"HomeAddress",
"FavoriteFeature",
"Features",
"Friends",
"BestFriend",
"Trips"
]
}
}
},
{
"name": "$expand",
"in": "query",
"style": "form",
"description": "Expand related entities",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"*",
"Friends",
"BestFriend",
"Trips"
]
}
}
}
],
"responses": {
"200": {
"description": "Retrieved entity",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Trippin.Person"
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
},
"patch": {
"tags": [
"People.Person"
],
"summary": "Update entity in People",
"operationId": "People.Person.UpdatePerson",
"parameters": [
{
"name": "UserName",
"in": "path",
"required": true,
"description": "key: UserName of Person",
"schema": {
"type": "string"
},
"x-ms-docs-key-type": "Person"
}
],
"requestBody": {
"description": "New property values",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Trippin.Person"
}
}
},
"required": true
},
"responses": {
"204": {
"description": "Success"
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
},
"delete": {
"tags": [
"People.Person"
],
"summary": "Delete entity from People",
"operationId": "People.Person.DeletePerson",
"parameters": [
{
"name": "UserName",
"in": "path",
"required": true,
"description": "key: UserName of Person",
"schema": {
"type": "string"
},
"x-ms-docs-key-type": "Person"
},
{
"name": "If-Match",
"in": "header",
"description": "ETag",
"schema": {
"type": "string"
}
}
],
"responses": {
"204": {
"description": "Success"
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
}
},
"/People({UserName})/BestFriend": {
"get": {
"tags": [
"People.Person"
],
"summary": "Get BestFriend from People",
"operationId": "People.GetBestFriend",
"parameters": [
{
"name": "UserName",
"in": "path",
"required": true,
"description": "key: UserName of Person",
"schema": {
"type": "string"
},
"x-ms-docs-key-type": "Person"
},
{
"name": "$select",
"in": "query",
"style": "form",
"description": "Select properties to be returned",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"UserName",
"FirstName",
"LastName",
"MiddleName",
"Gender",
"Age",
"Emails",
"AddressInfo",
"HomeAddress",
"FavoriteFeature",
"Features",
"Friends",
"BestFriend",
"Trips"
]
}
}
},
{
"name": "$expand",
"in": "query",
"style": "form",
"description": "Expand related entities",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"*",
"Friends",
"BestFriend",
"Trips"
]
}
}
}
],
"responses": {
"200": {
"description": "Retrieved navigation property",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Trippin.Person"
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
}
},
"/People({UserName})/BestFriend/$ref": {
"get": {
"tags": [
"People.Person"
],
"summary": "Get ref of BestFriend from People",
"operationId": "People.GetRefBestFriend",
"parameters": [
{
"name": "UserName",
"in": "path",
"required": true,
"description": "key: UserName of Person",
"schema": {
"type": "string"
},
"x-ms-docs-key-type": "Person"
}
],
"responses": {
"200": {
"description": "Retrieved navigation property link",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
},
"put": {
"tags": [
"People.Person"
],
"summary": "Update the ref of navigation property BestFriend in People",
"operationId": "People.UpdateRefBestFriend",
"parameters": [
{
"name": "UserName",
"in": "path",
"required": true,
"description": "key: UserName of Person",
"schema": {
"type": "string"
},
"x-ms-docs-key-type": "Person"
}
],
"requestBody": {
"description": "New navigation property ref values",
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": {
"type": "object"
}
}
}
},
"required": true
},
"responses": {
"204": {
"description": "Success"
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
},
"delete": {
"tags": [
"People.Person"
],
"summary": "Delete ref of navigation property BestFriend for People",
"operationId": "People.DeleteRefBestFriend",
"parameters": [
{
"name": "UserName",
"in": "path",
"required": true,
"description": "key: UserName of Person",
"schema": {
"type": "string"
},
"x-ms-docs-key-type": "Person"
},
{
"name": "If-Match",
"in": "header",
"description": "ETag",
"schema": {
"type": "string"
}
}
],
"responses": {
"204": {
"description": "Success"
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
}
},
"/People({UserName})/Friends": {
"get": {
"tags": [
"People.Person"
],
"summary": "Get Friends from People",
"operationId": "People.ListFriends",
"parameters": [
{
"name": "UserName",
"in": "path",
"required": true,
"description": "key: UserName of Person",
"schema": {
"type": "string"
},
"x-ms-docs-key-type": "Person"
},
{
"$ref": "#/components/parameters/top/schema"
},
{
"$ref": "#/components/parameters/skip/schema"
},
{
"$ref": "#/components/parameters/search/schema"
},
{
"$ref": "#/components/parameters/filter/schema"
},
{
"$ref": "#/components/parameters/count/schema"
},
{
"name": "$orderby",
"in": "query",
"style": "form",
"description": "Order items by property values",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"UserName",
"UserName desc",
"FirstName",
"FirstName desc",
"LastName",
"LastName desc",
"MiddleName",
"MiddleName desc",
"Gender",
"Gender desc",
"Age",
"Age desc",
"Emails",
"Emails desc",
"AddressInfo",
"AddressInfo desc",
"HomeAddress",
"HomeAddress desc",
"FavoriteFeature",
"FavoriteFeature desc",
"Features",
"Features desc"
]
}
}
},
{
"name": "$select",
"in": "query",
"style": "form",
"description": "Select properties to be returned",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"UserName",
"FirstName",
"LastName",
"MiddleName",
"Gender",
"Age",
"Emails",
"AddressInfo",
"HomeAddress",
"FavoriteFeature",
"Features",
"Friends",
"BestFriend",
"Trips"
]
}
}
},
{
"name": "$expand",
"in": "query",
"style": "form",
"description": "Expand related entities",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"*",
"Friends",
"BestFriend",
"Trips"
]
}
}
}
],
"responses": {
"200": {
"description": "Retrieved navigation property",
"content": {
"application/json": {
"schema": {
"title": "Collection of Person",
"type": "object",
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Trippin.Person"
}
}
}
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
}
},
"/People({UserName})/Friends/$ref": {
"get": {
"tags": [
"People.Person"
],
"summary": "Get ref of Friends from People",
"operationId": "People.ListRefFriends",
"parameters": [
{
"name": "UserName",
"in": "path",
"required": true,
"description": "key: UserName of Person",
"schema": {
"type": "string"
},
"x-ms-docs-key-type": "Person"
},
{
"$ref": "#/components/parameters/top/schema"
},
{
"$ref": "#/components/parameters/skip/schema"
},
{
"$ref": "#/components/parameters/search/schema"
},
{
"$ref": "#/components/parameters/filter/schema"
},
{
"$ref": "#/components/parameters/count/schema"
},
{
"name": "$orderby",
"in": "query",
"style": "form",
"description": "Order items by property values",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"UserName",
"UserName desc",
"FirstName",
"FirstName desc",
"LastName",
"LastName desc",
"MiddleName",
"MiddleName desc",
"Gender",
"Gender desc",
"Age",
"Age desc",
"Emails",
"Emails desc",
"AddressInfo",
"AddressInfo desc",
"HomeAddress",
"HomeAddress desc",
"FavoriteFeature",
"FavoriteFeature desc",
"Features",
"Features desc"
]
}
}
}
],
"responses": {
"200": {
"description": "Retrieved navigation property links",
"content": {
"application/json": {
"schema": {
"title": "Collection of links of Person",
"type": "object",
"properties": {
"value": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
},
"post": {
"tags": [
"People.Person"
],
"summary": "Create new navigation property ref to Friends for People",
"operationId": "People.CreateRefFriends",
"parameters": [
{
"name": "UserName",
"in": "path",
"required": true,
"description": "key: UserName of Person",
"schema": {
"type": "string"
},
"x-ms-docs-key-type": "Person"
}
],
"requestBody": {
"description": "New navigation property ref value",
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": {
"type": "object"
}
}
}
},
"required": true
},
"responses": {
"201": {
"description": "Created navigation property link.",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
}
},
"/People({UserName})/Trippin.GetFavoriteAirline()": {
"get": {
"tags": [
"People.Functions"
],
"summary": "Invoke function GetFavoriteAirline",
"operationId": "People.GetFavoriteAirline",
"parameters": [
{
"name": "UserName",
"in": "path",
"required": true,
"description": "key: UserName of Person",
"schema": {
"type": "string"
},
"x-ms-docs-key-type": "Person"
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"nullable": true,
"anyOf": [
{
"$ref": "#/components/schemas/Trippin.Airline"
}
]
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "function"
}
},
"/People({UserName})/Trippin.GetFriendsTrips(userName={userName})": {
"get": {
"tags": [
"People.Functions"
],
"summary": "Invoke function GetFriendsTrips",
"operationId": "People.GetFriendsTrips",
"parameters": [
{
"name": "UserName",
"in": "path",
"required": true,
"description": "key: UserName of Person",
"schema": {
"type": "string"
},
"x-ms-docs-key-type": "Person"
},
{
"name": "userName",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"nullable": true,
"anyOf": [
{
"$ref": "#/components/schemas/Trippin.Trip"
}
]
}
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "function"
}
},
"/People({UserName})/Trippin.ShareTrip": {
"post": {
"tags": [
"People.Actions"
],
"summary": "Invoke action ShareTrip",
"operationId": "People.ShareTrip",
"parameters": [
{
"name": "UserName",
"in": "path",
"required": true,
"description": "key: UserName of Person",
"schema": {
"type": "string"
},
"x-ms-docs-key-type": "Person"
}
],
"requestBody": {
"description": "Action parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"userName": {
"type": "string"
},
"tripId": {
"type": "integer",
"format": "int32",
"maximum": 2147483647.0,
"minimum": -2147483648.0
}
}
}
}
},
"required": true
},
"responses": {
"204": {
"description": "Success"
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "action"
}
},
"/People({UserName})/Trippin.UpdateLastName": {
"post": {
"tags": [
"People.Actions"
],
"summary": "Invoke action UpdateLastName",
"operationId": "People.UpdateLastName",
"parameters": [
{
"name": "UserName",
"in": "path",
"required": true,
"description": "key: UserName of Person",
"schema": {
"type": "string"
},
"x-ms-docs-key-type": "Person"
}
],
"requestBody": {
"description": "Action parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"lastName": {
"type": "string"
}
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "boolean",
"default": false
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "action"
}
},
"/People({UserName})/Trips": {
"get": {
"tags": [
"People.Trip"
],
"summary": "Get Trips from People",
"operationId": "People.ListTrips",
"parameters": [
{
"name": "UserName",
"in": "path",
"required": true,
"description": "key: UserName of Person",
"schema": {
"type": "string"
},
"x-ms-docs-key-type": "Person"
},
{
"$ref": "#/components/parameters/top/schema"
},
{
"$ref": "#/components/parameters/skip/schema"
},
{
"$ref": "#/components/parameters/search/schema"
},
{
"$ref": "#/components/parameters/filter/schema"
},
{
"$ref": "#/components/parameters/count/schema"
},
{
"name": "$orderby",
"in": "query",
"style": "form",
"description": "Order items by property values",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"TripId",
"TripId desc",
"ShareId",
"ShareId desc",
"Name",
"Name desc",
"Budget",
"Budget desc",
"Description",
"Description desc",
"Tags",
"Tags desc",
"StartsAt",
"StartsAt desc",
"EndsAt",
"EndsAt desc"
]
}
}
},
{
"name": "$select",
"in": "query",
"style": "form",
"description": "Select properties to be returned",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"TripId",
"ShareId",
"Name",
"Budget",
"Description",
"Tags",
"StartsAt",
"EndsAt",
"PlanItems"
]
}
}
},
{
"name": "$expand",
"in": "query",
"style": "form",
"description": "Expand related entities",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"*",
"PlanItems"
]
}
}
}
],
"responses": {
"200": {
"description": "Retrieved navigation property",
"content": {
"application/json": {
"schema": {
"title": "Collection of Trip",
"type": "object",
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Trippin.Trip"
}
}
}
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
}
},
"/People({UserName})/Trips/$ref": {
"get": {
"tags": [
"People.Trip"
],
"summary": "Get ref of Trips from People",
"operationId": "People.ListRefTrips",
"parameters": [
{
"name": "UserName",
"in": "path",
"required": true,
"description": "key: UserName of Person",
"schema": {
"type": "string"
},
"x-ms-docs-key-type": "Person"
},
{
"$ref": "#/components/parameters/top/schema"
},
{
"$ref": "#/components/parameters/skip/schema"
},
{
"$ref": "#/components/parameters/search/schema"
},
{
"$ref": "#/components/parameters/filter/schema"
},
{
"$ref": "#/components/parameters/count/schema"
},
{
"name": "$orderby",
"in": "query",
"style": "form",
"description": "Order items by property values",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"TripId",
"TripId desc",
"ShareId",
"ShareId desc",
"Name",
"Name desc",
"Budget",
"Budget desc",
"Description",
"Description desc",
"Tags",
"Tags desc",
"StartsAt",
"StartsAt desc",
"EndsAt",
"EndsAt desc"
]
}
}
}
],
"responses": {
"200": {
"description": "Retrieved navigation property links",
"content": {
"application/json": {
"schema": {
"title": "Collection of links of Trip",
"type": "object",
"properties": {
"value": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
},
"post": {
"tags": [
"People.Trip"
],
"summary": "Create new navigation property ref to Trips for People",
"operationId": "People.CreateRefTrips",
"parameters": [
{
"name": "UserName",
"in": "path",
"required": true,
"description": "key: UserName of Person",
"schema": {
"type": "string"
},
"x-ms-docs-key-type": "Person"
}
],
"requestBody": {
"description": "New navigation property ref value",
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": {
"type": "object"
}
}
}
},
"required": true
},
"responses": {
"201": {
"description": "Created navigation property link.",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
}
},
"/ResetDataSource": {
"post": {
"tags": [
"ResetDataSource"
],
"summary": "Invoke actionImport ResetDataSource",
"operationId": "ActionImport.ResetDataSource",
"responses": {
"204": {
"description": "Success"
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "actionImport"
}
}
},
"components": {
"schemas": {
"Trippin.Person": {
"title": "Person",
"type": "object",
"properties": {
"UserName": {
"type": "string"
},
"FirstName": {
"type": "string"
},
"LastName": {
"type": "string",
"maxLength": 26,
"nullable": true
},
"MiddleName": {
"type": "string",
"nullable": true
},
"Gender": {
"anyOf": [
{
"$ref": "#/components/schemas/Trippin.PersonGender"
}
]
},
"Age": {
"type": "integer",
"format": "int64",
"nullable": true
},
"Emails": {
"type": "array",
"items": {
"type": "string",
"nullable": true
}
},
"AddressInfo": {
"type": "array",
"items": {
"nullable": true,
"anyOf": [
{
"$ref": "#/components/schemas/Trippin.Location"
}
]
}
},
"HomeAddress": {
"nullable": true,
"anyOf": [
{
"$ref": "#/components/schemas/Trippin.Location"
}
]
},
"FavoriteFeature": {
"anyOf": [
{
"$ref": "#/components/schemas/Trippin.Feature"
}
]
},
"Features": {
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/components/schemas/Trippin.Feature"
}
]
}
},
"Friends": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Trippin.Person"
}
},
"BestFriend": {
"nullable": true,
"anyOf": [
{
"$ref": "#/components/schemas/Trippin.Person"
}
]
},
"Trips": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Trippin.Trip"
}
}
}
},
"Trippin.Airline": {
"title": "Airline",
"type": "object",
"properties": {
"AirlineCode": {
"type": "string"
},
"Name": {
"type": "string",
"nullable": true
}
}
},
"Trippin.Airport": {
"title": "Airport",
"type": "object",
"properties": {
"Name": {
"type": "string",
"nullable": true
},
"IcaoCode": {
"type": "string"
},
"IataCode": {
"type": "string",
"nullable": true
},
"Location": {
"nullable": true,
"anyOf": [
{
"$ref": "#/components/schemas/Trippin.AirportLocation"
}
]
}
}
},
"Trippin.Location": {
"title": "Location",
"type": "object",
"properties": {
"Address": {
"type": "string",
"nullable": true
},
"City": {
"nullable": true,
"anyOf": [
{
"$ref": "#/components/schemas/Trippin.City"
}
]
}
}
},
"Trippin.City": {
"title": "City",
"type": "object",
"properties": {
"Name": {
"type": "string",
"nullable": true
},
"CountryRegion": {
"type": "string",
"nullable": true
},
"Region": {
"type": "string",
"nullable": true
}
}
},
"Trippin.AirportLocation": {
"allOf": [
{
"$ref": "#/components/schemas/Trippin.Location"
},
{
"title": "AirportLocation",
"type": "object",
"properties": {
"Loc": {
"$ref": "#/components/schemas/Edm.GeographyPoint"
}
}
}
]
},
"Trippin.EventLocation": {
"allOf": [
{
"$ref": "#/components/schemas/Trippin.Location"
},
{
"title": "EventLocation",
"type": "object",
"properties": {
"BuildingInfo": {
"type": "string",
"nullable": true
}
}
}
]
},
"Trippin.Trip": {
"title": "Trip",
"type": "object",
"properties": {
"TripId": {
"type": "integer",
"format": "int32",
"maximum": 2147483647.0,
"minimum": -2147483648.0
},
"ShareId": {
"type": "string",
"format": "uuid",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
},
"Name": {
"type": "string",
"nullable": true
},
"Budget": {
"format": "float",
"anyOf": [
{
"type": "number"
},
{
"type": "string"
},
{
"enum": [
"-INF",
"INF",
"NaN"
]
}
]
},
"Description": {
"type": "string",
"nullable": true
},
"Tags": {
"type": "array",
"items": {
"type": "string",
"nullable": true
}
},
"StartsAt": {
"type": "string",
"format": "date-time",
"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])$"
},
"EndsAt": {
"type": "string",
"format": "date-time",
"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])$"
},
"PlanItems": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Trippin.PlanItem"
}
}
}
},
"Trippin.PlanItem": {
"title": "PlanItem",
"type": "object",
"properties": {
"PlanItemId": {
"type": "integer",
"format": "int32",
"maximum": 2147483647.0,
"minimum": -2147483648.0
},
"ConfirmationCode": {
"type": "string",
"nullable": true
},
"StartsAt": {
"type": "string",
"format": "date-time",
"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])$"
},
"EndsAt": {
"type": "string",
"format": "date-time",
"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])$"
},
"Duration": {
"type": "string",
"format": "duration",
"pattern": "^-?P([0-9]+D)?(T([0-9]+H)?([0-9]+M)?([0-9]+([.][0-9]+)?S)?)?$"
}
}
},
"Trippin.Event": {
"allOf": [
{
"$ref": "#/components/schemas/Trippin.PlanItem"
},
{
"title": "Event",
"type": "object",
"properties": {
"OccursAt": {
"nullable": true,
"anyOf": [
{
"$ref": "#/components/schemas/Trippin.EventLocation"
}
]
},
"Description": {
"type": "string",
"nullable": true
}
}
}
]
},
"Trippin.PublicTransportation": {
"allOf": [
{
"$ref": "#/components/schemas/Trippin.PlanItem"
},
{
"title": "PublicTransportation",
"type": "object",
"properties": {
"SeatNumber": {
"type": "string",
"nullable": true
}
}
}
]
},
"Trippin.Flight": {
"allOf": [
{
"$ref": "#/components/schemas/Trippin.PublicTransportation"
},
{
"title": "Flight",
"type": "object",
"properties": {
"FlightNumber": {
"type": "string",
"nullable": true
},
"Airline": {
"nullable": true,
"anyOf": [
{
"$ref": "#/components/schemas/Trippin.Airline"
}
]
},
"From": {
"nullable": true,
"anyOf": [
{
"$ref": "#/components/schemas/Trippin.Airport"
}
]
},
"To": {
"nullable": true,
"anyOf": [
{
"$ref": "#/components/schemas/Trippin.Airport"
}
]
}
}
}
]
},
"Trippin.Employee": {
"allOf": [
{
"$ref": "#/components/schemas/Trippin.Person"
},
{
"title": "Employee",
"type": "object",
"properties": {
"Cost": {
"type": "integer",
"format": "int64"
},
"Peers": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Trippin.Person"
}
}
}
}
]
},
"Trippin.Manager": {
"allOf": [
{
"$ref": "#/components/schemas/Trippin.Person"
},
{
"title": "Manager",
"type": "object",
"properties": {
"Budget": {
"type": "integer",
"format": "int64"
},
"BossOffice": {
"nullable": true,
"anyOf": [
{
"$ref": "#/components/schemas/Trippin.Location"
}
]
},
"DirectReports": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Trippin.Person"
}
}
}
}
]
},
"Trippin.PersonGender": {
"title": "PersonGender",
"type": "string",
"enum": [
"Male",
"Female",
"Unknown"
]
},
"Trippin.Feature": {
"title": "Feature",
"type": "string",
"enum": [
"Feature1",
"Feature2",
"Feature3",
"Feature4"
]
},
"Edm.Geography": {
"type": "object",
"anyOf": [
{
"$ref": "#/components/schemas/Edm.GeographyPoint"
},
{
"$ref": "#/components/schemas/Edm.GeographyLineString"
},
{
"$ref": "#/components/schemas/Edm.GeographyPolygon"
},
{
"$ref": "#/components/schemas/Edm.GeographyMultiPoint"
},
{
"$ref": "#/components/schemas/Edm.GeographyMultiLineString"
},
{
"$ref": "#/components/schemas/Edm.GeographyMultiPolygon"
},
{
"$ref": "#/components/schemas/Edm.GeographyCollection"
}
]
},
"Edm.GeographyPoint": {
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"default": "Point",
"enum": [
"Point"
]
},
"coordinates": {
"$ref": "#/components/schemas/GeoJSON.position"
}
}
},
"Edm.GeographyLineString": {
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"enum": [
"LineString"
]
},
"coordinates": {
"type": "array",
"minItems": 2,
"items": {
"$ref": "#/components/schemas/GeoJSON.position"
}
}
}
},
"Edm.GeographyPolygon": {
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"enum": [
"Polygon"
]
},
"coordinates": {
"type": "array",
"minItems": 4,
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/GeoJSON.position"
}
}
}
}
},
"Edm.GeographyMultiPoint": {
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"enum": [
"MultiPoint"
]
},
"coordinates": {
"type": "array",
"items": {
"$ref": "#/components/schemas/GeoJSON.position"
}
}
}
},
"Edm.GeographyMultiLineString": {
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"enum": [
"MultiLineString"
]
},
"coordinates": {
"type": "array",
"minItems": 2,
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/GeoJSON.position"
}
}
}
}
},
"Edm.GeographyMultiPolygon": {
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"enum": [
"MultiPolygon"
]
},
"coordinates": {
"type": "array",
"minItems": 4,
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/GeoJSON.position"
}
}
}
}
}
},
"Edm.GeographyCollection": {
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"enum": [
"GeometryCollection"
]
},
"coordinates": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Edm.Geography"
}
}
}
},
"Edm.Geometry": {
"type": "object",
"anyOf": [
{
"$ref": "#/components/schemas/Edm.GeographyPoint"
},
{
"$ref": "#/components/schemas/Edm.GeographyLineString"
},
{
"$ref": "#/components/schemas/Edm.GeographyPolygon"
},
{
"$ref": "#/components/schemas/Edm.GeographyMultiPoint"
},
{
"$ref": "#/components/schemas/Edm.GeographyMultiLineString"
},
{
"$ref": "#/components/schemas/Edm.GeographyMultiPolygon"
},
{
"$ref": "#/components/schemas/Edm.GeographyCollection"
}
]
},
"Edm.GeometryPoint": {
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"default": "Point",
"enum": [
"Point"
]
},
"coordinates": {
"$ref": "#/components/schemas/GeoJSON.position"
}
}
},
"Edm.GeometryLineString": {
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"enum": [
"LineString"
]
},
"coordinates": {
"type": "array",
"minItems": 2,
"items": {
"$ref": "#/components/schemas/GeoJSON.position"
}
}
}
},
"Edm.GeometryPolygon": {
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"enum": [
"Polygon"
]
},
"coordinates": {
"type": "array",
"minItems": 4,
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/GeoJSON.position"
}
}
}
}
},
"Edm.GeometryMultiPoint": {
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"enum": [
"MultiPoint"
]
},
"coordinates": {
"type": "array",
"items": {
"$ref": "#/components/schemas/GeoJSON.position"
}
}
}
},
"Edm.GeometryMultiLineString": {
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"enum": [
"MultiLineString"
]
},
"coordinates": {
"type": "array",
"minItems": 2,
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/GeoJSON.position"
}
}
}
}
},
"Edm.GeometryMultiPolygon": {
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"enum": [
"MultiPolygon"
]
},
"coordinates": {
"type": "array",
"minItems": 4,
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/GeoJSON.position"
}
}
}
}
}
},
"Edm.GeometryCollection": {
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"enum": [
"GeometryCollection"
]
},
"coordinates": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Edm.Geography"
}
}
}
},
"GeoJSON.position": {
"type": "array",
"minItems": 2,
"items": {
"type": "number"
}
},
"odata.error": {
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"$ref": "#/components/schemas/odata.error.main"
}
}
},
"odata.error.main": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"target": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"$ref": "#/components/schemas/odata.error.detail"
}
},
"innererror": {
"type": "object",
"description": "The structure of this object is service-specific"
}
}
},
"odata.error.detail": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"target": {
"type": "string"
}
}
}
},
"responses": {
"error": {
"description": "error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/odata.error"
}
}
}
}
},
"parameters": {
"top": {
"name": "$top",
"in": "query",
"description": "Show only the first n items",
"schema": {
"type": "integer",
"minimum": 0.0
},
"example": 50
},
"skip": {
"name": "$skip",
"in": "query",
"description": "Skip the first n items",
"schema": {
"type": "integer",
"minimum": 0.0
}
},
"count": {
"name": "$count",
"in": "query",
"description": "Include count of items",
"schema": {
"type": "boolean"
}
},
"filter": {
"name": "$filter",
"in": "query",
"description": "Filter items by property values",
"schema": {
"type": "string"
}
},
"search": {
"name": "$search",
"in": "query",
"description": "Search items by search phrases",
"schema": {
"type": "string"
}
}
},
"examples": {
"Trippin.Person": {
"value": {
"AddressInfo": [
{
"@odata.type": "Trippin.Location"
}
],
"Age": 0,
"BestFriend": {
"@odata.type": "Trippin.Person"
},
"Emails": [
"String"
],
"FavoriteFeature": {
"@odata.type": "Trippin.Feature"
},
"Features": [
{
"@odata.type": "Trippin.Feature"
}
],
"FirstName": "String",
"Friends": [
{
"@odata.type": "Trippin.Person"
}
],
"Gender": {
"@odata.type": "Trippin.PersonGender"
},
"HomeAddress": {
"@odata.type": "Trippin.Location"
},
"LastName": "String",
"MiddleName": "String",
"Trips": [
{
"@odata.type": "Trippin.Trip"
}
],
"UserName": "String (identifier)"
}
},
"Trippin.Airline": {
"value": {
"AirlineCode": "String (identifier)",
"Name": "String"
}
},
"Trippin.Airport": {
"value": {
"IataCode": "String",
"IcaoCode": "String (identifier)",
"Location": {
"@odata.type": "Trippin.AirportLocation"
},
"Name": "String"
}
},
"Trippin.Location": {
"value": {
"Address": "String",
"City": {
"@odata.type": "Trippin.City"
}
}
},
"Trippin.City": {
"value": {
"CountryRegion": "String",
"Name": "String",
"Region": "String"
}
},
"Trippin.AirportLocation": {
"value": {
"Loc": "GeographyPoint"
}
},
"Trippin.EventLocation": {
"value": {
"BuildingInfo": "String"
}
},
"Trippin.Trip": {
"value": {
"Budget": 0,
"Description": "String",
"EndsAt": "0001-01-01T03:00:00+03:00",
"Name": "String",
"PlanItems": [
{
"@odata.type": "Trippin.PlanItem"
}
],
"ShareId": "00000000-0000-0000-0000-000000000000",
"StartsAt": "0001-01-01T03:00:00+03:00",
"Tags": [
"String"
],
"TripId": 0
}
},
"Trippin.PlanItem": {
"value": {
"ConfirmationCode": "String",
"Duration": "Duration",
"EndsAt": "0001-01-01T03:00:00+03:00",
"PlanItemId": 0,
"StartsAt": "0001-01-01T03:00:00+03:00"
}
},
"Trippin.Event": {
"value": {
"Description": "String",
"OccursAt": {
"@odata.type": "Trippin.EventLocation"
}
}
},
"Trippin.PublicTransportation": {
"value": {
"SeatNumber": "String"
}
},
"Trippin.Flight": {
"value": {
"Airline": {
"@odata.type": "Trippin.Airline"
},
"FlightNumber": "String",
"From": {
"@odata.type": "Trippin.Airport"
},
"To": {
"@odata.type": "Trippin.Airport"
}
}
},
"Trippin.Employee": {
"value": {
"Cost": 0,
"Peers": [
{
"@odata.type": "Trippin.Person"
}
]
}
},
"Trippin.Manager": {
"value": {
"BossOffice": {
"@odata.type": "Trippin.Location"
},
"Budget": 0,
"DirectReports": [
{
"@odata.type": "Trippin.Person"
}
]
}
}
}
},
"tags": [
{
"name": "Airlines.Airline",
"x-ms-docs-toc-type": "page"
},
{
"name": "Airports.Airport",
"x-ms-docs-toc-type": "page"
},
{
"name": "Airports",
"x-ms-docs-toc-type": "container"
},
{
"name": "People",
"x-ms-docs-toc-type": "container"
},
{
"name": "Me.Person",
"x-ms-docs-toc-type": "page"
},
{
"name": "Me.Functions",
"x-ms-docs-toc-type": "container"
},
{
"name": "Me.Actions",
"x-ms-docs-toc-type": "container"
},
{
"name": "Me.Trip",
"x-ms-docs-toc-type": "page"
},
{
"name": "People.Person",
"x-ms-docs-toc-type": "page"
},
{
"name": "People.Functions",
"x-ms-docs-toc-type": "container"
},
{
"name": "People.Actions",
"x-ms-docs-toc-type": "container"
},
{
"name": "People.Trip",
"x-ms-docs-toc-type": "page"
},
{
"name": "ResetDataSource",
"x-ms-docs-toc-type": "container"
}
]
}
No create methods for inherited class where in parent defined operations;
OpenAPI.NET.OData 1.0.1
public class AccountModel : BaseEntityApiModel{
public long Id {get; set;}
public string Name {get; set;}
}
public class AccountModel : BaseEntityApiModel{
public string AccountType {get; set;}
}
public class MyDbContext : DbContext {
public DbSet<AccountModel> Accounts { get; set; }
}
public static IEdmModel GetEdmModel() {
var builder = new ODataConventionModelBuilder();
var baseEntity = builder.EntityType<BaseEntityApiModel>();
baseEntity.Function("Attachments").ReturnsCollection<AttachmentApiModel>();
builder.EntitySet<AccountModel>("Accounts");
return builder.GetEdmModel();
}
public OpenApiDocument ConvertEdmToOpenApi(){
var model = SoftWell.Ctor.Api.Admin.AllConfigurations.GetEdmModel();
OpenApiConvertSettings settings = new OpenApiConvertSettings {
EnableUnqualifiedCall = true,
TopExample = 100
};
var doc = model.ConvertToOpenApi(settings);
return doc;
}
In created OpenApiDocument method for Attachments created for Account
and BaseEntityApiModel entities.
In created OpenApiDocument no method for Attachments Account entity, only for BaseEntityApiModel.
Links tags should be optional in the output, driven by a bool in the settings object.
I don't always want links tags in my OAS document..
As a side note, the links tags generated are currently completely broken, so this is a key reason for turning them off, however, even when they are working correctly, I'd like to choose whether to have them or not.
We need a config value that includes or excludes the keys (ids') in the path when generating the description. This should be configurable such that the user can generate the paths with or without keys in the segment.
Hi,
I'm creating a POC trying to convert this test oData service: https://services.odata.org/V2/Northwind/Northwind.svc/$metadata but I'm getting the issue below and I'm not able to fix it.
Encountered the following errors when parsing the EDMX document: UnexpectedXmlElement : The element 'edmx:Edmx' was unexpected for the root element. The root element should be Edmx. : (0, 0)
Any clue? Could be the edmx version and .net verion (4.6) ?
Thanks in advance.
It is pretty common to use a rout prefix such as "odata" or "api" for paths in an OData API.
Adding this into the generated paths would create an OAS doc that more accurately matches the implementation.
Affects Microsoft.OpenAPI.OData.Reader.
Map a route with a call like the following:
endpoints.MapODataRoute("odata", "api", this.GetEdmModel());
Paths are along the lines of
/api/entitySet1
/api/entitySet2
Paths are along the lines of
/entitySet1
/entitySet2
I'm proposing to add a pathPrefix string to the Settings class, and simply include that as a prefix to all generated paths. That provides an easy way to match the routePrefix with the actual paths.
Short summary (3-5 sentences) describing the issue.
Recently, I got a lot of requirements, for example
Yes, we can meet all of these by modifying the codes, by adding settings, etc.
However, i'd think maybe it's time to refactor it in the next major release.
I'd like to use the Dependency Injection to allow customer to customize the converting process.
We need figure out the working flow from OData to OpenAPI. The process steps are certain, at each step, we can create a service to work on it.
We need figure out the services used during converting.
for example:
I think we need
public static IServiceCollection UseOpenApiOData(IServiceCollection services)
{
services.AddSingleton<IOpenApiODataConverter>(); // converter or generator
services.AddSingleton<IODataPathProvider>();
services.AddSingleton<IODataOpenApiPathHandler>();
services.AddSingleton<IODataOpenApiOperationHandler>();
.....
service.AddSingleton<ODataOpenApiOptions>();
return services;
}
IServiceCollection services= new ServiceCollection();
services.UserOpenApiOData();
IServiceProvider sp = services.CreateServiceProvider();
IOpenApiODataConverter converter = sp.GetService<IOpenApiODataConverter>();
...
It can be used in the ASP.NET Core pipeline, for example we can create a middleware to generate the OpenAPI description for a OData service.
It can support to customize the converting. For example, we can replace a certain service using customized service.
I think we need to pass the default $Top value to CreateTop method.
OpenAPI specification generated for RefPatchOperationHandler
and RefPostOperationHandler
has some errors in editor.swagger.io.
Microsoft.OpenApi.OData v1.0.2
Paste the contents of test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.yaml in editor.swagger.io
Generated OpenAPI specification does not have errors (except perhaps for the ones mentioned in issue #66).
Generated OpenAPI specification has a bunch of errors along the lines of:
Caused by incorrect casing of the OpenAPI type in the following lines
OpenAPI specification generated, for example, by OData-specification:
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
<edmx:DataServices>
<Schema Namespace="Namespace1" xmlns="http://docs.oasis-open.org/odata/ns/edm">
<EntityType Name="EntityType">
<Key>
<PropertyRef Name="Id" />
</Key>
<Property Name="Id" Type="Edm.Int32" Nullable="false" />
</EntityType>
<Action Name="DoWorkWithEntityType">
<Parameter Name="source" Type="Namespace1.EntityType"/>
</Action>
<EntityContainer Name="EntityContainer">
<EntitySet Name="Set1" EntityType="Namespace1.EntityType" />
<ActionImport Name="DoWorkWithEntityType" Action="Namespace1.DoWorkWithEntityType"/>
</EntityContainer>
</Schema>
</edmx:DataServices>
</edmx:Edmx>
has paths with (
, )
symbols which lead to compilation errors when we generate C# client code with, for example, NSwag.
P.S. For Trippin sample service OData specification have the same issue.
P.P.S. Or should create the issue in NSwag repository?
Microsoft.OpenApi.OData v1.0.2
public static void GenerateOpenApiDescription()
{
IEdmModel model = GetEdmModel();
OpenApiDocument document = model.ConvertToOpenApi();
var outputJSON = document.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0);
System.IO.File.WriteAllText("openapi.json", outputJSON);
}
public static IEdmModel GetEdmModel()
{
string csdlFilePath = @"odata.xml"; // saved before
string csdl = System.IO.File.ReadAllText(csdlFilePath);
IEdmModel model = CsdlReader.Parse(XElement.Parse(csdl).CreateReader());
return model;
}
{
"openapi": "3.0.1",
"info": {
"title": "OData Service for namespace Namespace1",
"description": "This OData service is located at https://localhost",
"version": "1.0.1"
},
"servers": [
{
"url": "https://localhost"
}
],
"paths": {
"/Set1": {
"get": {
"tags": [
"Set1.EntityType"
],
"summary": "Get entities from Set1",
"operationId": "Set1",
"parameters": [
{
"$ref": "#/components/parameters/top/schema"
},
{
"$ref": "#/components/parameters/skip/schema"
},
{
"$ref": "#/components/parameters/search/schema"
},
{
"$ref": "#/components/parameters/filter/schema"
},
{
"$ref": "#/components/parameters/count/schema"
},
{
"name": "$orderby",
"in": "query",
"style": "form",
"description": "Order items by property values",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"Id",
"Id desc"
]
}
}
},
{
"name": "$select",
"in": "query",
"style": "form",
"description": "Select properties to be returned",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"Id"
]
}
}
},
{
"name": "$expand",
"in": "query",
"style": "form",
"description": "Expand related entities",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"*"
]
}
}
}
],
"responses": {
"200": {
"description": "Retrieved entities",
"content": {
"application/json": {
"schema": {
"title": "Collection of EntityType",
"type": "object",
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Namespace1.EntityType"
}
}
}
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
}
},
"post": {
"tags": [
"Set1.EntityType"
],
"summary": "Add new entity to Set1",
"operationId": "Set12",
"requestBody": {
"description": "New entity",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Namespace1.EntityType"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "Created entity",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Namespace1.EntityType"
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
}
},
"/Set1({Id})": {
"get": {
"tags": [
"Set1.EntityType"
],
"summary": "Get entity from Set1 by key",
"operationId": "Anonymous",
"parameters": [
{
"name": "Id",
"in": "path",
"required": true,
"description": "key: Id of EntityType",
"schema": {
"type": "integer",
"format": "int32",
"maximum": 2147483647.0,
"minimum": -2147483648.0
},
"x-ms-docs-key-type": "EntityType"
},
{
"name": "$select",
"in": "query",
"style": "form",
"description": "Select properties to be returned",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"Id"
]
}
}
},
{
"name": "$expand",
"in": "query",
"style": "form",
"description": "Expand related entities",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"*"
]
}
}
}
],
"responses": {
"200": {
"description": "Retrieved entity",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Namespace1.EntityType"
}
}
}
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
},
"patch": {
"tags": [
"Set1.EntityType"
],
"summary": "Update entity in Set1",
"operationId": "Anonymous2",
"parameters": [
{
"name": "Id",
"in": "path",
"required": true,
"description": "key: Id of EntityType",
"schema": {
"type": "integer",
"format": "int32",
"maximum": 2147483647.0,
"minimum": -2147483648.0
},
"x-ms-docs-key-type": "EntityType"
}
],
"requestBody": {
"description": "New property values",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Namespace1.EntityType"
}
}
},
"required": true
},
"responses": {
"204": {
"description": "Success"
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
},
"delete": {
"tags": [
"Set1.EntityType"
],
"summary": "Delete entity from Set1",
"operationId": "Anonymous3",
"parameters": [
{
"name": "Id",
"in": "path",
"required": true,
"description": "key: Id of EntityType",
"schema": {
"type": "integer",
"format": "int32",
"maximum": 2147483647.0,
"minimum": -2147483648.0
},
"x-ms-docs-key-type": "EntityType"
},
{
"name": "If-Match",
"in": "header",
"description": "ETag",
"schema": {
"type": "string"
}
}
],
"responses": {
"204": {
"description": "Success"
},
"default": {
"$ref": "#/components/responses/error",
"description": ""
}
},
"x-ms-docs-operation-type": "operation"
}
}
},
"components": {
"schemas": {
"Namespace1.EntityType": {
"title": "EntityType",
"type": "object",
"example": {
"Id": "integer (identifier)"
},
"properties": {
"Id": {
"type": "integer",
"format": "int32",
"maximum": 2147483647.0,
"minimum": -2147483648.0
}
}
},
"odata.error": {
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"$ref": "#/components/schemas/odata.error.main"
}
}
},
"odata.error.main": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"target": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"$ref": "#/components/schemas/odata.error.detail"
}
},
"innererror": {
"type": "object",
"description": "The structure of this object is service-specific"
}
}
},
"odata.error.detail": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"target": {
"type": "string"
}
}
}
},
"responses": {
"error": {
"description": "error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/odata.error"
}
}
}
}
},
"parameters": {
"top": {
"name": "$top",
"in": "query",
"description": "Show only the first n items",
"schema": {
"type": "integer",
"minimum": 0.0
},
"example": 50
},
"skip": {
"name": "$skip",
"in": "query",
"description": "Skip the first n items",
"schema": {
"type": "integer",
"minimum": 0.0
}
},
"count": {
"name": "$count",
"in": "query",
"description": "Include count of items",
"schema": {
"type": "boolean"
}
},
"filter": {
"name": "$filter",
"in": "query",
"description": "Filter items by property values",
"schema": {
"type": "string"
}
},
"search": {
"name": "$search",
"in": "query",
"description": "Search items by search phrases",
"schema": {
"type": "string"
}
}
},
"examples": {
"Namespace1.EntityType": {
"value": {
"Id": 0
}
}
}
},
"tags": [
{
"name": "Set1.EntityType",
"x-ms-docs-toc-type": "page"
}
]
}
Generated C# client code has not any compilation errors.
Generated C# client code has compilation errors.
The generated examples are not very useful as they don't contain representative values and in some cases the values actually don't match the datatypes so they cause warnings and errors with linting tools. They also considerably bulk up the output document.
Consider this example. It doesn't provide any more information than the schema itself.
example:
serialNumber: string
totalStorageSpace: integer
deviceGuardLocalSystemAuthorityCredentialGuardState: '@odata.type': microsoft.graph.deviceGuardLocalSystemAuthorityCredentialGuardState
osBuildNumber: string
operatingSystemProductType: integer
The other consideration is to just stop producing examples completely. If we keep them we should consider actually generating representative sample values.
Need to remove the "*" from the Enum under the $expand parameter in paths.
Currently it starts with * and then lists all the navigation values.
"items": { "enum": [ "*", "ownedDevices", "registeredDevices", "manager", "directReports",
Hi,
I have a simple REST Endpoint for querying Users:
[HttpGet]
[EnableQuery()]
public IQueryable<User> Get()
{
var user = this._repository.GetAllUsers().AsQueryable();
return user;
}
and my configuration for the ODATA Endpoint looks like this:
var builder = new ODataConventionModelBuilder(app.ApplicationServices);
builder.EntitySet<User>("User");
var model = builder.GetEdmModel();
app.UseMvc(routeBuilder => {
routeBuilder.EnableDependencyInjection();
routeBuilder.OrderBy().MaxTop(100).SkipToken();
routeBuilder.MapODataServiceRoute("api", "api", model);
});
So I want to expose the orderBy, Top and skip parameters for my endpoints. However in the generated OpenAPI yaml I have also parameters for all other parameters e. g. search, filter, expand and so on. In e. g. the swagger-editor I can choose values for these parameters and send a request, which obviously will fail with a bad request, as the endpoint does not expose all parameters for ODATA.
Is there a way that the generated yaml files correspond to my exposed parameters. Or am i missing something here? My version of Microsoft.OpenApi.OData
is 1.0.1 (stable release)
Any help is much appreciated. Thanks!
When a property is of time Edm.Date, the wrong sample value is generated.
Add a property of type Edm.Date, generate OAS.
:
value:
date: '0001-01-01'
:
value:
date: '0001-01-01T00:00:00.0000000'
Hi! I like the progress in this project so far! I would like to know if there is any way I can augment the output OpenApi document with C# xml comments generated in Visual Studio. I have browsed through the repo and couldnt determine a viable entry point to add such configuration. I have checked out the other OpenAPI.Net project: CSharpAnnotations, but it is not aware of OData models it seems. I basically need a union of both projects.
I have code that can parse the xml comments but i dont have a valid identifier to match the Controller Action in the xml with the Path in the OpenAPI document. Please let me know if there are other avenues to inject custom commentary besides xml comments. I am open to submitting a PR if a suitable design is approved.
Thanks!
Short summary (3-5 sentences) describing the issue.
The NavigationProperty
descriptions from the Graph CSDL metadata do not get mapped on to the OpenApi output.
Which assemblies and versions are known to be affected?
Microsoft.OpenApi.OData.Generator
Generate an OpenApi description using the provided GUI.
What would happen if there wasn't a bug.
The underlined string description should be captured in the OpenApi description
The odata => oa3 spec says we should convert actions/functions to path items.
Section 4.5.3 "Paths for Action Imports"
talks about adding a post operation to each action path.
We need to implement this in our Graph OA3 description.
System.InvalidCastException
HResult=0x80004002
Message=Unable to cast object of type 'Microsoft.OData.Edm.EdmPrimitiveTypeReference' to type 'Microsoft.OData.Edm.IEdmStringTypeReference'.
Source=Microsoft.OpenApi.OData.Reader
StackTrace:
at Microsoft.OpenApi.OData.Generator.OpenApiEdmTypeSchemaGenerator.CreateSchema(ODataContext context, IEdmPrimitiveTypeReference primitiveType)
After implementing a PoC of this tool in one of my APIs, I noticed that while the CSDL generated from my OData models is complete, the output .JSON / .YML files are not.
They end abruptly, as you can see below.
.yml Example
Example of implementation. Some of this may be incorrect, considering the documentation doesn't seem to have been updated in the readme, but after some time of figuring it out I was at least able to get the document generated.
Any chance anyone can reproduce this or give me an idea as to what I may be doing incorrectly that is causing this to happen?
For example, update this line at: https://github.com/microsoft/OpenAPI.NET.OData/blob/master/src/Microsoft.OpenApi.OData.Reader/Microsoft.OpenAPI.OData.Reader.Release.nuspec#L9
TO include the description about the usage.
Installing the new stable 1.0.0 throws the following error:
Assembly 'Microsoft.OpenApi.OData.Reader' with identity 'Microsoft.OpenApi.OData.Reader, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' uses 'Microsoft.OData.Edm, Version=7.6.1.30918, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'Microsoft.OData.Edm' with identity 'Microsoft.OData.Edm, Version=7.6.0.30605, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
Microsoft.OpenApi.OData.Reader
A "stable" release shouldn't have dependencies to preview packages.
"Stable" release has dependencies to preview packages.
The root path should contain links to all top level entity sets and singletons in the entity container.
Let's say you have two entityTypes with an inheritance relationship Vehicle <-- Car
Then you bind an operation to Car, e.g. DriveFast()
Then the only time Vehicle is used is as a nav property
entitySet : vehicleTransporters(VehicleTransporter)
VehicleTransporter --navProp-- vehicles(Vehicle)
None of the exisiting three cases in ODataPathProvider.cs will pick this operation up, as it is neither an entitySet or Singleton, or a derived type of the types of those, of a non-derived navigation property.
A fourth case is needed for derived navigation properties.
We have quite a lot of actions bound to derived types in our model, so this is making our OAS file inaccurate.
For navigation properties we currently only seem to generate GET/PATCH/POST
// navigation property (Get/Patch/Post)
_handlers[ODataPathKind.NavigationProperty] = new Dictionary<OperationType, IOperationHandler>
{
{OperationType.Get, new NavigationPropertyGetOperationHandler() },
{OperationType.Patch, new NavigationPropertyPatchOperationHandler() },
{OperationType.Post, new NavigationPropertyPostOperationHandler() }
};
I think we also need to implement delete for these. And deleting contained entities is going to have a different URL than non-contained entities. Can you confirm @xuzhg ?
Short summary (3-5 sentences) describing the issue.
Converter uses MD5 hash, which is not FIPS compliant. Full functionality failure in any environment with FIPS compliance enabled.
Reader.
Which assemblies and versions are known to be affected?
All.
Enable FIPS compliance on the environment where the converter is executing.
The simplest set of steps to reproduce the issue. If possible, reference a commit that demonstrates the issue.
Converter does not crash
What would happen if there wasn't a bug.
Converter crashes with FIPS compliance runtime error.
What is actually happening.
Oracle listing FIPS non-compliant algorithms:https://docs.oracle.com/cd/E36784_01/html/E54953/fips-notok-1.html
NIST draft of 2019 FIPS compliant algorithms: https://csrc.nist.gov/csrc/media/publications/fips/140/2/final/documents/fips1402annexa.pdf
*Optional, details of the root cause if known.
In Net.Core 2.x swagger generated OpenApi paths contained tags only with entity set name i.e. controller name. It was very convenient for grouping all paths by Entity set.
TagDepth settings does not do what I whant.
How can add this feature? To Add new settings to OpenApiConvertSettings?
Convert the Microsoft.OpenApi.OData.Reader project to reference OpenApi.Net repo:
Hello!
Thank you for a great tool! We use it to generate docs for Microsoft Common Data Service OData endpoint (formerly Dynamics CRM, formerly D365). This endpoint is generic and has quite big CSDL file (about 4 MB). Resulting JSON file is about 880 MB!!! Can you please suggest how we can cut some unused datasets and related stuff before generating OpenAPI file?
Create links for Actions and functions on entities and collections of entities. e.g.
<Action Name="getByIds" IsBound="true" EntitySetPath="bindingParameter">
<Parameter Name="bindingParameter" Type="Collection(graph.directoryObject)" Nullable="false"/>
<Parameter Name="ids" Type="Collection(Edm.String)" Nullable="false" Unicode="false"/>
<Parameter Name="types" Type="Collection(Edm.String)" Unicode="false"/>
<ReturnType Type="Collection(graph.directoryObject)" Nullable="false"/>
</Action>
Properties with attribute * ContainsTarget="true"* need to be represented as paths.
$select values should be comma-separated values. maybe for parameters like $expand and ...
https://swagger.io/docs/specification/serialization/
we need to set "style": "simple"
Attachment navigation property is a contained property on "event", "post" and "message" but there is no path generated for it.
Short summary (3-5 sentences) describing the issue.
OpenAPI.NET.OData beta
When the return type is a collection the responses object should identify that as atype:array
in the schema object.
This is how it shows right now:
"/workbooks/{driveItem-id}/workbook/worksheets": {
"get": {
"tags": [
"workbooks.workbook.workbookWorksheet"
],
"summary": "Get worksheets from workbooks",
"operationId": "workbooks.workbook.ListWorksheets",
"responses": {
"200": {
"description": "Retrieved navigation property",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/microsoft.graph.workbookWorksheet"
}
}
}
},
"default": {
"$ref": "#/components/responses/error"
}
},
"x-ms-docs-operation-type": "operation"
}
The response from the path "/workbooks/{driveItem-id}/workbook/worksheets"
is a collection and the payload looks like such:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('e7e78c6b-edc1-4a64-967a-191762f770f9')/drive/items('01GP26K3AE24TDFMLPNBBISOVVWJ23VZMJ')/workbook/worksheets",
"value": [
{
"@odata.id": "/users('e7e78c6b-edc1-4a64-967a-191762f770f9')/drive/items('01GP26K3AE24TDFMLPNBBISOVVWJ23VZMJ')/workbook/worksheets(%27%7B9AA98A93-6FFB-43F7-9FE3-6F64A5FB0D20%7D%27)",
"id": "{9AA98A93-6FFB-43F7-9FE3-6F64A5FB0D20}",
"name": "Sheet 1",
"position": 0,
"visibility": "Visible"
},
…
]
}
Responses object in the schema needs to include "type": "array".
"responses": {
"200": {
"description": "Retrieved navigation property",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/components/schemas/microsoft.graph.workbookWorksheet"
}
}
}
}
}
}
Need to update overload function ids which have MD5 hash appended to them. Change the "." before the hash to "-" and then append the hash.
Action responses are always serialized in the generated document as 204 No Content.
Serialize any OData metadata where an action has a response type. e.g.
In this example, the response should be 200 and the returnType defined in the openAPI document.
204 is always generated for Actions.
This appears to be due to OpenApiResponseGenerator.cs line 97 filtering all Actions to have 204, even though they may contain a response.
It would seem per the OASIS Mapping documentation 4.5.3 :
HTTP response code 204 if the response has no body
The correct approach is to return 204 for isAction && returnType == null.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.