openapi-graph-types
Advanced tools
Comparing version 0.0.1-alpha.2.1.1 to 0.0.1-alpha.2.1.2
@@ -1,6 +0,31 @@ | ||
import { NodeInterface } from '.'; | ||
import { NodeInterface, ArraySchemaNodeInterface, NonArraySchemaNodeInterface } from '.'; | ||
export declare type EdgeConstructor = new () => EdgeInterface; | ||
export interface EdgeInterface { | ||
parent: NodeInterface | undefined; | ||
child: NodeInterface | undefined; | ||
child: ArraySchemaNodeInterface | NonArraySchemaNodeInterface | undefined; | ||
} | ||
export interface Edges { | ||
ref: EdgesRefDict; | ||
} | ||
export interface EdgesRefDict { | ||
schemaRef: { | ||
[key: string]: RefEdgeInterface; | ||
}; | ||
} | ||
export declare type RefEdgeConstructor = new (absolutePath: string, ref: string) => RefEdgeInterface; | ||
export interface RefEdgeInterface extends EdgeInterface { | ||
ref: string; | ||
absolutePath: string; | ||
tokenName: string; | ||
type: RefType; | ||
getType(ref: string): RefType | undefined; | ||
getTokenName(ref: string): string; | ||
resolveAbsolutePath(absolutePath: string, ref: string): string; | ||
getFullPath(): string; | ||
} | ||
export declare enum RefType { | ||
Local = "local", | ||
Remote = "remote", | ||
URL = "url" | ||
} | ||
export declare type RefTo = 'schema'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.RefType = void 0; | ||
// Type of a reference: https://swagger.io/docs/specification/using-ref/ | ||
var RefType; | ||
(function (RefType) { | ||
RefType["Local"] = "local"; | ||
RefType["Remote"] = "remote"; | ||
RefType["URL"] = "url"; | ||
})(RefType = exports.RefType || (exports.RefType = {})); |
@@ -1,6 +0,3 @@ | ||
export { EdgeConstructor, EdgeInterface } from './Edge'; | ||
export { Edges } from './Edges'; | ||
export { EdgesRefDict } from './EdgesRefDict'; | ||
export { NodeConstructor, NodeInterface } from './Node'; | ||
export { Nodes } from './Nodes'; | ||
export * from './Edge'; | ||
export * from './Node'; | ||
export { OpenAPIContent } from './OpenAPIContent'; | ||
@@ -10,4 +7,1 @@ export { OpenAPIGraphConstructor, OpenAPIGraphInterface } from './OpenAPIGraph'; | ||
export { OpenAPIGraphsBuilderConstructor, OpenAPIGraphsBuilderInterface } from './OpenAPIGraphsBuilder'; | ||
export { RefEdgeConstructor, RefEdgeInterface } from './RefEdge'; | ||
export { RefTo, RefType } from './RefType'; | ||
export { SchemaNodeConstructor, SchemaNodeInterface } from './SchemaNode'; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.RefType = void 0; | ||
var RefType_1 = require("./RefType"); | ||
Object.defineProperty(exports, "RefType", { enumerable: true, get: function () { return RefType_1.RefType; } }); | ||
__exportStar(require("./Edge"), exports); | ||
__exportStar(require("./Node"), exports); |
@@ -0,1 +1,9 @@ | ||
import { RefEdgeInterface } from "."; | ||
export interface Nodes { | ||
schemas: SchemaNodesDict; | ||
} | ||
export interface SchemaNodesDict { | ||
nonArraySchema: NonArraySchemaNodeInterface[]; | ||
arraySchema: ArraySchemaNodeInterface[]; | ||
} | ||
export declare type NodeConstructor = new (name: string) => NodeInterface; | ||
@@ -5,1 +13,44 @@ export interface NodeInterface { | ||
} | ||
export declare type NonArraySchemaSchemaNodeConstructor = new (name: string) => NonArraySchemaNodeInterface; | ||
export interface SchemaNodeInterface extends NodeInterface { | ||
} | ||
export interface NonArraySchemaNodeContent { | ||
type?: 'boolean' | 'object' | 'number' | 'string' | 'integer'; | ||
title?: string; | ||
description?: string; | ||
format?: string; | ||
default?: any; | ||
multipleOf?: number; | ||
maximum?: number; | ||
exclusiveMaximum?: boolean; | ||
minimum?: number; | ||
exclusiveMinimum?: boolean; | ||
maxLength?: number; | ||
minLength?: number; | ||
pattern?: string; | ||
additionalProperties?: boolean | RefEdgeInterface; | ||
maxItems?: number; | ||
minItems?: number; | ||
uniqueItems?: boolean; | ||
maxProperties?: number; | ||
minProperties?: number; | ||
required?: string[]; | ||
enum?: any[]; | ||
nullable?: boolean; | ||
readOnly?: boolean; | ||
writeOnly?: boolean; | ||
example?: any; | ||
deprecated?: boolean; | ||
properties?: { | ||
[name: string]: RefEdgeInterface; | ||
}; | ||
} | ||
export interface NonArraySchemaNodeInterface extends SchemaNodeInterface { | ||
content: NonArraySchemaNodeContent; | ||
} | ||
export declare type ArraySchemaSchemaNodeConstructor = new (name: string) => ArraySchemaNodeInterface; | ||
export interface SchemaNodeInterface extends NodeInterface { | ||
} | ||
export interface ArraySchemaNodeInterface extends SchemaNodeInterface { | ||
items: RefEdgeInterface; | ||
} |
{ | ||
"name": "openapi-graph-types", | ||
"version": "0.0.1-alpha.2.1.1", | ||
"version": "0.0.1-alpha.2.1.2", | ||
"description": "The types of the openapi-graph library.", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
9582
214