@kubb/plugin-redoc 4.18.5 → 4.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.cts +23 -6
- package/dist/index.d.ts +23 -6
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -553,7 +553,7 @@ type SafeParseResult<H extends PluginLifecycleHooks, Result = ReturnType<ParseRe
|
|
|
553
553
|
result: Result;
|
|
554
554
|
plugin: Plugin;
|
|
555
555
|
};
|
|
556
|
-
type Options$
|
|
556
|
+
type Options$1 = {
|
|
557
557
|
fabric: Fabric;
|
|
558
558
|
events: AsyncEventEmitter<KubbEvents>;
|
|
559
559
|
/**
|
|
@@ -571,8 +571,8 @@ type GetFileProps<TOptions = object> = {
|
|
|
571
571
|
declare class PluginManager {
|
|
572
572
|
#private;
|
|
573
573
|
readonly config: Config;
|
|
574
|
-
readonly options: Options$
|
|
575
|
-
constructor(config: Config, options: Options$
|
|
574
|
+
readonly options: Options$1;
|
|
575
|
+
constructor(config: Config, options: Options$1);
|
|
576
576
|
get events(): AsyncEventEmitter<KubbEvents>;
|
|
577
577
|
getContext<TOptions extends PluginFactoryOptions>(plugin: Plugin<TOptions>): PluginContext<TOptions> & Record<string, any>;
|
|
578
578
|
get plugins(): Array<Plugin>;
|
|
@@ -670,16 +670,21 @@ type Operation$1 = Operation;
|
|
|
670
670
|
type DiscriminatorObject$1 = DiscriminatorObject;
|
|
671
671
|
//#endregion
|
|
672
672
|
//#region ../oas/src/Oas.d.ts
|
|
673
|
-
type
|
|
673
|
+
type OasOptions = {
|
|
674
674
|
contentType?: contentType;
|
|
675
675
|
discriminator?: 'strict' | 'inherit';
|
|
676
|
+
/**
|
|
677
|
+
* Resolve name collisions when schemas from different components share the same name (case-insensitive).
|
|
678
|
+
* @default false
|
|
679
|
+
*/
|
|
680
|
+
collisionDetection?: boolean;
|
|
676
681
|
};
|
|
677
682
|
declare class Oas extends BaseOas {
|
|
678
683
|
#private;
|
|
679
684
|
document: Document;
|
|
680
685
|
constructor(document: Document);
|
|
681
|
-
setOptions(options:
|
|
682
|
-
get options():
|
|
686
|
+
setOptions(options: OasOptions): void;
|
|
687
|
+
get options(): OasOptions;
|
|
683
688
|
get<T = unknown>($ref: string): T | null;
|
|
684
689
|
getKey($ref: string): string | undefined;
|
|
685
690
|
set($ref: string, value: unknown): false | undefined;
|
|
@@ -690,6 +695,18 @@ declare class Oas extends BaseOas {
|
|
|
690
695
|
getParametersSchema(operation: Operation$1, inKey: 'path' | 'query' | 'header'): SchemaObject$1 | null;
|
|
691
696
|
validate(): Promise<oas_normalize_lib_types0.ValidationResult>;
|
|
692
697
|
flattenSchema(schema: SchemaObject$1 | null): SchemaObject$1 | null;
|
|
698
|
+
/**
|
|
699
|
+
* Get schemas from OpenAPI components (schemas, responses, requestBodies).
|
|
700
|
+
* Returns schemas in dependency order along with name mapping for collision resolution.
|
|
701
|
+
*/
|
|
702
|
+
getSchemas(options?: {
|
|
703
|
+
contentType?: contentType;
|
|
704
|
+
includes?: Array<'schemas' | 'responses' | 'requestBodies'>;
|
|
705
|
+
collisionDetection?: boolean;
|
|
706
|
+
}): {
|
|
707
|
+
schemas: Record<string, SchemaObject$1>;
|
|
708
|
+
nameMapping: Map<string, string>;
|
|
709
|
+
};
|
|
693
710
|
}
|
|
694
711
|
//#endregion
|
|
695
712
|
//#region src/types.d.ts
|
package/dist/index.d.ts
CHANGED
|
@@ -552,7 +552,7 @@ type SafeParseResult<H extends PluginLifecycleHooks, Result = ReturnType<ParseRe
|
|
|
552
552
|
result: Result;
|
|
553
553
|
plugin: Plugin;
|
|
554
554
|
};
|
|
555
|
-
type Options$
|
|
555
|
+
type Options$1 = {
|
|
556
556
|
fabric: Fabric;
|
|
557
557
|
events: AsyncEventEmitter<KubbEvents>;
|
|
558
558
|
/**
|
|
@@ -570,8 +570,8 @@ type GetFileProps<TOptions = object> = {
|
|
|
570
570
|
declare class PluginManager {
|
|
571
571
|
#private;
|
|
572
572
|
readonly config: Config;
|
|
573
|
-
readonly options: Options$
|
|
574
|
-
constructor(config: Config, options: Options$
|
|
573
|
+
readonly options: Options$1;
|
|
574
|
+
constructor(config: Config, options: Options$1);
|
|
575
575
|
get events(): AsyncEventEmitter<KubbEvents>;
|
|
576
576
|
getContext<TOptions extends PluginFactoryOptions>(plugin: Plugin<TOptions>): PluginContext<TOptions> & Record<string, any>;
|
|
577
577
|
get plugins(): Array<Plugin>;
|
|
@@ -669,16 +669,21 @@ type Operation$1 = Operation;
|
|
|
669
669
|
type DiscriminatorObject$1 = DiscriminatorObject;
|
|
670
670
|
//#endregion
|
|
671
671
|
//#region ../oas/src/Oas.d.ts
|
|
672
|
-
type
|
|
672
|
+
type OasOptions = {
|
|
673
673
|
contentType?: contentType;
|
|
674
674
|
discriminator?: 'strict' | 'inherit';
|
|
675
|
+
/**
|
|
676
|
+
* Resolve name collisions when schemas from different components share the same name (case-insensitive).
|
|
677
|
+
* @default false
|
|
678
|
+
*/
|
|
679
|
+
collisionDetection?: boolean;
|
|
675
680
|
};
|
|
676
681
|
declare class Oas extends BaseOas {
|
|
677
682
|
#private;
|
|
678
683
|
document: Document;
|
|
679
684
|
constructor(document: Document);
|
|
680
|
-
setOptions(options:
|
|
681
|
-
get options():
|
|
685
|
+
setOptions(options: OasOptions): void;
|
|
686
|
+
get options(): OasOptions;
|
|
682
687
|
get<T = unknown>($ref: string): T | null;
|
|
683
688
|
getKey($ref: string): string | undefined;
|
|
684
689
|
set($ref: string, value: unknown): false | undefined;
|
|
@@ -689,6 +694,18 @@ declare class Oas extends BaseOas {
|
|
|
689
694
|
getParametersSchema(operation: Operation$1, inKey: 'path' | 'query' | 'header'): SchemaObject$1 | null;
|
|
690
695
|
validate(): Promise<oas_normalize_lib_types0.ValidationResult>;
|
|
691
696
|
flattenSchema(schema: SchemaObject$1 | null): SchemaObject$1 | null;
|
|
697
|
+
/**
|
|
698
|
+
* Get schemas from OpenAPI components (schemas, responses, requestBodies).
|
|
699
|
+
* Returns schemas in dependency order along with name mapping for collision resolution.
|
|
700
|
+
*/
|
|
701
|
+
getSchemas(options?: {
|
|
702
|
+
contentType?: contentType;
|
|
703
|
+
includes?: Array<'schemas' | 'responses' | 'requestBodies'>;
|
|
704
|
+
collisionDetection?: boolean;
|
|
705
|
+
}): {
|
|
706
|
+
schemas: Record<string, SchemaObject$1>;
|
|
707
|
+
nameMapping: Map<string, string>;
|
|
708
|
+
};
|
|
692
709
|
}
|
|
693
710
|
//#endregion
|
|
694
711
|
//#region src/types.d.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/plugin-redoc",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.19.1",
|
|
4
4
|
"description": "Beautiful docs with Redoc",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@kubb/react-fabric": "0.12.4",
|
|
50
50
|
"handlebars": "^4.7.8",
|
|
51
|
-
"@kubb/
|
|
52
|
-
"@kubb/
|
|
53
|
-
"@kubb/
|
|
51
|
+
"@kubb/core": "4.19.1",
|
|
52
|
+
"@kubb/oas": "4.19.1",
|
|
53
|
+
"@kubb/plugin-oas": "4.19.1"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@kubb/react-fabric": "0.12.4"
|