@swagger-api/apidom-ns-json-schema-draft-4
Advanced tools
Comparing version 0.99.1 to 0.99.2
@@ -6,2 +6,6 @@ # Change Log | ||
## [0.99.2](https://github.com/swagger-api/apidom/compare/v0.99.1...v0.99.2) (2024-04-30) | ||
**Note:** Version bump only for package @swagger-api/apidom-ns-json-schema-draft-4 | ||
## [0.99.1](https://github.com/swagger-api/apidom/compare/v0.99.0...v0.99.1) (2024-04-05) | ||
@@ -8,0 +12,0 @@ |
{ | ||
"name": "@swagger-api/apidom-ns-json-schema-draft-4", | ||
"version": "0.99.1", | ||
"version": "0.99.2", | ||
"description": "JSON Schema Draft 4 namespace for ApiDOM.", | ||
@@ -45,8 +45,8 @@ "publishConfig": { | ||
"@babel/runtime-corejs3": "^7.20.7", | ||
"@swagger-api/apidom-ast": "^0.99.1", | ||
"@swagger-api/apidom-core": "^0.99.1", | ||
"@swagger-api/apidom-ast": "^0.99.2", | ||
"@swagger-api/apidom-core": "^0.99.2", | ||
"@types/ramda": "~0.29.6", | ||
"ramda": "~0.29.1", | ||
"ramda-adjunct": "^4.1.1", | ||
"stampit": "^4.3.2" | ||
"ramda": "~0.30.0", | ||
"ramda-adjunct": "^5.0.0", | ||
"ts-mixer": "^6.0.4" | ||
}, | ||
@@ -63,3 +63,3 @@ "files": [ | ||
], | ||
"gitHead": "ad1f5d3aff83a179309673da13801a882cd3df6a" | ||
"gitHead": "6080f63b5e18283c10dcebc5ec6087552a3e1d4f" | ||
} |
@@ -6,4 +6,3 @@ /// <reference types="@swagger-api/apidom-core/types/minim" /> | ||
import * as minim from 'minim'; | ||
import * as stampit from 'stampit'; | ||
import stampit__default from 'stampit'; | ||
import * as ts_mixer_dist_types_types from 'ts-mixer/dist/types/types'; | ||
@@ -28,3 +27,3 @@ type Format = 'generic' | 'json' | 'yaml'; | ||
declare const refract: <T extends Element>(value: any, { specPath, plugins, specificationObj, }?: { | ||
declare const refract: <T extends Element>(value: unknown, { specPath, plugins, specificationObj, }?: { | ||
specPath?: string[] | undefined; | ||
@@ -34,74 +33,132 @@ plugins?: never[] | undefined; | ||
visitors: { | ||
value: stampit.default.Stamp<any>; | ||
JSONSchemaOrJSONReferenceVisitor: stampit.default.Stamp<any>; | ||
value: typeof FallbackVisitor; | ||
JSONSchemaOrJSONReferenceVisitor: typeof SchemaOrReferenceVisitor; | ||
document: { | ||
objects: { | ||
JSONSchema: { | ||
$visitor: stampit.default.Stamp<any>; | ||
$visitor: typeof JSONSchemaVisitor; | ||
fixedFields: { | ||
id: stampit.default.Stamp<any>; | ||
$schema: stampit.default.Stamp<any>; | ||
multipleOf: stampit.default.Stamp<any>; | ||
maximum: stampit.default.Stamp<any>; | ||
exclusiveMaximum: stampit.default.Stamp<any>; | ||
minimum: stampit.default.Stamp<any>; | ||
exclusiveMinimum: stampit.default.Stamp<any>; | ||
maxLength: stampit.default.Stamp<any>; | ||
minLength: stampit.default.Stamp<any>; | ||
pattern: stampit.default.Stamp<any>; | ||
additionalItems: stampit.default.Stamp<any>; | ||
items: stampit.default.Stamp<any>; | ||
maxItems: stampit.default.Stamp<any>; | ||
minItems: stampit.default.Stamp<any>; | ||
uniqueItems: stampit.default.Stamp<any>; | ||
maxProperties: stampit.default.Stamp<any>; | ||
minProperties: stampit.default.Stamp<any>; | ||
required: stampit.default.Stamp<any>; | ||
properties: stampit.default.Stamp<any>; | ||
additionalProperties: stampit.default.Stamp<any>; | ||
patternProperties: stampit.default.Stamp<any>; | ||
dependencies: stampit.default.Stamp<any>; | ||
enum: stampit.default.Stamp<any>; | ||
type: stampit.default.Stamp<any>; | ||
allOf: stampit.default.Stamp<any>; | ||
anyOf: stampit.default.Stamp<any>; | ||
oneOf: stampit.default.Stamp<any>; | ||
not: stampit.default.Stamp<any>; | ||
definitions: stampit.default.Stamp<any>; | ||
title: stampit.default.Stamp<any>; | ||
description: stampit.default.Stamp<any>; | ||
default: stampit.default.Stamp<any>; | ||
format: stampit.default.Stamp<any>; | ||
base: stampit.default.Stamp<any>; | ||
links: stampit.default.Stamp<any>; | ||
id: { | ||
$ref: string; | ||
}; | ||
$schema: { | ||
$ref: string; | ||
}; | ||
multipleOf: { | ||
$ref: string; | ||
}; | ||
maximum: { | ||
$ref: string; | ||
}; | ||
exclusiveMaximum: { | ||
$ref: string; | ||
}; | ||
minimum: { | ||
$ref: string; | ||
}; | ||
exclusiveMinimum: { | ||
$ref: string; | ||
}; | ||
maxLength: { | ||
$ref: string; | ||
}; | ||
minLength: { | ||
$ref: string; | ||
}; | ||
pattern: { | ||
$ref: string; | ||
}; | ||
additionalItems: typeof SchemaOrReferenceVisitor; | ||
items: typeof ItemsVisitor; | ||
maxItems: { | ||
$ref: string; | ||
}; | ||
minItems: { | ||
$ref: string; | ||
}; | ||
uniqueItems: { | ||
$ref: string; | ||
}; | ||
maxProperties: { | ||
$ref: string; | ||
}; | ||
minProperties: { | ||
$ref: string; | ||
}; | ||
required: typeof RequiredVisitor; | ||
properties: typeof PropertiesVisitor; | ||
additionalProperties: typeof SchemaOrReferenceVisitor; | ||
patternProperties: typeof PatternPropertiesVisitor; | ||
dependencies: typeof DependenciesVisitor; | ||
enum: typeof EnumVisitor; | ||
type: typeof TypeVisitor; | ||
allOf: typeof AllOfVisitor; | ||
anyOf: typeof AnyOfVisitor; | ||
oneOf: typeof OneOfVisitor; | ||
not: typeof SchemaOrReferenceVisitor; | ||
definitions: typeof DefinitionsVisitor; | ||
title: { | ||
$ref: string; | ||
}; | ||
description: { | ||
$ref: string; | ||
}; | ||
default: { | ||
$ref: string; | ||
}; | ||
format: { | ||
$ref: string; | ||
}; | ||
base: { | ||
$ref: string; | ||
}; | ||
links: typeof LinksVisitor; | ||
media: { | ||
$ref: string; | ||
}; | ||
readOnly: stampit.default.Stamp<any>; | ||
readOnly: { | ||
$ref: string; | ||
}; | ||
}; | ||
}; | ||
JSONReference: { | ||
$visitor: stampit.default.Stamp<any>; | ||
$visitor: typeof JSONReferenceVisitor; | ||
fixedFields: { | ||
$ref: stampit.default.Stamp<any>; | ||
$ref: typeof $RefVisitor; | ||
}; | ||
}; | ||
Media: { | ||
$visitor: stampit.default.Stamp<any>; | ||
$visitor: typeof MediaVisitor; | ||
fixedFields: { | ||
binaryEncoding: stampit.default.Stamp<any>; | ||
type: stampit.default.Stamp<any>; | ||
binaryEncoding: { | ||
$ref: string; | ||
}; | ||
type: { | ||
$ref: string; | ||
}; | ||
}; | ||
}; | ||
LinkDescription: { | ||
$visitor: stampit.default.Stamp<any>; | ||
$visitor: typeof LinkDescriptionVisitor; | ||
fixedFields: { | ||
href: stampit.default.Stamp<any>; | ||
rel: stampit.default.Stamp<any>; | ||
title: stampit.default.Stamp<any>; | ||
targetSchema: stampit.default.Stamp<any>; | ||
mediaType: stampit.default.Stamp<any>; | ||
method: stampit.default.Stamp<any>; | ||
encType: stampit.default.Stamp<any>; | ||
schema: stampit.default.Stamp<any>; | ||
href: { | ||
$ref: string; | ||
}; | ||
rel: { | ||
$ref: string; | ||
}; | ||
title: { | ||
$ref: string; | ||
}; | ||
targetSchema: typeof SchemaOrReferenceVisitor; | ||
mediaType: { | ||
$ref: string; | ||
}; | ||
method: { | ||
$ref: string; | ||
}; | ||
encType: { | ||
$ref: string; | ||
}; | ||
schema: typeof SchemaOrReferenceVisitor; | ||
}; | ||
@@ -114,93 +171,46 @@ }; | ||
}) => T; | ||
declare const createRefractor: (specPath: string[]) => (value: any, options?: {}) => Element; | ||
declare const createRefractor: (specPath: string[]) => (value: unknown, options?: {}) => Element; | ||
interface VisitorOptions { | ||
} | ||
declare class Visitor { | ||
element: Element; | ||
constructor(options: VisitorOptions); | ||
copyMetaAndAttributes(from: Element, to: Element): void; | ||
} | ||
declare class FallbackVisitor extends Visitor { | ||
enter(element: Element): {}; | ||
} | ||
/** | ||
* Specification object allows us to have complete control over visitors | ||
* when traversing the ApiDOM. | ||
* Specification also allows us to create amended refractors from | ||
* existing ones by manipulating it. | ||
* | ||
* Note: Specification object allows to use absolute internal JSON pointers. | ||
* This is a base Type for every visitor that does | ||
* internal look-ups to retrieve other child visitors. | ||
*/ | ||
declare const specification: { | ||
visitors: { | ||
value: stampit.default.Stamp<any>; | ||
JSONSchemaOrJSONReferenceVisitor: stampit.default.Stamp<any>; | ||
document: { | ||
objects: { | ||
JSONSchema: { | ||
$visitor: stampit.default.Stamp<any>; | ||
fixedFields: { | ||
id: stampit.default.Stamp<any>; | ||
$schema: stampit.default.Stamp<any>; | ||
multipleOf: stampit.default.Stamp<any>; | ||
maximum: stampit.default.Stamp<any>; | ||
exclusiveMaximum: stampit.default.Stamp<any>; | ||
minimum: stampit.default.Stamp<any>; | ||
exclusiveMinimum: stampit.default.Stamp<any>; | ||
maxLength: stampit.default.Stamp<any>; | ||
minLength: stampit.default.Stamp<any>; | ||
pattern: stampit.default.Stamp<any>; | ||
additionalItems: stampit.default.Stamp<any>; | ||
items: stampit.default.Stamp<any>; | ||
maxItems: stampit.default.Stamp<any>; | ||
minItems: stampit.default.Stamp<any>; | ||
uniqueItems: stampit.default.Stamp<any>; | ||
maxProperties: stampit.default.Stamp<any>; | ||
minProperties: stampit.default.Stamp<any>; | ||
required: stampit.default.Stamp<any>; | ||
properties: stampit.default.Stamp<any>; | ||
additionalProperties: stampit.default.Stamp<any>; | ||
patternProperties: stampit.default.Stamp<any>; | ||
dependencies: stampit.default.Stamp<any>; | ||
enum: stampit.default.Stamp<any>; | ||
type: stampit.default.Stamp<any>; | ||
allOf: stampit.default.Stamp<any>; | ||
anyOf: stampit.default.Stamp<any>; | ||
oneOf: stampit.default.Stamp<any>; | ||
not: stampit.default.Stamp<any>; | ||
definitions: stampit.default.Stamp<any>; | ||
title: stampit.default.Stamp<any>; | ||
description: stampit.default.Stamp<any>; | ||
default: stampit.default.Stamp<any>; | ||
format: stampit.default.Stamp<any>; | ||
base: stampit.default.Stamp<any>; | ||
links: stampit.default.Stamp<any>; | ||
media: { | ||
$ref: string; | ||
}; | ||
readOnly: stampit.default.Stamp<any>; | ||
}; | ||
}; | ||
JSONReference: { | ||
$visitor: stampit.default.Stamp<any>; | ||
fixedFields: { | ||
$ref: stampit.default.Stamp<any>; | ||
}; | ||
}; | ||
Media: { | ||
$visitor: stampit.default.Stamp<any>; | ||
fixedFields: { | ||
binaryEncoding: stampit.default.Stamp<any>; | ||
type: stampit.default.Stamp<any>; | ||
}; | ||
}; | ||
LinkDescription: { | ||
$visitor: stampit.default.Stamp<any>; | ||
fixedFields: { | ||
href: stampit.default.Stamp<any>; | ||
rel: stampit.default.Stamp<any>; | ||
title: stampit.default.Stamp<any>; | ||
targetSchema: stampit.default.Stamp<any>; | ||
mediaType: stampit.default.Stamp<any>; | ||
method: stampit.default.Stamp<any>; | ||
encType: stampit.default.Stamp<any>; | ||
schema: stampit.default.Stamp<any>; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
interface SpecificationVisitorOptions extends VisitorOptions { | ||
readonly specObj: typeof specification; | ||
} | ||
declare class SpecificationVisitor extends Visitor { | ||
protected readonly specObj: typeof specification; | ||
protected readonly passingOptionsNames: string[]; | ||
constructor({ specObj, ...rest }: SpecificationVisitorOptions); | ||
retrievePassingOptions(): string[]; | ||
retrieveFixedFields(specPath: string[]): string[]; | ||
retrieveVisitor(specPath: string[]): unknown; | ||
retrieveVisitorInstance(specPath: string[], options?: {}): Visitor; | ||
toRefractedElement(specPath: string[], element: any, options?: {}): any; | ||
} | ||
type SpecPath<T = string[]> = (element: unknown) => T; | ||
interface FixedFieldsVisitorOptions extends SpecificationVisitorOptions { | ||
readonly specPath: SpecPath; | ||
readonly ignoredFields?: string[]; | ||
} | ||
declare class FixedFieldsVisitor extends SpecificationVisitor { | ||
protected specPath: SpecPath; | ||
protected ignoredFields: string[]; | ||
constructor({ specPath, ignoredFields, ...rest }: FixedFieldsVisitorOptions); | ||
ObjectElement(objectElement: ObjectElement): {}; | ||
} | ||
/** | ||
@@ -349,2 +359,192 @@ * In Draft 4, $ref behaves a little differently. When an object contains a $ref property, | ||
interface JSONSchemaVisitorOptions extends FixedFieldsVisitorOptions, VisitorOptions { | ||
} | ||
declare const JSONSchemaVisitor_base: ts_mixer_dist_types_types.Class<any[], FixedFieldsVisitor & FallbackVisitor, typeof FixedFieldsVisitor & typeof FallbackVisitor>; | ||
declare class JSONSchemaVisitor extends JSONSchemaVisitor_base { | ||
element: JSONSchema; | ||
protected readonly specPath: SpecPath<['document', 'objects', 'JSONSchema']>; | ||
constructor(options: JSONSchemaVisitorOptions); | ||
} | ||
interface ParentSchemaAwareVisitorOptions { | ||
readonly parent: Element; | ||
} | ||
declare class ParentSchemaAwareVisitor { | ||
parent: Element; | ||
constructor({ parent }: ParentSchemaAwareVisitorOptions); | ||
} | ||
interface ItemsVisitorOptions extends SpecificationVisitorOptions, ParentSchemaAwareVisitorOptions, VisitorOptions { | ||
} | ||
declare const ItemsVisitor_base: ts_mixer_dist_types_types.Class<any[], SpecificationVisitor & ParentSchemaAwareVisitor & FallbackVisitor, typeof SpecificationVisitor & typeof ParentSchemaAwareVisitor & typeof FallbackVisitor>; | ||
declare class ItemsVisitor extends ItemsVisitor_base { | ||
element: ArrayElement | ObjectElement; | ||
ObjectElement(objectElement: ObjectElement): {}; | ||
ArrayElement(arrayElement: ArrayElement): {}; | ||
} | ||
declare class RequiredVisitor extends FallbackVisitor { | ||
readonly element: ArrayElement; | ||
ArrayElement(arrayElement: ArrayElement): {}; | ||
} | ||
interface PatternedFieldsVisitorOptions extends SpecificationVisitorOptions { | ||
readonly specPath: SpecPath; | ||
readonly ignoredFields?: string[]; | ||
readonly fieldPatternPredicate?: (...args: unknown[]) => boolean; | ||
} | ||
declare class PatternedFieldsVisitor extends SpecificationVisitor { | ||
protected specPath: SpecPath; | ||
protected ignoredFields: string[]; | ||
protected fieldPatternPredicate: (value: unknown) => boolean; | ||
constructor({ specPath, ignoredFields, fieldPatternPredicate, ...rest }: PatternedFieldsVisitorOptions); | ||
ObjectElement(objectElement: ObjectElement): {}; | ||
} | ||
interface MapVisitorOptions extends PatternedFieldsVisitorOptions { | ||
} | ||
declare class MapVisitor extends PatternedFieldsVisitor { | ||
constructor(options: MapVisitorOptions); | ||
} | ||
interface PropertiesVisitorOptions extends MapVisitorOptions, ParentSchemaAwareVisitorOptions, VisitorOptions { | ||
} | ||
declare const PropertiesVisitor_base: ts_mixer_dist_types_types.Class<any[], MapVisitor & ParentSchemaAwareVisitor & FallbackVisitor, typeof MapVisitor & typeof ParentSchemaAwareVisitor & typeof FallbackVisitor>; | ||
declare class PropertiesVisitor extends PropertiesVisitor_base { | ||
readonly element: ObjectElement; | ||
protected readonly specPath: SpecPath<[ | ||
'document', | ||
'objects', | ||
'JSONReference' | ||
] | ['document', 'objects', 'JSONSchema']>; | ||
constructor(options: PropertiesVisitorOptions); | ||
} | ||
interface PatternPropertiesVisitorOptions extends MapVisitorOptions, ParentSchemaAwareVisitorOptions, VisitorOptions { | ||
} | ||
declare const PatternPropertiesVisitor_base: ts_mixer_dist_types_types.Class<any[], MapVisitor & ParentSchemaAwareVisitor & FallbackVisitor, typeof MapVisitor & typeof ParentSchemaAwareVisitor & typeof FallbackVisitor>; | ||
declare class PatternPropertiesVisitor extends PatternPropertiesVisitor_base { | ||
readonly element: ObjectElement; | ||
protected readonly specPath: SpecPath<[ | ||
'document', | ||
'objects', | ||
'JSONReference' | ||
] | ['document', 'objects', 'JSONSchema']>; | ||
constructor(options: PatternPropertiesVisitorOptions); | ||
} | ||
interface DependenciesVisitorOptions extends MapVisitorOptions, ParentSchemaAwareVisitorOptions, VisitorOptions { | ||
} | ||
declare const DependenciesVisitor_base: ts_mixer_dist_types_types.Class<any[], MapVisitor & ParentSchemaAwareVisitor & FallbackVisitor, typeof MapVisitor & typeof ParentSchemaAwareVisitor & typeof FallbackVisitor>; | ||
declare class DependenciesVisitor extends DependenciesVisitor_base { | ||
readonly element: ObjectElement; | ||
protected readonly specPath: SpecPath<[ | ||
'document', | ||
'objects', | ||
'JSONReference' | ||
] | ['document', 'objects', 'JSONSchema']>; | ||
constructor(options: DependenciesVisitorOptions); | ||
} | ||
declare class EnumVisitor extends FallbackVisitor { | ||
readonly element: ArrayElement; | ||
ArrayElement(arrayElement: ArrayElement): {}; | ||
} | ||
declare class TypeVisitor extends FallbackVisitor { | ||
readonly element: StringElement | ArrayElement; | ||
StringElement(stringElement: StringElement): {}; | ||
ArrayElement(arrayElement: ArrayElement): {}; | ||
} | ||
interface AllOfVisitorOptions extends SpecificationVisitorOptions, ParentSchemaAwareVisitorOptions, VisitorOptions { | ||
} | ||
declare const AllOfVisitor_base: ts_mixer_dist_types_types.Class<any[], SpecificationVisitor & ParentSchemaAwareVisitor & FallbackVisitor, typeof SpecificationVisitor & typeof ParentSchemaAwareVisitor & typeof FallbackVisitor>; | ||
declare class AllOfVisitor extends AllOfVisitor_base { | ||
readonly element: ArrayElement; | ||
constructor(options: AllOfVisitorOptions); | ||
ArrayElement(arrayElement: ArrayElement): {}; | ||
} | ||
interface AnyOfVisitorOptions extends SpecificationVisitorOptions, ParentSchemaAwareVisitorOptions, VisitorOptions { | ||
} | ||
declare const AnyOfVisitor_base: ts_mixer_dist_types_types.Class<any[], SpecificationVisitor & ParentSchemaAwareVisitor & FallbackVisitor, typeof SpecificationVisitor & typeof ParentSchemaAwareVisitor & typeof FallbackVisitor>; | ||
declare class AnyOfVisitor extends AnyOfVisitor_base { | ||
readonly element: ArrayElement; | ||
constructor(options: AnyOfVisitorOptions); | ||
ArrayElement(arrayElement: ArrayElement): {}; | ||
} | ||
interface OneOfVisitorOptions extends SpecificationVisitorOptions, ParentSchemaAwareVisitorOptions, VisitorOptions { | ||
} | ||
declare const OneOfVisitor_base: ts_mixer_dist_types_types.Class<any[], SpecificationVisitor & ParentSchemaAwareVisitor & FallbackVisitor, typeof SpecificationVisitor & typeof ParentSchemaAwareVisitor & typeof FallbackVisitor>; | ||
declare class OneOfVisitor extends OneOfVisitor_base { | ||
readonly element: ArrayElement; | ||
constructor(options: OneOfVisitorOptions); | ||
ArrayElement(arrayElement: ArrayElement): {}; | ||
} | ||
interface DefinitionsVisitorOptions extends MapVisitorOptions, ParentSchemaAwareVisitorOptions, VisitorOptions { | ||
} | ||
declare const DefinitionsVisitor_base: ts_mixer_dist_types_types.Class<any[], MapVisitor & ParentSchemaAwareVisitor & FallbackVisitor, typeof MapVisitor & typeof ParentSchemaAwareVisitor & typeof FallbackVisitor>; | ||
declare class DefinitionsVisitor extends DefinitionsVisitor_base { | ||
readonly element: ObjectElement; | ||
protected readonly specPath: SpecPath<[ | ||
'document', | ||
'objects', | ||
'JSONReference' | ||
] | ['document', 'objects', 'JSONSchema']>; | ||
constructor(options: DefinitionsVisitorOptions); | ||
} | ||
interface LinksVisitorOptions extends SpecificationVisitorOptions, ParentSchemaAwareVisitorOptions, VisitorOptions { | ||
} | ||
declare const LinksVisitor_base: ts_mixer_dist_types_types.Class<any[], SpecificationVisitor & ParentSchemaAwareVisitor & FallbackVisitor, typeof SpecificationVisitor & typeof ParentSchemaAwareVisitor & typeof FallbackVisitor>; | ||
declare class LinksVisitor extends LinksVisitor_base { | ||
readonly element: ArrayElement; | ||
constructor(options: LinksVisitorOptions); | ||
ArrayElement(arrayElement: ArrayElement): {}; | ||
} | ||
interface JSONReferenceVisitorOptions extends FixedFieldsVisitorOptions, VisitorOptions { | ||
} | ||
declare const JSONReferenceVisitor_base: ts_mixer_dist_types_types.Class<any[], FixedFieldsVisitor & FallbackVisitor, typeof FixedFieldsVisitor & typeof FallbackVisitor>; | ||
declare class JSONReferenceVisitor extends JSONReferenceVisitor_base { | ||
readonly element: JSONReference; | ||
protected readonly specPath: SpecPath<['document', 'objects', 'JSONReference']>; | ||
constructor(options: JSONReferenceVisitorOptions); | ||
ObjectElement(objectElement: ObjectElement): {}; | ||
} | ||
declare class $RefVisitor extends FallbackVisitor { | ||
readonly element: StringElement; | ||
StringElement(stringElement: StringElement): {}; | ||
} | ||
type Alternator = { | ||
predicate: (element: unknown) => boolean; | ||
specPath: string[]; | ||
}; | ||
interface AlternatingVisitorOptions extends SpecificationVisitorOptions { | ||
readonly alternator: Alternator[]; | ||
} | ||
declare class AlternatingVisitor extends SpecificationVisitor { | ||
protected alternator: Alternator[]; | ||
constructor({ alternator, ...rest }: AlternatingVisitorOptions); | ||
enter(element: Element): {}; | ||
} | ||
declare class SchemaOrReferenceVisitor extends AlternatingVisitor { | ||
constructor(options: AlternatingVisitorOptions); | ||
} | ||
interface MediaVisitorOptions extends FixedFieldsVisitorOptions, VisitorOptions { | ||
} | ||
declare const MediaVisitor_base: ts_mixer_dist_types_types.Class<any[], FixedFieldsVisitor & FallbackVisitor, typeof FixedFieldsVisitor & typeof FallbackVisitor>; | ||
declare class MediaVisitor extends MediaVisitor_base { | ||
readonly element: Media; | ||
protected readonly specPath: SpecPath<['document', 'objects', 'Media']>; | ||
constructor(options: MediaVisitorOptions); | ||
} | ||
/** | ||
@@ -373,2 +573,158 @@ * URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-hyperschema-00#section-5 | ||
interface LinkDescriptionVisitorOptions extends FixedFieldsVisitorOptions, VisitorOptions { | ||
} | ||
declare const LinkDescriptionVisitor_base: ts_mixer_dist_types_types.Class<any[], FixedFieldsVisitor & FallbackVisitor, typeof FixedFieldsVisitor & typeof FallbackVisitor>; | ||
declare class LinkDescriptionVisitor extends LinkDescriptionVisitor_base { | ||
readonly element: LinkDescription; | ||
protected readonly specPath: SpecPath<['document', 'objects', 'LinkDescription']>; | ||
constructor(options: LinkDescriptionVisitorOptions); | ||
} | ||
/** | ||
* Specification object allows us to have complete control over visitors | ||
* when traversing the ApiDOM. | ||
* Specification also allows us to create amended refractors from | ||
* existing ones by manipulating it. | ||
* | ||
* Note: Specification object allows to use absolute internal JSON pointers. | ||
*/ | ||
declare const specification: { | ||
visitors: { | ||
value: typeof FallbackVisitor; | ||
JSONSchemaOrJSONReferenceVisitor: typeof SchemaOrReferenceVisitor; | ||
document: { | ||
objects: { | ||
JSONSchema: { | ||
$visitor: typeof JSONSchemaVisitor; | ||
fixedFields: { | ||
id: { | ||
$ref: string; | ||
}; | ||
$schema: { | ||
$ref: string; | ||
}; | ||
multipleOf: { | ||
$ref: string; | ||
}; | ||
maximum: { | ||
$ref: string; | ||
}; | ||
exclusiveMaximum: { | ||
$ref: string; | ||
}; | ||
minimum: { | ||
$ref: string; | ||
}; | ||
exclusiveMinimum: { | ||
$ref: string; | ||
}; | ||
maxLength: { | ||
$ref: string; | ||
}; | ||
minLength: { | ||
$ref: string; | ||
}; | ||
pattern: { | ||
$ref: string; | ||
}; | ||
additionalItems: typeof SchemaOrReferenceVisitor; | ||
items: typeof ItemsVisitor; | ||
maxItems: { | ||
$ref: string; | ||
}; | ||
minItems: { | ||
$ref: string; | ||
}; | ||
uniqueItems: { | ||
$ref: string; | ||
}; | ||
maxProperties: { | ||
$ref: string; | ||
}; | ||
minProperties: { | ||
$ref: string; | ||
}; | ||
required: typeof RequiredVisitor; | ||
properties: typeof PropertiesVisitor; | ||
additionalProperties: typeof SchemaOrReferenceVisitor; | ||
patternProperties: typeof PatternPropertiesVisitor; | ||
dependencies: typeof DependenciesVisitor; | ||
enum: typeof EnumVisitor; | ||
type: typeof TypeVisitor; | ||
allOf: typeof AllOfVisitor; | ||
anyOf: typeof AnyOfVisitor; | ||
oneOf: typeof OneOfVisitor; | ||
not: typeof SchemaOrReferenceVisitor; | ||
definitions: typeof DefinitionsVisitor; | ||
title: { | ||
$ref: string; | ||
}; | ||
description: { | ||
$ref: string; | ||
}; | ||
default: { | ||
$ref: string; | ||
}; | ||
format: { | ||
$ref: string; | ||
}; | ||
base: { | ||
$ref: string; | ||
}; | ||
links: typeof LinksVisitor; | ||
media: { | ||
$ref: string; | ||
}; | ||
readOnly: { | ||
$ref: string; | ||
}; | ||
}; | ||
}; | ||
JSONReference: { | ||
$visitor: typeof JSONReferenceVisitor; | ||
fixedFields: { | ||
$ref: typeof $RefVisitor; | ||
}; | ||
}; | ||
Media: { | ||
$visitor: typeof MediaVisitor; | ||
fixedFields: { | ||
binaryEncoding: { | ||
$ref: string; | ||
}; | ||
type: { | ||
$ref: string; | ||
}; | ||
}; | ||
}; | ||
LinkDescription: { | ||
$visitor: typeof LinkDescriptionVisitor; | ||
fixedFields: { | ||
href: { | ||
$ref: string; | ||
}; | ||
rel: { | ||
$ref: string; | ||
}; | ||
title: { | ||
$ref: string; | ||
}; | ||
targetSchema: typeof SchemaOrReferenceVisitor; | ||
mediaType: { | ||
$ref: string; | ||
}; | ||
method: { | ||
$ref: string; | ||
}; | ||
encType: { | ||
$ref: string; | ||
}; | ||
schema: typeof SchemaOrReferenceVisitor; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
declare const isJSONSchemaElement: _swagger_api_apidom_core.ElementPredicate<JSONSchema>; | ||
@@ -384,26 +740,2 @@ declare const isJSONReferenceElement: _swagger_api_apidom_core.ElementPredicate<JSONReference>; | ||
/** | ||
* This is a base Type for every visitor that does | ||
* internal look-ups to retrieve other child visitors. | ||
*/ | ||
declare const SpecificationVisitor: stampit__default.Stamp<any>; | ||
/** | ||
* This visitor is responsible for falling back to current traversed element | ||
* Given JSONSchemaVisitor expects ObjectElement to be traversed. If | ||
* different Element is provided FallBackVisitor is responsible to assigning | ||
* this Element as current element. | ||
*/ | ||
declare const FallbackVisitor: stampit__default.Stamp<any>; | ||
declare const FixedFieldsVisitor: stampit__default.Stamp<any>; | ||
declare const PatternedFieldsJsonObjectVisitor: stampit__default.Stamp<any>; | ||
declare const MapVisitor: stampit__default.Stamp<any>; | ||
declare const AlternatingVisitor: stampit__default.Stamp<any>; | ||
declare const ParentSchemaAwareVisitor: stampit__default.Stamp<any>; | ||
declare const getNodeType: <T extends Element>(element: T) => string | undefined; | ||
@@ -430,2 +762,2 @@ declare const keyMap: { | ||
export { AlternatingVisitor, FallbackVisitor, FixedFieldsVisitor, JSONReference as JSONReferenceElement, JSONSchemaDraft4MediaTypes, JSONSchema as JSONSchemaElement, LinkDescription as LinkDescriptionElement, MapVisitor, Media as MediaElement, ParentSchemaAwareVisitor, PatternedFieldsJsonObjectVisitor as PatternedFieldsVisitor, SpecificationVisitor, createRefractor, jsonSchemaDraft4 as default, getNodeType, isJSONReferenceElement, isJSONReferenceLikeElement, isJSONSchemaElement, isLinkDescriptionElement, isMediaElement, keyMap, mediaTypes, refract, plugin as refractorPluginReplaceEmptyElement, specification as specificationObj }; | ||
export { AllOfVisitor, type AllOfVisitorOptions, AlternatingVisitor, type AlternatingVisitorOptions, AnyOfVisitor, type AnyOfVisitorOptions, DefinitionsVisitor, type DefinitionsVisitorOptions, DependenciesVisitor, type DependenciesVisitorOptions, EnumVisitor, type VisitorOptions as EnumVisitorOptions, FallbackVisitor, type VisitorOptions as FallbackVisitorOptions, FixedFieldsVisitor, type FixedFieldsVisitorOptions, ItemsVisitor, type ItemsVisitorOptions, $RefVisitor as JSONReference$RefVisitor, type VisitorOptions as JSONReference$RefVisitorOptions, JSONReference as JSONReferenceElement, JSONReferenceVisitor, type JSONReferenceVisitorOptions, JSONSchemaDraft4MediaTypes, JSONSchema as JSONSchemaElement, JSONSchemaVisitor, type JSONSchemaVisitorOptions, LinkDescription as LinkDescriptionElement, LinkDescriptionVisitor, type LinkDescriptionVisitorOptions, LinksVisitor, type LinksVisitorOptions, MapVisitor, type MapVisitorOptions, Media as MediaElement, MediaVisitor, type MediaVisitorOptions, OneOfVisitor, type OneOfVisitorOptions, ParentSchemaAwareVisitor, type ParentSchemaAwareVisitorOptions, PatternPropertiesVisitor, type PatternPropertiesVisitorOptions, PatternedFieldsVisitor, type PatternedFieldsVisitorOptions, PropertiesVisitor, type PropertiesVisitorOptions, RequiredVisitor, type VisitorOptions as RequiredVisitorOptions, SchemaOrReferenceVisitor, type AlternatingVisitorOptions as SchemaOrReferenceVisitorOptions, type SpecPath, SpecificationVisitor, type SpecificationVisitorOptions, TypeVisitor, type VisitorOptions as TypeVisitorOptions, Visitor, type VisitorOptions, createRefractor, jsonSchemaDraft4 as default, getNodeType, isJSONReferenceElement, isJSONReferenceLikeElement, isJSONSchemaElement, isLinkDescriptionElement, isMediaElement, keyMap, mediaTypes, refract, plugin as refractorPluginReplaceEmptyElement, specification as specificationObj }; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3755
319605
91
+ Addedts-mixer@^6.0.4
+ Addedts-mixer@6.0.4(transitive)
- Removedstampit@^4.3.2
- Removedramda@0.29.1(transitive)
- Removedramda-adjunct@4.1.1(transitive)
Updatedramda@~0.30.0
Updatedramda-adjunct@^5.0.0