Options
All
  • Public
  • Public/Protected
  • All
Menu

Class to represent the a service Schema.

Hierarchy

  • Schema

Index

Constructors

constructor

  • new Schema(identifier: string, label: string, description: string | null, pluralName: string, _fields: {}): Schema
  • Constructor for a Schema.

    Parameters

    • identifier: string

      Schema identifier (see docs for format).

    • label: string

      Label of the schema.

    • description: string | null

      Description of the schema.

    • pluralName: string

      Plural name of the schema.

    • _fields: {}

      Object of the fields.

    Returns Schema

Properties

_fields

_fields: {}

Object of the fields.

Type declaration

description

description: string | null

Description of the schema.

Private id

id: Field

identifier

identifier: string

Schema identifier (see docs for format).

label

label: string

Label of the schema.

pluralName

pluralName: string

Plural name of the schema.

Accessors

fields

  • get fields(): {}
  • Get all fields including the identifier.

    function

    fields

    memberof

    Schema

    Returns {}

    Object of all fields.

pascalCase

  • get pascalCase(): string
  • Returns the name of the schema in PascaleCase.

    function

    pascalCase

    memberof

    Schema

    Returns string

    Formatted schema name.

Methods

serialize

Static deserialize

  • Deserialize an object into an Schema instance.

    function

    deserialize

    static
    memberof

    Schema

    Parameters

    • data: SchemaType

      Javascript object of the Schema.

    Returns Schema

    Schema instance.

Generated using TypeDoc