@tsed/schema
Version:
JsonSchema module for Ts.ED Framework
22 lines (21 loc) • 424 B
JavaScript
import { JsonEntityFn } from "./jsonEntityFn.js";
/**
* See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27
*
* ::: warning
* AnyOf isn't supported by OS2
* :::
*
* @decorator
* @validation
* @swagger
* @schema
* @classDecorator
* @input
* @param anyOf
*/
export function AnyOf(...anyOf) {
return JsonEntityFn((entity) => {
entity.itemSchema.anyOf(anyOf);
});
}