Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Trevor Howard
    @tahoward
    IMO order should not matter but ¯_(ツ)_/¯
    Trevor Howard
    @tahoward
    Yohann
    @iamyohann
    Hi everyone, could I get a review on this pull request
    zalando/connexion#897
    Cheers, Yohann
    Jacob Floyd
    @cognifloyd
    Is there a way to specify a default controller without using x-swagger-router-controller in the spec?
    Ghost
    @ghost~5756cf3bc43b8c6019785349
    How can I access the matched url pattern of a request, i.e. how do I get /user/{user_id} from /user/123?
    Ghost
    @ghost~5cc30fc0d73408ce4fbec0ef
    @ghost~5756cf3bc43b8c6019785349 instead of using request.path ( = /user/123) use request.url_rule.rule ( = /user/{user_id}).
    Jasper Duizendstra
    @duizendstra
    Hi all, I am new here. I am looking into the possibility to run connexion on Google App Engine Flex/Endpoints. I can't find much about it, has anybody here maybe tried it?
    Jacob Floyd
    @cognifloyd
    I want to add a service to the request context so that it is available in every request. How do I do that when setting up the connexion app? (I'm using aiohttp btw)
    I've got pass_context_arg_name='request', now how do I add something to every request?
    Do I need to add a middleware that injects the service into the request?
    Rafael Carício
    @rafaelcaricio
    @cognifloyd Yes, that would be the way to go since you're using aiohttp. Or create a simple decorator (same thing).
    Jacob Floyd
    @cognifloyd
    With aiohttp, does raising Problems work? I'm using aiohttp-client in pytest to test an endpoint, but I think that might be bypassing the connexion middleware that deals with problems. I'm trying to figure out how to validate my suspicion.
    Jacob Floyd
    @cognifloyd
    Found it. the common_error_handler that turns everything into problems is only implemented for Flask, not AioHttp.
    Ram Grandhi
    @ramgrandhi_gitlab

    Dear All.. 2 days ago, i was pleasantly introduced to connexion. I loved how it embraces API-design-first approach, and I am glad to have my first microservice up and running locally in my virtualenv. :)

    Now the rainy side!!
    I want to get it deloyed on AWS Lambda using Terraform. I just can't get to make it work - Lambda complains Handler 'main' missing on module 'deliveries' when I try to invoke it.

    Here's my deliveries.py:
    import connexion from flask_cors import CORS app = connexion.FlaskApp(__name__, specification_dir='./') def post_deliveries(body): return "{'status':'created.'}" if __name__ == "__main__": CORS(app.app) app.add_api('swagger.yaml') app.run(debug=True)

    Here is my deliveries.py:

    import connexion 
    from flask_cors import CORS 
    app = connexion.FlaskApp(__name__, specification_dir='./') 
    def post_deliveries(body): 
       return "{'status':'created.'}" 
    if __name__ == "__main__": 
       CORS(app.app) 
       app.add_api('swagger.yaml') 
       app.run(debug=True)
    def lambda_handler(event, context):
        app.add_api('swagger.yaml')
        CORS(app.app)
        app.run()

    Appreciate your tips! Thanks in advance.

    Jacob Floyd
    @cognifloyd
    Is there any way for non-zalando folks to join the core team for connexion?
    Ram Grandhi
    @ramgrandhi_gitlab
    Hello there! It’s sad to see no reactions on this page :( Is there another official channel for Connexion?
    Jacob Floyd
    @cognifloyd
    My best guess is that there's a big push at Zalando so none of the devs have time to work on Connexion right now.
    /shrugs
    Aviran Abady
    @AviranAbady
    Hey, is it possible to add logs for the openapi validation? when I have a request validation error i mostly get errors like "None is not of type object" in the logs, no specifying which variable in missing..............
    Logi Ragnarsson
    @logi
    @AviranAbady you asked quite a while ago, so I don't know if you still care, but I was stepping through this code yesterday and it seems to be delegated to a separate openapi validation library which in turn delegates to a json schema library so it's not really a connexion thing.
    And yeah, this channel is pretty dead...
    Logi Ragnarsson
    @logi
    BTW, if anyone is here, is it considered a problem that path arguments of type number or integer are not allowed to be negative or that number is not allowed to be a whole number (2 bad, 2.0 good), at least using flask?
    Anant Kumar Yadav
    @Anant706
    Hello @here,
    how can I use Application-level Authentication with connexion.Aiohttp(....) ?
    Jacob Floyd
    @cognifloyd
    @hjacobs Release notes for 2.5.0 are missing a big feature: Support returning tuples with aiohttp
    Daniel Grossmann-Kavanagh
    @dtkav
    I'll see if I can update
    Daniel Grossmann-Kavanagh
    @dtkav
    @cognifloyd I've added that feature to the release notes
    Jacob Floyd
    @cognifloyd
    Thank you.
    It's a pretty sweet feature that I'm loving using in production.
    Justin Black
    @spacether
    Hey all, it looks like the latest release of connexion is installable in python 2.7 though it won't work with that version of python.
    If we want to disallow that, I have a PR posted to fix it at zalando/connexion#1109
    Daniel Grossmann-Kavanagh
    @dtkav
    thanks!
    Marijan Gradecak
    @Gradecak
    Hi Guys, quick question. I cannot find it documented anywhere, but is it possible for authentication functions for apiKeyAuth or Oauth2 to return a custom User object rather than a uid and token_info? I would ideally like to add some sort of a hook to transform those params into a single User object but im not sure where to look
    Lioman
    @lioman
    Hi, I've got a problem. in a method I use connexion.request.headers but now I need to invoke this method via a cli command to and I do not have a connexion request context. Does anyone know how to set the headers for connexion. perhaps with flasks test_request_context() method?
    Lioman
    @lioman
    Never mind: After 2 hours of searching it was just a with app.test_request_context in the wrong part of an if statement
    Lloyd N.
    @Kulu-M
    How would I go on logging all requests to my API? Like the IP adress and other things. Where would be the best place to do so? I can't find any place which has access to all requests...
    David Ojeda
    @dojeda
    @Kulu-M
    David Ojeda
    @dojeda
    Sorry, my bad, I wanted to respond to the logging requests: take a look at flask_app.before_request as
    Sorry I am so sloppy I am mobile
    tahalukmanji
    @tahalukmanji
    I submitted a pull request for connexion. This pull request gives an ability to pass flask constructor args through the FlaskApp constructor. The argument name is server_args, which is then expanded when create_app is called
    Here is the pull request. zalando/connexion#1173. Please let me know if this is good and when will the change be part of the pypi mirror:
    Fredrik Jonsén
    @frjonsen
    Hi. Is there any way to get the operationId for the current request? We are attempting add role-based authentication per operation, and have added fields such as x-roles: ['admin'] in the specification, and we can get the roles from the JWT from the context in connexion.request, but I fail to find a decent way of getting the x-roles into the controllers. Preferably we would be handling this in our security_controller, so I'd prefer not having a hardcoded solution in each endpoint handler
    Raffaele
    @rafspiny

    Hi all! I can not find any reference in the documentation to how pythonic_params behave on POST body. Especially when connexion is used in combination with openapi-generator where the body of a POST endpoint is passed as

    {
       "body": {
          "paramId:":1,
          "paramName": "name"
       }
    }

    Only the first-level keys will be made pythonic. Is this intended? Reading the code, it looks like it is. See https://github.com/zalando/connexion/blob/master/connexion/operations/openapi.py#L299

    And later in the flow...

            # optionally convert parameter variable names to un-shadowed, snake_case form
            if pythonic_params:
                kwargs = {snake_and_shadow(k): v for k, v in kwargs.items()}

    Could you shed some lights on this one? Do you have any hints? : )

    Aviran Abady
    @AviranAbady
    Which unit tests framework works well with connexion?
    RES
    @madkote
    @AviranAbady unit test +pytest
    Jonathan Nakandala
    @JonathanNakandala
    Hi all,
    I noticed that there hasn't been much activity on the project in a while. Has development been stopped?
    Jacob Floyd
    @cognifloyd
    @JonathanNakandala you're best bet is to ping zalando on twitter and ask them to have the connexion devs look at it
    cognifloyd (Jacob Floyd)
    @cognifloyd:matrix.org
    [m]
    Test message via Matrix 🙂