You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: validator/README.md
+11-10Lines changed: 11 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,18 +5,19 @@ It is configured [in the specification directory](../specification/eslint.config
5
5
6
6
## Rules
7
7
8
-
| Name | Description |
9
-
|---------------------------------------| - |
10
-
|`single-key-dictionary-key-is-string`|`SingleKeyDictionary` keys must be strings. |
11
-
|`dictionary-key-is-string`|`Dictionary` keys must be strings. |
12
-
|`no-native-types`| TypeScript native utility types (`Record`, `Partial`, etc.) and collection types (`Map`, `Set`, etc.) are not allowed. Use spec-defined aliases like `Dictionary` instead. |
13
-
|`invalid-node-types`| The spec uses a subset of TypeScript, so some types, clauses and expressions are not allowed. |
14
-
|`no-generic-number`| Generic `number` type is not allowed outside of `_types/Numeric.ts`. Use concrete numeric types like `integer`, `long`, `float`, `double`, etc. |
15
-
|`request-must-have-urls`| All Request interfaces extending `RequestBase` must have a `urls` property defining their endpoint paths and HTTP methods. |
16
-
|`no-variants-on-responses`|`@variants` is only supported on Interface types, not on Request or Response classes. Use value_body pattern with `@codegen_name` instead. |
17
-
|`no-inline-unions`| Inline union types (e.g., `field: A \| B`) are not allowed in properties/fields. Define a named type alias instead to improve code generation for statically-typed languages. |
|`single-key-dictionary-key-is-string`|`SingleKeyDictionary` keys must be strings. |
11
+
|`dictionary-key-is-string`|`Dictionary` keys must be strings. |
12
+
|`no-native-types`| TypeScript native utility types (`Record`, `Partial`, etc.) and collection types (`Map`, `Set`, etc.) are not allowed. Use spec-defined aliases like `Dictionary` instead. |
13
+
|`invalid-node-types`| The spec uses a subset of TypeScript, so some types, clauses and expressions are not allowed. |
14
+
|`no-generic-number`| Generic `number` type is not allowed outside of `_types/Numeric.ts`. Use concrete numeric types like `integer`, `long`, `float`, `double`, etc. |
15
+
|`request-must-have-urls`| All Request interfaces extending `RequestBase` must have a `urls` property defining their endpoint paths and HTTP methods. |
16
+
|`no-variants-on-responses`|`@variants` is only supported on Interface types, not on Request or Response classes. Use value_body pattern with `@codegen_name` instead. |
17
+
|`no-inline-unions`| Inline union types (e.g., `field: A \| B`) are not allowed in properties/fields. Define a named type alias instead to improve code generation for statically-typed languages. |
18
18
|`prefer-tagged-variants`| Union of class types should use tagged variants (`@variants internal` or `@variants container`) instead of inline unions for better deserialization support in statically-typed languages. |
19
19
|`no-duplicate-type-names`| All types must be unique across class and enum definitions. |
20
+
| `no-all-string-literal-unions | Unions consisting entirely of string literals (e.g., `"green" \| "yellow" \| "red"`) are not allowed, use enums instead. ||
0 commit comments