Skip to content

Commit

Permalink
feat: using snake_case rather than kebab-case
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe committed Jul 28, 2023
1 parent 798fa88 commit 920e17b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/server/actix_server/annos_db_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use super::{error::CustomError, WebServerData};
#[serde_with::skip_serializing_none]
#[serde_with::serde_as]
#[derive(Deserialize, Debug, Clone)]
#[serde(rename_all = "kebab-case")]
#[serde(rename_all = "snake_case")]
struct Request {
pub genome_release: String,
}
Expand Down
2 changes: 1 addition & 1 deletion src/server/actix_server/annos_range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use super::{error::CustomError, WebServerData};
#[serde_with::skip_serializing_none]
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone)]
#[serde(rename_all = "kebab-case")]
#[serde(rename_all = "snake_case")]
struct Request {
/// Genome release version.
pub genome_release: String,
Expand Down
2 changes: 1 addition & 1 deletion src/server/actix_server/annos_variant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use super::fetch::{fetch_pos_protobuf, fetch_var_protobuf, fetch_var_tsv_json};
#[serde_with::skip_serializing_none]
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone)]
#[serde(rename_all = "kebab-case")]
#[serde(rename_all = "snake_case")]
struct Request {
/// Genome release specification.
#[allow(dead_code)]
Expand Down
2 changes: 1 addition & 1 deletion src/server/actix_server/genes_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use serde_with::{formats::CommaSeparator, StringWithSeparator};
#[serde_with::skip_serializing_none]
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone)]
#[serde(rename_all = "kebab-case")]
#[serde(rename_all = "snake_case")]
struct Request {
/// The HGNC IDs to search for.
#[serde_as(as = "Option<StringWithSeparator::<CommaSeparator, String>>")]
Expand Down
4 changes: 2 additions & 2 deletions src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ use crate::common::{self, cli::GenomeRelease};
serde::Deserialize,
enum_map::Enum,
)]
#[strum(serialize_all = "kebab-case")]
#[serde(rename_all = "kebab-case")]
#[strum(serialize_all = "snake_case")]
#[serde(rename_all = "snake_case")]
pub enum AnnoDb {
/// Other database.
#[default]
Expand Down

0 comments on commit 920e17b

Please sign in to comment.