APIRequestBody.schema constructor
APIRequestBody.schema(
- APISchemaObject schema, {
- Iterable<
String> contentTypes = const ["application/json"], - String? description,
- bool isRequired = false,
Implementation
APIRequestBody.schema(APISchemaObject schema,
{Iterable<String> contentTypes: const ["application/json"],
this.description,
bool isRequired = false}) {
this.isRequired = isRequired;
this.content =
contentTypes.fold<Map<String, APIMediaType?>>({}, (prev, elem) {
prev[elem] = APIMediaType(schema: schema);
return prev;
});
}