-
Notifications
You must be signed in to change notification settings - Fork 64
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
Generating custom headers and query parameters in the clients' functions when generating clients from Open API definition. #5820
Comments
The support for custom headers has been address via this client method change: #6475. This is sufficient for the above mentioned OpenAPI specification. The support for custom queries are not yet addressed. If there such a requirement, we will allow it in the feature Btw, the client generation with the above OpenAPI spec gives swagger parser error due to some parser limit:
|
The given Server error occurred due to the swagger parser issue and it can be solved by the below options
This issue was closed with the support for custom headers has been address via this client method change: #6475. This is sufficient for the above mentioned OpenAPI specification. |
Description:
When making the request, the user can set the custom headers and queries in the request according to their purpose. But when we generate the client from openAPI spec which doesn't have a custom header or query definition, those generated clients' resource/remote function doesn't have these supports. So, We have to manually add those supports in all the client functions.
Describe your problem(s)
The OpenAPI definition [1] of
msgraph-metadata
Excel doesn't have a header parameter definition. However, The RestAPI doc says Excel APIs could be called in one of three modes[2]. Here, Users have to set the session id as a header parameter.[1] https://github.com/microsoftgraph/msgraph-metadata/blob/master/openapi/v1.0/openapi.yaml
[2] https://learn.microsoft.com/en-us/graph/api/resources/excel?view=graph-rest-1.0
Describe your solution(s)
In this situation, It could be easy If we have any ways to add the custom header and query parameters during the client generation.
The text was updated successfully, but these errors were encountered: