Skip to content

Figure out the story around required complex properties within optional complex types #36402

@roji

Description

@roji

I think I'm running into a weirdness around optional complex types and nesting... Looking in InternalEntryBase.CheckForNullComplexProperties(), it seems like we don't allow required nested properties within optional ones. Shouldn't it be OK to have a required property X (complex or otherwise) nested within an optional required property Y, meaning that X can (obviously) be null if Y is null, but if Y is non-null, then X should also be non-null?

Otherwise, we're basically not allowing any meaningful idea of requiredness within optional complex types - everything within an optional type must be configured as optional, which in some sense is true (since the outer can be null), but seems overall wrong (since we still want to allow users to configure requiredness of nested properties even when they're within optional complex types).

See TODO in ComplexJsonRelationalFixtureBase.

Metadata

Metadata

Assignees

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions