Unable to see Example payload in On-Prem Developer Portal

hadleena
Participant III

I have created a swagger spec which has example values to be displayed in the body parameter. I could see the example values being populated when I render the spec through Swagger editor but the same spec doesn't show the example payload when uploaded in the developer portal.

We are using On-Prem version 4.17.05.

Is it possible to display the example request payload in developer portal?

Attached the sample spec for reference.

Solved Solved
1 5 808
1 ACCEPTED SOLUTION

hadleena
Participant III

We were able to solve this issue with the following workaround:

  1. Goto ‘APIs’ -> Your API name -> Method Name -> click ‘Edit’ tab
  2. Goto ‘Body Parameters’ section -> change the value of ‘Name’
  3. Goto ‘Body sample’ section -> paste you sample request payload -> Click save

You would be able to see the default request payload after following these steps.

Note:

When you re-import a swagger file again, the above changes will be wiped out. Please make sure that the imported file is the latest before you give default values, for your changes to be effective.

View solution in original post

5 REPLIES 5

Not applicable
@Hadlee N.A

I suspect the issue here is to the due to the method template being used. Could you navigate to settings page for the smartdocs and update the method template with the one email to you. You will have to publish the model again and clear cache. I have emailed you the template as i was unable to attach to my comment here. Let me know if this helps. - Arun

The solution suggested did not work.

@Arun Kumar, I am also facing the same issue. kindly mail the template to AhmedEid.Dev@gmail.com

hadleena
Participant III

We were able to solve this issue with the following workaround:

  1. Goto ‘APIs’ -> Your API name -> Method Name -> click ‘Edit’ tab
  2. Goto ‘Body Parameters’ section -> change the value of ‘Name’
  3. Goto ‘Body sample’ section -> paste you sample request payload -> Click save

You would be able to see the default request payload after following these steps.

Note:

When you re-import a swagger file again, the above changes will be wiped out. Please make sure that the imported file is the latest before you give default values, for your changes to be effective.

Not applicable

@Arun Kumar , I am also facing the same issue. kindly mail the template to ram.rahul.sap@gmail.com.

Thanks in advance