Skip to content

Commit 9592b1f

Browse files
committed
Define Parameter as a filtered superset
1 parent bedcc17 commit 9592b1f

File tree

2 files changed

+97
-420
lines changed

2 files changed

+97
-420
lines changed

schemas/v3.0/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,17 @@ Such data would become invalid:
2929
patternProperties:
3030
'^(get|put|post|delete|options|head|patch|trace)$': $ref: '#/definitions/Operation'
3131
```
32+
33+
## Define Parameter as a filtered superset
34+
35+
In order to avoid massive duplication all possible properties can be defined in a superset.
36+
Custom rules of exclusiveness can be further defined as a list of traits in `allOf`.
37+
38+
For example such structure does not allow having `example` and `examples` in same object:
39+
```yaml
40+
not:
41+
required:
42+
- example
43+
- examples
44+
```
45+

0 commit comments

Comments
 (0)