amend if/then/else example
...so the if clause is not true when "country" is missing
✔️ Deploy Preview for lucid-bardeen-10edfb ready!
🔨 Explore the source changes: 31b1aa5d0dd1bc03681345fdce9b263e2a097584
🔍 Inspect the deploy log: https://app.netlify.com/sites/lucid-bardeen-10edfb/deploys/61e099c716a909000710b750
😎 Browse the preview: https://deploy-preview-185--lucid-bardeen-10edfb.netlify.app
Build failed... https://app.netlify.com/sites/lucid-bardeen-10edfb/deploys/61e099c716a909000710b750#L114-L122
9:31:06 PM: Exception occurred:
9:31:06 PM: File "/opt/build/repo/source/sphinxext/jsonschemaext.py", line 149, in run
9:31:06 PM: raise ValueError(
9:31:06 PM: ValueError: Doc says fragment should pass, but it does not validate:
9:31:06 PM: {
9:31:06 PM: "street_address": "1600 Pennsylvania Avenue NW",
9:31:06 PM: "postal_code": "20500"
9:31:06 PM: }
9:31:06 PM: VALIDATION ERROR
it would help if it said why validation failed...
The schema is correct as it is. If the country is not set, USA is assumed and therefore the postal code (if present) needs to be a USA postal code.
It's a bit complicated for an intro example. Last time I went through it, I just fixed the errors and kept the same example, but it really could use a less confusing example.