Skip to content

Commit

Permalink
Update json2md.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tombch authored Feb 2, 2024
1 parent 76cfc3f commit 6e9207c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions metadata/json2md.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
j = json.load(f)

required = [
['Field name', 'Data type', 'Description'],
['Field name', 'Data type', 'Description', 'Restrictions'],
['-----']*3,
]
optional = [row[:] for row in required] # deep copy

for k, v in j['data']['fields'].items():
try:
row = [f"`{k}`", f"`{v['type']}`", v['description']]
row = [f"`{k}`", f"`{v['type']}`", v['description'], ", ".join(v['values'])]

if v['required']:
required.append(row)
Expand Down

0 comments on commit 6e9207c

Please sign in to comment.