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! Go to Solution.
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
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
@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?
User | Count |
---|---|
5 | |
2 | |
1 | |
1 | |
1 |