commit 567107a79abf3ad446901ec5d4602ea5a5e2b17c parent afdef4d615e48a3a31e4105493d1556552c85f12 Author: Christian Grothoff <christian@grothoff.org> Date: Wed, 5 Aug 2026 00:27:37 +0200 use spec_web_url instead of spec_string where applicable Diffstat:
17 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_patch-management-instances-INSTANCE.c b/src/backend/taler-merchant-httpd_patch-management-instances-INSTANCE.c @@ -79,7 +79,7 @@ patch_instances_ID (struct TMH_MerchantInstance *mi, GNUNET_JSON_spec_string ("name", &name), GNUNET_JSON_spec_mark_optional ( - GNUNET_JSON_spec_string ("website", + TALER_JSON_spec_web_url ("website", (const char **) &is.website), NULL), GNUNET_JSON_spec_mark_optional ( diff --git a/src/backend/taler-merchant-httpd_post-management-instances.c b/src/backend/taler-merchant-httpd_post-management-instances.c @@ -89,7 +89,7 @@ post_instances (const struct TMH_RequestHandler *rh, &iphone), NULL), GNUNET_JSON_spec_mark_optional ( - GNUNET_JSON_spec_string ("website", + TALER_JSON_spec_web_url ("website", (const char **) &is.website), NULL), GNUNET_JSON_spec_mark_optional ( diff --git a/src/backend/taler-merchant-httpd_post-orders-ORDER_ID-pay.c b/src/backend/taler-merchant-httpd_post-orders-ORDER_ID-pay.c @@ -4856,7 +4856,7 @@ phase_parse_wallet_data (struct PayContext *pc) /* Fetching and checking that all 3 are present in some way */ struct GNUNET_JSON_Specification dspec[] = { - GNUNET_JSON_spec_string ("url", + TALER_JSON_spec_web_url ("url", &donau_url_tmp), GNUNET_JSON_spec_uint64 ("year", &pc->parse_wallet_data.donau.donation_year), diff --git a/src/backend/taler-merchant-httpd_post-private-accept-tos-early.c b/src/backend/taler-merchant-httpd_post-private-accept-tos-early.c @@ -44,7 +44,7 @@ TMH_private_post_accept_tos_early ( const char *exchange_url; const char *tos_version; struct GNUNET_JSON_Specification spec[] = { - GNUNET_JSON_spec_string ("exchange_url", + TALER_JSON_spec_web_url ("exchange_url", &exchange_url), GNUNET_JSON_spec_string ("tos_version", &tos_version), diff --git a/src/backend/taler-merchant-httpd_post-private-accounts-H_WIRE-kycauth.c b/src/backend/taler-merchant-httpd_post-private-accounts-H_WIRE-kycauth.c @@ -568,7 +568,7 @@ phase_parse (struct KycAuthContext *kac) const char *exchange_url; enum GNUNET_GenericReturnValue res; struct GNUNET_JSON_Specification spec[] = { - GNUNET_JSON_spec_string ("exchange_url", + TALER_JSON_spec_web_url ("exchange_url", &exchange_url), GNUNET_JSON_spec_end () }; diff --git a/src/backend/taler-merchant-httpd_post-private-donau.c b/src/backend/taler-merchant-httpd_post-private-donau.c @@ -283,7 +283,7 @@ TMH_private_post_donau_instance (const struct TMH_RequestHandler *rh, pdc); { struct GNUNET_JSON_Specification spec[] = { - GNUNET_JSON_spec_string ("donau_url", + TALER_JSON_spec_web_url ("donau_url", &pdc->donau_url), GNUNET_JSON_spec_uint64 ("charity_id", &pdc->charity_id), diff --git a/src/backend/taler-merchant-httpd_post-templates-TEMPLATE_ID.c b/src/backend/taler-merchant-httpd_post-templates-TEMPLATE_ID.c @@ -514,7 +514,7 @@ parse_using_templates_paivana_request ( { const json_t *choice_amounts = NULL; struct GNUNET_JSON_Specification spec[] = { - GNUNET_JSON_spec_string ("website", + TALER_JSON_spec_web_url ("website", &uc->parse_request.paivana.website), GNUNET_JSON_spec_string ("paivana_id", &uc->parse_request.paivana.paivana_id), diff --git a/src/lib/merchant_api_get-config.c b/src/lib/merchant_api_get-config.c @@ -233,7 +233,7 @@ handle_get_config_finished (void *cls, struct GNUNET_JSON_Specification ispec[] = { GNUNET_JSON_spec_string ("currency", &ei->currency), - GNUNET_JSON_spec_string ("base_url", + TALER_JSON_spec_web_url ("base_url", &ei->base_url), GNUNET_JSON_spec_fixed_auto ("master_pub", &ei->master_pub), diff --git a/src/lib/merchant_api_get-management-instances-INSTANCE.c b/src/lib/merchant_api_get-management-instances-INSTANCE.c @@ -115,7 +115,7 @@ parse_accounts (const json_t *ia, TALER_JSON_spec_full_payto_uri ("payto_uri", &ae->payto_uri), GNUNET_JSON_spec_mark_optional ( - GNUNET_JSON_spec_string ( + TALER_JSON_spec_web_url ( "credit_facade_url", &ae->credit_facade_url), NULL), @@ -231,7 +231,7 @@ handle_get_instance_finished (void *cls, &igr.details.ok.details.phone_validated), NULL), GNUNET_JSON_spec_mark_optional ( - GNUNET_JSON_spec_string ( + TALER_JSON_spec_web_url ( "website", &igr.details.ok.details.website), NULL), diff --git a/src/lib/merchant_api_get-management-instances.c b/src/lib/merchant_api_get-management-instances.c @@ -115,7 +115,7 @@ parse_instances (const json_t *ia, GNUNET_JSON_spec_array_const ("payment_targets", &ii->payment_targets), GNUNET_JSON_spec_mark_optional ( - GNUNET_JSON_spec_string ("website", + TALER_JSON_spec_web_url ("website", &ii->website), NULL), GNUNET_JSON_spec_mark_optional ( diff --git a/src/lib/merchant_api_get-orders-ORDER_ID.c b/src/lib/merchant_api_get-orders-ORDER_ID.c @@ -182,7 +182,7 @@ handle_get_order_finished (void *cls, case MHD_HTTP_ACCEPTED: { struct GNUNET_JSON_Specification spec[] = { - GNUNET_JSON_spec_string ( + TALER_JSON_spec_web_url ( "public_reorder_url", &owgr.details.accepted.public_reorder_url), GNUNET_JSON_spec_end () @@ -218,7 +218,7 @@ handle_get_order_finished (void *cls, &owgr.details.payment_required.already_paid_order_id), NULL), GNUNET_JSON_spec_mark_optional ( - GNUNET_JSON_spec_string ( + TALER_JSON_spec_web_url ( "fulfillment_url", &owgr.details.payment_required.fulfillment_url), NULL), diff --git a/src/lib/merchant_api_get-private-donau.c b/src/lib/merchant_api_get-private-donau.c @@ -112,7 +112,7 @@ parse_donau_instances ( struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_uint64 ("donau_instance_serial", &instance->donau_instance_serial), - GNUNET_JSON_spec_string ("donau_url", + TALER_JSON_spec_web_url ("donau_url", &instance->donau_url), GNUNET_JSON_spec_string ("charity_name", &instance->charity_name), diff --git a/src/lib/merchant_api_get-private-orders-ORDER_ID.c b/src/lib/merchant_api_get-private-orders-ORDER_ID.c @@ -130,7 +130,7 @@ handle_unpaid (struct TALER_MERCHANT_GetPrivateOrderHandle *oph, &osr->details.ok.details.unpaid.already_paid_order_id), NULL), GNUNET_JSON_spec_mark_optional ( - GNUNET_JSON_spec_string ( + TALER_JSON_spec_web_url ( "already_paid_fulfillment_url", &osr->details.ok.details.unpaid.already_paid_fulfillment_url), NULL), @@ -145,7 +145,7 @@ handle_unpaid (struct TALER_MERCHANT_GetPrivateOrderHandle *oph, "proto_contract_terms", &osr->details.ok.details.unpaid.proto_contract_terms), NULL), - GNUNET_JSON_spec_string ( + TALER_JSON_spec_web_url ( "order_status_url", &osr->details.ok.details.unpaid.order_status_url), GNUNET_JSON_spec_timestamp ( @@ -192,7 +192,7 @@ handle_claimed (struct TALER_MERCHANT_GetPrivateOrderHandle *oph, "contract_terms", &osr->details.ok.details.claimed.contract_terms), GNUNET_JSON_spec_mark_optional ( - GNUNET_JSON_spec_string ( + TALER_JSON_spec_web_url ( "order_status_url", &osr->details.ok.details.claimed.order_status_url), NULL), @@ -262,7 +262,7 @@ handle_paid (struct TALER_MERCHANT_GetPrivateOrderHandle *oph, GNUNET_JSON_spec_timestamp ("last_payment", &osr->details.ok.details.paid.last_payment), NULL), - GNUNET_JSON_spec_string ( + TALER_JSON_spec_web_url ( "order_status_url", &osr->details.ok.details.paid.order_status_url), GNUNET_JSON_spec_end () diff --git a/src/testing/test_merchant_api.c b/src/testing/test_merchant_api.c @@ -46,7 +46,7 @@ * commands should NOT wait for this timeout! */ #define POLL_ORDER_TIMEOUT \ - GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60) + GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60) /** * The 'poll-orders-conclude-1x' and other 'conclude' @@ -54,7 +54,7 @@ * here we use a short value! */ #define POLL_ORDER_SHORT_TIMEOUT \ - GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 2) + GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 2) /** * Configuration file we use. One (big) configuration is used @@ -285,8 +285,8 @@ cmd_exec_wirewatch (const char *label) * @param label label to use for the command. */ #define CMD_EXEC_AGGREGATOR(label) \ - TALER_TESTING_cmd_exec_aggregator (label "-aggregator", config_file), \ - TALER_TESTING_cmd_exec_transfer (label "-transfer", config_file) + TALER_TESTING_cmd_exec_aggregator (label "-aggregator", config_file), \ + TALER_TESTING_cmd_exec_transfer (label "-transfer", config_file) /** @@ -2858,7 +2858,7 @@ run (void *cls, true /* wait for response */)), TALER_TESTING_cmd_charity_post_merchant ("post-charity", "example", - "example.com", + "https://example.com/", "EUR:50", // max_per_year &bearer, "create-another-order-with-input-and-output", @@ -2866,7 +2866,7 @@ run (void *cls, MHD_HTTP_CREATED), TALER_TESTING_cmd_charity_post_merchant ("post-charity-idempotent", "example", - "example.com", + "https://example.com/", "EUR:50", // max_per_year &bearer, "create-another-order-with-input-and-output", diff --git a/src/util/base_terms_parse.c b/src/util/base_terms_parse.c @@ -49,7 +49,7 @@ TALER_MERCHANT_base_terms_parse ( &ct->summary_i18n), NULL), GNUNET_JSON_spec_mark_optional ( - GNUNET_JSON_spec_string_copy ("public_reorder_url", + TALER_JSON_spec_web_url_copy ("public_reorder_url", &ct->public_reorder_url), NULL), GNUNET_JSON_spec_mark_optional ( diff --git a/src/util/contract_parse.c b/src/util/contract_parse.c @@ -176,7 +176,7 @@ TALER_MERCHANT_proto_contract_parse ( &pc->merchant_pub), GNUNET_JSON_spec_fixed_auto ("h_wire", &pc->h_wire), - GNUNET_JSON_spec_string_copy ("merchant_base_url", + TALER_JSON_spec_web_url_copy ("merchant_base_url", &pc->merchant_base_url), TALER_MERCHANT_spec_merchant_details ("merchant", &pc->merchant), diff --git a/src/util/merchant_parse.c b/src/util/merchant_parse.c @@ -52,7 +52,7 @@ parse_merchant_details (void *cls, &merchant->email), NULL), GNUNET_JSON_spec_mark_optional ( - GNUNET_JSON_spec_string_copy ("website", + TALER_JSON_spec_web_url_copy ("website", &merchant->website), NULL), GNUNET_JSON_spec_mark_optional (