error[E0277]: the trait bound `access_control::AccessControl: JsonSchema` is not satisfied
│ --> src/access_control/mod.rs:22:46
│ |
│ 22 | pub fn get_access_control_info(&self) -> &AccessControl {
│ | ^^^^^^^^^^^^^^ the trait `JsonSchema` is not implemented for `access_control::AccessControl`
│ |
│ = help: the following other types implement trait `JsonSchema`:
│ &'a T
│ &'a mut T
│ ()
│ (T0, T1)
│ (T0, T1, T2)
│ (T0, T1, T2, T3)
│ (T0, T1, T2, T3, T4)
│ (T0, T1, T2, T3, T4, T5)
│ and 163 others
│ = note: required for `&access_control::AccessControl` to implement `JsonSchema`
│ note: required by a bound in `SchemaGenerator::subschema_for`
│ --> /Users/ebraem/.cargo/registry/src/index.crates.io-6f17d22bba15001f/schemars-0.8.15/src/gen.rs:221:38
│ |
│ 221 | pub fn subschema_for<T: ?Sized + JsonSchema>(&mut self) -> Schema {
│ | ^^^^^^^^^^ required by this bound in `SchemaGenerator::subschema_for`
│
│ error[E0277]: the trait bound `RulesList: JsonSchema` is not satisfied
│ --> src/access_control/mod.rs:34:51
│ |
│ 34 | pub fn set_restricted_rules(&mut self, rules: RulesList) {
│ | ^^^^^^^^^ the trait `JsonSchema` is not implemented for `RulesList`
│ |
│ = help: the following other types implement trait `JsonSchema`:
│ &'a T
│ &'a mut T
│ ()
│ (T0, T1)
│ (T0, T1, T2)
│ (T0, T1, T2, T3)
│ (T0, T1, T2, T3, T4)
│ (T0, T1, T2, T3, T4, T5)
│ and 163 others
I believe this is because the abigen does not support the same types of schema traits as borsh. Is this a limitation with the standard or will support be added in the future.
When running
cargo near build --embed-abi
as well ascargo near abi
on the following contract sources: https://github.com/archetype-org/attestation-registry/blob/main/src/lib.rsI get the following error:
Similar code also fails due to the same reason: https://github.com/NEAR-DevHub/neardevhub-contract
I believe this is because the abigen does not support the same types of schema traits as
borsh
. Is this a limitation with the standard or will support be added in the future.