Skip to content

Commit

Permalink
Sort enums in json schema
Browse files Browse the repository at this point in the history
  • Loading branch information
echoix authored May 29, 2024
1 parent 2d7d109 commit 630edc6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .automation/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -2712,7 +2712,7 @@ def generate_json_schema_enums():
json_schema = json.load(json_file)
json_schema["definitions"]["enum_flavors"]["enum"] = ["all_flavors"] + list(
flavors.keys()
)
).sort()
with open(DESCRIPTOR_JSON_SCHEMA, "w", encoding="utf-8") as outfile:
json.dump(json_schema, outfile, indent=2, sort_keys=True)
outfile.write("\n")
Expand All @@ -2723,9 +2723,9 @@ def generate_json_schema_enums():
json_schema = json.load(json_file)
json_schema["definitions"]["enum_descriptor_keys"]["enum"] = [
x["descriptor_id"] for x in descriptors
]
].sort()
json_schema["definitions"]["enum_descriptor_keys"]["enum"] += ["CREDENTIALS", "GIT"]
json_schema["definitions"]["enum_linter_keys"]["enum"] = [x.name for x in linters]
json_schema["definitions"]["enum_linter_keys"]["enum"] = [x.name for x in linters].sort()
# Deprecated linters
json_schema["definitions"]["enum_linter_keys"]["enum"] += DEPRECATED_LINTERS
with open(CONFIG_JSON_SCHEMA, "w", encoding="utf-8") as outfile:
Expand Down

0 comments on commit 630edc6

Please sign in to comment.