RefSpec class final

Specification for a reference to another type.

Used to avoid duplication when the same type appears multiple times in a schema.

Inheritance

Constructors

RefSpec({required String typeName, bool nullable = false, String? description, List<Object>? examples, bool isDeprecated = false})
Creates a new RefSpec.
const

Properties

description → String?
Optional description of this type.
finalinherited
examples → List<Object>?
Example values for documentation.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
isDeprecated → bool
Whether this type is deprecated.
finalinherited
nullable → bool
Whether this type accepts null values.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
typeName → String
The name of the referenced type.
final

Methods

asNullable() → RefSpec
Creates a copy of this spec with nullable set to true.
override
copyWith({String? typeName, bool? nullable, String? description, List<Object>? examples, bool? isDeprecated}) → RefSpec
Creates a copy with the given modifications.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
withDescription(String description) → RefSpec
Creates a copy of this spec with the given description.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited