Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: default value in schematics schema.json (for NX support) #536

Merged
merged 1 commit into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export function ngGenerateJavaClientCore(options: NgGenerateJavaClientCoreSchema
specPath,
codegenLanguage: 'javaClient',
apiTests: false,
specConfigPath: options.specConfigPath
specConfigPath: options.specConfigPath || undefined
})
]);
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
},
"specConfigPath": {
"type": "string",
"description": "Swagger config file\nMore info: https://openapi-generator.tech/docs/generators/java/#config-options",
"default": ""
"description": "Swagger config file\nMore info: https://openapi-generator.tech/docs/generators/java/#config-options"
}
},
"additionalProperties": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ export interface NgGenerateJavaClientCoreSchematicsSchema extends JsonObject {
specPath: string;

/** Swagger config file */
specConfigPath: string;
specConfigPath: string | null;
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@
},
"specConfigPath": {
"type": "string",
"description": "Spec config file\nMore info: https://openapi-generator.tech/docs/generators/typescript/#config-options",
"default": ""
"description": "Spec config file\nMore info: https://openapi-generator.tech/docs/generators/typescript/#config-options"
},
"directory": {
"type": "string",
"description": "Directory where to generate the SDK",
"default": ""
"description": "Directory where to generate the SDK"
},
"packageManager": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ export interface NgGenerateTypescriptSDKCoreSchematicsSchema extends JsonObject
specPath: string;

/** Directory where to generate the SDK */
directory: string;
directory: string | null;

/** Package manager to be used in the generated SDK */
packageManager: 'npm' | 'yarn' | '';

/** Path to the spec generation configuration */
specConfigPath: string;
specConfigPath: string | null;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@
},
"description": {
"type": "string",
"description": "Project description",
"default": ""
"description": "Project description"
},
"directory": {
"type": "string",
"description": "Directory where to generate the SDK",
"default": ""
"description": "Directory where to generate the SDK"
},
"skipInstall": {
"type": "boolean",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ export interface NgGenerateTypescriptSDKShellSchematicsSchema extends JsonObject
package: string;

/** Project description */
description: string;
description: string | null;

/** Directory where to generate the SDK */
directory: string;
directory: string | null;

/** Package manager to be used in the generated SDK */
packageManager: 'npm' | 'yarn' | '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
},
"name": {
"type": "string",
"description": "Library/Application name to be assigned into metadata",
"default": ""
"description": "Library/Application name to be assigned into metadata"
},
"filePattern": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface ComponentExtractorBuilderSchema extends JsonObject {
configOutputFile: string;

/** Library/Application name to be assigned into metadata */
name: string;
name: string | null;

/** Enable watch mode */
watch: boolean;
Expand Down
3 changes: 1 addition & 2 deletions packages/@o3r/core/builders/ngc/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"properties": {
"tsConfig": {
"type": "string",
"description": "The path to tsconfig file.",
"default": null
"description": "The path to tsconfig file."
},
"watch" : {
"type": "boolean",
Expand Down
6 changes: 2 additions & 4 deletions packages/@o3r/core/builders/pattern-replacement/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@
},
"searchValue": {
"type": "string",
"description": "The RegExp that has to be replaced by replaceValue",
"default": ""
"description": "The RegExp that has to be replaced by replaceValue"
},
"replaceValue": {
"type": "string",
"description": "A string containing the text to replace for every successful match of searchValue in this string.",
"default": ""
"description": "A string containing the text to replace for every successful match of searchValue in this string."
}
},
"additionalProperties": false,
Expand Down
12 changes: 5 additions & 7 deletions packages/@o3r/core/schematics/module/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,20 @@
"description": {
"type": "string",
"description": "Description of the new module",
"x-prompt": "Short description of the new module",
"default": null
"x-prompt": "Short description of the new module"
},
"prefix": {
"type": "string",
"description": "Prefix use to package future generation",
"default": ""
"description": "Prefix use to package future generation"
},
"projectName": {
"type": "string",
"description": "Name of the Nx Project (applied only in Nx Monorepo)",
"default": ""
"description": "Name of the Nx Project (applied only in Nx Monorepo)"
},
"path": {
"type": "string",
"description": "Target directory to generate the module"
"description": "Target directory to generate the module",
"default": ""
},
"skipLinter": {
"type": "boolean",
Expand Down
6 changes: 3 additions & 3 deletions packages/@o3r/core/schematics/module/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ export interface NgGenerateModuleSchema extends JsonObject {
path: string;

/** Description of the new module */
description: string;
description: string | null;

/** Prefix use to package future generation */
prefix: string;
prefix: string | null;

/** Name of the Nx Project (applied only in Nx Monorepo) */
projectName: string;
projectName: string | null;

/** Skip the linter process */
skipLinter: boolean;
Expand Down
4 changes: 2 additions & 2 deletions packages/@o3r/core/schematics/page/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"scope": {
"type": "string",
"description": "Page scope (e.g. booking, servicing, ssci, etc.)",
"default": "",
"x-prompt": "Page scope (e.g. booking, servicing, ssci, etc.)?"
"x-prompt": "Page scope (e.g. booking, servicing, ssci, etc.)?",
"default": ""
},
"appRoutingModulePath": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,16 @@
"assets": {
"oneOf": [
{
"type": "string",
"default": null
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"default": null
}
}
],
"description": "Asset folder containing the package translations",
"default": null
"description": "Asset folder containing the package translations"
},
"checkUnusedTranslation": {
"type": "boolean",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
},
"description": {
"type": "string",
"description": "Description of the localization",
"default": ""
"description": "Description of the localization"
},
"value": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export interface NgAddLocalizationKeySchematicsSchema extends JsonObject {
key: string;

/** Description of the localization */
description: string;
description: string | null;

/** Default value of the localization */
value: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"properties": {
"path": {
"type": "string",
"description": "Path to the component"
"description": "Path to the component",
"default": ""
},
"specFilePath": {
"type": "string",
"description": "Path to spec file of the component",
"default": ""
"description": "Path to spec file of the component"
},
"skipLinter": {
"type": "boolean",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export interface NgAddLocalizationSchematicsSchema extends JsonObject {
path: string;

/** Path to spec file of the component */
specFilePath: string;
specFilePath: string | null;

/** Skip the linter process */
skipLinter: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
},
"specFilePath": {
"type": "string",
"description": "Path to spec file of the component",
"default": ""
"description": "Path to spec file of the component"
},
"skipLinter": {
"type": "boolean",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export interface NgAddFixtureSchematicsSchema extends JsonObject {
path: string;

/** Path to spec file of the component */
specFilePath: string;
specFilePath: string | null;

/** Skip the linter process */
skipLinter: boolean;
Expand Down