Skip to content

Commit b94a23f

Browse files
Merge pull request #986 from micalevisk/feat-add-schema-entry
feat: add `$schema` entry on generated `nest-cli.json` files
2 parents 9bd3a0b + ac6fecf commit b94a23f

File tree

5 files changed

+7
-0
lines changed

5 files changed

+7
-0
lines changed

src/lib/application/files/js/nest-cli.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/nest-cli",
23
"language": "js",
34
"collection": "@nestjs/schematics",
45
"sourceRoot": "src"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/nest-cli",
23
"collection": "@nestjs/schematics",
34
"sourceRoot": "src"
45
}

src/lib/configuration/configuration.factory.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ describe('Configuration Factory', () => {
2020
files.find(filename => filename === '/project/nest-cli.json'),
2121
).not.toBeUndefined();
2222
expect(JSON.parse(tree.readContent('/project/nest-cli.json'))).toEqual({
23+
$schema: 'https://json.schemastore.org/nest-cli',
2324
collection: '@nestjs/schematics',
2425
sourceRoot: 'src',
2526
});
@@ -35,6 +36,7 @@ describe('Configuration Factory', () => {
3536
files.find(filename => filename === '/project/nest-cli.json'),
3637
).not.toBeUndefined();
3738
expect(JSON.parse(tree.readContent('/project/nest-cli.json'))).toEqual({
39+
$schema: 'https://json.schemastore.org/nest-cli',
3840
language: 'js',
3941
collection: '@nestjs/schematics',
4042
sourceRoot: 'src',
@@ -51,6 +53,7 @@ describe('Configuration Factory', () => {
5153
files.find(filename => filename === '/project/nest-cli.json'),
5254
).not.toBeUndefined();
5355
expect(JSON.parse(tree.readContent('/project/nest-cli.json'))).toEqual({
56+
$schema: 'https://json.schemastore.org/nest-cli',
5457
collection: 'foo',
5558
sourceRoot: 'src',
5659
});

src/lib/configuration/files/js/nest-cli.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/nest-cli",
23
"language": "<%= language %>",
34
"collection": "<%= collection %>",
45
"sourceRoot": "src"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/nest-cli",
23
"collection": "<%= collection %>",
34
"sourceRoot": "src"
45
}

0 commit comments

Comments
 (0)