Swagger for dummies

Posted by goo on 18-Sep-2019 08:46

12.0

I am into a new REST service project and I have made my first calls. Very cool !

I would like to know how to generate the myProject.json for swagger? Is there a tool? Any info?

Anything? I tried to search for swagger in the doc online, but did not find anything.

All Replies

Posted by goo on 18-Sep-2019 11:08

I am using WEB handler (not REST)

Posted by Jean-Christophe Cardot on 18-Sep-2019 11:16

Hi

We are using https://editor.swagger.io/ in order to write (manually) our swagger. Very handy.

In fact we do everything manually, no json generation (we are using the REST adapter and in order to circumvent its limitations, webhandlers through URL Rewrite so that they have consistent URI with those from the REST adapter).

You're right to start with Web handlers; had I known the limitations of the REST adapter I'd do the same a few years ago.

Regards

JC

Posted by egarcia on 18-Sep-2019 12:38

Hello,

Are you working with Business Entities and generating a catalog file for the Progress Data Service?

If so, you might be interested on a sample program to generate an OpenAPI spec file (formerly known as Swagger) from a catalog file:

- community.progress.com/.../3389

If you are not working with a catalog file, perhaps, we should express our interest on creating an OpenAPI spec for REST/WebHandlers so that Product Management knows that developers are interested.

I hope this helps,

Edsel

Posted by goo on 18-Sep-2019 16:08

Thanx Jean-Christophe :-) I will check it out..

Sendt fra min iPhone

18. sep. 2019 kl. 13:18 skrev Jean-Christophe Cardot <bounce-jeanchristophe@community.progress.com>:

Update from Progress Community
<4U1JQ3CSXXVK-png_2D00_70x70x2-png>
Jean-Christophe Cardot

Hi

We are using https://editor.swagger.io/ in order to write (manually) our swagger. Very handy.

In fact we do everything manually, no json generation (we are using the REST adapter and in order to circumvent its limitations, webhandlers through URL Rewrite so that they have consistent URI with those from the REST adapter).

You're right to start with Web handlers; had I known the limitations of the REST adapter I'd do the same a few years ago.

Regards

JC

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

Posted by goo on 18-Sep-2019 17:36

We are not using BE.


Geir Otto

Sendt fra min iPad

18. sep. 2019 kl. 14:40 skrev egarcia <bounce-egarcia@community.progress.com>:

Update from Progress Community
egarcia

Hello,

Are you working with Business Entities and generating a catalog file for the Progress Data Service?

If so, you might be interested on a sample program to generate an OpenAPI spec file (formerly known as Swagger) from a catalog file:

- community.progress.com/.../3389

If you are not working with a catalog file, perhaps, we should express our interest on creating an OpenAPI spec for REST/WebHandlers so that Product Management knows that developers are interested.

I hope this helps,

Edsel

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

Posted by Mike Fechner on 18-Sep-2019 17:42

You should ;-)

Sent from Nine

Von: goo <bounce-goo@community.progress.com>
Gesendet: Mittwoch, 18. September 2019 19:38
An: TU.OE.General@community.progress.com
Betreff: RE: [Technical Users - OE General] Swagger for dummies

Update from Progress Community
goo

We are not using BE.


Geir Otto

Sendt fra min iPad

18. sep. 2019 kl. 14:40 skrev egarcia <bounce-egarcia@community.progress.com>:

Update from Progress Community
egarcia

Hello,

Are you working with Business Entities and generating a catalog file for the Progress Data Service?

If so, you might be interested on a sample program to generate an OpenAPI spec file (formerly known as Swagger) from a catalog file:

- community.progress.com/.../3389

If you are not working with a catalog file, perhaps, we should express our interest on creating an OpenAPI spec for REST/WebHandlers so that Product Management knows that developers are interested.

I hope this helps,

Edsel

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

Posted by goo on 18-Sep-2019 17:54

Probably, but I feel more free without :-) 

Sendt fra min iPad

18. sep. 2019 kl. 19:43 skrev Mike Fechner <bounce-mikefechner@community.progress.com>:

<ProgressEmailLogo-png_2D00_150x42x2-png> Update from Progress Community
<4U6EDACHGGRD-jpg_2D00_70x70x2-jpg>
Mike Fechner

You should ;-)

Sent from Nine

Von: goo <bounce-goo@community.progress.com>
Gesendet: Mittwoch, 18. September 2019 19:38
An: TU.OE.General@community.progress.com
Betreff: RE: [Technical Users - OE General] Swagger for dummies

Update from Progress Community
goo

We are not using BE.


Geir Otto

Sendt fra min iPad

18. sep. 2019 kl. 14:40 skrev egarcia <bounce-egarcia@community.progress.com>:

Update from Progress Community
egarcia

Hello,

Are you working with Business Entities and generating a catalog file for the Progress Data Service?

If so, you might be interested on a sample program to generate an OpenAPI spec file (formerly known as Swagger) from a catalog file:

- community.progress.com/.../3389

If you are not working with a catalog file, perhaps, we should express our interest on creating an OpenAPI spec for REST/WebHandlers so that Product Management knows that developers are interested.

I hope this helps,

Edsel

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

Posted by Mike Fechner on 18-Sep-2019 17:58

You may confuse chaos with liberty ...

Sent from Nine

Von: goo <bounce-goo@community.progress.com>
Gesendet: Mittwoch, 18. September 2019 19:55
An: TU.OE.General@community.progress.com
Betreff: RE: [Technical Users - OE General] Swagger for dummies

Update from Progress Community
goo

Probably, but I feel more free without :-) 

Sendt fra min iPad

18. sep. 2019 kl. 19:43 skrev Mike Fechner <bounce-mikefechner@community.progress.com>:

<ProgressEmailLogo-png_2D00_150x42x2-png> Update from Progress Community
<4U6EDACHGGRD-jpg_2D00_70x70x2-jpg>
Mike Fechner

You should ;-)

Sent from Nine

Von: goo <bounce-goo@community.progress.com>
Gesendet: Mittwoch, 18. September 2019 19:38
An: TU.OE.General@community.progress.com
Betreff: RE: [Technical Users - OE General] Swagger for dummies

Update from Progress Community
goo

We are not using BE.


Geir Otto

Sendt fra min iPad

18. sep. 2019 kl. 14:40 skrev egarcia <bounce-egarcia@community.progress.com>:

Update from Progress Community
egarcia

Hello,

Are you working with Business Entities and generating a catalog file for the Progress Data Service?

If so, you might be interested on a sample program to generate an OpenAPI spec file (formerly known as Swagger) from a catalog file:

- community.progress.com/.../3389

If you are not working with a catalog file, perhaps, we should express our interest on creating an OpenAPI spec for REST/WebHandlers so that Product Management knows that developers are interested.

I hope this helps,

Edsel

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

Posted by bronco on 19-Sep-2019 06:09

Well, the last time I checked the BE delivered in OE turned out to be more of a Service Interface (SI) instead of a proper BE. This BE (or should I say SI) is nice for demo's but not the way to go for a complete application since it basically combines handling of two things: the transport protocol (http) and business logic.

Posted by Mike Fechner on 19-Sep-2019 06:46

You’re right Bronco. I didn‘t talk about the inbox BE’s. The CCSBE spec recommends a better solution. And there are reference implementations available. But the way, some of them come with automated Swagger file generation (for JSDO based access and truly RESTful).

Posted by bronco on 19-Sep-2019 06:59

You're not talking about SmartComponent Library accidentally, do you? :-D

Posted by goo on 23-Sep-2019 07:18

Hi Jean-Christophe, could you explain how the swagger works if I would setup a local mySwagger.json file ? I believe I would need to use swagger as frontend for reading the json file? Do I need to make it avail on a webserver, or could I make an account at swagger that holds the info?
 
//Geir Otto
 

Posted by goo on 23-Sep-2019 07:36

I surfed a bit on net and found that I would need to download swagger to a local webserver, and refer to that...

Would it be possible to add the swagger to PASOE webserver? ie. put it in /static area?

Posted by goo on 23-Sep-2019 07:36

I surfed a bit on net and found that I would need to download swagger to a local webserver, and refer to that...

Would it be possible to add the swagger to PASOE webserver? ie. put it in /static area?

Posted by Peter Judge on 23-Sep-2019 15:16

The Swagger UI is already part of the PASOE server . There's some doc on getting it enabled (docs.progress.com/.../Enable-Swagger-UI-for-management-REST-API-access.html) , and more info if you search for "swagger' in the doc.

The more important part is the where the API data comes from - the oemanager API that's provided does not use a YAMl or JSON file. I've had success generating an OpenAPI doc from our Data Object Handler's services and loading that JSON into the swagger UI.

If you're feeling up to it, the OpenAPI spec for the file is at https://swagger.io/specification/ .

Posted by goo on 23-Sep-2019 15:26

Thanks Peter, I have added an account on swaggerHub, and I am doing it manually. I was hoping to be able to run it from PASOE, and I have got the swagger in oemanager to run. I have read the documentation you are referring to, but honestly? That is not a lot…. I was hoping that I could export a json file from swagger into PASOE, is that possible?
 
//Geir Otto
 

Posted by Peter Judge on 23-Sep-2019 19:02

When you say "export swagger file into PASOE" do you mean "create services in PASOE"?
 

Posted by goo on 23-Sep-2019 20:04

No, only Expose it so others can read it/use it

Sendt fra min iPhone

23. sep. 2019 kl. 21:04 skrev Peter Judge <bounce-pjudge@community.progress.com>:

Update from Progress Community
Peter Judge

When you say "export swagger file into PASOE" do you mean "create services in PASOE"?
 

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

Posted by Mike Fechner on 23-Sep-2019 20:08

So you want to host the Swagger file (you manually created) on PASOE?
 
Just copy it to the static folder of your webapp.

Posted by goo on 23-Sep-2019 21:12

Ok, but what else is needed? Will pasoe understand that it is swagger and formate the json fire? Or do I need to add additional files to the same area?

Sendt fra min iPad

23. sep. 2019 kl. 22:10 skrev Mike Fechner <bounce-mikefechner@community.progress.com>:

Update from Progress Community
<4U6EDACHGGRD-jpg_2D00_70x70x2-jpg>
Mike Fechner

So you want to host the Swagger file (you manually created) on PASOE?
 
Just copy it to the static folder of your webapp.

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

Posted by Mike Fechner on 23-Sep-2019 21:20

Have a look at this here:
 
 
You basically deploy the swagger web application and maintain the definition link

Posted by Irfan on 03-Oct-2019 13:36

Swagger UI and the API are available by default for you with oemanager. Once you have the SwaggerUI, all you have to do is add your OpenAPI URL in the search box and it will parse and show the data for you in Swagger UI.

Posted by Irfan on 03-Oct-2019 13:36

Swagger UI and the API are available by default for you with oemanager. Once you have the SwaggerUI, all you have to do is add your OpenAPI URL in the search box and it will parse and show the data for you in Swagger UI.

This thread is closed