mirror of https://github.com/apache/cloudstack.git
Merge pull request #1599 from shapeblue/independent-marvin
Marvin: Fix codegenerator to work with API discoveryThis fixes Marvin cloudstackAPI generator to work with a live running mgmt server's api discovery. * pr/1599: marvin: fix codegeneration against API discovery endpoint Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
commit
11c90dfb3b
|
|
@ -368,6 +368,7 @@ class CodeGenerator(object):
|
|||
self.constructResponseFromJSON(innerResponse)
|
||||
paramProperty.subProperties.append(subProperty)
|
||||
paramProperty.type = response['type']
|
||||
paramProperty.dataType = response['type']
|
||||
return paramProperty
|
||||
|
||||
def loadCmdFromJSON(self, apiStream):
|
||||
|
|
@ -404,13 +405,14 @@ class CodeGenerator(object):
|
|||
assert paramProperty.name
|
||||
|
||||
if 'required' in param:
|
||||
paramProperty.required = param['required']
|
||||
paramProperty.required = str(param['required']).lower()
|
||||
|
||||
if 'description' in param:
|
||||
paramProperty.desc = param['description']
|
||||
|
||||
if 'type' in param:
|
||||
paramProperty.type = param['type']
|
||||
paramProperty.dataType = param['type']
|
||||
|
||||
csCmd.request.append(paramProperty)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue