mirror of
https://github.com/LukeHagar/redocly-cli.git
synced 2025-12-06 04:21:09 +00:00
docs: update the no-required-schema-properties-undefined rule description (#1446)
This commit is contained in:
@@ -53,12 +53,12 @@ schemas:
|
||||
Pet:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- name
|
||||
- id
|
||||
- name
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
format: int64
|
||||
id:
|
||||
type: integer
|
||||
format: int64
|
||||
```
|
||||
|
||||
Expected error message when linting incorrect schema example:
|
||||
@@ -74,15 +74,28 @@ schemas:
|
||||
Pet:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- name
|
||||
- id
|
||||
- name
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
format: int64
|
||||
name:
|
||||
type: string
|
||||
example: doggie
|
||||
id:
|
||||
type: integer
|
||||
format: int64
|
||||
name:
|
||||
type: string
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user