Skip to content

Latest commit

 

History

History
62 lines (45 loc) · 2.56 KB

specifications.md

File metadata and controls

62 lines (45 loc) · 2.56 KB

Specification for YAML Definitions

Introduction

This document outlines the template for creating definitions in YAML format. Definitions are used to describe the structure and properties of various entities in a dataset or schema.

YAML Structure

YAML (YAML Ain't Markup Language) is a human-readable data serialization format. It uses indentation to represent the hierarchical structure of data. Definitions in YAML typically consist of a combination of keys and values, organized into a structured format.

Template for Definitions

Below is the template for creating definitions in YAML:

EntityName:
  description: >
    Description of the entity.
  properties:
    Property1:
      description: >
        Description of the property.
      type: DataType
      format: DataFormat (if applicable)
      pattern: RegularExpression (if applicable)
      additionalProperties: AdditionalProperties (if applicable)
      ...
    Property2:
      description: >
        Description of the property.
      type: DataType
      format: DataFormat (if applicable)
      pattern: RegularExpression (if applicable)
      additionalProperties: AdditionalProperties (if applicable)
      ...
    ...
  type: ObjectType
  version: VersionNumber

Explanation

In the template provided:

  • EntityName: Represents the name of the entity being defined. For example, if defining a "Person" entity, you would replace "EntityName" with "Person".

  • description: Describes the entity being defined, providing information about its purpose and usage. This should be a concise but informative description.

  • properties: Contains definitions for the properties of the entity. Each property is defined under this section.

  • Property1, Property2, ...: Represents the names of properties associated with the entity. For example, for a "Person" entity, properties could include "name", "age", and "email".

  • description: Provides a description for each property, explaining its purpose and usage.

  • type: Specifies the data type of the property, such as string, number, object, or array.

  • format: Indicates the format of the data, if applicable. For example, for an email property, the format could be specified as "email".

  • pattern: Allows you to specify a regular expression pattern for the property, if needed.

  • additionalProperties: This property allows you to specify additional properties for the entity, if applicable.

  • type: Specifies the type of the entity, such as object.

  • version: Specifies the version number of the definition.