Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

make schema check for missing non-defaulted args #93

Merged
merged 1 commit into from
Sep 11, 2023
Merged

Conversation

gilesknap
Copy link
Member

This fixes an issue where Args with no specified default were being allowed to not be supplied in the IOC schema. It should be a schema error if you supply no value in the IOC and the SUPPORT does not supply a default.

@coretl FYI

My mistake was removing default from the Support Arg types.
We do need default = None in the Support YAML so that IOCs can decide to specify defaults for Args.

But when we translate that into an IOC class we need to set default = PydanticUndefined where the instance of the Arg has default = None.

@gilesknap gilesknap merged commit 7831c58 into main Sep 11, 2023
@gilesknap gilesknap deleted the fix_defaults branch September 11, 2023 13:28
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant