finatra-swagger
finatra-swagger copied to clipboard
Requiring `Product` for a request type
Hi!
we have request bodies that are lists, so we are using the .request[List[Something]]
method on FinatraOperation
. When going to Scala 2.13, the List
type doesn't extend Product
anymore, which is defined as a type constraint on this method. From a very quick look (I'm sorry if this is a too quick conclusion), it looks like it is not necessary? Can this type constraint be removed or am I missing something?
Thank you and thank you for this library!
Edit: here is a link to what I'm talking about: https://github.com/jakehschwartz/finatra-swagger/blob/5ee72bc8331a273da579ba95f77fc3e14ae6893b/src/main/scala/com/jakehschwartz/finatra/swagger/FinatraOperation.scala#L30
Hey @eikek. Honestly, I have no idea what a Product
is. I've mostly been maintaining the library with new versions of OpenAPI and Finatra, I havent touched a lot of the original code so I dont know what the intent is.
Happy to take PRs with some tests that prove its fine to change! :)
Hey @jakehschwartz thank you, I understand, np! I will try finding some time to take a closer look. Regarding tests: if the code compiles without that constraint, it should be good imho, it means it is not being used anyways. But I'll try to also get some tests for it, don't hold your breath though ;-)
Hahaha, yeah making sure there is something in the examples folder that compiles like you said is plenty!