Open alanrenouf opened 6 years ago
With all the fixes you should not be getting model with 'com.vmware.' prefixed to their names.
However, the error "Error resolving $ref pointer" is a bug when VC version is 6.7.
Some of the model definitions in vcenter.json, like
"vcenter.deployment.task", "vcenter.deployment.info" and "_vcenter.deployment.importhistory.info" refer to an undefined reference ""$ref": "#/definitions/cis.task.status" .
So this is a bug we can fix? sorry was a little unclear as to what the resolution was here?
@kunal-pmj i think" com.vmware" prefix removal change caused this regression. There should not be any models with undefined reference. if you look here, https://10.160.107.125/apiexplorer/json/vcenter.json, we do find com.vmware.cis.task.status in definition section and everywhere it is being referred correctly.
Looks like "com.vmware" prefix removal change is missing a corner case.
It might also be a case where vcenter or appliance is referring to structure from cis package. If that is the case, we have to either pull the structure into vcenter or appliance or make a relative reference to structure in cis package.
Hi @sreeshas
The issue is reproducible in some Versions of VC.
The removal of "com.vmware." is ruled out because these changes are done only after the complete swagger is generated.
I used following 67U1 VC: sc-rdops-vm17-dhcp-10-241.eng.vmware.com and the issue of missing "cis.task.status" is not reproducible here. However, Issue 20 reported by @kmruddy is reproducible.
This is a regression caused by this fix .
I am working on addressing it.
The issue is reproducible only on VC 6.7
It might also be a case where vcenter or appliance is referring to structure from cis package. If that is the case, we have to either pull the structure into vcenter or appliance or make a relative reference to structure in cis package.
You are right @sreeshas . The issue is reproducible only with the 6.7 vCenter. The structures defined in under cis are not available in vcenter or content. We need to get these structures from the other packages. I will create another branch locally and submit a review request with the approach.
thanks Kunal
Hi @sreeshas
Here are update on the issue. swagger editor, redoc etc report validation error because of missing model cis.task.progress and cis.task.status. I looked for their references in the cis.json from the same server but could not find it there as well. It seems the cis task apis where these models are actually used were introduced later and certainly not available in the cis.json from 6.7 version.
I am yet to check the the structures coming form the cis package for these models. Will try that and provide an update soon(early next week)
Thanks Kunal
Can anyone share the generated swagger file?
You can run the generator against your vcsa
You can run the generator against your vcsa
Thanks. However I don't have a vcsa. Is there a free version of vcsa available?
Just tried the latest version of the openapi generator against 6.7 VC and it created me a swagger file but when i try and use it with an off the shelf doc generator (redoc) for a swagger file i get the following error