Blueprints

Metadata

The metadata in a blueprint carries vital information that identifies and describes the blueprint. Let's delve into each component:

  • id: Its unique and absolute identifier within Rely.io. This unique identifier is crucial for ensuring the distinctness of each blueprint, preventing conflicts, and allowing for precise referencing in various operations and integrations.

  • title: The display name of the blueprint. This is used to represent the blueprint in interfaces making it more accessible and understandable.

  • icon: An icon descriptor for visual representation.

  • description (optional): A brief description of what the blueprint represents.

Properties

The Properties of a blueprint define the attributes and the respective data types that entities created from this blueprint have.

This is crucial for dictating what information entities can hold. Properties are defined within a blueprint's schemaProperties section.

Let's break down the elements:

  • id: The unique key used to represent the property.

  • title: The human-readable name of the property.

  • type: Specifies the data type of the property.

    • Available values are:

      1. string

      2. number

      3. boolean

      4. object

    • Any unknown data-type defaults to an "object"'s display and edit flow.

  • format(optional): Enables specific display and editing workflows for depending on the property's data type.

    1. For type string available values are:

      • date-time

  • description(optional): A brief description of what the property represents.

Relations

The Relations of a blueprint dictate the interaction mechanisms available between their generated entities and other entities, serving as a key tool for identifying and structuring interdependencies and relationships within any software environment.

Let's break down the elements:

  • id: The unique key used to represent the property.

  • title: The human-readable name of the relation.

  • value: This field contains a blueprint id, specifying the relation to another blueprint.

  • array: A boolean value that defines whether this relation supports either multi-selection of entities or a single-selection of entities. Defaults to false.

  • description(optional): A brief description of what the property represents.

In this example bellow, the blueprint specifies that entities created from it can depend on other services and can be part of a single system.

"relations": {
  "dependsOn": {
    "title": "Depends On",
    "value": "rely.io/v1alpha/service",
    "array": true,
    "description": "..."
  },
  "partOfSystem": {
    "title": "Part of System",
    "value": "rely.io/v1alpha/system",
    "array": false,
    "description": "..."
  }
}

Reference Properties

Reference property allows you to map data from related entities to your entity. When two blueprints have a relation between them, a new set of properties becomes available to entities in the "source" blueprint.

Code

Blueprints can be represented in its entirety using a JSON format. Below is an example of a blueprint code definition:

{
  "id": "my-blueprint",
  "title": "My first Blueprint",
  "description": "...",
  "icon": null,
  "schemaProperties": {
    "type": "object",
    "properties": {
      "my-property-id": {
        "title": "My first property",
        "type": "string",
        "description": "..."
      }
    }
  },
  "relations": {
      "my-relation-id": {
        "title": "My first relation",
        "value": "an-existing-blueprint-id",
        "array": false,
        "description": "..."
    }
  }
}

Last updated