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

Throw invalid operation exception if Dictionary type is used for specification #889

Open
wants to merge 18 commits into
base: develop
Choose a base branch
from

Conversation

phaniva
Copy link

@phaniva phaniva commented May 26, 2023

To address Issue 377, I have added to list of existing specification gaurds.

@PentaPinguino
Copy link

Hi Phani,

In my opinion the problem with this solution is that the error Non scalar properties should be sequence of type IEnumerable<T>. defined in TypeConverter.ChangeTypeSequence will be bypassed - that means that developers will receive a different error message when trying to parse a IEnumerable without a specified type.

In my opinion there are two possible solutions to the problem:

  1. To ensure - inside ChangeTypeSequence - that the sequence has exactly one generic argument.
  2. To add two new rules inside SpecificationGuards that ensure that sequence types have exactly one generic argument.

Is it fair to have some checks inside the ChangeTypeSequence and some checks inside SpecificationGuards? Shouldn't we maybe try to move all checks to SpecificationGuards?

Thanks in advance and kind regards,
Davide

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.

7 participants