Skip to content

Conversation

@senthilkumarmohan
Copy link
Contributor

No description provided.

@PerthCharern
Copy link
Contributor

PerthCharern commented Nov 15, 2018

I don't think we need to add this validation in the reference resolver itself. In general, we try to avoid adding a validation into the reader and resolver unless we have to (e.g. YAML malformatting can't really be validated anywhere else).

This seems like it would fit better in the Validations Rules

https://github.com/Microsoft/OpenAPI.NET/tree/master/src/Microsoft.OpenApi/Validations/Rules

This rule belongs to OpenApiSchemaRules. #Closed

@senthilkumarmohan
Copy link
Contributor Author

senthilkumarmohan commented Nov 15, 2018

Okay, I will move the validation into OpenApiSchemaRules. Thanks. #Closed

@PerthCharern
Copy link
Contributor

PerthCharern commented Nov 15, 2018

Thanks for adding the tests to the reader. Could you help move the tests to OpenApiSchemaValidationTests.cs? Also, the tests should be adjusted to simply read the Schema object instead of the real document. #Closed

Copy link
Contributor

@PerthCharern PerthCharern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕐

…he-discriminator-property' of https://github.com/senthilkumarmohan/OpenAPI.NET into bugfix#344-Report-error-when-OneOf-schema-doesnt-have-the-discriminator-property
@senthilkumarmohan
Copy link
Contributor Author

senthilkumarmohan commented Nov 15, 2018

Thanks for the review. I have moved test cases to OpenApiSchemaValidationTests (with changes) and updated code as per the comments. #Closed

@PerthCharern
Copy link
Contributor

PerthCharern commented Nov 15, 2018

Thank you for making this change. I have left a few minor comments. Once you have fixed that and merged in the latest master, we should be good to go :)

Edit: Looks like merge is not needed given no conflicts. Github wasn't updating correctly for me.

Copy link
Contributor

@PerthCharern PerthCharern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@senthilkumarmohan
Copy link
Contributor Author

I have updated the resource keys and reverted changes to OpenApiDiscriminatorTests. Thanks again. 👍

@PerthCharern
Copy link
Contributor

This looks good now. I'll check it in.

Thanks a lot for your contribution :)

@PerthCharern PerthCharern merged commit 26a2ef1 into microsoft:master Nov 15, 2018
@senthilkumarmohan
Copy link
Contributor Author

Thankyou very much

@senthilkumarmohan senthilkumarmohan deleted the bugfix#344-Report-error-when-OneOf-schema-doesnt-have-the-discriminator-property branch November 15, 2018 22:18
@senthilkumarmohan senthilkumarmohan restored the bugfix#344-Report-error-when-OneOf-schema-doesnt-have-the-discriminator-property branch November 24, 2018 01:12
@PerthCharern PerthCharern mentioned this pull request Dec 12, 2018
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.

2 participants