diff --git a/packages/api/src/controllers/asset.ts b/packages/api/src/controllers/asset.ts index df3d976b80..7550bcc79b 100644 --- a/packages/api/src/controllers/asset.ts +++ b/packages/api/src/controllers/asset.ts @@ -283,7 +283,7 @@ app.post( req.config.vodObjectStoreId, req.body ); - if (!req.body.url) { + if (typeof req.body?.url !== "string") { return res.status(422).json({ errors: ["You must provide a url from which import an asset"], }); diff --git a/packages/api/src/schema/schema.yaml b/packages/api/src/schema/schema.yaml index 232b314658..aea1586a29 100644 --- a/packages/api/src/schema/schema.yaml +++ b/packages/api/src/schema/schema.yaml @@ -1049,7 +1049,7 @@ components: example: 09F8B46C-61A0-4254-9875-F71F4C605BC7 new-asset-payload: - additionalProperties: false + additionalProperties: true required: - name properties: