Fix RON schema, prettify doc comments

This commit is contained in:
jc 2024-08-24 16:29:28 +04:00
parent 4b05e9dd69
commit b15ba1d31a
3 changed files with 16 additions and 12 deletions

View file

@ -4041,12 +4041,14 @@ Schema(
Param( Param(
name: "currency", name: "currency",
ty: String, ty: String,
descr: Doc(md: "Three-letter ISO 4217 currency code, see [more on currencies]. Pass `XTR` for payments in [Telegram Stars]."), descr: Doc(
md: "Three-letter ISO 4217 currency code, see [more on currencies]. Pass `XTR` for payments in [Telegram Stars].",
md_links: { md_links: {
"more on currencies":"https://core.telegram.org/bots/payments#supported-currencies", "more on currencies":"https://core.telegram.org/bots/payments#supported-currencies",
"Telegram Stars": "Telegram Stars" "Telegram Stars": "https://t.me/BotNews/90"
} }
), ),
),
Param( Param(
name: "prices", name: "prices",
ty: ArrayOf(RawTy("LabeledPrice")), ty: ArrayOf(RawTy("LabeledPrice")),
@ -4191,12 +4193,14 @@ Schema(
Param( Param(
name: "currency", name: "currency",
ty: String, ty: String,
descr: Doc(md: "Three-letter ISO 4217 currency code, see [more on currencies]. Pass `XTR` for payments in [Telegram Stars]."), descr: Doc(
md: "Three-letter ISO 4217 currency code, see [more on currencies]. Pass `XTR` for payments in [Telegram Stars].",
md_links: { md_links: {
"more on currencies":"https://core.telegram.org/bots/payments#supported-currencies", "more on currencies":"https://core.telegram.org/bots/payments#supported-currencies",
"Telegram Stars": "Telegram Stars" "Telegram Stars": "https://t.me/BotNews/90"
} }
), ),
),
Param( Param(
name: "prices", name: "prices",
ty: ArrayOf(RawTy("LabeledPrice")), ty: ArrayOf(RawTy("LabeledPrice")),

View file

@ -15,7 +15,7 @@ pub struct PreCheckoutQuery {
pub from: User, pub from: User,
/// Three-letter ISO 4217 currency code, see [more on currencies]. Pass /// Three-letter ISO 4217 currency code, see [more on currencies]. Pass
/// "XTR" for payments in [Telegram Stars]. /// `XTR` for payments in [Telegram Stars].
/// ///
/// [more on currencies]: https://core.telegram.org/bots/payments#supported-currencies /// [more on currencies]: https://core.telegram.org/bots/payments#supported-currencies
/// [Telegram Stars]: https://t.me/BotNews/90 /// [Telegram Stars]: https://t.me/BotNews/90

View file

@ -9,7 +9,7 @@ use crate::types::OrderInfo;
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
pub struct SuccessfulPayment { pub struct SuccessfulPayment {
/// Three-letter ISO 4217 currency code, see [more on currencies]. Pass /// Three-letter ISO 4217 currency code, see [more on currencies]. Pass
/// "XTR" for payments in [Telegram Stars]. /// `XTR` for payments in [Telegram Stars].
/// ///
/// [more on currencies]: https://core.telegram.org/bots/payments#supported-currencies /// [more on currencies]: https://core.telegram.org/bots/payments#supported-currencies
/// [Telegram Stars]: https://t.me/BotNews/90 /// [Telegram Stars]: https://t.me/BotNews/90