Support POST by ref and POST by object for api enpoints that allow both
@ramsessanchez y travaille déjà.
Depuis le 7/6/2023.
Évaluation
Cette issue n'a pas encore été évaluée.
Description
An issue was recently raised for the current Java sdk in which a user wanted to create a group while simultaneously posting to the '/directory/administrativeUnit/members' enpoint. The documentation states that this is possible: https://learn.microsoft.com/en-us/graph/api/administrativeunit-post-members?view=graph-rest-1.0&tabs=http
However, our current java SDK only creates a referenceRequestBuilder for this scenario due to a limitation in the current generation. We acknowledge that this is due to a 'Contains-Target' annotation being absent in the metadata file, this however is not incorrect since the service allows for both posting by reference and object so we cannot simply add 'Contains-Target' as this would remove the other functionality. In short, we need to support both.
This relates to Kiota because while investigating the issue Mustafa and I discovered that the code snippet generated for C# in the documentation provided above does not compile in Raptor, specifically because the method 'postAsync' does not exist for the following case:
graphClient.Directory.AdministrativeUnits["{administrativeUnit-id}"].Members.PostAsync(requestBody);
but the following is available:
graphClient.Directory.AdministrativeUnits["{administrativeUnit-id}"].Members.Ref.PostAsync(requestBody);
While it seems that our intention is to support both scenarios given the snippets generated, the reality is that the Kiota generation is not actually generating the code to provide functionality for both scenarios. Is the expectation that Kiota should cover scenarios in which we can post by reference or object to a single endpoint? Or are we overlooking this scenario?
- Langage dominant
- C#
- Étoiles
- 240
- Forks
- 70
- Merge moyen
- 7 h 59 min
- PR mergées (30 j)
- 13
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de microsoft/OpenAPI.NET.OData
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
microsoft/OpenAPI.NET.OData#661 ·
-
Microsoft.OpenApi.OData.Reader.dll ships unversioned (0.0.0.0) since the 2026-01-16 releases Ouverte
Difficulté 3/5 1-2 jours Accessibilité débutants 58/100
microsoft/OpenAPI.NET.OData#852 ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 45/100
microsoft/OpenAPI.NET.OData#833 ·
-
status:needs-more-information
Difficulté 4/5 3-5 jours Accessibilité débutants 42/100
microsoft/OpenAPI.NET.OData#723 · 1 commentaire · 1 réaction ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 45/100
microsoft/OpenAPI.NET.OData#720 ·
Toutes les issues de microsoft/OpenAPI.NET.OData
Issues similaires
-
type/automation type/tech-debt
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
-
t/bug
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
-
ci-failure-cause test-failure
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
-
area:auth FE mvp P3
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
klasolsson81/jobbliggaren#1788 ·