Skip to content
Permalink
Branch: master
Commits on Nov 17, 2019
  1. Update README.md

    jehugaleahsa committed Nov 17, 2019
  2. Unit testing (WIP)

    jehugaleahsa committed Nov 17, 2019
Commits on Nov 13, 2019
Commits on Nov 12, 2019
  1. Update README.md

    jehugaleahsa committed Nov 12, 2019
  2. Merge branch 'websockets' of https://github.com/jehugaleahsa/javalin-mvc

    jehugaleahsa committed Nov 12, 2019
     into websockets
    
    # Conflicts:
    #	README.md
Commits on Nov 11, 2019
  1. Add WebSocket initial support.

    jehugaleahsa committed Nov 11, 2019
    WebSockets work very differently than HTTP requests. WebSockets are concerned with connectivity, so there are multiple handlers on a single route for detecting connections opening and closing, and client errors.  There's less concern about having complex model-binding and action results, although this might be a future effort. For now, I just want to have controller classes that can be instantiated via D.I. As part of this task, I realized that I cannot pass the context as an argument to the D.I. setup logic. I made the hard decision to hard-code all Javalin-specific binding rather than use the D.I. framework to create these objects. This means there's no need to inherit from a `ControllerComponent` or force users to add a `JavalinControllerModule` to their D.I. setup. In fact, after this change, I feel one step closer to perhaps freeing users from needing to use one particular D.I. framework.
    
    In the future, I feel like I should focus on model binding of some sort, but I am not sure how this fits in with the other handlers. It could be as simple as creating an abstract `WsController` class that implements `onMessage` and you pass it a lambda taking the desired arguments... and it binds them on the fly. We'll see!
Commits on Nov 7, 2019
  1. Update README.md

    jehugaleahsa committed Nov 7, 2019
  2. Update README.md

    jehugaleahsa committed Nov 7, 2019
  3. Update README.md

    jehugaleahsa committed Nov 7, 2019
  4. Remove required dependency on OpenAPI - use Javalin OpenAPI annotations.

    jehugaleahsa committed Nov 7, 2019
    Previously, I could not find a way to apply the built-in Javalin OpenAPI annotations to controller methods because they were not `Handler`s. In order for Javalin to extract OpenAPI annotations from a method or lambda, it must have the signature `(ctx: Context) -> void`; however controller methods can accept any arbitrary set of arguments. I discovered a helper method provided by Javalin under the `OpenApiBuilder` class, called `moveDocumentationFromAnnotationToHandler`, that allows OpenAPI on an arbitrary method to be associated with a handler, so now I simply call this method after creating the handler in the code generation piece. This means I can retire all of the OpenAPI annotations and code generation I wrote previously. This also means that the dependencies required for OpenAPI also go away.
  5. Dependency updates.

    jehugaleahsa committed Nov 7, 2019
You can’t perform that action at this time.