You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The second, when I pass the path of a python file directly I get:
`$pydantic2ts --module ./api/apps/folder/models.py --output test.ts --json2ts-cmd ./ui/node_modules/.bin/json2ts
2021-05-11 15:47:53,683 Finding pydantic models...
2021-05-11 15:47:53,688 Generating JSON schema from pydantic models...
Traceback (most recent call last):
File ".../venv/bin/pydantic2ts", line 8, in
sys.exit(main())
File ".../venv/lib/python3.8/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File ".../venv/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File ".../venv/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File ".../venv/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File ".../venv/lib/python3.8/site-packages/pydantic2ts/cli/script.py", line 222, in main
return generate_typescript_defs(module, output, json2ts_cmd)
File ".../venv/lib/python3.8/site-packages/pydantic2ts/cli/script.py", line 187, in generate_typescript_defs
schema = generate_json_schema(models)
File ".../venv/lib/python3.8/site-packages/pydantic2ts/cli/script.py", line 144, in generate_json_schema
model_extras = [m.Config.extra for m in models]
File ".../venv/lib/python3.8/site-packages/pydantic2ts/cli/script.py", line 144, in
model_extras = [m.Config.extra for m in models]
AttributeError: type object 'Config' has no attribute 'extra'
`
If I understand the docs correctly, the Config.extra field is optional.
However, right now pydantic-to-typescript does not handle this case.
The text was updated successfully, but these errors were encountered:
Hi! First of all, many thanks for providing this useful tool!
I'm trying to get it running, but there are two issues I'm stuck with.
First is the same as #5
The second, when I pass the path of a python file directly I get:
`$pydantic2ts --module ./api/apps/folder/models.py --output test.ts --json2ts-cmd ./ui/node_modules/.bin/json2ts
2021-05-11 15:47:53,683 Finding pydantic models...
2021-05-11 15:47:53,688 Generating JSON schema from pydantic models...
Traceback (most recent call last):
File ".../venv/bin/pydantic2ts", line 8, in
sys.exit(main())
File ".../venv/lib/python3.8/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File ".../venv/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File ".../venv/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File ".../venv/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File ".../venv/lib/python3.8/site-packages/pydantic2ts/cli/script.py", line 222, in main
return generate_typescript_defs(module, output, json2ts_cmd)
File ".../venv/lib/python3.8/site-packages/pydantic2ts/cli/script.py", line 187, in generate_typescript_defs
schema = generate_json_schema(models)
File ".../venv/lib/python3.8/site-packages/pydantic2ts/cli/script.py", line 144, in generate_json_schema
model_extras = [m.Config.extra for m in models]
File ".../venv/lib/python3.8/site-packages/pydantic2ts/cli/script.py", line 144, in
model_extras = [m.Config.extra for m in models]
AttributeError: type object 'Config' has no attribute 'extra'
`
If I understand the docs correctly, the Config.extra field is optional.
However, right now pydantic-to-typescript does not handle this case.
The text was updated successfully, but these errors were encountered: