When using the try-it feature of smartdoc, the body request field doesn't get populated. The try-it feature seems to be quite buggy for us. Do people find this feature to be reliable? We tested things with Chrome and Firefox.
Hi
We are having similar issues and are working with Apigee to get them fixed.
Couple of things we've noticed:
So I agree that it seems to be buggy.
Gordon
We recently upgraded to OPDK 1507 and have same issue.
Please try using a ref schema for the body parameter. The petstore POST request is a good reference. Had some trouble when I used inline schema and it went away when I used a ref.
https://github.com/OAI/OpenAPI-Specification/blob/master/examples/v2.0/json/petstore-expanded.json
Hi @Madhan Sadasivam, I think we are following schema using ref element; Still Smart Docs does't render the POST body model schema. Appreciate any help. Here is the method definition and ref body:
We are having trouble uploading our swagger json spec and the model schema is not being rendered for body parameters. Here is the method definition:
"post":{
"tags":[
"Partner Provisioning"
],
"summary":"Creates a partner entity with admin record into the partner platform",
"description":"Creates a partner entity with admin record into the partner platform. Takes in partner configuration and admin configuration",
"operationId":"/createpartner",
"consumes":[
"application/json"
],
"produces":[
"application/xml",
"application/json"
],
"parameters":[
{
"in":"body",
"name":"partnerBody",
"description":"Partner creation meta-data object to be created",
"required":true,
"schema":{
"$ref":"#/definitions/PartnerBody"
}
}
],
"responses":{
"200":{
"description":"Successfull creation of a partner entry. Responds with partner identifier.",
"schema":{
"$ref":"#/definitions/ResponseEntity"
}
},
"201":{
"description":"Created"
},
"400":{
"description":"Generic mal formed request."
},
"422":{
"description":"One or more of the required parameters not found in the request URI."
},
"401":{
"description":"Unauthorized"
},
"500":{
"description":"Internal server error."
},
"403":{
"description":"Unauthorized token error."
},
"404":{
"description":"No resource found for the path"
}
}
}
}
Here is the body defintion under definitions:
"definitions":{
"PartnerBody":{
"type":"object",
"properties":{
"partnerAdminConfig":{
"description":"Partner entity configuration",
"$ref":"#/definitions/PartnerAdminConfig"
},
"partnerConfiguration":{
"description":"Partner entity configuration",
"$ref":"#/definitions/PartnerConfiguration"
},
"partnerSubscription":{
"type":"array",
"description":"Partner entity configuration",
"items":{
"$ref":"#/definitions/PartnerSubscription"
}
}
}
}
Did you find any solution for this?