Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Update generated code#22

Merged
calebkiage merged 15 commits into
mainfrom
chore/run_codegen
Feb 17, 2022
Merged

Update generated code#22
calebkiage merged 15 commits into
mainfrom
chore/run_codegen

Conversation

@calebkiage

Copy link
Copy Markdown
Contributor

Run code gen to incorporate output formatter selection changes.

The OpenAPI source file revision used in the generation is microsoftgraph/msgraph-metadata@8388bce

Issues

To work around microsoft/kiota#1052, the OpenApi file had to be modified. The changes made are outlined below:

  • Remove all endpoints that match the regex: \/([\w]+)\/\1 e.g. /me/onenote/sections/{onenoteSection-id}/parentSectionGroup/parentSectionGroup
  • Run a replacement on all endpoints matching regex \/([\w]+)\/\{\1-id\} replacing the match with /$1/{$1Item-id} e.g. /deviceManagement/termsAndConditions/{termsAndConditions-id} -> /deviceManagement/termsAndConditions/{termsAndConditionsItem-id}

Comment thread src/generated/Admin/AdminRequestBuilder.cs Outdated
@baywet

baywet commented Feb 3, 2022

Copy link
Copy Markdown
Member

the amount of changes makes it really hard to actually review the PR (the page keeps freezing the browser).
I'm not sure needing to rely on dependency injection and type checks is the right way forward for the CLI, it adds a lot of complexity when most of the issues we're trying to solve for using that could be handled in a simpler manner through the existing serializatoin/deserialization infrastructure and through the backing store. Please take the time to thoroughly evaluate those options.

@calebkiage

calebkiage commented Feb 4, 2022

Copy link
Copy Markdown
Contributor Author

Made changes to remove the need for dependency injection. Also, I've used the SendPrimitiveAsync<Stream>(...) function to get the raw response from the server and pass that onto the formatter. A few sample diffs of the change compared to main:
image
image

@calebkiage calebkiage merged commit 1f2dbbf into main Feb 17, 2022
@calebkiage calebkiage deleted the chore/run_codegen branch February 17, 2022 15:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants