Schema.object constructor

const Schema.object({
  1. String? title,
  2. String? description,
  3. @JsonKey(name: 'default') dynamic defaultValue,
  4. @JsonKey(name: '\$ref') @_SchemaRefConverter() String? ref,
  5. @_SchemaListConverter() List<Schema>? allOf,
  6. @_SchemaListConverter() List<Schema>? oneOf,
  7. @_SchemaListConverter() List<Schema>? anyOf,
  8. List<String>? required,
  9. Discriminator? discriminator,
  10. ExternalDocs? externalDocs,
  11. Map<String, Schema>? properties,
  12. bool? nullable,
  13. Xml? xml,
})

Implementation

const factory Schema.object({
  /// A summary title of the schema
  String? title,

  /// A short description of the schema
  String? description,

  /// The default value code to place into `@Default()`
  @JsonKey(name: 'default') dynamic defaultValue,

  /// Reference to a schema definition
  @JsonKey(name: '\$ref') @_SchemaRefConverter() String? ref,

  /// The allOf definition
  @_SchemaListConverter() List<Schema>? allOf,

  /// The allOf definition
  @_SchemaListConverter() List<Schema>? oneOf,

  /// The anyOf definition
  @_SchemaListConverter() List<Schema>? anyOf,

  /// The required properties of the schema
  List<String>? required,

  /// Adds support for polymorphism.
  /// The discriminator is an object name that is used to differentiate between
  /// other schemas which may satisfy the payload description
  Discriminator? discriminator,

  /// Additional external documentation for this schema.
  ExternalDocs? externalDocs,

  /// The properties of the schema
  Map<String, Schema>? properties,

  /// Define if this scheme is nullable
  bool? nullable,

  /// Any extra properties to add to this schema
  // Schema? additionalProperties,

  /// Adds additional metadata to describe the XML representation of this property.
  Xml? xml,
}) = SchemaObject;