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

feat: Let nested properties be nullable when using schema helpers #2487

Closed
edgarrmondragon opened this issue Jun 18, 2024 · 0 comments · Fixed by #2488
Closed

feat: Let nested properties be nullable when using schema helpers #2487

edgarrmondragon opened this issue Jun 18, 2024 · 0 comments · Fixed by #2488
Assignees
Labels
kind/Feature New feature or request valuestream/SDK
Milestone

Comments

@edgarrmondragon
Copy link
Collaborator

Feature scope

Configuration (settings parsing, validation, etc.)

Description

For example, currently

>>> from singer_sdk import typing as th 
>>> th.ArrayType(th.StringType()).to_dict()
{'type': 'array', 'items': {'type': ['string']}}

Ideally, something like this would be supported

>>> from singer_sdk import typing as th 
>>> th.ArrayType(th.StringType(nullable=True)).to_dict()
{'type': 'array', 'items': {'type': ['string', 'null']}}

Workaround

>>> from singer_sdk import typing as th 
>>> th.ArrayType(th.CustomType({"type": ["string", "null"]})).to_dict()
{'type': 'array', 'items': {'type': ['string', 'null']}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/Feature New feature or request valuestream/SDK
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant