Open API specification issues

Open API specification issues

Open API specification issues
Open API specification issues
19 hours ago

Hi Omada team,

 

First of all, I want to show my appreciation for the Omada Open API, I think the team have done a brilliant job documenting it so well online.

 

I'm aiming to consume the OpenAPI spec to automatically generate a Golang SDK and a Terraform provider for the platform, all open source and MIT licensed. This is something I personally want to use, and have seen at least one other too (https://community.tp-link.com/en/business/forum/topic/850008?moduleId=2692). In my line of work, the best way to get something done is to do it yourself!

I have found some issues, however, with the spec available at https://use1-omada-northbound.tplinkcloud.com/v3/api-docs/00%20All (you may not want to click that link in a browser, it's about 5MB in size!). Notably;

  1. There are about 65 instances where a path parameter is listed in the path, but missing in the parameter list. Many times this is the `omadacId` value that's required for all operations.
  2. There are 4 instances where extra path parameters are specified, but aren't present in the path.
  3. Nearly, if not all (2185) response content blocks list `*/*` as the content type, when this is almost always supposed to be `application/json`.
  4. Some operationIds are misleading. For example, the operation `getGatewayInfo` does not correspond to the `Get gateway info` summary, but to the `Get gateway template info`.

 

TL;DR - when I pass your OpenAPI spec into a tool like github.com/oapi-codegen/oapi-codegen then I am met with many errors and cannot generate a reliable SDK for use. 

At present time, I've created this repo with some tools to overwrite the issues with the spec and generate a useable SDK so I can continue my work. As this is kinda bodged together with duct tape and chewing gum (and a lot of AI generated code), I'd really appreciate it if the spec could be updated to address these issues. I am very happy to work with your engineering team to test updates and provide other feedback, if so desired.

Thanks for your time, 

Miles

  0      
  0      
#1
Options