Skip to content

Annotations: missing type validation (RSAN1a3) #2194

@paddybyers

Description

@paddybyers

Spec point

  • RSAN1a3: "The SDK must validate that the user supplied a `type`. All other fields are optional." Should throw error code 40003.

Observed behaviour

`constructValidateAnnotation()` does not validate that `type` is present. An annotation without a type is published without error, and the request succeeds (or fails server-side with a less informative error).

Failing test

Test Expected Actual
`RSAN1a3 - type required` Throw with error code 40003 No error thrown

Reproduction

```bash
RUN_DEVIATIONS=1 npx mocha --grep "RSAN1a3" test/uts/rest/channel/annotations.test.ts
```

From PR #2191, branch `uts-rest`.

┆Issue is synchronized with this Jira Task by Unito

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working. It's clear that this does need to be fixed.uts-issueIssues raised there there is an apparent discrepancy between this library and the UTS tests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions