Skip to content

Commit

Permalink
fix(Rust bindings): Correct casing for property type overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
nokome committed Aug 29, 2021
1 parent e1c394e commit 586529a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions rust/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1727,10 +1727,10 @@ pub struct ArrayValidator {
pub items_validator: Option<Box<ValidatorTypes>>,

/// An array node is valid if its size is less than, or equal to, this value.
pub max_items: Option<Integer>,
pub max_items: Option<u32>,

/// An array node is valid if its size is greater than, or equal to, this value.
pub min_items: Option<Integer>,
pub min_items: Option<u32>,

/// A flag to indicate that each value in the array should be unique.
pub unique_items: Option<Boolean>,
Expand Down Expand Up @@ -3935,10 +3935,10 @@ pub struct StringValidator {
pub id: Option<Box<String>>,

/// The maximum length for a string node.
pub max_length: Option<Integer>,
pub max_length: Option<u32>,

/// The minimum length for a string node.
pub min_length: Option<Integer>,
pub min_length: Option<u32>,

/// A regular expression that a string node must match.
pub pattern: Option<Box<String>>,
Expand Down
8 changes: 4 additions & 4 deletions ts/bindings/rust.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ const propertyTypes: Record<string, string> = {
// Expect list items positions to be non-zero
'ListItem.position': 'u32',
// These validation related properties have a minimum of zero
'ArrayValidator.min_items': 'u32',
'ArrayValidator.max_items': 'u32',
'StringValidator.min_length': 'u32',
'StringValidator.max_length': 'u32',
'ArrayValidator.minItems': 'u32',
'ArrayValidator.maxItems': 'u32',
'StringValidator.minLength': 'u32',
'StringValidator.maxLength': 'u32',
// SHA-256 digests are most efficiently represented as 32 bytes
'*.compileDigest': '[u8; 32]',
'*.buildDigest': '[u8; 32]',
Expand Down

0 comments on commit 586529a

Please sign in to comment.