Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on providing Microsoft Graph oData metadata url #18

Open
niyati-shah-95 opened this issue Jan 11, 2018 · 1 comment
Open

Error on providing Microsoft Graph oData metadata url #18

niyati-shah-95 opened this issue Jan 11, 2018 · 1 comment

Comments

@niyati-shah-95
Copy link

Hi, I have tried using the microsoft graph metadata url - https://graph.microsoft.com/v1.0/$metadata
I have written my script in js as follows:

const { odata2openapi } = require('odata2openapi');

odata2openapi('https://graph.microsoft.com/v1.0/$metadata')
  .then(swagger => console.log(JSON.stringify(swagger, null, 2)))
  .catch(error => console.error(error))

I get the following error on the console:

TypeError: Cannot read property 'find' of undefined
    at C:\Users\kh2339\node_modules\odata2openapi\dist\convert.js:396:54
    at Array.forEach (<anonymous>)
    at addContainmentPathsRecursive (C:\Users\kh2339\node_modules\odata2openapi\dist\convert.js:392:164)
    at C:\Users\kh2339\node_modules\odata2openapi\dist\convert.js:569:13
    at Array.forEach (<anonymous>)
    at pathsRecursive (C:\Users\kh2339\node_modules\odata2openapi\dist\convert.js:527:16)
    at Object.convert [as default] (C:\Users\kh2339\node_modules\odata2openapi\dist\convert.js:882:17)
    at C:\Users\kh2339\node_modules\odata2openapi\dist\index.js:17:120
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
@dzardoya
Copy link

dzardoya commented Mar 6, 2018

Hi niyati,

I have the same issue, I also tried changing to https://graph.microsoft.com/beta/$metadata but obtained the same error... have you manage to solve that?

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants