-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
fix: NewRoute/NewBaseRoute to take engine not just OpeAPI for accepted content types #334
Conversation
c36f782
to
8ed6f35
Compare
8ed6f35
to
1529578
Compare
…estContentTypes`
I'm going to go ahead and merge this unless anyone objects. |
Looking at it again right now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect. Sorry for the long review delay!
Thank you. Sorry been a bit impatient. Been thinking about #341 a bunch and i know this would cause conflicts. |
Relates to #333
Somewhere along implementing support for different engines this was lost. This is a bit disruptive as it's changing the
NewRoute/NewBaseRoute
. The other option would be to placeacceptedContentTypes
on ourOpenAPI
struct I could go either way. We wouldn't be changing theNewRoute
andNewBaseRoute
API in the case of the later, but again we'd need to support yet another nested structure with it's own options. I think flattening in the Engine is OK, I guess 🤷.So the options are
acceptedContentTypes
in theOpenAPI
struct. We can could then do something likeacceptedContentTypes
in theOpenAPI
struct. And expose aWithOpenAPIOptions
. At this point we're nesting pretty deep...OpenAPIConfig
struct as well. Then engine would still need to be passed to theNew*Route
funcs.Cheers