klasik 1.0.35 → 1.0.38
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 +25 -12
- package/dist/cli.js +7 -2
- package/dist/crd/crd-generator.d.ts +11 -5
- package/dist/crd/crd-generator.js +24 -13
- package/dist/openapi-client-generator.js +1 -0
- package/package.json +2 -2
- package/test-kebab-case/app-project/index.ts +2 -0
- package/test-kebab-case/app-project/v1alpha1/index.ts +2 -0
- package/test-kebab-case/app-project/v1alpha1/models/app-project-spec-cluster-resource-blacklist-item.ts +66 -0
- package/test-kebab-case/app-project/v1alpha1/models/app-project-spec-cluster-resource-whitelist-item.ts +66 -0
- package/test-kebab-case/app-project/v1alpha1/models/app-project-spec-destination-service-accounts-item.ts +66 -0
- package/test-kebab-case/app-project/v1alpha1/models/app-project-spec-destinations-item.ts +66 -0
- package/test-kebab-case/app-project/v1alpha1/models/app-project-spec-namespace-resource-blacklist-item.ts +53 -0
- package/test-kebab-case/app-project/v1alpha1/models/app-project-spec-namespace-resource-whitelist-item.ts +53 -0
- package/test-kebab-case/app-project/v1alpha1/models/app-project-spec-orphaned-resources-ignore-item.ts +66 -0
- package/test-kebab-case/app-project/v1alpha1/models/app-project-spec-orphaned-resources.ts +58 -0
- package/test-kebab-case/app-project/v1alpha1/models/app-project-spec-roles-item-jwt-tokens-item.ts +66 -0
- package/test-kebab-case/app-project/v1alpha1/models/app-project-spec-roles-item.ts +97 -0
- package/test-kebab-case/app-project/v1alpha1/models/app-project-spec-signature-keys-item.ts +40 -0
- package/test-kebab-case/app-project/v1alpha1/models/app-project-spec-sync-windows-item.ts +157 -0
- package/test-kebab-case/app-project/v1alpha1/models/app-project-spec.ts +259 -0
- package/test-kebab-case/app-project/v1alpha1/models/app-project.ts +96 -0
- package/test-kebab-case/app-project/v1alpha1/models/index.ts +16 -0
- package/test-kebab-case/app-project/v1alpha1/models/object-meta.ts +157 -0
- package/test-kebab-case/application/index.ts +2 -0
- package/test-kebab-case/application/v1alpha1/index.ts +2 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-destination.ts +66 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-ignore-differences-item.ts +118 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-info-item.ts +50 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-source-directory-jsonnet-ext-vars-item.ts +66 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-source-directory-jsonnet-tlas-item.ts +66 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-source-directory-jsonnet.ts +76 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-source-directory.ts +84 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-source-helm-file-parameters-item.ts +53 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-source-helm-parameters-item.ts +66 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-source-helm.ts +118 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-source-hydrator-dry-source-directory-jsonnet-ext-vars-item.ts +66 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-source-hydrator-dry-source-directory-jsonnet-tlas-item.ts +66 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-source-hydrator-dry-source-directory-jsonnet.ts +76 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-source-hydrator-dry-source-directory.ts +84 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-source-hydrator-dry-source-helm-file-parameters-item.ts +53 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-source-hydrator-dry-source-helm-parameters-item.ts +66 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-source-hydrator-dry-source-helm.ts +118 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-source-hydrator-dry-source-kustomize-patches-item-target.ts +115 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-source-hydrator-dry-source-kustomize-patches-item.ts +81 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-source-hydrator-dry-source-kustomize-replicas-item.ts +56 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-source-hydrator-dry-source-kustomize.ts +132 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-source-hydrator-dry-source-plugin-env-item.ts +53 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-source-hydrator-dry-source-plugin-parameters-item.ts +76 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-source-hydrator-dry-source-plugin.ts +76 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-source-hydrator-dry-source.ts +138 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-source-hydrator-hydrate-to.ts +40 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-source-hydrator-sync-source.ts +53 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-source-hydrator.ts +81 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-source-kustomize-patches-item-target.ts +115 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-source-kustomize-patches-item.ts +81 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-source-kustomize-replicas-item.ts +51 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-source-kustomize.ts +132 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-source-plugin-env-item.ts +53 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-source-plugin-parameters-item.ts +76 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-source-plugin.ts +76 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-source.ts +177 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-sources-item-directory-jsonnet-ext-vars-item.ts +66 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-sources-item-directory-jsonnet-tlas-item.ts +66 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-sources-item-directory-jsonnet.ts +76 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-sources-item-directory.ts +84 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-sources-item-helm-file-parameters-item.ts +53 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-sources-item-helm-parameters-item.ts +66 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-sources-item-helm.ts +118 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-sources-item-kustomize-patches-item-target.ts +115 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-sources-item-kustomize-patches-item.ts +81 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-sources-item-kustomize-replicas-item.ts +56 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-sources-item-kustomize.ts +132 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-sources-item-plugin-env-item.ts +53 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-sources-item-plugin-parameters-item.ts +76 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-sources-item-plugin.ts +76 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-sources-item.ts +177 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-sync-policy-automated.ts +79 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-sync-policy-managed-namespace-metadata.ts +53 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-sync-policy-retry-backoff.ts +66 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-sync-policy-retry.ts +71 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec-sync-policy.ts +94 -0
- package/test-kebab-case/application/v1alpha1/models/application-spec.ts +179 -0
- package/test-kebab-case/application/v1alpha1/models/application.ts +96 -0
- package/test-kebab-case/application/v1alpha1/models/index.ts +60 -0
- package/test-kebab-case/application/v1alpha1/models/object-meta.ts +157 -0
- package/test-kebab-case/index.ts +3 -0
package/README.md
CHANGED
|
@@ -502,9 +502,10 @@ Generate TypeScript models from Kubernetes CustomResourceDefinition (CRD) YAML f
|
|
|
502
502
|
- `-H, --header <header...>` - Custom headers for HTTP requests (format: "Key: Value")
|
|
503
503
|
- `-t, --template <dir>` - Custom template directory
|
|
504
504
|
- `-k, --keep-spec` - Keep the generated OpenAPI spec files (for debugging)
|
|
505
|
-
- `--crd-kind-
|
|
506
|
-
-
|
|
507
|
-
-
|
|
505
|
+
- `--crd-kind-case <format>` - Format for CRD kind names in folder names (default: pascal)
|
|
506
|
+
- `pascal`: `AppProject` (default)
|
|
507
|
+
- `snake`: `app_project`
|
|
508
|
+
- `kebab`: `app-project`
|
|
508
509
|
- `--timeout <ms>` - Request timeout in milliseconds (default: 30000)
|
|
509
510
|
|
|
510
511
|
**Examples:**
|
|
@@ -558,13 +559,13 @@ klasik generate-crd \
|
|
|
558
559
|
klasik generate-crd \
|
|
559
560
|
--url https://raw.githubusercontent.com/argoproj/argo-cd/master/manifests/crds/appproject-crd.yaml \
|
|
560
561
|
--output ./generated \
|
|
561
|
-
--crd-kind-snake
|
|
562
|
-
|
|
563
|
-
#
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
562
|
+
--crd-kind-case snake
|
|
563
|
+
|
|
564
|
+
# Generate with kebab-case folder names
|
|
565
|
+
klasik generate-crd \
|
|
566
|
+
--url https://raw.githubusercontent.com/argoproj/argo-cd/master/manifests/crds/appproject-crd.yaml \
|
|
567
|
+
--output ./generated \
|
|
568
|
+
--crd-kind-case kebab
|
|
568
569
|
```
|
|
569
570
|
|
|
570
571
|
**Output Structure:**
|
|
@@ -581,7 +582,7 @@ output/
|
|
|
581
582
|
└── index.ts
|
|
582
583
|
```
|
|
583
584
|
|
|
584
|
-
For multiple CRDs (default):
|
|
585
|
+
For multiple CRDs with `--crd-kind-case pascal` (default):
|
|
585
586
|
```
|
|
586
587
|
output/
|
|
587
588
|
├── AppProject/
|
|
@@ -593,7 +594,7 @@ output/
|
|
|
593
594
|
└── index.ts
|
|
594
595
|
```
|
|
595
596
|
|
|
596
|
-
With `--crd-kind-snake
|
|
597
|
+
With `--crd-kind-case snake`:
|
|
597
598
|
```
|
|
598
599
|
output/
|
|
599
600
|
├── app_project/
|
|
@@ -605,6 +606,18 @@ output/
|
|
|
605
606
|
└── index.ts
|
|
606
607
|
```
|
|
607
608
|
|
|
609
|
+
With `--crd-kind-case kebab`:
|
|
610
|
+
```
|
|
611
|
+
output/
|
|
612
|
+
├── app-project/
|
|
613
|
+
│ ├── v1alpha1/
|
|
614
|
+
│ └── index.ts
|
|
615
|
+
├── application/
|
|
616
|
+
│ ├── v1alpha1/
|
|
617
|
+
│ └── index.ts
|
|
618
|
+
└── index.ts
|
|
619
|
+
```
|
|
620
|
+
|
|
608
621
|
### `generate-jsonschema`
|
|
609
622
|
|
|
610
623
|
Generate TypeScript models from JSON Schema files.
|
package/dist/cli.js
CHANGED
|
@@ -147,7 +147,7 @@ program
|
|
|
147
147
|
.option('--timeout <ms>', 'Request timeout in milliseconds', '30000')
|
|
148
148
|
.option('-t, --template <dir>', 'Custom template directory')
|
|
149
149
|
.option('-k, --keep-spec', 'Keep the generated OpenAPI spec files', false)
|
|
150
|
-
.option('--crd-kind-
|
|
150
|
+
.option('--crd-kind-case <format>', 'Format for CRD kind in folder names: pascal (default), snake, kebab', 'pascal')
|
|
151
151
|
.action(async (options) => {
|
|
152
152
|
try {
|
|
153
153
|
// Parse headers if provided
|
|
@@ -167,6 +167,11 @@ program
|
|
|
167
167
|
const generator = new CRDGenerator();
|
|
168
168
|
// Handle both single URL (backwards compat) and multiple URLs
|
|
169
169
|
const urls = Array.isArray(options.url) ? options.url : [options.url];
|
|
170
|
+
// Validate crdKindCase format
|
|
171
|
+
const crdKindCase = options.crdKindCase;
|
|
172
|
+
if (!['pascal', 'snake', 'kebab'].includes(crdKindCase)) {
|
|
173
|
+
throw new Error(`Invalid --crd-kind-case format: ${crdKindCase}. Must be one of: pascal, snake, kebab`);
|
|
174
|
+
}
|
|
170
175
|
await generator.generate({
|
|
171
176
|
urls,
|
|
172
177
|
outputDir,
|
|
@@ -178,7 +183,7 @@ program
|
|
|
178
183
|
classValidator: options.classValidator,
|
|
179
184
|
templateDir: options.template,
|
|
180
185
|
keepSpec: options.keepSpec,
|
|
181
|
-
|
|
186
|
+
crdKindCase,
|
|
182
187
|
});
|
|
183
188
|
process.exit(0);
|
|
184
189
|
}
|
|
@@ -55,10 +55,10 @@ export interface CRDGeneratorOptions {
|
|
|
55
55
|
*/
|
|
56
56
|
keepSpec?: boolean;
|
|
57
57
|
/**
|
|
58
|
-
*
|
|
59
|
-
* @default
|
|
58
|
+
* Format for CRD kind names in folder names
|
|
59
|
+
* @default 'pascal'
|
|
60
60
|
*/
|
|
61
|
-
|
|
61
|
+
crdKindCase?: 'pascal' | 'snake' | 'kebab';
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
64
|
* Main orchestrator for generating TypeScript models from Kubernetes CRDs
|
|
@@ -84,10 +84,16 @@ export declare class CRDGenerator {
|
|
|
84
84
|
/**
|
|
85
85
|
* Format CRD kind name for use as folder name
|
|
86
86
|
* @param kind The CRD kind name (e.g., "AppProject")
|
|
87
|
-
* @param
|
|
88
|
-
* @returns Formatted name (e.g., "app_project"
|
|
87
|
+
* @param format The case format to use
|
|
88
|
+
* @returns Formatted name (e.g., "app_project" for snake, "app-project" for kebab, "AppProject" for pascal)
|
|
89
89
|
*/
|
|
90
90
|
private formatKindName;
|
|
91
|
+
/**
|
|
92
|
+
* Convert a folder name to a valid JavaScript identifier for exports
|
|
93
|
+
* @param folderName The folder name (may contain dashes)
|
|
94
|
+
* @returns Valid JavaScript identifier (dashes replaced with underscores)
|
|
95
|
+
*/
|
|
96
|
+
private toValidIdentifier;
|
|
91
97
|
/**
|
|
92
98
|
* Generate index file for a CRD (when multiple CRDs in one file)
|
|
93
99
|
* @param crdDir CRD directory
|
|
@@ -57,7 +57,7 @@ class CRDGenerator {
|
|
|
57
57
|
* @param options Generation options
|
|
58
58
|
*/
|
|
59
59
|
async generate(options) {
|
|
60
|
-
const { urls: urlsInput, outputDir, includeStatus = false, headers, timeout, fixEsmImports = false, nestJsSwagger = false, classValidator = false, skipJsExtensions = false, templateDir, keepSpec = false,
|
|
60
|
+
const { urls: urlsInput, outputDir, includeStatus = false, headers, timeout, fixEsmImports = false, nestJsSwagger = false, classValidator = false, skipJsExtensions = false, templateDir, keepSpec = false, crdKindCase = 'pascal', } = options;
|
|
61
61
|
// Normalize to array
|
|
62
62
|
const urls = Array.isArray(urlsInput) ? urlsInput : [urlsInput];
|
|
63
63
|
try {
|
|
@@ -115,7 +115,7 @@ class CRDGenerator {
|
|
|
115
115
|
for (const crd of allCRDs) {
|
|
116
116
|
console.log(`\nProcessing CRD: ${crd.spec.names.kind}`);
|
|
117
117
|
// Determine output directory structure
|
|
118
|
-
const formattedKind = this.formatKindName(crd.spec.names.kind,
|
|
118
|
+
const formattedKind = this.formatKindName(crd.spec.names.kind, crdKindCase);
|
|
119
119
|
const crdOutputDir = allCRDs.length > 1
|
|
120
120
|
? path.join(outputDir, formattedKind)
|
|
121
121
|
: outputDir;
|
|
@@ -138,7 +138,7 @@ class CRDGenerator {
|
|
|
138
138
|
// Step 4: Generate main index file
|
|
139
139
|
console.log('\nGenerating index files...');
|
|
140
140
|
if (allCRDs.length > 1) {
|
|
141
|
-
const formattedKindNames = allCRDs.map(c => this.formatKindName(c.spec.names.kind,
|
|
141
|
+
const formattedKindNames = allCRDs.map(c => this.formatKindName(c.spec.names.kind, crdKindCase));
|
|
142
142
|
this.generateMainIndex(outputDir, formattedKindNames, skipJsExtensions);
|
|
143
143
|
}
|
|
144
144
|
else {
|
|
@@ -216,21 +216,32 @@ class CRDGenerator {
|
|
|
216
216
|
/**
|
|
217
217
|
* Format CRD kind name for use as folder name
|
|
218
218
|
* @param kind The CRD kind name (e.g., "AppProject")
|
|
219
|
-
* @param
|
|
220
|
-
* @returns Formatted name (e.g., "app_project"
|
|
219
|
+
* @param format The case format to use
|
|
220
|
+
* @returns Formatted name (e.g., "app_project" for snake, "app-project" for kebab, "AppProject" for pascal)
|
|
221
221
|
*/
|
|
222
|
-
formatKindName(kind,
|
|
223
|
-
if (
|
|
222
|
+
formatKindName(kind, format) {
|
|
223
|
+
if (format === 'pascal') {
|
|
224
224
|
return kind;
|
|
225
225
|
}
|
|
226
|
-
// Convert PascalCase to snake_case
|
|
227
|
-
// AppProject -> app_project
|
|
228
|
-
// HTTPServer -> http_server
|
|
226
|
+
// Convert PascalCase to snake_case or kebab-case
|
|
227
|
+
// AppProject -> app_project or app-project
|
|
228
|
+
// HTTPServer -> http_server or http-server
|
|
229
|
+
const separator = format === 'snake' ? '_' : '-';
|
|
229
230
|
return kind
|
|
230
|
-
.replace(/([a-z0-9])([A-Z])/g,
|
|
231
|
-
.replace(/([A-Z])([A-Z][a-z])/g,
|
|
231
|
+
.replace(/([a-z0-9])([A-Z])/g, `$1${separator}$2`) // Add separator between lowercase and uppercase
|
|
232
|
+
.replace(/([A-Z])([A-Z][a-z])/g, `$1${separator}$2`) // Handle consecutive capitals (HTTPServer -> HTTP_Server)
|
|
232
233
|
.toLowerCase();
|
|
233
234
|
}
|
|
235
|
+
/**
|
|
236
|
+
* Convert a folder name to a valid JavaScript identifier for exports
|
|
237
|
+
* @param folderName The folder name (may contain dashes)
|
|
238
|
+
* @returns Valid JavaScript identifier (dashes replaced with underscores)
|
|
239
|
+
*/
|
|
240
|
+
toValidIdentifier(folderName) {
|
|
241
|
+
// Replace dashes with underscores to create valid JavaScript identifiers
|
|
242
|
+
// app-project -> app_project
|
|
243
|
+
return folderName.replace(/-/g, '_');
|
|
244
|
+
}
|
|
234
245
|
/**
|
|
235
246
|
* Generate index file for a CRD (when multiple CRDs in one file)
|
|
236
247
|
* @param crdDir CRD directory
|
|
@@ -285,7 +296,7 @@ class CRDGenerator {
|
|
|
285
296
|
generateMainIndex(outputDir, crdNames, skipJsExtensions = false) {
|
|
286
297
|
const extension = skipJsExtensions ? '' : '.js';
|
|
287
298
|
const exports = crdNames
|
|
288
|
-
.map(name => `export * as ${name} from './${name}/index${extension}';`)
|
|
299
|
+
.map(name => `export * as ${this.toValidIdentifier(name)} from './${name}/index${extension}';`)
|
|
289
300
|
.join('\n');
|
|
290
301
|
const indexContent = `// Auto-generated main index\n${exports}\n`;
|
|
291
302
|
const indexPath = path.join(outputDir, 'index.ts');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "klasik",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.38",
|
|
4
4
|
"description": "Download OpenAPI specs from remote URLs and generate TypeScript clients with class-transformer support - support yaml, json, CustomResourceDefinition formats",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"class-transformer": "^0.5.1",
|
|
34
34
|
"commander": "^11.0.0",
|
|
35
35
|
"js-yaml": "^4.1.0",
|
|
36
|
-
"openapi-class-transformer": "^1.0
|
|
36
|
+
"openapi-class-transformer": "^1.1.0",
|
|
37
37
|
"reflect-metadata": "^0.2.2"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* AppProject
|
|
5
|
+
* Generated from CustomResourceDefinition: appprojects.argoproj.io
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: v1alpha1
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
import { Expose, Type } from 'class-transformer';
|
|
19
|
+
/**
|
|
20
|
+
* ClusterResourceRestrictionItem is a cluster resource that is restricted by the project\'s whitelist or blacklist
|
|
21
|
+
*/
|
|
22
|
+
export class AppProjectSpecClusterResourceBlacklistItem {
|
|
23
|
+
/**
|
|
24
|
+
* group
|
|
25
|
+
*/
|
|
26
|
+
@Expose()
|
|
27
|
+
'group': string;
|
|
28
|
+
/**
|
|
29
|
+
* kind
|
|
30
|
+
*/
|
|
31
|
+
@Expose()
|
|
32
|
+
'kind': string;
|
|
33
|
+
/**
|
|
34
|
+
* Name is the name of the restricted resource. Glob patterns using Go\'s filepath.Match syntax are supported. Unlike the group and kind fields, if no name is specified, all resources of the specified group/kind are matched.
|
|
35
|
+
*/
|
|
36
|
+
@Expose()
|
|
37
|
+
'name'?: string;
|
|
38
|
+
|
|
39
|
+
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string, description?: string, vendorExtensions?: any, modelClass?: any}> = [
|
|
40
|
+
{
|
|
41
|
+
"name": "group",
|
|
42
|
+
"baseName": "group",
|
|
43
|
+
"type": "string",
|
|
44
|
+
"format": "",
|
|
45
|
+
"description": undefined,
|
|
46
|
+
"vendorExtensions": {}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "kind",
|
|
50
|
+
"baseName": "kind",
|
|
51
|
+
"type": "string",
|
|
52
|
+
"format": "",
|
|
53
|
+
"description": undefined,
|
|
54
|
+
"vendorExtensions": {}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "name",
|
|
58
|
+
"baseName": "name",
|
|
59
|
+
"type": "string",
|
|
60
|
+
"format": "",
|
|
61
|
+
"description": `Name is the name of the restricted resource. Glob patterns using Go\'s filepath.Match syntax are supported. Unlike the group and kind fields, if no name is specified, all resources of the specified group/kind are matched.`,
|
|
62
|
+
"vendorExtensions": {}
|
|
63
|
+
}
|
|
64
|
+
];
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* AppProject
|
|
5
|
+
* Generated from CustomResourceDefinition: appprojects.argoproj.io
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: v1alpha1
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
import { Expose, Type } from 'class-transformer';
|
|
19
|
+
/**
|
|
20
|
+
* ClusterResourceRestrictionItem is a cluster resource that is restricted by the project\'s whitelist or blacklist
|
|
21
|
+
*/
|
|
22
|
+
export class AppProjectSpecClusterResourceWhitelistItem {
|
|
23
|
+
/**
|
|
24
|
+
* group
|
|
25
|
+
*/
|
|
26
|
+
@Expose()
|
|
27
|
+
'group': string;
|
|
28
|
+
/**
|
|
29
|
+
* kind
|
|
30
|
+
*/
|
|
31
|
+
@Expose()
|
|
32
|
+
'kind': string;
|
|
33
|
+
/**
|
|
34
|
+
* Name is the name of the restricted resource. Glob patterns using Go\'s filepath.Match syntax are supported. Unlike the group and kind fields, if no name is specified, all resources of the specified group/kind are matched.
|
|
35
|
+
*/
|
|
36
|
+
@Expose()
|
|
37
|
+
'name'?: string;
|
|
38
|
+
|
|
39
|
+
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string, description?: string, vendorExtensions?: any, modelClass?: any}> = [
|
|
40
|
+
{
|
|
41
|
+
"name": "group",
|
|
42
|
+
"baseName": "group",
|
|
43
|
+
"type": "string",
|
|
44
|
+
"format": "",
|
|
45
|
+
"description": undefined,
|
|
46
|
+
"vendorExtensions": {}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "kind",
|
|
50
|
+
"baseName": "kind",
|
|
51
|
+
"type": "string",
|
|
52
|
+
"format": "",
|
|
53
|
+
"description": undefined,
|
|
54
|
+
"vendorExtensions": {}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "name",
|
|
58
|
+
"baseName": "name",
|
|
59
|
+
"type": "string",
|
|
60
|
+
"format": "",
|
|
61
|
+
"description": `Name is the name of the restricted resource. Glob patterns using Go\'s filepath.Match syntax are supported. Unlike the group and kind fields, if no name is specified, all resources of the specified group/kind are matched.`,
|
|
62
|
+
"vendorExtensions": {}
|
|
63
|
+
}
|
|
64
|
+
];
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* AppProject
|
|
5
|
+
* Generated from CustomResourceDefinition: appprojects.argoproj.io
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: v1alpha1
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
import { Expose, Type } from 'class-transformer';
|
|
19
|
+
/**
|
|
20
|
+
* ApplicationDestinationServiceAccount holds information about the service account to be impersonated for the application sync operation.
|
|
21
|
+
*/
|
|
22
|
+
export class AppProjectSpecDestinationServiceAccountsItem {
|
|
23
|
+
/**
|
|
24
|
+
* DefaultServiceAccount to be used for impersonation during the sync operation
|
|
25
|
+
*/
|
|
26
|
+
@Expose()
|
|
27
|
+
'defaultServiceAccount': string;
|
|
28
|
+
/**
|
|
29
|
+
* Namespace specifies the target namespace for the application\'s resources.
|
|
30
|
+
*/
|
|
31
|
+
@Expose()
|
|
32
|
+
'namespace'?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Server specifies the URL of the target cluster\'s Kubernetes control plane API.
|
|
35
|
+
*/
|
|
36
|
+
@Expose()
|
|
37
|
+
'server': string;
|
|
38
|
+
|
|
39
|
+
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string, description?: string, vendorExtensions?: any, modelClass?: any}> = [
|
|
40
|
+
{
|
|
41
|
+
"name": "defaultServiceAccount",
|
|
42
|
+
"baseName": "defaultServiceAccount",
|
|
43
|
+
"type": "string",
|
|
44
|
+
"format": "",
|
|
45
|
+
"description": `DefaultServiceAccount to be used for impersonation during the sync operation`,
|
|
46
|
+
"vendorExtensions": {}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "namespace",
|
|
50
|
+
"baseName": "namespace",
|
|
51
|
+
"type": "string",
|
|
52
|
+
"format": "",
|
|
53
|
+
"description": `Namespace specifies the target namespace for the application\'s resources.`,
|
|
54
|
+
"vendorExtensions": {}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "server",
|
|
58
|
+
"baseName": "server",
|
|
59
|
+
"type": "string",
|
|
60
|
+
"format": "",
|
|
61
|
+
"description": `Server specifies the URL of the target cluster\'s Kubernetes control plane API.`,
|
|
62
|
+
"vendorExtensions": {}
|
|
63
|
+
}
|
|
64
|
+
];
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* AppProject
|
|
5
|
+
* Generated from CustomResourceDefinition: appprojects.argoproj.io
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: v1alpha1
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
import { Expose, Type } from 'class-transformer';
|
|
19
|
+
/**
|
|
20
|
+
* ApplicationDestination holds information about the application\'s destination
|
|
21
|
+
*/
|
|
22
|
+
export class AppProjectSpecDestinationsItem {
|
|
23
|
+
/**
|
|
24
|
+
* Name is an alternate way of specifying the target cluster by its symbolic name. This must be set if Server is not set.
|
|
25
|
+
*/
|
|
26
|
+
@Expose()
|
|
27
|
+
'name'?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Namespace specifies the target namespace for the application\'s resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace
|
|
30
|
+
*/
|
|
31
|
+
@Expose()
|
|
32
|
+
'namespace'?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Server specifies the URL of the target cluster\'s Kubernetes control plane API. This must be set if Name is not set.
|
|
35
|
+
*/
|
|
36
|
+
@Expose()
|
|
37
|
+
'server'?: string;
|
|
38
|
+
|
|
39
|
+
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string, description?: string, vendorExtensions?: any, modelClass?: any}> = [
|
|
40
|
+
{
|
|
41
|
+
"name": "name",
|
|
42
|
+
"baseName": "name",
|
|
43
|
+
"type": "string",
|
|
44
|
+
"format": "",
|
|
45
|
+
"description": `Name is an alternate way of specifying the target cluster by its symbolic name. This must be set if Server is not set.`,
|
|
46
|
+
"vendorExtensions": {}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "namespace",
|
|
50
|
+
"baseName": "namespace",
|
|
51
|
+
"type": "string",
|
|
52
|
+
"format": "",
|
|
53
|
+
"description": `Namespace specifies the target namespace for the application\'s resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace`,
|
|
54
|
+
"vendorExtensions": {}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "server",
|
|
58
|
+
"baseName": "server",
|
|
59
|
+
"type": "string",
|
|
60
|
+
"format": "",
|
|
61
|
+
"description": `Server specifies the URL of the target cluster\'s Kubernetes control plane API. This must be set if Name is not set.`,
|
|
62
|
+
"vendorExtensions": {}
|
|
63
|
+
}
|
|
64
|
+
];
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* AppProject
|
|
5
|
+
* Generated from CustomResourceDefinition: appprojects.argoproj.io
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: v1alpha1
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
import { Expose, Type } from 'class-transformer';
|
|
19
|
+
/**
|
|
20
|
+
* GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types
|
|
21
|
+
*/
|
|
22
|
+
export class AppProjectSpecNamespaceResourceBlacklistItem {
|
|
23
|
+
/**
|
|
24
|
+
* group
|
|
25
|
+
*/
|
|
26
|
+
@Expose()
|
|
27
|
+
'group': string;
|
|
28
|
+
/**
|
|
29
|
+
* kind
|
|
30
|
+
*/
|
|
31
|
+
@Expose()
|
|
32
|
+
'kind': string;
|
|
33
|
+
|
|
34
|
+
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string, description?: string, vendorExtensions?: any, modelClass?: any}> = [
|
|
35
|
+
{
|
|
36
|
+
"name": "group",
|
|
37
|
+
"baseName": "group",
|
|
38
|
+
"type": "string",
|
|
39
|
+
"format": "",
|
|
40
|
+
"description": undefined,
|
|
41
|
+
"vendorExtensions": {}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "kind",
|
|
45
|
+
"baseName": "kind",
|
|
46
|
+
"type": "string",
|
|
47
|
+
"format": "",
|
|
48
|
+
"description": undefined,
|
|
49
|
+
"vendorExtensions": {}
|
|
50
|
+
}
|
|
51
|
+
];
|
|
52
|
+
}
|
|
53
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* AppProject
|
|
5
|
+
* Generated from CustomResourceDefinition: appprojects.argoproj.io
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: v1alpha1
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
import { Expose, Type } from 'class-transformer';
|
|
19
|
+
/**
|
|
20
|
+
* GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types
|
|
21
|
+
*/
|
|
22
|
+
export class AppProjectSpecNamespaceResourceWhitelistItem {
|
|
23
|
+
/**
|
|
24
|
+
* group
|
|
25
|
+
*/
|
|
26
|
+
@Expose()
|
|
27
|
+
'group': string;
|
|
28
|
+
/**
|
|
29
|
+
* kind
|
|
30
|
+
*/
|
|
31
|
+
@Expose()
|
|
32
|
+
'kind': string;
|
|
33
|
+
|
|
34
|
+
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string, description?: string, vendorExtensions?: any, modelClass?: any}> = [
|
|
35
|
+
{
|
|
36
|
+
"name": "group",
|
|
37
|
+
"baseName": "group",
|
|
38
|
+
"type": "string",
|
|
39
|
+
"format": "",
|
|
40
|
+
"description": undefined,
|
|
41
|
+
"vendorExtensions": {}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "kind",
|
|
45
|
+
"baseName": "kind",
|
|
46
|
+
"type": "string",
|
|
47
|
+
"format": "",
|
|
48
|
+
"description": undefined,
|
|
49
|
+
"vendorExtensions": {}
|
|
50
|
+
}
|
|
51
|
+
];
|
|
52
|
+
}
|
|
53
|
+
|