Skip to content

Commit

Permalink
refactor: change type name delimiters from <> () [] to _
Browse files Browse the repository at this point in the history
  • Loading branch information
daxartio committed Oct 22, 2024
1 parent 27320bf commit 58a37fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion poem-openapi/src/types/external/chrono.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ macro_rules! impl_naive_datetime_types {
type RawElementValueType = Self;

fn name() -> Cow<'static, str> {
concat!($type_name, "(", $format, ")").into()
concat!($type_name, "_", $format).into()
}

fn schema_ref() -> MetaSchemaRef {
Expand Down
4 changes: 2 additions & 2 deletions poem-openapi/src/types/external/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ impl Type for OffsetDateTime {
type RawElementValueType = Self;

fn name() -> Cow<'static, str> {
"string_datetime".into()
"string_date-time".into()
}

fn schema_ref() -> MetaSchemaRef {
Expand Down Expand Up @@ -83,7 +83,7 @@ macro_rules! impl_naive_datetime_types {
type RawElementValueType = Self;

fn name() -> Cow<'static, str> {
concat!($type_name, "(", $format, ")").into()
concat!($type_name, "_", $format).into()
}

fn schema_ref() -> MetaSchemaRef {
Expand Down

0 comments on commit 58a37fc

Please sign in to comment.