mirror of
https://github.com/LukeHagar/redocly-cli.git
synced 2025-12-09 20:57:44 +00:00
docs: update the no-required-schema-properties-undefined rule description (#1446)
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user