SmartDocs Success code

Is there a way to tell what the success code # is in smartdocs? We are trying to customize the smartdocs template and I know you can get a list of all the response codes (expect for the first success code) in the Apigee.APIModel.response.errors

Solved Solved
0 3 273
1 ACCEPTED SOLUTION

@daniel.biales ,

Success codes are different for different APIs. For example, Sometimes even 3XX, 4XX treated as success code in various contexts.

I suggest to modify the template to achieve the desired functionality. I don't think OPEN API Spec has any default out of the box spec for defining success codes. I recommend leveraging Open API Spec custom extensions with x- & then modify the smartdocs template to list the information as needed. Below article will help you to achieve same.

https://community.apigee.com/articles/50017/smartdocs-a-custom-module-to-your-rescue-fix-for-s.html

Hope it helps. Keep us posted if any.

-------------------------------------

Anil Sagar

5997-screen-shot-2017-11-23-at-75916-pm.png Learn Apigee Concepts in 4 Minutes HandsOn

View solution in original post

3 REPLIES 3

@daniel.biales ,

Success codes are different for different APIs. For example, Sometimes even 3XX, 4XX treated as success code in various contexts.

I suggest to modify the template to achieve the desired functionality. I don't think OPEN API Spec has any default out of the box spec for defining success codes. I recommend leveraging Open API Spec custom extensions with x- & then modify the smartdocs template to list the information as needed. Below article will help you to achieve same.

https://community.apigee.com/articles/50017/smartdocs-a-custom-module-to-your-rescue-fix-for-s.html

Hope it helps. Keep us posted if any.

-------------------------------------

Anil Sagar

5997-screen-shot-2017-11-23-at-75916-pm.png Learn Apigee Concepts in 4 Minutes HandsOn

@Anil Sagar I think the smartdocs_extend module will help me out. Do you know if there is a way to get that json object to be available to handlebars in the template or is it only available in the javascript?