Skip to content
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

Duplicate Items Found in Parsing Kiota Generated OAD #5468

Closed
fey101 opened this issue Sep 25, 2024 · 3 comments
Closed

Duplicate Items Found in Parsing Kiota Generated OAD #5468

fey101 opened this issue Sep 25, 2024 · 3 comments
Assignees
Labels
type:bug A broken experience
Milestone

Comments

@fey101
Copy link
Contributor

fey101 commented Sep 25, 2024

What are you generating using Kiota, clients or plugins?

Kiota plugin

In what context or format are you using Kiota?

Windows executable

Client library/SDK language

None

Describe the bug

Am getting errors with generated openapi file, generated based on the admin endpoint of msgraph. To generate, run the command below
plugin add --plugin-name MicrosoftGraph -d https://raw.githubusercontent.com/microsoftgraph/msgraph-metadata/master/openapi/v1.0/openapi.yaml -i **/admin/** --type ApiPlugin -o <output-path> --ll Debug

Getting errors below:
Swagger schema validation failed. #/paths/~1admin~1edge~1internetExplorerMode~1siteLists~1{browserSiteList-id}/parameters must NOT have duplicate items (items ## 1 and 2 are identical) #/paths/~1admin~1edge~1internetExplorerMode~1siteLists~1{browserSiteList-id}~1sharedCookies/parameters must NOT have duplicate items (items ## 0 and 1 are identical) #/paths/~1admin~1edge~1internetExplorerMode~1siteLists~1{browserSiteList-id}~1sharedCookies~1{browserSharedCookie-id}/parameters must NOT have duplicate items (items ## 3 and 5 are identical) #/paths/~1admin~1edge~1internetExplorerMode~1siteLists~1{browserSiteList-id}~1sites/parameters must NOT have duplicate items (items ## 0 and 1 are identical) #/paths/~1admin~1edge~1internetExplorerMode~1siteLists~1{browserSiteList-id}~1sites~1{browserSite-id}/parameters must NOT have duplicate items (items ## 3 and 5 are identical) #/paths/~1admin~1people~1profileCardProperties~1{profileCardProperty-id}/parameters must NOT have duplicate items (items ## 1 and 2 are identical) #/paths/~1admin~1serviceAnnouncement~1healthOverviews~1{serviceHealth-id}/parameters must NOT have duplicate items (items ## 1 and 2 are identical) #/paths/~1admin~1serviceAnnouncement~1healthOverviews~1{serviceHealth-id}~1issues/parameters must NOT have duplicate items (items ## 0 and 1 are identical) #/paths/~1admin~1serviceAnnouncement~1healthOverviews~1{serviceHealth-id}~1issues~1{serviceHealthIssue-id}/parameters must NOT have duplicate items (items ## 3 and 5 are identical) #/paths/~1admin~1serviceAnnouncement~1issues~1{serviceHealthIssue-id}/parameters must NOT have duplicate items (items ## 1 and 2 are identical) #/paths/~1admin~1serviceAnnouncement~1messages~1{serviceUpdateMessage-id}/parameters must NOT have duplicate items (items ## 1 and 2 are identical) #/paths/~1admin~1serviceAnnouncement~1messages~1{serviceUpdateMessage-id}~1attachments/parameters must NOT have duplicate items (items ## 0 and 1 are identical) #/paths/~1admin~1serviceAnnouncement~1messages~1{serviceUpdateMessage-id}~1attachments~1{serviceAnnouncementAttachment-id}/parameters must NOT have duplicate items (items ## 3 and 5 are identical) #/paths/~1admin~1serviceAnnouncement~1messages~1{serviceUpdateMessage-id}~1attachments~1{serviceAnnouncementAttachment-id}~1content/parameters must NOT have duplicate items (items ## 3 and 5 are identical) #/paths/~1admin~1serviceAnnouncement~1messages~1{serviceUpdateMessage-id}~1attachmentsArchive/parameters must NOT have duplicate items (items ## 1 and 2 are identical)

Expected behavior

Generated OAD should not fail swagger parser validations.

How to reproduce

  1. Run command kiota plugin add --plugin-name MicrosoftGraph -d https://raw.githubusercontent.com/microsoftgraph/msgraph-metadata/master/openapi/v1.0/openapi.yaml -i **/admin/** --type ApiPlugin -o <output-path> --ll Debug
  2. After successful completion of generation, copy content of the generated OAD in the output path
  3. Copy and paste the content into a OAD parser eg swagger online parser
  4. You will see validation failed with duplicate items errors

Open API description file

No response

Kiota Version

v1.19.0-preview.20240920002

Latest Kiota version known to work for scenario above?(Not required)

No response

Known Workarounds

No response

Configuration

No response

Debug output

Click to expand log ```
</details>


### Other information

_No response_
@andrueastman
Copy link
Member

Thanks for raising this @fey101

Looks like the issue is caused by the openApi.Net library and opened the issue for the same at microsoft/OpenAPI.NET#1840.

@andrueastman andrueastman removed the status in Kiota Sep 26, 2024
@andrueastman andrueastman moved this to Todo 📃 in Kiota Sep 26, 2024
@andrueastman andrueastman added blocked This work can't be done until an external dependent work is done. and removed status:waiting-for-triage An issue that is yet to be reviewed or assigned labels Sep 26, 2024
@baywet baywet added this to the Kiota v1.18.1 milestone Sep 26, 2024
@andrueastman
Copy link
Member

@fey101 I believe this is now resolved with microsoft/OpenAPI.NET#1841 and now available via https://www.nuget.org/packages/Microsoft.OpenApi/1.6.22

Any chance you can validate and close?

@andrueastman andrueastman removed the blocked This work can't be done until an external dependent work is done. label Sep 30, 2024
@baywet baywet modified the milestones: Kiota v1.18.1, Kiota v1.19 Sep 30, 2024
@baywet baywet moved this from Todo 📃 to In Progress 🚧 in Kiota Sep 30, 2024
@andrueastman
Copy link
Member

Dependency bumped via #5502

@fey101 fey101 closed this as completed Oct 3, 2024
@github-project-automation github-project-automation bot moved this from In Progress 🚧 to Done ✔️ in Kiota Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug A broken experience
Projects
Archived in project
Development

No branches or pull requests

3 participants