Skip to content

Commit d110246

Browse files
committed
Update Schema Max Length from 30 to 50
1 parent e4a2896 commit d110246

File tree

4 files changed

+5
-8
lines changed

4 files changed

+5
-8
lines changed

src/app/features/spaces/schemas/add-dialog/add-dialog.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ <h2 mat-dialog-title>Create new Schema</h2>
1212
</mat-form-field>
1313
<mat-form-field>
1414
<mat-label>Id</mat-label>
15-
<input matInput type="text" formControlName="id" required minlength="3" maxlength="30" autocomplete="off" />
15+
<input matInput type="text" formControlName="id" required minlength="3" maxlength="50" autocomplete="off" />
1616
<button mat-icon-button matSuffix (click)="normalizeId()">
1717
<mat-icon>auto_fix_normal</mat-icon>
1818
</button>
1919
<mat-hint>Will be used in OpenAPI Schema Name.</mat-hint>
20-
<mat-hint align="end">{{ form.controls['id'].value?.length || 0 }}/30</mat-hint>
20+
<mat-hint align="end">{{ form.controls['id'].value?.length || 0 }}/50</mat-hint>
2121
@if (form.controls['id'].errors; as errors) {
2222
<mat-error>{{ fe.errors(errors) }}</mat-error>
2323
}

src/app/features/spaces/schemas/edit-comp/edit-comp.component.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@
150150
}
151151
}
152152
</mat-select>
153-
<mat-hint align="end">{{ form.controls['previewField'].value?.length || 0 }}/50</mat-hint>
154153
@if (form.controls['previewField'].errors; as errors) {
155154
<mat-error>{{ fe.errors(errors) }}</mat-error>
156155
}

src/app/features/spaces/schemas/edit-comp/edit-comp.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export class EditCompComponent implements OnInit, DirtyFormGuardComponent {
5656
form: FormRecord = this.fb.record({
5757
displayName: this.fb.control<string | undefined>(undefined, SchemaValidator.DISPLAY_NAME),
5858
description: this.fb.control<string | undefined>(undefined, SchemaValidator.DESCRIPTION),
59-
previewField: this.fb.control<string | undefined>(undefined, SchemaValidator.PREVIEW_FIELD),
59+
previewField: this.fb.control<string | undefined>(undefined),
6060
labels: this.fb.control<string[] | undefined>([]),
6161
fields: this.fb.array<SchemaField>([]),
6262
});

src/app/shared/validators/schema.validator.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,14 @@ export class SchemaValidator {
77
CommonValidator.noSpace,
88
Validators.pattern(CommonPattern.SCHEMA_ID),
99
Validators.minLength(3),
10-
Validators.maxLength(30),
10+
Validators.maxLength(50),
1111
];
1212

1313
public static TYPE: ValidatorFn[] = [Validators.required];
1414

1515
public static DESCRIPTION: ValidatorFn[] = [Validators.maxLength(250)];
1616

17-
public static DISPLAY_NAME: ValidatorFn[] = [CommonValidator.noSpaceAround, Validators.maxLength(30)];
18-
19-
public static PREVIEW_FIELD: ValidatorFn[] = [CommonValidator.noSpaceAround, Validators.maxLength(30)];
17+
public static DISPLAY_NAME: ValidatorFn[] = [CommonValidator.noSpaceAround, Validators.maxLength(50)];
2018

2119
public static LABEL: ValidatorFn[] = [CommonValidator.noSpace, Validators.minLength(2), Validators.maxLength(50)];
2220

0 commit comments

Comments
 (0)