mirror of
https://github.com/unmojang/meta.git
synced 2025-09-23 03:01:21 -04:00
fix: set by_alias for json export
This commit is contained in:
parent
a5bb3a091d
commit
367518371f
@ -24,7 +24,7 @@ class MetaBase(pydantic.BaseModel):
|
||||
if k in kwargs:
|
||||
del kwargs[k]
|
||||
|
||||
return super(MetaBase, self).json(exclude_none=True, sort_keys=True, indent=4, **kwargs)
|
||||
return super(MetaBase, self).json(exclude_none=True, sort_keys=True, by_alias=True, indent=4, **kwargs)
|
||||
|
||||
def write(self, file_path):
|
||||
with open(file_path, "w") as f:
|
||||
|
@ -93,7 +93,7 @@ def compute_jar_file(path, url):
|
||||
sha256 = filehash(jar_path, hashlib.sha256)
|
||||
size = os.path.getsize(jar_path)
|
||||
|
||||
data = FabricJarInfo(releaseTime=tstamp, sha1=sha1, sha256=sha256, size=size)
|
||||
data = FabricJarInfo(release_time=tstamp, sha1=sha1, sha256=sha256, size=size)
|
||||
data.write(path + ".json")
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user