Does Microsoft provide a swagger file for Graph?

I scanned, although as many documents as I can find, but I can not find the swagger file for https://graph.microsoft.io/

There are several options in this API, and I saw links to the Office 365 API and the Azure Graph API, but I believe that Microsoft Graph is the latest unified version and provides the functions that I use.

I would like to use Microsoft Flow, and I was surprised that it was not integrated as an API out of the box. To register a user API with a stream, you must provide a swagger file, so the question is.

+5
source share
1 answer

I found something to convert the OData XML metadata to swagger. https://github.com/akorchev/odata2openapi

The msgraph metadata for beta is located at https://graph.microsoft.com/beta/$metadata .

For TypeScript, you will do something like this:

import { odata2openapi } from 'odata2openapi'; odata2openapi('https://graph.microsoft.com/beta/$metadata') .then(swagger => console.log(JSON.stringify(swagger, null, 2))) .catch(error => console.error(error)) 

UPDATE: I noticed that when trying this happened. I believe because the code did not process when the EntityType node did not have any property nodes. I put a pull request to fix this. https://github.com/akorchev/odata2openapi/pull/7

+2
source

Source: https://habr.com/ru/post/1259141/


All Articles