Skip to content

Commit

Permalink
Make IDL commas whitespace and newlines optional
Browse files Browse the repository at this point in the history
Commas are now treated as whitespace to reduce visual noise in models,
reduce diff noise when changes are made to models, and prevent modelers
from worrying about tricks like trailing commas. Commas are still
allowed because they do make traits and JSON-like node values defined on
a single line easier to read; however, they should be omitted everywhere
else.

The IDL previously required a newline after various statements. This
wasn't grammatically necessary, but was done to force good practice in
models. However, it added complexity to the grammar and parser. While
models should still define all statements on different lines, to simplify
parsers and the grammar, a new line after statements is no longer
required.
  • Loading branch information
mtdowling committed Sep 22, 2021
1 parent 84b9a1d commit 49b5c5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/source/1.0/spec/core/auth-traits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ the HTTP ``Authorization`` header:
@httpApiKeyAuth(scheme: "ApiKey", name: "Authorization", in: "header")
service WeatherService {
version: "2017-02-11",
version: "2017-02-11"
}
Expand Down

0 comments on commit 49b5c5d

Please sign in to comment.