-
Notifications
You must be signed in to change notification settings - Fork 531
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
ExternalRefProcessor has numerous problems causing NullPointerExceptions #132
Comments
Thanks. The 2nd example, as a model in the |
Wow. just seen your commits and trying to merge them now... PR incoming to try to address fully |
…y stolen from ModelProcessor) for swagger-api#132
Sorry, I don't understand how the second example isn't valid. Could you explain a little more please? Also your current fix would process potentially invalid properties from an array. And would miss this case:
|
having this: {
"definitions" : {
"myModel": {
"$ref": "./schemas/site.schema.json"
}
}
} is not legal, unless I'm taking your example out of context. |
That seems really counterintuitive This is legal:
and so is this:
So what you're saying should be legal |
So I think what @fehguy meant is that normally that use case would not make sense as you're simply referencing something external by naming it internally and referencing that, which seems redundant. That said, after talking with @samskiter on IRC, it seems they do have a use case for that and so it should be supported. JSON-Schema wise, that structure is valid. |
Thanks @webron I stand corrected :) The parser doesn't handle this, but if it's a valid schema, it should. I'll look into getting it supported. |
#278 is a duplicate of this one, right? |
This should be fixed now. |
Line 63 of ExternalRefProcessor.java attempts to use a property map from a model which may be null:
This is easy to generate with a referenced model that looks like any of the following:
or:
I presume there's also some work to be done to make these definitions parse properly
See also: swagger-api/swagger-codegen#1530
The text was updated successfully, but these errors were encountered: