Support POST by ref and POST by object for api enpoints that allow both
@ramsessanchez ya está trabajando en esto.
Desde el 7/6/2023.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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?
- Lenguaje dominante
- C#
- Estrellas
- 240
- Forks
- 70
- Merge medio
- 7 h 59 min
- PR fusionados (30 d)
- 13
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/OpenAPI.NET.OData
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
microsoft/OpenAPI.NET.OData#661 ·
-
Microsoft.OpenApi.OData.Reader.dll ships unversioned (0.0.0.0) since the 2026-01-16 releases Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
microsoft/OpenAPI.NET.OData#852 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
microsoft/OpenAPI.NET.OData#833 ·
-
status:needs-more-information
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
microsoft/OpenAPI.NET.OData#723 · 1 comentario · 1 reacción ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
microsoft/OpenAPI.NET.OData#720 ·
Todos los issues de microsoft/OpenAPI.NET.OData
Issues similares
-
core dependencies
Dificultad 1/5 Menos de una hora Aptitud para principiantes 80/100
-
bug frontend good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
NavigationViewItemAutomationPeer implements IInvokeProvider but never advertises the Invoke pattern Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
unoplatform/uno#24629 ·
-
agentic-workflows Needs: Triage :mag: State: In-PR
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
Down / Waiting for removal
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100