fix: ExampleGenerator correctly generates allOf composed schemas (#17499)

* fix: ExampleGenerator correctly generates allOf composed schemas

Changes the previous behavior of generating `null` examples for allOf composed schemas.

Fixes #17497

* fix: ExampleGenerator correctly generates anyOf and oneOf composed schemas

Changes the previous behavior of generating `null` examples for anyOf and oneOf composed schemas.

To generate a oneOf/anyOf example, we generate the example using the first valid schema available. In case of a $ref, we use the first valid reference.

Fixes #17497
This commit is contained in:
Alexis Couvreur
2024-01-09 22:04:11 -05:00
committed by GitHub
parent 8bab0ceb53
commit dd5c7e3b9a
30 changed files with 288 additions and 9 deletions

View File

@@ -49,4 +49,7 @@ components:
\ characters. The sanitization rules should make it possible to generate a\
\ language-specific classname with allowed characters in that programming\
\ language."
example:
prop2: prop2
objectType: objectType