Closed
Description
Describe
I encountered a problem that the class generator seems to parse version number as float or float strings.
I'm using the latest version installed with pip, and I used the following command to generate the model.
$ json2models -s nested --max-strings-literals 0 -m VersionInfo version_info.json >version_info.py
Reproduce
Package version: 0.2.7
JSON data:
{
"Version": [{
"Name": "1.1",
"Url": "https://foo"
}, {
"Name": "1.2",
"Url": "https://foo"
}]
}
Actual result
Class code:
from json_to_models.dynamic_typing import FloatString
from typing import List
class VersionInfo:
class Version:
name: FloatString
url: str
version: List['Version']
Expected result
Class code:
from typing import List
class VersionInfo:
class Version:
name: str
url: str
version: List['Version']
Additional context
I'd like an option to disable all string converters, if possible (e.g., --disable-strings-converters).
Thanks for the great tool!