Using swagger UI on sharepoint portal

1,236 views
Skip to first unread message

Santosh Ghalsasi

unread,
Jun 21, 2017, 6:04:34 AM6/21/17
to Swagger
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

Ron Ratovsky

unread,
Jun 21, 2017, 1:15:30 PM6/21/17
to swagger-sw...@googlegroups.com

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.

--
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 swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Santosh Ghalsasi

unread,
Jun 22, 2017, 5:50:35 AM6/22/17
to Swagger
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

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.

Santosh Ghalsasi

unread,
Jun 22, 2017, 7:35:45 AM6/22/17
to Swagger
Hi,
Update :
While trying to resolve the https to http issue I had taken latest files for UI from git and tried to see if that helps. When I imported the new files on sharepoint it started working but later it is not accepting any text in the text boxes that we see in try it out functionality. It only accepts a single letter in body text box. It works on the browser of few of my team members properly but not on other's browsers. We restored the old file but the issue still persists. We tried restating machine and clearing browser cache, etc,. No use so far. Has anyone experienced this issue?

Regards,
Santosh

Josh Ponelat

unread,
Jun 22, 2017, 8:02:24 AM6/22/17
to Swagger
HI Santosh,

The case where you only receive a single char in the text input. Is a very recent bug, that has a pending PR on it. I imagine it'll get merged today, it was an oversight. One which we hope testing will catch in the future. Apologies for that.

Josh Ponelat

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.


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 swagger-swaggers...@googlegroups.com.

Josh Ponelat

unread,
Jun 22, 2017, 8:03:18 AM6/22/17
to Swagger

Santosh Ghalsasi

unread,
Jun 22, 2017, 9:11:21 AM6/22/17
to Swagger

Hi Josh,
Thank you for your reply. We were indeed facing same problem. It was behaving weirdly. I guess this is resolved now. Now we are only facing the issue of https URL being sent as http by curl call.

Regards,
Santosh

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.


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 swagger-swaggersocket+unsub...@googlegroups.com.

Santosh Ghalsasi

unread,
Jun 23, 2017, 4:29:45 AM6/23/17
to Swagger
Hi Josh, Ron,
Can you please help and let me know how to resolve the problem of conversion of 'https' to 'http' while executing 'try it out' functionality'. I am not sure if this is a bug and need to be reported.

Regards,
Santosh

Ron Ratovsky

unread,
Jun 23, 2017, 12:43:53 PM6/23/17
to swagger-sw...@googlegroups.com

I believe there’s an open issue on that.

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.


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 swagger-swaggers...@googlegroups.com.


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 swagger-swaggers...@googlegroups.com.

Santosh Ghalsasi

unread,
Jun 24, 2017, 7:14:07 AM6/24/17
to swagger-sw...@googlegroups.com
Thanks Ron. Any timelines for pushing fix of this issue??

You received this message because you are subscribed to a topic in the Google Groups "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/uVrQnRrB-0M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to swagger-swaggers...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
Best Regards,
Santosh Ghalsasi.

Reply all
Reply to author
Forward
0 new messages