Correct HTTP verb is not going in request in Smartdocs from developer portal.

Not applicable

When we send a request using smartdoc from developer portal, the request is going to Apigee Edge. However when we checked in the trace, the HTTP verb is going incorrect.

This happens when we add view that displays the methods of that API to primary region of the page. But when we change the position to secondary region it works fine.

However our requirement is to place it in the primary region of the smartdoc page.

Kindly assist us with the same.

Solved Solved
1 5 224
1 ACCEPTED SOLUTION

@Minakshi Wadibhsme ,

Answer lies in model.js line no 945, in smartdocs core module local folder v6/model.js

var methodVerb = jQuery.trim(jQuery("[data-role='verb']:first").text().toLowerCase()); // Retrieve the verb from the first HTML element.<br>

It reads the verb from html first dom element which has attribute data-role='verb'. Since you are displaying multiple APIs with verbs in left side bar, it picks first one which is always post.

You just need to remove the attribute data-role from your list & make sure the core template has this verb value with dom element attribute data-role='verb'

That should solve the problem. 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

5 REPLIES 5

jaywanttopno
Participant III

Hi @Minakshi Try editing specific API and check whether Verb is having correct value or not ..? If possible please share screenshot

I have checked that also. In swagger the HTTP verb is mentioned correct. Sorry but I can not share the screenshots.

Thank you

Can you elaborate more on this "This happens when we add view that displays the methods of that API to primary region of the page. But when we change the position to secondary region it works fine"? @Minakshi Wadibhsme

@Minakshi Wadibhsme ,

Answer lies in model.js line no 945, in smartdocs core module local folder v6/model.js

var methodVerb = jQuery.trim(jQuery("[data-role='verb']:first").text().toLowerCase()); // Retrieve the verb from the first HTML element.<br>

It reads the verb from html first dom element which has attribute data-role='verb'. Since you are displaying multiple APIs with verbs in left side bar, it picks first one which is always post.

You just need to remove the attribute data-role from your list & make sure the core template has this verb value with dom element attribute data-role='verb'

That should solve the problem. 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

Thank you Anil for the solution. It is working for me.