1
0
Fork 0

make generated fields public

This commit is contained in:
Cyborus 2024-01-16 19:13:45 -05:00
parent a0fbf64fce
commit 92c913c457
No known key found for this signature in database

View file

@ -730,6 +730,7 @@ fn create_struct_for_definition(
fields.push_str(prop_name);
fields.push_str("\")]\n");
}
fields.push_str("pub ");
fields.push_str(&field_name);
fields.push_str(": ");
fields.push_str(&field_ty);
@ -805,6 +806,7 @@ fn create_query_struct(spec: &OpenApiV2, path: &str, op: &Operation) -> eyre::Re
let ty = param_type(param, true)?;
let field_name = sanitize_ident(&param.name);
let required = param.required.unwrap_or_default();
fields.push_str("pub ");
fields.push_str(&field_name);
fields.push_str(": ");
if required {