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

Framework-agnostic Connexion #380

Closed
garbas opened this issue Jan 9, 2017 · 18 comments
Closed

Framework-agnostic Connexion #380

garbas opened this issue Jan 9, 2017 · 18 comments

Comments

@garbas
Copy link

garbas commented Jan 9, 2017

Hi,

First thank you for a great work you did, at Mozilla Release Engineering team we started using it few months ago and it proved to be the step into the right direction.

Currently Connexion is very flask specific which worked ok for initial work we are doing and since majority of our team is familiar with flask. But talking to others at Mozilla they like the idea but would like to use their existing framework. You think it would be worthwhile having Connexion being a cross framework utility, with framework specific helpers/layers.

I was wondering if you would be interesting into such contribution? Of course I would consider doing (and later helping maintain it) the majority of the work, since I'm proposing it.

I guess first step could be making Connexion framework agnostic. Since this would mainly involve re-organization of the code, we might also meet in person (I'm based in Berlin).

@rafaelcaricio
Copy link
Collaborator

Hi @garbas ,

Thank you for the feedback we really appreciate it.

About making Connexion more framework agnostic, Yes. I was discussing about it some time ago with @jmcs and this is something that we are interested in working on. That is something that I personally would like to be involved with, so I would be willing to join you in making this idea move forward. Connexion cold evolve to be like a library/layer over other frameworks (Tornado/Django/etc).

We can setup some time to sit in person as well, that would be cool! 😃

@garbas
Copy link
Author

garbas commented Jan 9, 2017

@rafaelcaricio awesome! I will ping you on twitter to meet in person.

I expect what we will come up with we will post here (or in additional PR) for further discussion to not exclude others.

@tarekziade
Copy link

Hi all, thanks @garbas for starting this.

What I would be interested in is too see if there's a layer between Connexion and Swagger that can be reused as a lib without making any assumptions on how its actually used in a web framework (spec=>code or code=>spec, how it's linked to views etc) (a little bit like bravado-core but specific to the server-side)

I started to work on this on my side but I'd love to see if we can share some stuff

@hjacobs
Copy link
Contributor

hjacobs commented Jan 9, 2017

@garbas @rafaelcaricio I would also be happy to join any Berlin meeting 😄

@jonathansp
Copy link

It would be awesome! I'm currently using connexion in a personal project and after writing some code I realized that it's very flask-specific while frameworks such as tornado and django have a few libraries for open API initiative. Thanks for starting this thread @garbas. Please let me know if I can help.

@hjacobs hjacobs changed the title Question: Would it be possible to make connexion more framework agnostic? Framework-agnostic Connexion Jan 12, 2017
@hjacobs
Copy link
Contributor

hjacobs commented Jan 12, 2017

Thoughts:

  • pip install connexion should only install core features (i.e. not pulling in Flask or any other web framework)
  • connexion console script will tell user to install at least one supported web framework of their choice (like Flask or Pyramid)
  • user can get the "current" feature set (Flask etc) by using pip install connexion[flask]

@hjacobs
Copy link
Contributor

hjacobs commented Jan 12, 2017

For reference: Connexion is used here: https://github.com/mozilla-releng/services

@dutradda
Copy link
Contributor

Hello guys and @garbas, I really want to contribute to this issue. I wrote a Swagger lib that do same task as connexion (but with much less features), but I did it framework agnostic. https://github.com/dutradda/swaggerit

With the experience that I learned, I think I will be useful to contribute. Are you working on a branch for it?

@hjacobs
Copy link
Contributor

hjacobs commented Jan 14, 2017

@dutradda a first shot is in PR #386 --- first minor goal is to extract the calls to Flask into the Framework interface. @garbas wanted to create a documentation PR (docs folder) with a proposal on how "Connexion as a library" could look like (library API from user perspective).

@advance512
Copy link

This is great! I really like Connexion. However, I prefer using an HTTP library like Falcon or which is very minimal compared to Flask, and seems more suited towards RESTful APIs. I do suggest keeping it opinionated and simple, as it is now - it is a joy to develop API servers with.

@dutradda's project is a great first step in the direction of a Falcon+Swagger framework, I especially liked the SQLAlchemy integration.

Starred, will also offer my time to support this project :)

@hjacobs
Copy link
Contributor

hjacobs commented Jan 16, 2017

@advance512 Falcon looks great, but I haven't used it yet. Do you want to contribute on integrating Connexion with Falcon? The PR #386 is a first step in extracting the calls to the framework (like Flask), it should be straight forward to create a FalconFramework afterwards.

@dutradda
Copy link
Contributor

@hjacobs I want to integrate the connexion with aiohttp. The framework interface is ready to inherit from?
Perhaps I will create a PR to use connexion with coroutines

@rafaelcaricio
Copy link
Collaborator

@dutradda The interface is not defined yet. This was our first iteration towards having this definition of what should go there. If you start integrating with some other framework like Falcon/aiohttp then you will get insights on what is missing in the interface and can suggest the changes you think makes sense. We are open for proposals. The PR #386 still needs some work.

@dutradda
Copy link
Contributor

OK @rafaelcaricio, I will start my implementation and suggests to #386

@rafaelcaricio
Copy link
Collaborator

Pull request #386 just got merged. Thank you @dutradda for working on that. Now we have some basis to try to integrate other frameworks with Connexion.

@jugaadi
Copy link

jugaadi commented Oct 15, 2019

Any updates in this direction?

@xordoquy
Copy link

xordoquy commented Nov 3, 2020

Hi there,
I started working on using Django with connexion.
I assumed it'll be easier for me to use the parsing done by connexion rather than doing my own.
Anyway, I found it quite hard to find tests specifically for unit testing the api module. Now I'm a bit lost with the various decorators role (RequestResponseDecorator and AbstractURIParser).
Is there a way I can get in touch with the developers for guidance ? irc, mailing list or otherwise ? I haven't seen any channel to exchange other than github's issues.

@RobbeSneyders
Copy link
Member

Closing in favor of #1489.

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

10 participants