Open kmudrick opened 3 years ago
I don't think we considered that people might put parameters in their media types, which I guess is valid according to the spec.
The right way to fix this would be to augment ContentType
to match against whatever is before the ;
. We should also store the parameters so we can make use of them in the generators, but as a first step I'm fine with just fixing the matching to not account for parameters at all.
In a spec, specifying
produces
andconsumes
with media type parameters generates broken code (does not compile).Example:
I am guessing that the
ApplicationJson
check could maybe be changed to useexists
with a predicate that matches against the start of the string? I can open a PR if need be to illustrate/fix.