You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Optimize and reduce duplicates during the Graph metadata OData to OpenAPI conversion. #913
Actions in Graph are mapped for each path in the generated OpenAPI doc and each of these paths is associated with a request body and the response . The request bodies and responses are often duplicates
The Kiota generation using the OpenAPI v1.0 doc creates a model class for each of this request body and response which generates duplicate code.
Expectation:
Optimize and reduce the duplicates during the Graph OData to OpenAPI transformation.
The schema values within the Response objects of Actions are generated based on the return type of the action: null, collection, primitive or others.
Even for those which have similar return types, e.g., collection, they have different $ref values in their schemas, e.g.,
vs
This might make it unfeasible to refactor out the responses into a reusable component by all Action responses.
The same applies to the RequestBody; depending on whether an Action is bound or not, the schema will differ. For bound Actions, the parameters and their schemas will be added to the content property of the RequestBody e.g.,:
Activity
irvinesunday commentedon Jun 23, 2022
The schema values within the
Responseobjects of Actions are generated based on the return type of the action: null, collection, primitive or others.Even for those which have similar return types, e.g., collection, they have different
$refvalues in their schemas, e.g.,vs
This might make it unfeasible to refactor out the responses into a reusable component by all Action responses.
The same applies to the
RequestBody; depending on whether an Action is bound or not, the schema will differ. For bound Actions, the parameters and their schemas will be added to thecontentproperty of theRequestBodye.g.,:vs
baywet commentedon Jun 27, 2022
Closing in favor of microsoft/OpenAPI.NET.OData#241 as the work needs to happen in the conversion library.