Smartdoc - body request field is not rendered

Not applicable

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.

0 5 822
5 REPLIES 5

Not applicable

Hi

We are having similar issues and are working with Apigee to get them fixed.

Couple of things we've noticed:

  • Body parameters are not sent in the request (there is a server-side javascript patch for this, but we've had it work in one environment and fail in another).
  • The request body is not displayed correctly when the smartdoc is rendered.
  • The request body is not submitted when we try it out (although this could be related to the previous issue)
  • The response body is not displayed when rendering the smartdoc which means that developers don't know which response to code against.

So I agree that it seems to be buggy.

Gordon

Not applicable

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?