summaryrefslogtreecommitdiffstats
path: root/generator
diff options
context:
space:
mode:
authorCyborus <cyborus@cyborus.xyz>2024-01-21 22:03:44 +0100
committerCyborus <cyborus@cyborus.xyz>2024-01-21 22:03:44 +0100
commit8d3738af50a5e0d85182701aa405204d3f19e7a8 (patch)
tree15b5a08a25db609762f242130e97dac34fbf02a6 /generator
parentsupport returning header values (diff)
downloadforgejo-api-8d3738af50a5e0d85182701aa405204d3f19e7a8.tar.xz
forgejo-api-8d3738af50a5e0d85182701aa405204d3f19e7a8.zip
special-case `ssh_url` to not be a `url::Url`
Diffstat (limited to 'generator')
-rw-r--r--generator/src/main.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/generator/src/main.rs b/generator/src/main.rs
index 9f43814..cc02416 100644
--- a/generator/src/main.rs
+++ b/generator/src/main.rs
@@ -790,7 +790,7 @@ fn create_struct_for_definition(
let prop_ty = schema_ref_type_name(spec, prop_schema)?;
let field_name = sanitize_ident(prop_name);
let mut field_ty = prop_ty.clone();
- if field_name.ends_with("url") && field_ty == "String" {
+ if field_name.ends_with("url") && field_name != "ssh_url" && field_ty == "String" {
field_ty = "url::Url".into()
}
if field_ty == name {