api-docs: Standardize on lowercase true, false and null.

Creates a custom linter rule for `zerver/openapi/zulip.yaml` to
only allow lowercase versions of "true", "false" and "null".

Updates existing documentation for new rules.
This commit is contained in:
Lauryn Menard
2023-05-15 11:30:00 +02:00
committed by Tim Abbott
parent 17bdf22521
commit 4fcb243769
2 changed files with 54 additions and 41 deletions

View File

@@ -904,6 +904,18 @@ puppet_rules = RuleList(
],
)
openapi_rules = RuleList(
langs=["yaml"],
rules=[
*whitespace_rules,
{
"pattern": "True|TRUE|False|FALSE|Null|NULL",
"include_only": {"zerver/openapi/"},
"description": "Use lowercase for true, false and null in API documentation.",
},
],
)
txt_rules = RuleList(
langs=["txt", "text", "yaml", "rst", "yml"],
rules=whitespace_rules,
@@ -919,4 +931,5 @@ non_py_rules = [
bash_rules,
txt_rules,
puppet_rules,
openapi_rules,
]