Skip to content
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

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

Merged
merged 1 commit into from
Sep 24, 2019

Conversation

BalloonWen
Copy link
Contributor

@BalloonWen BalloonWen commented Sep 17, 2019

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

@ddobrin
Copy link
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
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
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
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
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