mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
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:
committed by
Tim Abbott
parent
17bdf22521
commit
4fcb243769
@@ -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,
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user