diff options
| author | rtkay123 <dev@kanjala.com> | 2026-03-31 21:35:49 +0200 |
|---|---|---|
| committer | rtkay123 <dev@kanjala.com> | 2026-03-31 21:35:49 +0200 |
| commit | 2c336f0339747aa77a8fe6613b83200c8d4902a5 (patch) | |
| tree | 5e77ac42c48c455fd9869df6baf39c0887f6d8e6 /lib/api-config/src/schema/create.rs | |
| parent | cec58d78e968250e4c589899eab460d1132f6d01 (diff) | |
| download | warden-2c336f0339747aa77a8fe6613b83200c8d4902a5.tar.bz2 warden-2c336f0339747aa77a8fe6613b83200c8d4902a5.zip | |
test(config): schema
Diffstat (limited to 'lib/api-config/src/schema/create.rs')
| -rw-r--r-- | lib/api-config/src/schema/create.rs | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/lib/api-config/src/schema/create.rs b/lib/api-config/src/schema/create.rs deleted file mode 100644 index e6511d5..0000000 --- a/lib/api-config/src/schema/create.rs +++ /dev/null @@ -1,43 +0,0 @@ -use serde::{Deserialize, Serialize}; - -#[derive(Deserialize, Serialize)] -#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))] -#[cfg_attr(feature = "utoipa", schema(example = json!({ - "schemaType": "custom.schema", - "schemaVersion": "1.0.0", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "title": "FinancialTransaction", - "type": "object", - "required": ["transactionId", "amount", "currency", "timestamp"], - "properties": { - "transactionId": { - "type": "string", - "format": "uuid" - }, - "amount": { - "type": "number", - "exclusiveMinimum": 0 - }, - "currency": { - "type": "string", - "pattern": "^[A-Z]{3}$", - "description": "ISO 4217 Alpha-3 code (e.g., USD, EUR)" - }, - "timestamp": { - "type": "string", - "format": "date-time" - }, - } - } -})))] -#[serde(rename_all = "camelCase")] -/// The json schema to validate for each transaction of this type and version -pub struct CreateSchema { - /// Transaction schema type - pub schema_type: String, - /// The schema's version - pub schema_version: String, - /// The json schema - pub schema: serde_json::Value, -} |
