I want to know how to show xml content in the body request using smartdocs because I want to send xml request using the portal.
now it is being showed as json, is there any attribute that I need to set? or I need to change the structure of the yaml.
Solved! Go to Solution.
[This answer pertains to the Drupal-based Apigee Edge developer portal.]
The "display of sample payloads" is still JSON by default. If you know JavaScript, you should be able to modify the smartdocs.js to display the samples in XML.
See also this answer.
If we are discussing the new, streamlined developer portal, then there will be a different answer.
EDIT -
I tried a proof of concept and it seems entirely possible to make this happen. It's the model.js file that needs modification. You'll need to know a little jQuery to make it work properly.
Here's a demonstration: https://youtu.be/Pe17smteUZw
Here's a repo. https://github.com/DinoChiesa/Edge-DevPortal-Smartdocs-ModelPlus
[This answer pertains to the Drupal-based Apigee Edge developer portal.]
The "display of sample payloads" is still JSON by default. If you know JavaScript, you should be able to modify the smartdocs.js to display the samples in XML.
See also this answer.
If we are discussing the new, streamlined developer portal, then there will be a different answer.
EDIT -
I tried a proof of concept and it seems entirely possible to make this happen. It's the model.js file that needs modification. You'll need to know a little jQuery to make it work properly.
Here's a demonstration: https://youtu.be/Pe17smteUZw
Here's a repo. https://github.com/DinoChiesa/Edge-DevPortal-Smartdocs-ModelPlus
is there any way to show as this??(maybe an attribute or special configuration):
in the editor of swagger I can see the request as xml but in smartdocs not, I tried to modify the schema string in smartdocs js but it has a different format which will need a lot of validations to transform into the exact xml that I want.
Are you referring to the Drupal-based developer portal? If so, check the youtube video with ID: Pe17smteUZw .
(I have had difficulty creating a direct link to that video from this comment.)
thanks, can you share you yaml file and the changes that you did in that model.js? please
Try this. https://github.com/DinoChiesa/Edge-DevPortal-Smartdocs-ModelPlus
BTW, if you have a specific OpenAPI Spec you can share with me, I'd be glad to have a look, and try to make model.js work the right way for your case.
Is there any way to make it work(XML schema) in new integrated migrated OOTB Dev Portal?
Unfortunately, I don't know of a way. No. But there are people who are much more experienced that I am with the new portal.
I suggest that you ask a new toplevel question.
I have already raised one question two days back.
https://community.apigee.com/questions/64277/applicationx-www-form-urlencoded-request-parameter.html
But no response as of now.
It would be really helpful if you can tag experienced people in that post.
Thanks @Dino-at-Google @Dino
ok, thank you. I've done that.
User | Count |
---|---|
7 | |
2 | |
2 | |
2 | |
1 |