Hi Ron,
Thank you for your reply. We are trying to mimic a dev portal like 
experience on sharepoint. We have our swagger specs imported on the 
sharepoint portal and want to enable connection between the sharepoint and 
our API gateway to enable try it out option. While testing the 'try it out' 
option we encountered 'Access Denied' error. the investigation lead to two 
things -
1. Find out if the curl command that swagger UI creates calls the API 
directly or via the sharepoint server. This would help us find out if there 
is a connectivity issue between sharepoint and API gateway.
2. The curl command that swagger prepares is creating a 'http' call instead 
of 'https', although we have mentioned only https in the spec's schemes 
section. We know that from normal swagger ui(which is on swagger's website) 
we are able to reach to API gateway. CORS is also enabled on gateway but we 
will have to add the sharepoint domain for enabling hits from this portal. 
We will be able to do that once we establish connection.

Now that we know about swagger UI calls the curl via browser, we want to 
find the solution for second problem. 

I hope this is clear now. Can you please help and let me know how can we 
resolve the second issue. Also correct me if I am missing any step/point.

Cheers,
Santosh

On Wednesday, 21 June 2017 18:15:30 UTC+1, Ron wrote:

> Hello Santosh,
>
>  
>
> You don’t really describe the problem when you use the try it out 
> functionality, so it’s difficult to suggest a course of action.
>
> What exactly is happening? 
>
> In general, only CORS needs to be enabled.
>
> The calls made by swagger-ui are made at the *browser* not the hosting 
> server.
>
>  
>
> *From: *<[email protected] <javascript:>> on behalf of 
> Santosh Ghalsasi <[email protected] <javascript:>>
> *Reply-To: *"[email protected] <javascript:>" <
> [email protected] <javascript:>>
> *Date: *Wednesday, 21 June 2017 at 3:04
> *To: *Swagger <[email protected] <javascript:>>
> *Subject: *Using swagger UI on sharepoint portal
>
>  
>
> Hi All,
>
> We are trying to explore the possibility of using sharepoint as a 
> repository for our all swagger specs. We have uploaded swagger specs 
> and swagger UI on a sharepoint page and are able to see specs rendered as 
> UI on the portal. The problem we are facing is with the 'try it out' 
> functionality. Unlike the regular swagger portal, we are not able to 
> connect from sharepoint to our API platform to enable end to end try it out 
> functionality. I wanted to know if swagger UI directly calls the curl from 
> browser or from the a web server where the UI is hosted. Also if we need to 
> take care of any other thing, apart from CORS, to properly enable 
> this.Really appreciate the help here.
>
>  
>
> Regards,
>
> Santosh
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to