[NEW PLUGIN] Swagger UI

Have you always wanted to expose your app’s Swagger API documentation from right within your app? Bubble exposes this powerful API documentation tool - the swagger.json file. But until now there’s not been a great way to display your API documentation from within the app.

Now, the power of Swagger UI is available for embedding in your Bubble app!

3 Likes

Hello Brian, I’m André, I’m speaking here from Brazil, are you ok?!
I have some questions about how to use your plugin, do you have a tutorial or video that can explain it better?

Thank you very much for creating the Swagger plugin.

I’d say start here: Plaid Link| Lost Sheep Advisory

The instructions on the Plugin page cover just about everything you need to know too: Swagger UI Plugin | Bubble

1 Like

Ok, I’ll try here, but from what I noticed I have to create an account on Swagger and do everything there, correct?!

Nope - you don’t need to create an account anywhere. This plugin just lets you Render a swagger file on a page in your app.

Your bubble app comes with a swagger file of it’s own - if you leave the plugin’s swagger file url blank, that’s the swagger that will appear.

If you want to generate your own swagger file, you can do it in any text editor. But SwaggerBear/Swagger Hub does have a web application for easy Swagger file creation and editing - I assume that’s what you’re referring to.

1 Like

Hi @lostsheep, exactly that, thanks for getting back to me friend!

Hi @lostsheep. There is some information in the page header that I would like to change, can you tell me if it is possible? There is a link to send an email that is pulling an email from Bubble.io, I would like an email with my domain, is this possible to change?

See attached image.

That’s from the swagger file itself - not from the plugin.

If you’re using Bubble’s created swagger (i.e. you haven’t put your own swagger URL in the plugin ‘swagger file url’ field) then you do not have control over that parameter since you can’t directly edit that swagger file. You could try changing your Bubble app’s configuration with Admin Emails (under settings > domains) and see if that changes it.

If you’re using a custom Swagger file, you can update that info in the swagger file itself. OpenAPI Specification - Version 3.0.3 | Swagger

1 Like

Hi @lostsheep, thanks for your feedback, I’m using my application’s URL, this: (https://MYDOMAIN.COM/api/1.1/meta/swagger.json) but if I choose to use a “swagger file” as you said, I have to create it all from scratch in Swagger, is that it?

Yup. you could always start from the point of the Bubble generated swagger file, copy that into a text editor or swagger’s website, and edit from there.

1 Like

Thanks! Do you know where I can find a tutorial that teaches you how to do this, I don’t really understand how to do this in swagger.

This plugin looks handy. @brian9, are there plans to enable support for the current OpenAPI spec, v3.1.0 (OpenAPI Specification v3.1.0 | Introduction, Definitions, & More)? In briefly test-driving the plugin, I get the following error when referencing a v3.1.0 file. A v3.0.3 file seems to display fine.
image

The library version I was using didn’t yet support v3.1.0. I just went ahead and updated it, and version 3.1.0 swagger files should work now.

Please update to plugin version 1.2.0 (the newest) and let me know if that does the trick!

1 Like

Thanks for the upgrade. Looks good! I look forward to buying you a coffee. I hope others who find the plugin useful will do the same.

:coffee: much appreciated!