copyWith method

ObjectSpec copyWith({
  1. String? name,
  2. Map<String, PropertySpec>? properties,
  3. List<String>? required,
  4. bool? additionalProperties,
  5. String? title,
  6. String? description,
  7. bool? nullable,
  8. List<Object>? examples,
  9. bool? isDeprecated,
})

Creates a copy with the given modifications.

Implementation

ObjectSpec copyWith({
  String? name,
  Map<String, PropertySpec>? properties,
  List<String>? required,
  bool? additionalProperties,
  String? title,
  String? description,
  bool? nullable,
  List<Object>? examples,
  bool? isDeprecated,
}) =>
    ObjectSpec(
      name: name ?? this.name,
      properties: properties ?? this.properties,
      required: required ?? this.required,
      additionalProperties: additionalProperties ?? this.additionalProperties,
      title: title ?? this.title,
      description: description ?? this.description,
      nullable: nullable ?? this.nullable,
      examples: examples ?? this.examples,
      isDeprecated: isDeprecated ?? this.isDeprecated,
    );