openapi-directory icon indicating copy to clipboard operation
openapi-directory copied to clipboard

Duplicate APIs that differ only in casing

Open pimterry opened this issue 6 years ago • 6 comments

Azure.com contains specs for both sql-databases and sql-Databases:

  • https://github.com/APIs-guru/openapi-directory/tree/master/APIs/azure.com/sql-databases
  • https://github.com/APIs-guru/openapi-directory/tree/master/APIs/azure.com/sql-Databases

It also has specs for both azsadmin-Quotas and azsadmin-quotas:

  • https://github.com/APIs-guru/openapi-directory/tree/master/APIs/azure.com/azsadmin-Quotas
  • https://github.com/APIs-guru/openapi-directory/tree/master/APIs/azure.com/azsadmin-quotas

Definitely seems like a mistake, and something that might cause unpredictable behaviour in some environments.

(I'm planning to keep filing minor errors I spot like this, partly just for my reference, but do let me know if it's annoying!)

pimterry avatar Feb 13 '19 16:02 pimterry

Not annoying!

MikeRalphson avatar Feb 13 '19 16:02 MikeRalphson

Fixed. As this looks like Microsoft manually moving API documents around, and doesn't seem to be a widespread problem, so I'll leave it as a manual fix for now. Thanks for raising the issue.

MikeRalphson avatar Feb 14 '19 11:02 MikeRalphson

Amazing, thanks for sorting this.

pimterry avatar Feb 14 '19 11:02 pimterry

@MikeRalphson, a user downstream (https://github.com/httptoolkit/openapi-directory-js/issues/20) has just pointed out that this reappeared at some point, and there are now duplicates with different casing for at least Azure.com/azsadmin-quotas and Azure.com/sql-databaseSecurityAlertPolicies:

  • https://github.com/APIs-guru/openapi-directory/blob/main/APIs/azure.com/azsadmin-quotas/2019-08-08-preview/swagger.yaml
  • https://github.com/APIs-guru/openapi-directory/blob/main/APIs/azure.com/azsadmin-Quotas/2018-02-09/swagger.yaml
  • https://github.com/APIs-guru/openapi-directory/blob/main/APIs/azure.com/sql-databaseSecurityAlertPolicies/2014-04-01/swagger.yaml
  • https://github.com/APIs-guru/openapi-directory/blob/main/APIs/azure.com/sql-DatabaseSecurityAlertPolicies/2018-06-01-preview/swagger.yaml

I haven't done a proper check for other examples, I suspect there may be more! I'm going to update openapi-directory-js shortly, and I'll see if I can automatically spot & flag those there myself, but it might also be worth finding a way to check them here too if possible.

It looks like really these are valid, it's just that they should just be compared case-insensitively so each pair here are treated as specs for the same service, right?

pimterry avatar Feb 27 '23 11:02 pimterry

Thanks! On your last point, you're probably right, I just need to check how much work it's going to be.

It's probably come back because I've moved from Linux to a mac.

MikeRalphson avatar Feb 27 '23 11:02 MikeRalphson

I haven't done a proper check for other examples, I suspect there may be more!

Just to confirm here, I have now added some checks on my end to catch this, and I think there are only 3 cases currently with casing issues (as opposed to the Googleapis.com issue in #777) and they're all Azure:

Duplicate spec id azure.com/azsadmin-quotas between APIs/azure.com/azsadmin-quotas/2019-08-08-preview/swagger.yaml and APIs/azure.com/azsadmin-Quotas/2018-02-09/swagger.yaml
Duplicate spec id azure.com/sql-databaseSecurityAlertPolicies between APIs/azure.com/sql-databaseSecurityAlertPolicies/2014-04-01/swagger.yaml and APIs/azure.com/sql-DatabaseSecurityAlertPolicies/2018-06-01-preview/swagger.yaml
Duplicate spec id azure.com/sql-serverAzureADAdministrators between APIs/azure.com/sql-serverAzureADAdministrators/2014-04-01/swagger.yaml and APIs/azure.com/sql-ServerAzureADAdministrators/2018-06-01-preview/swagger.yaml

pimterry avatar Feb 28 '23 13:02 pimterry