copyWith method
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,
);