-
Notifications
You must be signed in to change notification settings - Fork 0
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: add presetRef
to observation
#207
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should leave presetRef
as optional. I think there are cases where it might not make sense to populate this value (an observation could be created without a preset - it is in tests).
I think for Protobuf sub-messages, the difference between marking it as optional
or not is in the generated code and resulting types either being { presetRef?: PresetRef | undefined }
or { presetRef: PresetRef | undefined }
. I think the former is preferable, to avoid the API consumer needing to always specify it as a property, even if undefined. So maybe add optional
to the proto def too.
Can you ensure test fixtures include docs both with and without the presetRef set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one small fix needed, once done go ahead and merge.
Co-authored-by: Gregor MacLennan <gmaclennan@digital-democracy.org>
should close #205. I put it as required on JSONSchema and non-optional on the proto definition