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

Errors generating an SDK for the Twitter and GitHub OpenApi's #1833

Closed
PureKrome opened this issue Sep 12, 2022 · 3 comments · Fixed by #1837
Closed

Errors generating an SDK for the Twitter and GitHub OpenApi's #1833

PureKrome opened this issue Sep 12, 2022 · 3 comments · Fixed by #1837
Assignees
Labels
bug Something isn't working fixed generator Issues or improvements relater to generation capabilities.

Comments

@PureKrome
Copy link
Contributor

👋🏻 G'Day! Me again :)

While working on #135 I thought I might also test out some more real world OpenApi's, to get some more data on the effectiveness of Kiota.

Kiota: Tested against version 0.51.

Twitter OpenApi

  • Endpoint/API: https://api.twitter.com/2/openapi.json
  • Command: .\kiota.exe --openapi https://api.twitter.com/2/openapi.json --additional-data false --language csharp -o TwitterClient -c TwitterApiClient --log-level information --clean-output true
  • ✅ Completes and generates an SDK
  • ❌ Doesn't compile with a number of errors like:
  • REF: https://github.com/twitterdev

image

GitHub OpenApi

image

image


My rational for testing these two endpoints is because they are very public and well known. Sure, the PetStore is the go-to 'demo', but people might think it's not really 'real-world' and therefore not to be taken really seriously. While if this does work against real world endpoints, if can definitely give it some street-cred! In my opinion ...

@ghost ghost added the Needs: Triage 🔍 label Sep 12, 2022
@baywet baywet self-assigned this Sep 12, 2022
@baywet baywet added bug Something isn't working generator Issues or improvements relater to generation capabilities. and removed Needs: Triage 🔍 labels Sep 12, 2022
@ghost ghost added the WIP label Sep 12, 2022
@baywet
Copy link
Member

baywet commented Sep 12, 2022

As always, thanks for pushing Kiota into unexplored edge cases.

Twitter

Interesting, I had tested recently with this API, but only the v2 I think, and didn't run into these issues.

Authored a pull request to address the issues.

GitHub

 "forks": {
            "type": "array",
            "items": {
            }
          },
          "history": {
            "type": "array",
            "items": {
            }
          }

While this is technically valid JSON schema, it's not enough information. Are we expecting an array of scalars or objects?

@baywet baywet added the fixed label Sep 12, 2022
@PureKrome
Copy link
Contributor Author

🐦 Twitter: cheers for the PR. sorry to keep finding these things :(
:octocat: GitHub: er ... I have no idea? So is this like an issue with their schema? Like, I can open an issue on their github repo and ask them for more clarification? Would you like me to do that?

@baywet
Copy link
Member

baywet commented Sep 13, 2022

Don't apologize, your contributions are a great help! Knowing what doesn't work is better than not knowing.
As per GitHub, they already have an issue, and since their descriptions are generated by a bot, I feel like the only way to "contribute" is to jump on the issue and tell them this issue is impacting you as well. github/rest-api-description#214

@ghost ghost removed the WIP label Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed generator Issues or improvements relater to generation capabilities.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants