Closed darrelmiller closed 1 year ago
Example of code to walk the Apis.guru list https://github.com/microsoft/OpenAPI.NET/blob/vnext/test/Microsoft.OpenApi.SmokeTests/ApiGurus.cs#L41
Some thoughts on the APIs we should be testing against. Using this https://www.postman.com/explore/most-popular-apis-this-year to identify the most used. I'm linking either the yaml
file if available, or the Postman collection, from which we could export the collection and transform it to OpenAPI.
Now, these would be considered as "most popular" but probably not diverse enough to help us identify edge cases. Should we just loop through all of APIs guru catalog and generate every possible clients?
It's what speakeasy did. https://github.com/speakeasy-api/openapi-directory/tree/main/SDKs I have mixed feelings about it.
I absolutely agree with you. I don't think it's necessarily adding real value... Using the top APIs is certainly a good first step, but I don't feel we will find all the crazy things we can see in an OpenAPI description... @baywet or @RabebOthmani any idea on how we can get a high level of confidence we are generating valid clients with a diverse set of API definitions?
As I've started working on this, I did have a couple of remarks:
Bottom line, starting with 15/20 popular APIs like Seb listed is a good starting place. I do have a couple of remarks on that list:
Early implementations already uncovered a couple of things #2351, #2352, #2353 (and that's without counting the issues I've reported to GitHub directly)
I agree for Twitter, we might want to hold on it. Though, it's a very popular API so with (or without) the paid APIs, I think it's still relevant from a generation perspective.
For Postman collections, you might be right... It makes 11 OpenAPI descriptions... Any other candidates we want to include?
Adding to the list, a lot of descriptions will fail because of the lack of union/intersection types support in TypeScript (#1812) and other languages.
Failing now, or failing later? We expect to support these scenarios right?
failing now, union type support was never implement in typescript because that was at the time we rebooted efforts to have a lighter experience in typescript and I wanted to avoid potential conflicts. As per python/php, some of the work is still ongoing. And it remains to be done entirely in Ruby
Note from the meeting:
APIs ignored:
new bugs uncovered
additional bugs
Really happy to see these bugs being caught!
additional issues
Using the GitHub search mechanism, walk the advertised OpenAPI descriptions, generate clients and compile those clients. We can exclude Microsoft Graph because we already test that elsewhere
Benefits: