Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swagger Support ? #38

Closed
CastleSoft opened this issue Apr 26, 2016 · 22 comments
Closed

Swagger Support ? #38

CastleSoft opened this issue Apr 26, 2016 · 22 comments

Comments

@CastleSoft
Copy link

Feature request.. Would it be possible to add Swagger support to DelphiMVC ?

http://swagger.io/

In C# and with WebAPI, I can use NSwag to generate a Swagger Specification, TypeScript Client and CSharp Client.

Embarcadero's Berlin (EMS) now supports Swagger 2.0

http://docwiki.embarcadero.com/RADStudio/Berlin/en/EMS_API_Resource

@danieleteti
Copy link
Owner

Yes, it is in the roadmap.

@ghost
Copy link

ghost commented Nov 21, 2016

Thanks for danieleteti's team work.
Swagger is very useful.
Is there any progress?
Can we do something for it?

@danieleteti
Copy link
Owner

We are planning swagger support. Do you have some swagger generator which generates Delphi code for the client?
the design work is about adding all the metadata description that swagger needs. Currently we have only MVCDoc attribute as description for the actions. MVCDoc is already used in the system controller /system/describerserver.info

@ghost
Copy link

ghost commented Nov 21, 2016

I do not have generates Delphi code for the client.
But I can try to do something tomorrow in my free time.

@derChristoph
Copy link

how is the status? still on the Roadmap?

@danieleteti
Copy link
Owner

Sure, it is on the roadmap. At the next iteration it will be take in consideration.

@erisoftware
Copy link

erisoftware commented Sep 5, 2017

Hi, Thanks for this framework :)
Is there any progress with Swagger? I use it in Spring Boot and it is very useful.

@danieleteti
Copy link
Owner

danieleteti commented Apr 5, 2018

This feature will be implemented using this library.

@ads69
Copy link

ads69 commented May 13, 2019

There is an impressive swagger work implemented in AutoTablesForRADServer

it uses SwagDoc and Swagger-UI

@geoffsmith82
Copy link
Contributor

I've been working on adding SwagDoc into the delphimvcframework. It is a work in progress at the moment... I still have to handle schema/data types and fill out a few more details.

https://github.com/geoffsmith82/delphimvcframework/tree/swaggerdoc

@danieleteti
Copy link
Owner

Good @geoffsmith82 , when you are ready we can integrate your work in the repo.

@geoffsmith82
Copy link
Contributor

I've also been working on a program to go the other way... Swagger json file turned into a DelphiMVCFramework Controller class.

@danieleteti
Copy link
Owner

That's a good news. Keep me informed, if you need help.

@joaoduarte19
Copy link
Collaborator

I had to document my API, so I created middleware to generate Swagger documentation. Pull request #253

@geoffsmith82
Copy link
Contributor

Just added a pull request with my initial swagger demo projects.
#254

@danieleteti
Copy link
Owner

danieleteti commented Aug 5, 2019

Great news about this issue. We got 2 PRs!

While I like the idea to put the swagger controller into the already present system controllers, the middleware is abit more flexible while add a little overhead compared to the controller (middleware are always checked and called by the router, independently from the URL, while controllers are checked starting from the URL as first check).

Would be great if we could find a solution where @geoffsmith82 and @joaoduarte19 can work together without fragment the effort.

Can we find such solution?
The solution from @geoffsmith82 (based on controller) seems to have an initial support for client side code generation, which is good.

Do you guys have any though about the "merge" of the efforts?

@joaoduarte19
Copy link
Collaborator

I agree that merging the two works will be great.

@geoffsmith82
Copy link
Contributor

I've done an initial merge of @joaoduarte19 middlewareswagger_dev branch into mine. There was no merge conflicts. I have combined both our attributes together into one file at this stage. Some are very similar and some are different. I am also wondering if some of these would be better in the Swagdoc project and just referenced in the DelphiMVCFramework.

@geoffsmith82
Copy link
Contributor

Just thought I would give you an update. I've been working on improving the Swagdoc project.

@danieleteti
Copy link
Owner

Any news on this?

@joaoduarte19
Copy link
Collaborator

I believe that this issue can now be finalized, as currently Swagger support already works relatively well.

@ads69
Copy link

ads69 commented Mar 31, 2020

I confirm, it works very well !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants