mac icon indicating copy to clipboard operation
mac copied to clipboard

Problem when executing Python Generation Script

Open ignapzs opened this issue 2 years ago • 3 comments

After reading the scripts README, and proceed to create the virtual environment with all the required dependencies, I came across the following problem:

When executing ❯ python ./jsonschema_generator.py ../../schema/schema.json -o example1.json

then the following error appears

Traceback (most recent call last): [....] File "[......]/mac/scripts/python_validator/./jsonschema_generator.py", line 52, in generate_dict generator = self.get_generator(v["type"]) KeyError: 'type'

Could this be related to each of the different element definitions like #/$defs/person or #/$defs/location ?

ignapzs avatar Mar 21 '23 15:03 ignapzs

This issue is fixed by #24

ydarias avatar Mar 22 '23 09:03 ydarias

Hi @ydarias . I'm afraid to say that #24 does not fix this problem. I only submitted a PR ( #25 ) to fix #24. Problem still remains.

I just tried to explain current problem with generation script on the same way as validation one. Even one guess, based on the given returned message, as I only got basic Python skills.

My fault if I wasn't clear on my messages :/

ignapzs avatar Mar 23 '23 15:03 ignapzs

No problem @ignapzs I will keep it open until we fix it.

And no worries, thank you very much for your help anyway ^_^

ydarias avatar Mar 27 '23 06:03 ydarias