Any programmers notice that cnmaestros swagger $ref's make codegen impossible?

Is it just me or is it impossible to use the cloud or on-prem https://docs.cloud.cambiumnetworks.com/api/3.1.1/yaml/schemas/v2/base.yaml to generate codegen for programming against.

Even if I import that yaml and edit all the paths to change them to the full url https://docs.cloud.cambiumnetworks.com/api/3.1.1/yaml/schemas/v2/devices/basic.yaml instead of the relative paths devices/basic.yaml for instance, the generation will still always fail because the sub-imported yaml files also have $ref with relative paths that go up a folder and do random things that just breaks the codegen.

Now i will say i dont use codegen that often so maybe theirs a workaround i’m missing but it appears to be just because cambium generated it with relative paths and nested references when they build the swagger files.

Welcome to dealing with cnMaestro. Sometimes they make breaking changes without releasing a new api version, among other curiosities.

Oh, this one been there since the beginning the Swagger files have been … weird since the start to the point i had to code my own interfaces by hand which is a nightmare when they shift the API and i can’t just regenerate the interfaces, turns a 5-minute automated job into an hour or 2-hour manual job.

Thanks for bringing this to our attention @CSup.

When we added the Swagger UI, supporting the swagger-codegen tool was not considered. There are a lot of separate files connected by $refs that get loaded into memory when generating the webpage. Relative $ref’s work in that case, but obviously not when calling the base.yaml file via URL.

I am investigating the feasibility of supporting swagger-codegen so it can be added to our roadmap. I’ll follow up here with updates.