Options
All
  • Public
  • Public/Protected
  • All
Menu

Class which holds the logic for generating raml spec.

export
class

SpecGenerator

Hierarchy

  • SpecGenerator

Index

Methods

addCreateSpec

  • addCreateSpec(initialIndentation: string, entity: Table): string
  • Generates the create spec

    Parameters

    • initialIndentation: string

      holds the initial indentation

    • entity: Table

      holds the entity definition

    Returns string

    • returns the formatted create spec

addDataTypes

  • addDataTypes(schema: Schema): string
  • Adds the data types based on schema

    Parameters

    • schema: Schema

      entire collection of tables

    Returns string

    returns the formatted data types

addDeleteSpec

  • addDeleteSpec(initialIndentation: string, entity: Table): string
  • Generates the delete spec

    Parameters

    • initialIndentation: string

      holds the initial indentation

    • entity: Table

      holds the entity definition

    Returns string

    • returns the formatted delete spec

addGetAllSpec

  • addGetAllSpec(initialIndentation: string, entity: Table): string
  • Generates the get all spec

    Parameters

    • initialIndentation: string

      holds the initial indentation

    • entity: Table

      holds the entity definition

    Returns string

    • returns the formatted get all spec

addGetOneSpec

  • addGetOneSpec(initialIndentation: string, entity: Table): string
  • Generates the get one spec

    Parameters

    • initialIndentation: string

      holds the initial indentation

    • entity: Table

      holds the entity definition

    Returns string

    • returns the formatted get one spec

addHeaderContent

addSpecForEntity

  • addSpecForEntity(entity: Table): string
  • Generates the get all spec

    Parameters

    • entity: Table

      holds the entity definition

    Returns string

    • returns the formatted spec for the entity

addUpdateSpec

  • addUpdateSpec(initialIndentation: string, entity: Table): string
  • Generates the update spec

    Parameters

    • initialIndentation: string

      holds the initial indentation

    • entity: Table

      holds the entity definition

    Returns string

    • returns the formatted update spec

generateContent

  • Generates the api spec for the whole schema.

    Parameters

    • schema: Schema

      entire collection of tables

    • options: RAMLApplicationInfo

      holds the title of the app, the version and the base url

    Returns string

    • returns the api spec

Generated using TypeDoc