Skip to content

Latest commit

 

History

History
300 lines (172 loc) · 5.39 KB

SchemaGrammarConverter.md

File metadata and controls

300 lines (172 loc) · 5.39 KB

llama.rn / SchemaGrammarConverter

Class: SchemaGrammarConverter

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new SchemaGrammarConverter(options)

Parameters

Name Type
options Object
options.allow_fetch? boolean
options.dotall? boolean
options.prop_order? SchemaGrammarConverterPropOrder

Defined in

grammar.ts:213

Properties

_allowFetch

Private _allowFetch: boolean

Defined in

grammar.ts:203


_dotall

Private _dotall: boolean

Defined in

grammar.ts:205


_propOrder

Private _propOrder: SchemaGrammarConverterPropOrder

Defined in

grammar.ts:201


_refs

Private _refs: Object

Index signature

▪ [key: string]: any

Defined in

grammar.ts:209


_refsBeingResolved

Private _refsBeingResolved: Set<string>

Defined in

grammar.ts:211


_rules

Private _rules: Object

Index signature

▪ [key: string]: string

Defined in

grammar.ts:207

Methods

_addPrimitive

_addPrimitive(name, rule): string

Parameters

Name Type
name string
rule undefined | SchemaGrammarConverterBuiltinRule

Returns

string

Defined in

grammar.ts:695


_addRule

_addRule(name, rule): string

Parameters

Name Type
name string
rule string

Returns

string

Defined in

grammar.ts:226


_buildObjectRule

_buildObjectRule(properties, required, name, additionalProperties): string

Parameters

Name Type
properties any[]
required Set<string>
name string
additionalProperties any

Returns

string

Defined in

grammar.ts:712


_generateUnionRule

_generateUnionRule(name, altSchemas): string

Parameters

Name Type
name string
altSchemas any[]

Returns

string

Defined in

grammar.ts:314


_resolveRef

_resolveRef(ref): string

Parameters

Name Type
ref string

Returns

string

Defined in

grammar.ts:520


_visitPattern

_visitPattern(pattern, name): string

Parameters

Name Type
pattern string
name string

Returns

string

Defined in

grammar.ts:325


formatGrammar

formatGrammar(): string

Returns

string

Defined in

grammar.ts:815


resolveRefs

resolveRefs(schema, url): Promise<any>

Parameters

Name Type
schema any
url string

Returns

Promise<any>

Defined in

grammar.ts:249


visit

visit(schema, name): string

Parameters

Name Type
schema any
name string

Returns

string

Defined in

grammar.ts:531