SpecVerseFundamentals

Example 01-01: Basic model definition with attributes

Version: 1.0.0 Generated: 2026-03-23T18:22:33.405Z

Table of Contents

Models

Product

Simple product with basic attributes

Attributes

NameTypeRequiredUniqueDescription idUUID✓ nameString✓ summaryString priceMoney✓ inStockBooleanDefault: true categoryString✓ contactEmailEmail

Behaviors

attachProfile

Attach a profile to this model instance

Parameters:

  • profileName: String (required)
  • Returns: Boolean

    Preconditions:

  • Profile exists and is compatible with this model
  • Postconditions:

  • Profile is attached
  • Profile attributes are available
  • detachProfile

    Detach a profile from this model instance

    Parameters:

  • profileName: String (required)
  • Returns: Boolean

    Preconditions:

  • Profile is currently attached
  • Postconditions:

  • Profile is detached
  • Profile attributes are no longer available
  • hasProfile

    Check if a profile is attached to this model instance

    Parameters:

  • profileName: String (required)
  • Returns: Boolean

    ---