I have created an api proxy that accepts JSON requests and using the extract variable policy to retrieve data from it. I have published the same in my developer portal using smartdocs. But when I am trying it out from the developer portal, the requests are being sent in "application/x-www-form-urlencoded" format, even though I have specified the Content-Type as application/json. As a result the extract variable policy is failing.
Please guide me if there is any way to POST request from developer portal as it is.
POST /manageservicestatus/ HTTP/1.1
<code>-----------------------------251172655216004-- Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-ID: <startpart> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-ID: <textpart>
Solved! Go to Solution.
Thank you for highlighting this issue. Looks like Smartdocs is expecting $ref for body schema reference instead of inline schema ref. It's a bug in recent version of smartdocs.
For now, Just update the spec with "$ref", it should work fine. Please find attached spec which is working fine.
Keep us posted if any. If your query is resolved, please click on Accept link below the answer so that it will be helpful for others too.
@Chris Novak , @Anil Sagar - Can you please help here and let us know if we need to do any specific settings in portal?
Thanks,
Santosh
@Varun Kumar Kannan , @santosh_ghalsasi , Please post sample OpenAPI / Swagger spec to reproduce issue & better understand same.
Hi @Anil Sagar,
I have attached the Open API spec for your reference.spec.zip
Thank you for highlighting this issue. Looks like Smartdocs is expecting $ref for body schema reference instead of inline schema ref. It's a bug in recent version of smartdocs.
For now, Just update the spec with "$ref", it should work fine. Please find attached spec which is working fine.
Keep us posted if any. If your query is resolved, please click on Accept link below the answer so that it will be helpful for others too.
@harsh , @Chris Novak , @Daniel Johnson , @Marsh Gardiner FYI, Smartdocs bug found.
Hi @Anil Sagar
It is working as expected. Thanks for your help!
@Varun Kumar Kannan , Glad issue is resolved. Keep us posted moving forward if any.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |