Skip to content

Commit

Permalink
fix: off json ref #//MediaAudio/properties/item
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarenaldi committed Oct 1, 2024
1 parent b609eed commit 7a4d418
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/publication/common/media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ import {
encryptableUriSchema,
} from '../../primitives.js';

export const MediaAttributesSchema = MetadataAttributeSchema.array()
.min(1)
.optional()
.describe(
'A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard.',
);

const MediaCommonSchema = z.object({
item: encryptableUriSchema('The location of the file.'),
attributes: MetadataAttributeSchema.array()
.min(1)
.optional()
.describe(
'A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard.',
),
attributes: MediaAttributesSchema,
});

/**
Expand Down Expand Up @@ -286,9 +288,6 @@ function resolveAnyMediaSchema(val: unknown) {
case MediaVideoMimeType.WEBM:
return MediaVideoSchema;
}

// the alleged AnyMedia is not a valid shape
return AnyMediaShapeScheme;
}

/**
Expand Down

0 comments on commit 7a4d418

Please sign in to comment.