Module org.eclipse.microprofile.openapi
Package org.eclipse.microprofile.openapi.annotations.media

# Annotation Type DependentSchema

public @interface DependentSchema
A property name and an associated schema.

Used with `Schema.dependentSchemas()`, if an instance has a property named `name()`, then it must validate against `schema()`.

Since:
  4.0
See Also:
  - `Schema.dependentSchemas()`

## Required Element Summary

Required Elements
Modifier and Type
Required Element
Description
`String`
`name`
A property name
`Class<?>`
`schema`
The schema that an instance must validate against if it has a property named `name()`.

## Element Details

### name

String name
A property name

Returns:
  property name

### schema

Class<?> schema
The schema that an instance must validate against if it has a property named `name()`.

Returns:
  a class used to generate a schema which is used to validate objects with properties named `name()`