Skip to content

add NPE check before get "properties" property inside allOf/$ref/#387

Merged
stevehu merged 1 commit into1.6.xfrom
fix/#386-all-of-ref-properties
Sep 24, 2019
Merged

add NPE check before get "properties" property inside allOf/$ref/#387
stevehu merged 1 commit into1.6.xfrom
fix/#386-all-of-ref-properties

Conversation

@BalloonWen
Copy link
Copy Markdown
Contributor

@BalloonWen BalloonWen commented Sep 17, 2019

in some cases, there may not be properties
related issue: #386

@ddobrin
Copy link
Copy Markdown
Contributor

ddobrin commented Sep 17, 2019

@BalloonWen : small note: the issue is with oneOf.

Skipping the generation in case "properties" is not found is one issue.
Agreed that a lack of the node "properties" should not create a NPE. That is a good validation.

Would you create a second issue for oneOf encountered at that place, when there are no properties defined?

@BalloonWen
Copy link
Copy Markdown
Contributor Author

@BalloonWen : small note: the issue is with oneOf.

Skipping the generation in case "properties" is not found is one issue.
Agreed that a lack of the node "properties" should not create a NPE. That is a good validation.

Would you create a second issue for oneOf encountered at that place, when there are no properties defined?

Hi @ddobrin , it happens in the place in "oneOf" but the root cause is "allOf", because the "CIdentifier" which is missing properties is under "Result400/allOf/$ref"

@ddobrin
Copy link
Copy Markdown
Contributor

ddobrin commented Sep 17, 2019

Yes, I agreed with the NPE.
The problem discussed with @miklish yesterday has actually 2 parts: this NPE, which I was not worried about, as it is a clear fix, and the generation of the correct oneOf related artifacts

@BalloonWen
Copy link
Copy Markdown
Contributor Author

Yes, I agreed with the NPE.
The problem discussed with @miklish yesterday has actually 2 parts: this NPE, which I was not worried about, as it is a clear fix, and the generation of the correct oneOf related artifacts

I see, he discussed with us yesterday, but we feel a little bit confused, if it's not very urgent, let's discuss another round together, maybe in a meeting room. thank you.

@ddobrin
Copy link
Copy Markdown
Contributor

ddobrin commented Sep 17, 2019

@BalloonWen @miklish : I am not available to meet in person until next week, as I am working remotely this week.

We can discuss over Google hangouts or phone if you guys like.

My client sees it almost as a showstopper. Reach out offline if you like

@stevehu stevehu requested a review from jiachen1120 September 17, 2019 20:26
@miklish miklish self-assigned this Sep 23, 2019
@stevehu stevehu merged commit 3a56958 into 1.6.x Sep 24, 2019
@stevehu stevehu deleted the fix/#386-all-of-ref-properties branch September 24, 2019 12:29
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

Successfully merging this pull request may close these issues.

4 participants