You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Swagger schema validation failed.
#/basePath must match pattern "^/"
#/paths/~1api~1vcenter~1authentication~1token/post/parameters/0 must have required property 'schema'
#/paths/~1api~1vcenter~1authentication~1token/post/parameters/0 must NOT have additional properties
#/paths/~1api~1vcenter~1authentication~1token/post/parameters/0/in must be equal to one of the allowed values
#/paths/~1api~1vcenter~1authentication~1token/post/parameters/0/required must be boolean
#/paths/~1api~1vcenter~1authentication~1token/post/parameters/0/required must be boolean
#/paths/~1api~1vcenter~1authentication~1token/post/parameters/0/in must be equal to one of the allowed values
#/paths/~1api~1vcenter~1authentication~1token/post/parameters/0/required must be boolean
#/paths/~1api~1vcenter~1authentication~1token/post/parameters/0/required must be boolean
#/paths/~1api~1vcenter~1authentication~1token/post/parameters/0/in must be equal to one of the allowed values
#/paths/~1api~1vcenter~1authentication~1token/post/parameters/0/required must be boolean
#/paths/~1api~1vcenter~1authentication~1token/post/parameters/0/required must be equal to one of the allowed values
#/paths/~1api~1vcenter~1authentication~1token/post/parameters/0/in must be equal to one of the allowed values
#/paths/~1api~1vcenter~1authentication~1token/post/parameters/0 must match exactly one schema in oneOf
#/paths/~1api~1vcenter~1authentication~1token/post/parameters/0 must match exactly one schema in oneOf
#/paths/~1api~1vcenter~1authentication~1token/post/parameters/0 must have required property '$ref'
#/paths/~1api~1vcenter~1authentication~1token/post/parameters/0 must NOT have additional properties
#/paths/~1api~1vcenter~1authentication~1token/post/parameters/0 must NOT have additional properties
#/paths/~1api~1vcenter~1authentication~1token/post/parameters/0 must NOT have additional properties
#/paths/~1api~1vcenter~1authentication~1token/post/parameters/0 must NOT have additional properties
#/paths/~1api~1vcenter~1authentication~1token/post/parameters/0 must NOT have additional properties
#/paths/~1api~1vcenter~1authentication~1token/post/parameters/0 must match exactly one schema in oneOf
Analysis shows that formData mandatory parameter of POST /api/vcenter/authentication/token has field "required":"true" instead of "required":true.
Describe the bug
Building an OAS2 spec against vSphere vCenter 8.0u3 results in vcenter.json that does not pass OAS2 validation.
For example, Swagger-cli reports:
Analysis shows that
formDatamandatory parameter ofPOST /api/vcenter/authentication/tokenhas field"required":"true"instead of"required":true.The root cause appears to be:
https://github.com/vmware/vmware-openapi-generator/blob/54cf631512e69ca731a1fd5c0662b647833e7e2d/lib/api_endpoint/swagger2/api_swagger_parameter_handler.py#L125
Similar mistype is observed also here:
https://github.com/vmware/vmware-openapi-generator/blob/54cf631512e69ca731a1fd5c0662b647833e7e2d/lib/api_endpoint/swagger2/api_swagger_parameter_handler.py#L95
(Edited: updated to correct parameter type and suspected code line)
Reproduction steps
python vmsgen.py -vc <vcenter-8.0u3-host -oas 2 -o generatedswagger-cli validate generated/vcenter.jsonExpected behavior
Required mandatory parameters should result in a valid OAS2 spec.
Additional context
No response