Remove optional entity field

Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
Johan Haals
2021-04-19 15:24:42 +02:00
parent ab5ad7ecc3
commit d126628a9b
3 changed files with 3 additions and 5 deletions
@@ -31,7 +31,6 @@ export interface LocationEntityV1alpha1 extends Entity {
type?: string;
target?: string;
targets?: string[];
optional?: boolean;
};
}
@@ -181,7 +181,7 @@ export class CatalogProcessingOrchestratorImpl
// Backwards compatible processing of location entites
if (isLocationEntity(entity)) {
const { type = location.type, optional = false } = entity.spec;
const { type = location.type } = entity.spec;
const targets = new Array<string>();
if (entity.spec.target) {
targets.push(entity.spec.target);
@@ -214,9 +214,9 @@ export class CatalogProcessingOrchestratorImpl
{
type,
target,
presence: optional ? 'optional' : 'required',
presence: 'required',
},
Boolean(entity.spec?.optional),
false,
emitter.emit,
this.options.parser,
);
-1
View File
@@ -82,7 +82,6 @@ export function locationSpecToLocationEntity(
spec: {
type: location.type,
target: location.target,
optional: location.presence === 'optional' ? true : undefined,
},
};