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
parser/properties/__init__.py(242)build_model_property() does not contain the same "hack" that's present at parser/reference.py(23)from_ref(), which removes spaces from the class name to prevent "ugly pascalcase output".
This occurs in my own schema generation when a model has a title and that title has spaces. In this particular case, that's Noise Model which gets pascal-ized to Noisodel.
Two ways to fix:
Same inline hack as in parser/reference.py
Strip the spaces within utils.py(28)pascal_case() itself so the fix is everywhere
To Reproduce
Generate from a schema with an object that has a title with spaces in it.
Expected behavior
Noise Model becomes a python model called NoiseModel rather than Noiseodel
Desktop (please complete the following information):
Describe the bug
parser/properties/__init__.py(242)build_model_property()
does not contain the same "hack" that's present atparser/reference.py(23)from_ref()
, which removes spaces from the class name to prevent "ugly pascalcase output".This occurs in my own schema generation when a model has a
title
and that title has spaces. In this particular case, that'sNoise Model
which gets pascal-ized toNoisodel
.Two ways to fix:
parser/reference.py
utils.py(28)pascal_case()
itself so the fix is everywhereTo Reproduce
Generate from a schema with an object that has a
title
with spaces in it.Expected behavior
Noise Model
becomes a python model calledNoiseModel
rather thanNoiseodel
Desktop (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: