From 612b2c216e29346c442b9f5832f199dffe45d65d Mon Sep 17 00:00:00 2001 From: Kendall Weihe Date: Fri, 10 May 2024 11:06:51 -0400 Subject: [PATCH] Fix PEX '_type' to 'r#type', add git submodule to just setup recipe (#195) --- Justfile | 1 + crates/credentials/src/presentation_definition.rs | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Justfile b/Justfile index 435daab3..1120b3a0 100644 --- a/Justfile +++ b/Justfile @@ -3,6 +3,7 @@ set shell := ["bash", "-uc"] # Setup local development environment setup: #!/bin/bash + git submodule update --init --recursive if [[ "$(cargo 2>&1)" == *"rustup could not choose a version of cargo to run"* ]]; then rustup default 1.78.0 fi diff --git a/crates/credentials/src/presentation_definition.rs b/crates/credentials/src/presentation_definition.rs index 1d5e7980..2ece465d 100644 --- a/crates/credentials/src/presentation_definition.rs +++ b/crates/credentials/src/presentation_definition.rs @@ -203,7 +203,7 @@ impl InputDescriptor { struct JsonSchemaBuilder { schema: String, - _type: String, + r#type: String, properties: Map, required: Vec, } @@ -212,7 +212,7 @@ impl JsonSchemaBuilder { pub fn new() -> Self { JsonSchemaBuilder { schema: "http://json-schema.org/draft-07/schema#".to_string(), - _type: "object".to_string(), + r#type: "object".to_string(), properties: Map::new(), required: Vec::new(), } @@ -226,7 +226,7 @@ impl JsonSchemaBuilder { pub fn to_json(&self) -> Value { json!({ "$schema": self.schema, - "type": self._type, + "type": self.r#type, "properties": self.properties, "required": self.required, })