Remove optional entity field
Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
@@ -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,
|
||||
);
|
||||
|
||||
@@ -82,7 +82,6 @@ export function locationSpecToLocationEntity(
|
||||
spec: {
|
||||
type: location.type,
|
||||
target: location.target,
|
||||
optional: location.presence === 'optional' ? true : undefined,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user