Skip to content

Commit

Permalink
ref(profiles): Make schema stricter to reflect Rust consumer struct
Browse files Browse the repository at this point in the history
  • Loading branch information
phacops committed Jan 22, 2024
1 parent 68db9c8 commit 5b16f30
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
17 changes: 12 additions & 5 deletions schemas/profile-functions.v1.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@
"type": "string"
},
"project_id": {
"type": "integer"
"$ref": "#/definitions/UInt"
},
"received": {
"type": "integer"
"$ref": "#/definitions/UInt"
},
"release": {
"type": "string"
},
"retention_days": {
"type": "integer"
"$ref": "#/definitions/UInt"
},
"timestamp": {
"type": "integer"
"$ref": "#/definitions/UInt"
},
"transaction_name": {
"type": "string"
Expand Down Expand Up @@ -71,7 +71,14 @@
"$ref": "#/definitions/UInt"
}
}
}
},
"required": [
"fingerprint",
"function",
"in_app",
"package",
"self_times_ns"
]
}
},
"UInt": {
Expand Down
10 changes: 7 additions & 3 deletions schemas/profile-metadata.v1.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"type": "string"
},
"duration_ns": {
"type": "integer"
"$ref": "#/definitions/UInt"
},
"environment": {
"type": "string"
Expand All @@ -43,13 +43,13 @@
"type": "string"
},
"organization_id": {
"type": "integer"
"$ref": "#/definitions/UInt"
},
"platform": {
"type": "string"
},
"project_id": {
"type": "integer"
"$ref": "#/definitions/UInt"
},
"received": {
"type": "integer"
Expand Down Expand Up @@ -92,6 +92,10 @@
"version_code",
"version_name"
]
},
"UInt": {
"type": "integer",
"minimum": 0
}
}
}

0 comments on commit 5b16f30

Please sign in to comment.