Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 10:58
    angryziber edited #1515
  • 10:58
    angryziber opened #1515
  • Jan 17 20:59
    altmind closed #1514
  • Jan 17 20:59
    altmind commented #1514
  • Jan 17 19:12
    altmind commented #1514
  • Jan 17 19:12
    altmind commented #1514
  • Jan 17 18:54
    jknack commented #1514
  • Jan 17 18:53
    altmind commented #1514
  • Jan 17 18:45
    altmind opened #1514
  • Jan 17 07:39
    nedtwigg commented #1513
  • Jan 17 03:55
    jknack commented #1513
  • Jan 17 00:45
    altmind commented #1513
  • Jan 16 23:09
    nedtwigg commented #1513
  • Jan 16 22:44
    jknack labeled #1513
  • Jan 16 22:44
    jknack commented #1513
  • Jan 16 22:37
    nedtwigg opened #1513
  • Jan 16 20:27
    jknack labeled #1500
  • Jan 16 20:27
    jknack unlabeled #1500
  • Jan 16 20:23
    jknack milestoned #1500
  • Jan 16 20:23
    jknack labeled #1500
Edgar Espina
@jknack
Coroutines?
MrPowerGamerBR
@MrPowerGamerBR
wow, nice!
I need to upgrade to 2.X.X then, a lot of my endpoints are using runBlocking {} because 1.6.X didn't support coroutines :(
MrPowerGamerBR
@MrPowerGamerBR
https://jooby.io/#error-handler shouldn't it be MyException::class.java in the Kotlin section? Using MyException::class does not work
Edgar Espina
@jknack
send a PR and fix it
probably forgot to add the kotlin version
MrPowerGamerBR
@MrPowerGamerBR
will do when I finish migrating everything to 2.4.0 (and looks like it will take a while, a lot of stuff changed)
Edgar Espina
@jknack
yea it is a major upgrade
Edgar Espina
@jknack
iamnk
@iamnk
How about adding extra properties to Route class. Reason: cases like authenticationrequired can be handled with that
There is an example there
iamnk
@iamnk
Yup. Somehow I missed it. Thanks
iamnk
@iamnk
Hye @jknack jnack, why gradle joobyRun command always created new daemon without using the existing daemons?
me-jooby
@me-jooby
Hi, I'm trying to integrate jooby 2.3+ with swagger. The only examples I see are for jooby 1.x, i.e. they reference the package org.jooby instead of io.jooby. Is it possible to integrate io.jooby with swagger?
Edgar Espina
@jknack
@iamnk I wrote the gradle plugin following some tutorials/examples. I’m not a gradle user, can you look why is that and how can to improve it (if necessary)?
@me-jooby Unfortunately the OpenApi/Swagger Spec was not migrated yet to 2.x
paulovictorv
@paulovictorv
I would love to have swagger in jooby2 - it’s the only thing holding me back 😬😬
Edgar Espina
@jknack
yea I know
just need more time
Edgar Espina
@jknack
iamnk
@iamnk
@jknack Will check what can be done!
me-jooby
@me-jooby
@jknack, is there a plan to migrate? where would I find more info on the status? thanks.
me-jooby
@me-jooby
Also, I really need a quick fix to create a swagger interface for a REST server which supports 10 calls. Does anyone have any suggestions on how I can create a quick solution? Thanks.
Edgar Espina
@jknack
@me-jooby it will be at some point
you can write MVC routes, annotated them with swagger annotations
then add one of the maven/gradle plugin that generates the spec from annotations
me-jooby
@me-jooby
like dummy ones.
Edgar Espina
@jknack
not follow
me-jooby
@me-jooby
as of two days ago i was completely unaware of swagger. can you point me to some kind of an example where i could start.
Edgar Espina
@jknack
I don;t have one in my mind now
due always used the one I wrote for 1.x
me-jooby
@me-jooby
if i took that source and converted it to a 2.x router. would it be too much work for a decent java programmer with a very faint idea of swagger?
me-jooby
@me-jooby
Let me look at that. Thank you.
Edgar Espina
@jknack
yea play a bit
should be possible
LongkerDandy
@longkerdandy
@jknack, I'm using CORS handler, but it seems not handling the pre-flight request
"preflighted" requests first send an HTTP request by the OPTIONS method to the resource on the other domain, to determine if the actual request is safe to send.
LongkerDandy
@longkerdandy
the preflighted request does not have a Content-Type header, which result to UnsupportedMediaType exception
Jerry Dimitriou
@jerouris
@longkerdandy can you paste the pre-flight request here? The header structure etc.
There are many tests including the ones found here: https://github.com/jooby-project/jooby/blob/2.x/tests/src/test/java/io/jooby/Issue1413.java that properly test CORS handling.
Edgar Espina
@jknack
@longkerdandy believe CORS work as expected, like @jerouris said
but can you share your route pipeline?
Seems you set the consumes/produces attributes and probably one of those makes CORS request to fail
Andrew Gurinovich
@altmind
How can I create Context in a unit test? I want to require() a class in a test
there exist a MockContext() class, but I need a real one
Andrew Gurinovich
@altmind
i can instantiate my App class directly, and it contains a definition for require, but nothing can be require'd as registry is null. do i need some ceremony to initialize an app?
i would rather use integration tests and @JoobyTest, but its unclear how to get a reference to an App in an integration test