Drupal 7 Patheon Hosted - How do we show the "Examples" on Response Error Details of the Smart Docs?

Hi Everyone. I'm wondering how to add the expected Responses and error "examples" from our imported YAML file which is an OpenApi. I can't seem to make it to display on the method page. There are Respnse Error Details but it doesn't have the Example errors. I tried editing the template but I cant seem to display them.

Is there any way on doing it?

8919-screenshot-from-2019-07-26-17-09-55.png

Photo below as reference:

8920-screenshot-from-2019-07-26-17-30-15.png

0 3 158
3 REPLIES 3

Hi @Kenu Sagullo Cardino,

Example error feature is not there with smart doc. Probably you can checkout the redoc documentation which you can integrate with devportal for API documentation which provides a nicer interface for API components along with error examples also. example view -

8923-screen-shot-2019-07-26-at-53206-pm.png

you can have both documetation for try out and another for user reading.

Hi @Ravindra Sing, I saw that redoc has only release for drupal 8. It could have been a nice fix but unfortunately I can't use it. Thank you for theinput.

@Kenu Sagullo Cardino could you also check the modified template file from the following post and let us know if that helps.