Skip to content

Make JsonConstructor DataSource parameter nullable to match property annotation#3526

Open
aaronburtle wants to merge 2 commits intomainfrom
dev/aaronburtle/Fix-RuntimeConfig-JsonConstructor-Nullable
Open

Make JsonConstructor DataSource parameter nullable to match property annotation#3526
aaronburtle wants to merge 2 commits intomainfrom
dev/aaronburtle/Fix-RuntimeConfig-JsonConstructor-Nullable

Conversation

@aaronburtle
Copy link
Copy Markdown
Contributor

@aaronburtle aaronburtle commented May 7, 2026

Why make this change?

Closes #3525

What is this change?

Small change, DataSource to DataSource? in the JsonConstructor for RuntimeConfig, and update comment to match.

How was this tested?

Run against regular test suite.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aligns RuntimeConfig’s [JsonConstructor] parameter nullability with the DataSource property’s DataSource? annotation, allowing JSON deserialization to omit data-source (e.g., for root configs that use data-source-files).

Changes:

  • Updated the RuntimeConfig JSON constructor to accept DataSource? instead of DataSource.

Comment thread src/Config/ObjectModel/RuntimeConfig.cs
Comment thread src/Config/ObjectModel/RuntimeConfig.cs
@aaronburtle aaronburtle self-assigned this May 7, 2026
@aaronburtle aaronburtle added the bug Something isn't working label May 7, 2026
@aaronburtle aaronburtle moved this from Todo to Review In Progress in Data API builder May 7, 2026
@aaronburtle aaronburtle added this to the May 2026 milestone May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Review In Progress

Development

Successfully merging this pull request may close these issues.

Make JsonConstructor DataSource parameter nullable to match property annotation

4 participants