docs: update the no-required-schema-properties-undefined rule description (#1446)

This commit is contained in:
Andrew Tatomyr
2024-02-21 13:31:04 +02:00
committed by GitHub
parent 099455bda0
commit f7331f7832

View File

@@ -53,12 +53,12 @@ schemas:
Pet: Pet:
type: object type: object
required: required:
- id - id
- name - name
properties: properties:
id: id:
type: integer type: integer
format: int64 format: int64
``` ```
Expected error message when linting incorrect schema example: Expected error message when linting incorrect schema example:
@@ -74,15 +74,28 @@ schemas:
Pet: Pet:
type: object type: object
required: required:
- id - id
- name - name
properties: properties:
id: id:
type: integer type: integer
format: int64 format: int64
name: name:
type: string type: string
example: doggie example: doggie
```
The rule is case-sensitive, which means a property `name` does not match the string `Name` in the `required` list:
```yaml
schemas:
Pet:
type: object
properties:
name:
type: string
required:
- Name
``` ```
## Related rules ## Related rules