Code review fixes.

This commit is contained in:
Marek Calus
2020-10-22 09:35:31 +02:00
parent d9c63dd56c
commit cb93d87b17
4 changed files with 67 additions and 380 deletions
+3 -2
View File
@@ -18,8 +18,9 @@ export type LocationSpec = {
type: string;
target: string;
// When using repo importer plugin, location is being created before the component yaml file is merged to the main branch.
// This flag is then set to disable validation that prevents creation of location if target file does not yet exist.
pendingLocation?: boolean;
// This flag is then set to indicate that the file can be not present.
// default value: 'required'.
presence?: 'optional' | 'required';
};
export type Location = {
@@ -21,7 +21,7 @@ export const locationSpecSchema = yup
.object<LocationSpec>({
type: yup.string().required(),
target: yup.string().required(),
pendingLocation: yup.bool(),
pendingLocation: yup.bool().notRequired(),
})
.noUnknown()
.required();