Skip to content

Commit

Permalink
rest: enable all unstable apis by default
Browse files Browse the repository at this point in the history
Until the rest service as a whole is "stabalized" with a sane set of
default stable apis, have the default be to enable all unstable apis.
  • Loading branch information
bmwill committed Oct 4, 2024
1 parent cd49c6e commit 80a7360
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/sui-rest-api/src/health.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ use axum::{
http::StatusCode,
response::IntoResponse,
};
use documented::Documented;
use std::time::{Duration, SystemTime};
use sui_types::storage::ReadStore;
use tap::Pipe;
use documented::Documented;

/// Perform a service health check
///
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-rest-api/src/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ use crate::openapi::{ApiEndpoint, OperationBuilder, ResponseBuilder, RouteHandle
use crate::{RestService, Result};
use axum::extract::State;
use axum::Json;
use documented::Documented;
use sui_sdk_types::types::CheckpointDigest;
use tap::Pipe;
use documented::Documented;

/// Get basic information about the state of a Node
#[derive(Documented)]
Expand Down
6 changes: 4 additions & 2 deletions crates/sui-rest-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ const ENDPOINTS: &[&dyn ApiEndpoint<RestService>] = &[
&health::HealthCheck,
&checkpoints::ListCheckpoints,
&checkpoints::GetCheckpoint,

// unstable APIs
&accounts::ListAccountObjects,
&objects::GetObject,
Expand Down Expand Up @@ -241,7 +240,10 @@ pub struct Config {

impl Config {
pub fn enable_unstable_apis(&self) -> bool {
self.enable_unstable_apis.unwrap_or(false)
// TODO
// Until the rest service as a whole is "stabalized" with a sane set of default stable
// apis, have the default be to enable all apis
self.enable_unstable_apis.unwrap_or(true)
}
}

Expand Down

0 comments on commit 80a7360

Please sign in to comment.