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

Requiring Product for a request type #76

Open
eikek opened this issue Nov 25, 2021 · 3 comments
Open

Requiring Product for a request type #76

eikek opened this issue Nov 25, 2021 · 3 comments

Comments

@eikek
Copy link

eikek commented Nov 25, 2021

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:

def request[T <: Product : TypeTag](implicit openAPI: OpenAPI): Operation = {

@jakehschwartz
Copy link
Owner

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! :)

@eikek
Copy link
Author

eikek commented Dec 3, 2021

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 ;-)

@jakehschwartz
Copy link
Owner

Hahaha, yeah making sure there is something in the examples folder that compiles like you said is plenty!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants