Forum Discussion
1 Reply
Sort By
- HKosovaSmartBear Alumni (Retired)
If you mean that the object must have at least N properties, use minProperties:
testDto: type: object additionalProperties: type: string minProperties: 1 # <---------- example: name: Note Threads: '5'
The "required" list is only used to require specific named properties. For example, the following means that the object must have properties named "name" and "Threads" with any values and may have arbitrary extra properties.
testDto: type: object required: - name - Threads additionalProperties: type: string
This is equivalent to:
testDto: type: object required: - name - Threads properties: name: {} # any type Threads: {} # any type additionalProperties: type: string
Related Content
- 2 years ago
- 2 years ago
Recent Discussions
- 16 days ago
- 19 days ago