Skip to content

Commit ca4c324

Browse files
author
Rajat
committed
Added back signature security scheme
1 parent e5c35c6 commit ca4c324

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

apps/api/src/media/routes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ router.post(
2727
#swagger.tags = ['Media']
2828
#swagger.summary = 'Upload Media'
2929
#swagger.description = 'Upload a new media file. Use API key auth from Authorize (`x-medialit-apikey`) or pass `x-medialit-signature` for this endpoint only.'
30-
#swagger.security = [{ "apiKeyAuth": [] }]
30+
#swagger.security = [{ "apiKeyAuth": [] }, { "signatureAuth": [] }]
3131
#swagger.parameters['x-medialit-signature'] = {
3232
in: 'header',
3333
description: 'Upload Signature for secure client-side uploads',

apps/api/src/swagger-generator.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ const doc = {
6464
in: "header",
6565
name: "x-medialit-apikey",
6666
},
67+
signatureAuth: {
68+
type: "apiKey",
69+
in: "header",
70+
name: "x-medialit-signature",
71+
},
6772
},
6873
schemas: {}, // Leave empty for autogen, verify later
6974
},

apps/api/src/swagger_output.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,9 @@
359359
"security": [
360360
{
361361
"apiKeyAuth": []
362+
},
363+
{
364+
"signatureAuth": []
362365
}
363366
],
364367
"requestBody": {
@@ -812,6 +815,11 @@
812815
"type": "apiKey",
813816
"in": "header",
814817
"name": "x-medialit-apikey"
818+
},
819+
"signatureAuth": {
820+
"type": "apiKey",
821+
"in": "header",
822+
"name": "x-medialit-signature"
815823
}
816824
},
817825
"schemas": {

0 commit comments

Comments
 (0)