diff --git a/src/modules/coreHttpApi/openapi.yml b/src/modules/coreHttpApi/openapi.yml index 26445fd8..5a4e2f0b 100644 --- a/src/modules/coreHttpApi/openapi.yml +++ b/src/modules/coreHttpApi/openapi.yml @@ -1836,8 +1836,6 @@ paths: format: binary nullable: false required: - - title - - expiresAt - file responses: 201: @@ -2048,7 +2046,7 @@ paths: get: operationId: getFileMetadata description: | - Gets metadata for the file with the given `idOrReference` when the accept header is set to `application/json` or a QrCode containing the reference to the file if the accept header it set to `image/png`. + Gets metadata for the file with the given `idOrReference` when the accept header is set to `application/json` or a QR Code containing the reference to the file if the accept header it set to `image/png`. `idOrReference` can either be a FileId (starting with `FIL`) or a FileReference (starting with `RklM`). tags: @@ -2134,7 +2132,7 @@ paths: /api/v2/Files/{id}/Token: post: operationId: createTokenForFile - description: Creates a `Token` for the `File` with the given `id`. + description: Creates a `Token` for the `File` with the given `id`. If the accept header is set to `image/png` instead of `application/json`, a QR Code containing the reference to the token is shown. tags: - Files parameters: @@ -2155,7 +2153,7 @@ paths: type: string format: date-time ephemeral: - description: If set to true the token will will not be cached in the database of the connector. Note that you will not be able to fetch this token unless you remember the truncatedReference of the token. Defaults to true. Will be ignored if Accept is set to image/png. + description: If set to true the token will will not be cached in the database of the connector. Note that you will not be able to fetch this token unless you remember the truncatedReference of the token. Defaults to true. Will be ignored if the accept header is set to `image/png`. type: boolean forIdentity: $ref: "#/components/schemas/Address" @@ -3533,7 +3531,7 @@ paths: /api/v2/RelationshipTemplates/{id}: get: operationId: getRelationshipTemplate - description: Fetches the `RelationshipTemplate` with the given `id` when the accept header is set to `application/json` or a QrCode containing the reference to the RelationshipTemplate if the accept header it set to `image/png`. + description: Fetches the `RelationshipTemplate` with the given `id` when the accept header is set to `application/json` or a QR Code containing the reference to the RelationshipTemplate if the accept header it set to `image/png`. tags: - RelationshipTemplates parameters: @@ -3578,7 +3576,7 @@ paths: /api/v2/RelationshipTemplates/Own/{id}/Token: post: operationId: createTokenForTemplate - description: Creates a `Token` for the own `RelationshipTemplate` with the given `id` + description: Creates a `Token` for the own `RelationshipTemplate` with the given `id`. If the accept header is set to `image/png` instead of `application/json`, a QR Code containing the reference to the token is shown. tags: - RelationshipTemplates parameters: @@ -3599,7 +3597,7 @@ paths: type: string format: date-time ephemeral: - description: If set to true the token will will not be cached in the database of the connector. Note that you will not be able to fetch this token unless you remember the truncatedReference of the token. Defaults to true. Will be ignored if Accept is set to image/png. + description: If set to true the token will will not be cached in the database of the connector. Note that you will not be able to fetch this token unless you remember the truncatedReference of the token. Defaults to true. Will be ignored if the accept header is set to `image/png`. type: boolean forIdentity: $ref: "#/components/schemas/Address" diff --git a/test/files.test.ts b/test/files.test.ts index 0cd2fddb..e9ad1d7b 100644 --- a/test/files.test.ts +++ b/test/files.test.ts @@ -314,7 +314,7 @@ describe("Load peer file with reference", () => { }); describe("Password-protected tokens for files", () => { - test("send and receive an unprotected template via password-protected token", async () => { + test("send and receive an unprotected file via password-protected token", async () => { const file = await uploadFile(client1); const token = (await client1.files.createTokenForFile(file.id, { passwordProtection: { password: "password" } })).result; expect(token.passwordProtection?.password).toBe("password"); @@ -327,7 +327,7 @@ describe("Password-protected tokens for files", () => { expect(response).toBeSuccessful(ValidationSchema.File); }); - test("send and receive an unprotected template via PIN-protected token", async () => { + test("send and receive an unprotected file via PIN-protected token", async () => { const file = await uploadFile(client1); const token = (await client1.files.createTokenForFile(file.id, { passwordProtection: { password: "1234", passwordIsPin: true } })).result; expect(token.passwordProtection?.password).toBe("1234");