cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LeadFollowMove
Level: Power Up

Swagger file creation to Lightswitch back end (OData)

Hi all,

 

Apologies if this has already been answered, but a search didn't turn up the solution for me.

 

I'm currently using LightSwitch for creating applications. As per the recent blogpost from the LightSwitch team pushing us towards PowerApps I'm starting to look at what this has to offer. The first obvious stumbling block is the creation of the Swagger file so that I can add a Custom API and point back to my published LigthSwitch application (On Azure). 

 

Is there any guidance that would help a new "convert" get this up and running? Some "migration" guidance from MS on this front would be very helpful and ease the transition between platforms.

 

Thanks in advance.

 

Cheers,

Adam

1 ACCEPTED SOLUTION

Accepted Solutions
joshbooker
Level 8

Re: Swagger file creation to Lightswitch back end (OData)

Hey Adam

I tried to add my 2cents in your post on LightSwitch forums.

https://social.msdn.microsoft.com/Forums/vstudio/en-US/5350162f-c4ff-42e8-9892-4419dee8c678/ls-to-po...

The fact that it appears the PA team did not sit with LS team to carry forward lessons learned is indeed unfortunate. Custom API support has a long way to go in PA tooling in my opinion. The fact that OData is not a first class citizen is a disgrace.

Best of luck,
Josh

View solution in original post

4 REPLIES 4
Power Apps Staff rgruian
Power Apps Staff

Re: Swagger file creation to Lightswitch back end (OData)

 

Hi, the topic of Swagger has been covered quite a bit on this forum. It may be worth searching for "Swagger" and seeing how others have gotten around the various respective obstacles they encountered.

 

Here are some potentially useful links for you:

 

Here are the customizations you need to make to correctly pull your custom API into PowerApps:

https://powerapps.microsoft.com/en-us/tutorials/customapi-how-to-swagger/

 

Swagger 1.2 spec:

https://github.com/OAI/OpenAPI-Specification/blob/master/versions/1.2.md


Hello World example:
https://github.com/OAI/OpenAPI-Specification/wiki/Hello-World-Sample

 

Other links:

https://powerapps.microsoft.com/en-us/blog/using-azure-functions-in-powerapps/

Writing Open API Swagger Tutorial

Swagger API with Query String

Parameters

Radu Gruian [MSFT] ** PowerApps Staff
LeadFollowMove
Level: Power Up

Re: Swagger file creation to Lightswitch back end (OData)

Hi Radu,

 

Thanks for your reply. With all due respect I think you're missing a couple of points here.

 

There is a large LightSwitch community that is very pasisonate about the platform which has been left to dwindle away for the last two years with no communication from MSFT. Then a blog post advising that the platform is being abandoned and we should all move to PowerApps. However, what is missing is any kind of bridging documentation to ease that transition.

 

Advising me to search the term, after my initial opening line advising I had without success isn't a promising start. Also pointing me to a bunch of references to go RTFM is something I'm already trying to wade through myself.

 

What I was seeking on this forum is whether anyone else was coming in from the LS background and had found a way to generate the Swaggger file for a LS ODATA connection (automatically). For example, I have found Swashbuckle (https://github.com/domaindrivendev/Swashbuckle) which looks promising. Although it breaks my HTMLCLient when added - so I'm investigating this.

 

If you're trying to get across the point that I'm supposed to manually generate this file for an application I already have in production - which sounds like it's going to take a fair amount of effort - then my time with PowerApps is going to be very brief.

 

I'll search the forums again in case I've overlooked something that will help, and I really do appreciate you taking the time to respond however it doesn't appear that it's really providing any insight into my specific problem.

 

Cheers,

Adam

joshbooker
Level 8

Re: Swagger file creation to Lightswitch back end (OData)

Hey Adam

I tried to add my 2cents in your post on LightSwitch forums.

https://social.msdn.microsoft.com/Forums/vstudio/en-US/5350162f-c4ff-42e8-9892-4419dee8c678/ls-to-po...

The fact that it appears the PA team did not sit with LS team to carry forward lessons learned is indeed unfortunate. Custom API support has a long way to go in PA tooling in my opinion. The fact that OData is not a first class citizen is a disgrace.

Best of luck,
Josh

View solution in original post

Highlighted
joshbooker
Level 8

Re: Swagger file creation to Lightswitch back end (OData)

PS...  If you want to try out the PA Custom API experience you can use this swagger:

 

https://gist.github.com/joshbooker/56d84fd2a3cc708b9d98a3eb748b8723

 

Download the above code and save it as swagger.json

add a new connection in web.powerapp.com

upload the file, name it and then add the connector

 

Now try it out in an app.

 

HTH,

Josh

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,532)