-
Notifications
You must be signed in to change notification settings - Fork 108
status
== empty string
#370
Comments
@IanLee1521 Does it validate if you do not include the "status" key at all? I believe that is our preference for treating optional keys. We could work on adding empty strings or nulls if that fits your workflow better, though. Let me know! |
@zachary-kuhn -- It does validate if I remove that key, but I think that is the only field that has this problem (see I have been working on https://github.com/llnl/scraper as a means to produce code.json files automatically, and in the current implementation (https://github.com/LLNL/scraper/blob/c1a8c36230e860a02e36843cbf2b63eb9d919f2e/scraper/code_gov/__init__.py#L219) I set all the fields in advance at object creation, before I know if the values will be provided by some process. |
@IanLee1521 , I'll be working on this. I'll make sure to keep you updated. |
Thanks @DanielJDufour ! Let me know if you need any additional information or testing from me. |
@IanLee1521 , could you attach/share the JSON file that you're trying to get validated/ingested with the empty string for status? Thanks! |
Sure thing. Here you go (adapted from https://energy.gov/code.json which was how I discovered this), it's a JSON formatted .txt file because apparently GitHub doesn't allow uploading .json files... |
Thank you. Just a quick update. We're still discussing this as a team and we'll get back to you when a decision is made. |
Thanks! |
In the 2.0 schema — Given that
status
is optional and accepts a string, would it be reasonable to expect an empty string to be an acceptable value?Currently, https://code.gov/#/policy-guide/docs/compliance/inventory-code/tools/validate-schema doesn't validate correctly if I have the following in my code.json:
The text was updated successfully, but these errors were encountered: