Commit Graph

6 Commits

Author SHA1 Message Date
Klaas van Schelven
ed9ffa248d jsonschema check: allow for .values to be missing
see #16
2024-12-16 11:23:55 +01:00
Klaas van Schelven
b322a1e2fa Get up-to-date event.schema.json
6d2c435b8c
2024-09-16 14:22:05 +02:00
Klaas van Schelven
f1b75aab81 api.json.schema: put back in code, make test fail on invalidness and related fixes
This reverts course on 4201fbd778, and restores event.schema.json from that
commit.  In that commit we said: 'this is not used'. Not true: it's used in a
test, though this test used the validity check to silently skip.

In this commit:

1. Do _not_ just silently skip invalid samples. Since we have a way of properly
   validating, let's use that so that we know how useful the samples that we have
   actually are.

2. Deal with "_meta", a field that we sometimes see in the "private samples" (data
   that ultimately comes from running a somewhat recent python-sdk against my
   actual codebase). The need for this was exposed by [1]

3. Add a test for the up-to-date-ness of event.json.schema

4. remove special-cased attribute-checks in `is_valid`; `send_json` was, at the
   time, an opportunistic way to just get my hands on some sample data. the
   approach at validation reflected that: I just did some tests on the existence
   of certain attributes to determine which json files were even events. But in
   the end I did a full validation using an API schema, which kinda made the
   whole business useless. This commit cleans up the individual checks.
2024-09-16 11:28:05 +02:00
Klaas van Schelven
4201fbd778 remove vendored event.schema.json from codebase, document where it can be found in the future 2024-09-13 17:47:25 +02:00
Klaas van Schelven
5e995abf6d project_id is not actually a required attr
(it was added as such for some reason in the sentry _code_ though not documented API
; see the note in the sentry commit)
2023-11-12 21:19:44 +01:00
Klaas van Schelven
4c08fb81c0 copy-in json schema for events
from (current) sentry dd4fee44f121f46182eba6e8f97b3cde61dc905c
2023-11-12 20:43:33 +01:00