msgraph-sdk-python icon indicating copy to clipboard operation
msgraph-sdk-python copied to clipboard

Auto-generated documentation errors

Open stbrie opened this issue 2 years ago • 2 comments

Hi.

Adding some graph functionality to an application, I sometimes come across minor errors in the https://learn.microsoft.com/en-us/graph/api code snippets. When I go to create a PR for the typo, there is a message at the head of the snippet that says:


description: "Automatically generated file. DO NOT MODIFY"

And I'm stuck.

Am I able to submit PRs for typos, or is opening an issue here the way to handle it?

stbrie avatar Jul 01 '23 13:07 stbrie

Hello @stbrie mind sharing the typos, specifying the typo and the snippet so we can fix.

Note that the Snippets are generated with a different tool and only populated in the docs, this way we need to be aware of the error and fix at the point where snippets are generated so that the docs render the correct version of snippets

shemogumbe avatar Jul 10 '23 14:07 shemogumbe

Not a snippet, but in the readme (here for example, but there are other instances in the readme)

There is, for example:

client = GraphServiceClient(credentials=credential, scopes=scopes)

This will result in:

GraphServiceClient(credentials=credential, scopes=scopes) TypeError: GraphServiceClient.__init__() got an unexpected keyword argument 'credentials'

There are several of these in the readme and in the sample documentation. My understanding is that it should be

client = GraphServiceClient(request_adapter=adapter)

Additionally, in a python shell

>>> from msgraph import GraphServiceClient

>>> help(GraphServiceClient)

(...) | Methods defined here: |
| __init__(self, request_adapter: msgraph.graph_request_adapter.GraphRequestAdapter) -> None | Instantiates a new BaseGraphServiceClient and sets the default values. | Args: | requestAdapter: The request adapter to use to execute the requests. |

requestAdapter is not the correct parameter as shown in the __init__ function def.

stbrie avatar Jul 19 '23 23:07 stbrie