Skip to content

Commit

Permalink
feat: より良い品質のmarkdownを出すように
Browse files Browse the repository at this point in the history
  • Loading branch information
yupix committed Dec 30, 2023
1 parent 5e99257 commit ea1a0c6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions compiler/update_api_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def get_list(data: IData, section: SECTIONS, status: STATUS):
path = data['endpoints'][section][path_name]
if path['status'] == status:
affix = "(Need to work)" if path['status'] == 'needToWork' else ""
result += f"- [{'x' if path['status'] == 'supported' else ' '}] {path['path']} {affix}\n"
result += f"- [{'x' if path['status'] == 'supported' else ' '}] {path['path']}{f' {affix}' if affix else ''}\n"
return result

with open('./datas/support_status.md', mode='w', encoding='utf-8') as f:
Expand All @@ -139,13 +139,13 @@ def get_list(data: IData, section: SECTIONS, status: STATUS):
for schema_name in endpoints['schemas']:
schema = endpoints['schemas'][schema_name]
affix = "(Need to work)" if schema['status'] == 'needToWork' else ""
support_schemas += f"- [{'x' if schema['status'] == 'supported' else ' '}] {schema['name']} {affix}\n"
support_schemas += f"- [{'x' if schema['status'] == 'supported' else ' '}] {schema['name']}{f' {affix}' if affix else ''}\n"
f.write(f"""## SUPPORTED ENDPOINTS ({supported_path_number}/{path_number})
{supported_endpoints}
## Not supported endpoints
{"💯" if len(not_supported_endpoints.strip()) == 0 else not_supported_endpoints}
{"💯" if len(not_supported_endpoints.strip()) == 0 else not_supported_endpoints[:-1]}
## Changed request body or responses
Expand All @@ -157,7 +157,7 @@ def get_list(data: IData, section: SECTIONS, status: STATUS):
## SUPPORTED SCHEMAS
{support_schemas}
{support_schemas[:-1]}
""")

print("done")

0 comments on commit ea1a0c6

Please sign in to comment.