File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -367,6 +367,51 @@ paths:
367367 otherOuterProp :
368368 type : string
369369
370+ /allof-parent-required :
371+ get :
372+ tags :
373+ - allOf
374+ summary : allOf inherits parent required
375+ description : |
376+ Parent object marks the "pet" property as required while its schema is composed via allOf.
377+
378+ Schema:
379+ ```yaml
380+ type: object
381+ properties:
382+ pet:
383+ allOf:
384+ - type: object
385+ properties:
386+ name:
387+ type: string
388+ - type: object
389+ properties:
390+ age:
391+ type: integer
392+ required: [pet]
393+ ```
394+ responses :
395+ " 200 " :
396+ description : Successful response
397+ content :
398+ application/json :
399+ schema :
400+ type : object
401+ properties :
402+ pet :
403+ allOf :
404+ - type : object
405+ properties :
406+ name :
407+ type : string
408+ - type : object
409+ properties :
410+ age :
411+ type : integer
412+ required :
413+ - pet
414+
370415components :
371416 schemas :
372417 # Your existing schemas are integrated here.
You can’t perform that action at this time.
0 commit comments