Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpc: remove logic for generating openapi spec #20724

Merged
merged 2 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
490 changes: 246 additions & 244 deletions Cargo.lock

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,8 @@ prometheus-http-query = { version = "0.8", default-features = false, features =
"rustls-tls",
] }
prometheus-parse = { git = "https://github.com/asonnino/prometheus-parser.git", rev = "75334db" }
proptest = "1.1.0"
proptest-derive = "0.3.0"
proptest = "1.6.0"
proptest-derive = "0.5"
prost = "0.13"
prost-build = "0.13"
prost-types = "0.13.1"
Expand Down Expand Up @@ -599,7 +599,8 @@ anemo-tower = { git = "https://github.com/mystenlabs/anemo.git", rev = "e609f769

# core-types with json format for REST api
# sui-sdk-types = { version = "0.0.1", features = ["hash", "serde", "schemars"] }
sui-sdk-types = { git = "https://github.com/MystenLabs/sui-rust-sdk.git", rev = "24c34933c421319e9aa1c48b3b7108c756e1422f", features = ["hash", "serde", "schemars"] }
sui-sdk-types = { git = "https://github.com/MystenLabs/sui-rust-sdk.git", rev = "cb174b66714ea643e4b78bbfadb3f9c17e635460", features = ["hash", "serde"] }
sui-sdk-transaction-builder = { git = "https://github.com/MystenLabs/sui-rust-sdk.git", rev = "cb174b66714ea643e4b78bbfadb3f9c17e635460", package = "sui-transaction-builder" }

### Workspace Members ###
anemo-benchmark = { path = "crates/anemo-benchmark" }
Expand Down
1 change: 1 addition & 0 deletions crates/sui-e2e-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ sui-keys.workspace = true
sui-rpc-api.workspace = true
shared-crypto.workspace = true
sui-sdk-types.workspace = true
sui-sdk-transaction-builder.workspace = true

passkey-types.workspace = true
passkey-client.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-e2e-tests/tests/rpc/committee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ async fn get_committee() {
assert_eq!(latest_committee, epoch_0_committee);

// ensure we can convert proto committee type to sdk_types committee
sui_sdk_types::types::ValidatorCommittee::try_from(&latest_committee).unwrap();
sui_sdk_types::ValidatorCommittee::try_from(&latest_committee).unwrap();
}
2 changes: 1 addition & 1 deletion crates/sui-e2e-tests/tests/rpc/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use sui_macros::sim_test;
use sui_rpc_api::types::ExecuteTransactionOptions;
use sui_rpc_api::Client;
use sui_sdk_types::types::BalanceChange;
use sui_sdk_types::BalanceChange;
use sui_test_transaction_builder::make_transfer_sui_transaction;
use sui_types::base_types::SuiAddress;
use sui_types::effects::TransactionEffectsAPI;
Expand Down
4 changes: 2 additions & 2 deletions crates/sui-e2e-tests/tests/rpc/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ mod transactions;

async fn transfer_coin(
context: &sui_sdk::wallet_context::WalletContext,
) -> sui_sdk_types::types::TransactionDigest {
) -> sui_sdk_types::TransactionDigest {
let gas_price = context.get_reference_gas_price().await.unwrap();
let accounts_and_objs = context.get_all_accounts_and_gas_objects().await.unwrap();
let sender = accounts_and_objs[0].0;
Expand All @@ -29,7 +29,7 @@ async fn transfer_coin(

async fn stake_with_validator(
cluster: &test_cluster::TestCluster,
) -> sui_sdk_types::types::TransactionDigest {
) -> sui_sdk_types::TransactionDigest {
let context = &cluster.wallet;
let gas_price = context.get_reference_gas_price().await.unwrap();
let accounts_and_objs = context.get_all_accounts_and_gas_objects().await.unwrap();
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-e2e-tests/tests/rpc/objects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use sui_rpc_api::proto::node::node_client::NodeClient;
use sui_rpc_api::proto::node::GetObjectOptions;
use sui_rpc_api::proto::node::GetObjectRequest;
use sui_rpc_api::proto::node::GetObjectResponse;
use sui_sdk_types::types::ObjectId;
use sui_sdk_types::ObjectId;
use test_cluster::TestClusterBuilder;

#[sim_test]
Expand Down
34 changes: 15 additions & 19 deletions crates/sui-e2e-tests/tests/rpc/resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ use sui_rpc_api::client::reqwest::StatusCode;
use sui_rpc_api::client::sdk::Client as RestClient;
use sui_rpc_api::rest::transactions::ResolveTransactionQueryParameters;
use sui_rpc_api::Client;
use sui_sdk_types::types::unresolved;
use sui_sdk_types::types::Argument;
use sui_sdk_types::types::Command;
use sui_sdk_types::types::TransactionExpiration;
use sui_sdk_transaction_builder::unresolved;
use sui_sdk_types::Argument;
use sui_sdk_types::Command;
use sui_sdk_types::TransactionExpiration;
use sui_types::base_types::SuiAddress;
use sui_types::effects::TransactionEffectsAPI;
use test_cluster::TestClusterBuilder;
Expand Down Expand Up @@ -40,12 +40,10 @@ async fn resolve_transaction_simple_transfer() {
..Default::default()
},
],
commands: vec![Command::TransferObjects(
sui_sdk_types::types::TransferObjects {
objects: vec![Argument::Input(0)],
address: Argument::Input(1),
},
)],
commands: vec![Command::TransferObjects(sui_sdk_types::TransferObjects {
objects: vec![Argument::Input(0)],
address: Argument::Input(1),
})],
},
sender: sender.into(),
gas_payment: None,
Expand Down Expand Up @@ -104,12 +102,10 @@ async fn resolve_transaction_transfer_with_sponsor() {
..Default::default()
},
],
commands: vec![Command::TransferObjects(
sui_sdk_types::types::TransferObjects {
objects: vec![Argument::Input(0)],
address: Argument::Input(1),
},
)],
commands: vec![Command::TransferObjects(sui_sdk_types::TransferObjects {
objects: vec![Argument::Input(0)],
address: Argument::Input(1),
})],
},
sender: sender.into(),
gas_payment: Some(unresolved::GasPayment {
Expand Down Expand Up @@ -179,7 +175,7 @@ async fn resolve_transaction_borrowed_shared_object() {
object_id: Some("0x6".parse().unwrap()),
..Default::default()
}],
commands: vec![Command::MoveCall(sui_sdk_types::types::MoveCall {
commands: vec![Command::MoveCall(sui_sdk_types::MoveCall {
package: "0x2".parse().unwrap(),
module: "clock".parse().unwrap(),
function: "timestamp_ms".parse().unwrap(),
Expand Down Expand Up @@ -252,7 +248,7 @@ async fn resolve_transaction_mutable_shared_object() {
..Default::default()
},
],
commands: vec![Command::MoveCall(sui_sdk_types::types::MoveCall {
commands: vec![Command::MoveCall(sui_sdk_types::MoveCall {
package: "0x3".parse().unwrap(),
module: "sui_system".parse().unwrap(),
function: "request_add_stake".parse().unwrap(),
Expand Down Expand Up @@ -305,7 +301,7 @@ async fn resolve_transaction_insufficient_gas() {
object_id: Some("0x6".parse().unwrap()),
..Default::default()
}],
commands: vec![Command::MoveCall(sui_sdk_types::types::MoveCall {
commands: vec![Command::MoveCall(sui_sdk_types::MoveCall {
package: "0x2".parse().unwrap(),
module: "clock".parse().unwrap(),
function: "timestamp_ms".parse().unwrap(),
Expand Down
5 changes: 1 addition & 4 deletions crates/sui-rpc-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,15 @@ reqwest.workspace = true
url.workspace = true
serde.workspace = true
serde_json.workspace = true
serde_yaml.workspace = true
serde_with.workspace = true
tap.workspace = true
thiserror.workspace = true
tokio.workspace = true
async-trait.workspace = true
itertools.workspace = true
sui-sdk-types.workspace = true
sui-sdk-transaction-builder.workspace = true
prometheus.workspace = true
openapiv3 = { git = "https://github.com/bmwill/openapiv3.git", rev = "ca4b4845b7c159a39f5c68ad8f7f76cb6f4d6963" }
schemars.workspace = true
documented = "0.6.0"
http.workspace = true
tower.workspace = true

Expand Down
21 changes: 0 additions & 21 deletions crates/sui-rpc-api/openapi/elements.html

This file was deleted.

Loading
Loading