genoc 0.3.0 → 0.4.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/README.md +31 -187
- package/dist/analyzer/analyze.d.ts +18 -0
- package/dist/analyzer/analyze.js +493 -0
- package/dist/analyzer/discriminator-registry.d.ts +108 -0
- package/dist/analyzer/discriminator-registry.js +209 -0
- package/dist/analyzer/path-analyzer.d.ts +43 -6
- package/dist/analyzer/path-analyzer.js +57 -84
- package/dist/analyzer/schema-mapper.d.ts +68 -6
- package/dist/analyzer/schema-mapper.js +299 -40
- package/dist/analyzer/types.d.ts +126 -0
- package/dist/cli/app.d.ts +4 -2
- package/dist/cli/app.js +23 -4
- package/dist/cli/config-loader.d.ts +20 -0
- package/dist/cli/config-loader.js +186 -0
- package/dist/cli/config-schema.d.ts +105 -0
- package/dist/cli/config-schema.js +183 -0
- package/dist/cli/impl.d.ts +9 -1
- package/dist/cli/impl.js +189 -36
- package/dist/generator/client-generator.d.ts +13 -14
- package/dist/generator/client-generator.js +45 -77
- package/dist/generator/contracts-generator.d.ts +11 -9
- package/dist/generator/contracts-generator.js +45 -491
- package/dist/generator/method-generator.d.ts +1 -1
- package/dist/generator/method-generator.js +10 -150
- package/dist/parser/ref-resolver.d.ts +1 -1
- package/dist/parser/ref-resolver.js +1 -2
- package/dist/parser/version/index.d.ts +4 -16
- package/dist/parser/version/index.js +3 -14
- package/dist/parser/version/v3.0/validator.d.ts +1 -1
- package/dist/parser/version/v3.1/validator.d.ts +17 -0
- package/dist/parser/version/v3.1/validator.js +126 -0
- package/dist/parser/version/validate.d.ts +9 -0
- package/dist/parser/version/validate.js +12 -0
- package/dist/parser/version/version-detector.d.ts +21 -0
- package/dist/parser/version/version-detector.js +19 -0
- package/dist/pipeline.d.ts +15 -0
- package/dist/pipeline.js +25 -0
- package/dist/types/client.d.ts +0 -12
- package/dist/utils/generator-helpers.d.ts +1 -24
- package/dist/utils/generator-helpers.js +11 -78
- package/dist/utils/operation-naming.d.ts +84 -0
- package/dist/utils/operation-naming.js +178 -0
- package/dist/utils/proxy.d.ts +2 -0
- package/dist/utils/proxy.js +16 -0
- package/dist/utils/string.d.ts +7 -0
- package/dist/utils/string.js +9 -0
- package/package.json +19 -15
- package/dist/index.d.ts +0 -9
- package/dist/index.js +0 -11
- package/dist/parser/validators.d.ts +0 -7
- package/dist/parser/validators.js +0 -79
- package/dist/parser/version/normalized-spec.d.ts +0 -199
- package/dist/parser/version/registry.d.ts +0 -28
- package/dist/parser/version/registry.js +0 -44
- package/dist/parser/version/v3.0/index.d.ts +0 -3
- package/dist/parser/version/v3.0/index.js +0 -3
- package/dist/parser/version/v3.0/normalizer.d.ts +0 -15
- package/dist/parser/version/v3.0/normalizer.js +0 -389
- package/dist/parser/version/v3.0/strategy.d.ts +0 -27
- package/dist/parser/version/v3.0/strategy.js +0 -96
- package/dist/parser/version/v3.1/index.d.ts +0 -1
- package/dist/parser/version/v3.1/index.js +0 -1
- package/dist/parser/version/v3.1/strategy.d.ts +0 -42
- package/dist/parser/version/v3.1/strategy.js +0 -513
- package/dist/parser/version/v3.2/index.d.ts +0 -4
- package/dist/parser/version/v3.2/index.js +0 -4
- package/dist/parser/version/v3.2/strategy.d.ts +0 -39
- package/dist/parser/version/v3.2/strategy.js +0 -57
- package/dist/parser/version/version-strategy.d.ts +0 -31
- package/dist/parser/version/version-strategy.js +0 -1
- /package/dist/{parser/version/normalized-spec.js → analyzer/types.js} +0 -0
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { ValidationResult } from '../../validators.js';
|
|
2
|
-
import type { NormalizedSpec } from '../normalized-spec.js';
|
|
3
|
-
import type { VersionStrategy } from '../version-strategy.js';
|
|
4
|
-
/**
|
|
5
|
-
* Stub strategy for OpenAPI 3.2.x specifications
|
|
6
|
-
*
|
|
7
|
-
* This strategy matches OpenAPI 3.2.x specifications but throws
|
|
8
|
-
* "not yet supported" errors until full implementation is available.
|
|
9
|
-
*/
|
|
10
|
-
export declare class V3_2_VersionStrategy implements VersionStrategy {
|
|
11
|
-
/**
|
|
12
|
-
* Get the supported OpenAPI version
|
|
13
|
-
*/
|
|
14
|
-
version(): string;
|
|
15
|
-
/**
|
|
16
|
-
* Check if this strategy matches the given OpenAPI specification
|
|
17
|
-
*/
|
|
18
|
-
matches(spec: unknown): boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Normalize a raw OpenAPI specification to a consistent format
|
|
21
|
-
* Throws "not yet supported" error
|
|
22
|
-
*/
|
|
23
|
-
normalizeSpec(_rawSpec: unknown): NormalizedSpec;
|
|
24
|
-
/**
|
|
25
|
-
* Validate the normalized specification
|
|
26
|
-
* Throws "not yet supported" error
|
|
27
|
-
*/
|
|
28
|
-
validateSpec(_spec: NormalizedSpec): ValidationResult;
|
|
29
|
-
/**
|
|
30
|
-
* Resolve a reference within the document context
|
|
31
|
-
* Throws "not yet supported" error
|
|
32
|
-
*/
|
|
33
|
-
resolveRef(_ref: string, _doc: unknown, _context?: unknown): unknown;
|
|
34
|
-
/**
|
|
35
|
-
* Get supported features for this version
|
|
36
|
-
* Returns empty array since version is not yet supported
|
|
37
|
-
*/
|
|
38
|
-
getSupportedFeatures(): string[];
|
|
39
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Stub strategy for OpenAPI 3.2.x specifications
|
|
3
|
-
*
|
|
4
|
-
* This strategy matches OpenAPI 3.2.x specifications but throws
|
|
5
|
-
* "not yet supported" errors until full implementation is available.
|
|
6
|
-
*/
|
|
7
|
-
export class V3_2_VersionStrategy {
|
|
8
|
-
/**
|
|
9
|
-
* Get the supported OpenAPI version
|
|
10
|
-
*/
|
|
11
|
-
version() {
|
|
12
|
-
return '3.2';
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Check if this strategy matches the given OpenAPI specification
|
|
16
|
-
*/
|
|
17
|
-
matches(spec) {
|
|
18
|
-
if (!spec || typeof spec !== 'object' || Array.isArray(spec)) {
|
|
19
|
-
return false;
|
|
20
|
-
}
|
|
21
|
-
const specObj = spec;
|
|
22
|
-
const openapiVersion = specObj.openapi;
|
|
23
|
-
if (typeof openapiVersion === 'string') {
|
|
24
|
-
// Match 3.2.x versions (e.g., "3.2.0", "3.2.1", etc.)
|
|
25
|
-
return openapiVersion.startsWith('3.2');
|
|
26
|
-
}
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Normalize a raw OpenAPI specification to a consistent format
|
|
31
|
-
* Throws "not yet supported" error
|
|
32
|
-
*/
|
|
33
|
-
normalizeSpec(_rawSpec) {
|
|
34
|
-
throw new Error('OpenAPI 3.2 is not yet supported. Supported versions: 3.0, 3.1');
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Validate the normalized specification
|
|
38
|
-
* Throws "not yet supported" error
|
|
39
|
-
*/
|
|
40
|
-
validateSpec(_spec) {
|
|
41
|
-
throw new Error('OpenAPI 3.2 is not yet supported. Supported versions: 3.0, 3.1');
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Resolve a reference within the document context
|
|
45
|
-
* Throws "not yet supported" error
|
|
46
|
-
*/
|
|
47
|
-
resolveRef(_ref, _doc, _context) {
|
|
48
|
-
throw new Error('OpenAPI 3.2 is not yet supported. Supported versions: 3.0, 3.1');
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Get supported features for this version
|
|
52
|
-
* Returns empty array since version is not yet supported
|
|
53
|
-
*/
|
|
54
|
-
getSupportedFeatures() {
|
|
55
|
-
return [];
|
|
56
|
-
}
|
|
57
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { ValidationResult } from '../validators.js';
|
|
2
|
-
import type { NormalizedSpec } from './normalized-spec.js';
|
|
3
|
-
/**
|
|
4
|
-
* Version strategy interface for multi-version OpenAPI support
|
|
5
|
-
*/
|
|
6
|
-
export interface VersionStrategy {
|
|
7
|
-
/**
|
|
8
|
-
* Get the supported OpenAPI version
|
|
9
|
-
*/
|
|
10
|
-
version(): string;
|
|
11
|
-
/**
|
|
12
|
-
* Check if this strategy matches the given OpenAPI specification
|
|
13
|
-
*/
|
|
14
|
-
matches(spec: unknown): boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Normalize a raw OpenAPI specification to a consistent format
|
|
17
|
-
*/
|
|
18
|
-
normalizeSpec(rawSpec: unknown): NormalizedSpec;
|
|
19
|
-
/**
|
|
20
|
-
* Validate the normalized specification
|
|
21
|
-
*/
|
|
22
|
-
validateSpec(spec: NormalizedSpec): ValidationResult;
|
|
23
|
-
/**
|
|
24
|
-
* Resolve a reference within the document context
|
|
25
|
-
*/
|
|
26
|
-
resolveRef(ref: string, doc: unknown, context?: unknown): unknown;
|
|
27
|
-
/**
|
|
28
|
-
* Get supported features for this version
|
|
29
|
-
*/
|
|
30
|
-
getSupportedFeatures(): string[];
|
|
31
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
File without changes
|