Skip to content

Commit

Permalink
feat: implement JsonSchema for Any (#157)
Browse files Browse the repository at this point in the history
* misc: derive jsonschema for any

* chore: add unclog
  • Loading branch information
Farhad-Shabani committed Oct 9, 2023
1 parent beb7d11 commit 30f49ae
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Implement `JsonSchema` for the `Any` type
([#156](https://github.com/cosmos/ibc-proto-rs/issues/156))
4 changes: 4 additions & 0 deletions src/prost/google.protobuf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1831,6 +1831,10 @@ pub mod generated_code_info {
///
#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))]
#[derive(Eq)]
#[cfg_attr(
all(feature = "json-schema", feature = "serde"),
derive(::schemars::JsonSchema)
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Any {
Expand Down
1 change: 1 addition & 0 deletions tools/proto-compiler/src/cmd/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ impl CompileCmd {
.extern_path(".ics23", "::ics23")
.type_attribute(".google.protobuf.Any", attrs_serde)
.type_attribute(".google.protobuf.Any", attrs_eq)
.type_attribute(".google.protobuf.Any", attrs_jsonschema)
.type_attribute(".google.protobuf.Timestamp", attrs_serde)
.type_attribute(".google.protobuf.Duration", attrs_serde)
.type_attribute(".google.protobuf.Duration", attrs_eq)
Expand Down

0 comments on commit 30f49ae

Please sign in to comment.