-
Notifications
You must be signed in to change notification settings - Fork 85
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
Problems with Paramater References with OAS 3.x specifications #309
Comments
Interestingly if I manually resolve the reference by replacing it with a concrete definition then the API call still fails to resolve the parameter directly with the exact same NPE. Not sure if this is a problem with my parameter definition or a more general problem with Inflector's parameter type handling (and possibly a problem with parsing the Swagger document). I would tend to assume that this is my error but looking at the docs I don't see what I've done wrong?? |
Realised part of the problem might be that I was targeting the wrong version of Inflector. I am using OAS 3.x so needed to use Inflector 2.x however using 2.0.0 produces a different NPE instead:
So still no closer to having a usable REST service :( |
Did some more debugging, the root of the problem is that the Can't see anything obviously wrong with my schema declaration but clearly something is wrong with it? Any ideas? |
Further digging, in
Which would explain why the type isn't parsed but I'm still confused because this parameter definition looks identical to example ones in the pet store examples |
So this was a weird white space issue, applying some reformatting fixed the issue. |
Trying to use Inflector with an OAS 3.0 spec that uses parameter references extensively (this is a tiny subset of the whole API document) e.g.
And attempting to access the methods that use reference parameters result in NPEs:
Produces the following error trace:
Attaching a debugger and setting breakpoints I can see that the
RefParameter
is not getting resolved at all so all its fields arenull
leading to the NPE inSwaggerOperationController
Took a look at
ResolverUtils.resolveFully()
and it doesn't look like it does anything to resolve reference parameters which seems incorrect.The text was updated successfully, but these errors were encountered: