mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-01-23 03:33:51 +01:00
everything runs through now, only ordering missing
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
DELEGATE_PROPERTY_NAME, struct_type_bounds_s, scope_url_to_variant,
|
||||
re_find_replacements, ADD_PARAM_FN, ADD_PARAM_MEDIA_EXAMPLE, upload_action_fn, METHODS_RESOURCE,
|
||||
method_name_to_variant, unique_type_name, size_to_bytes, method_default_scope,
|
||||
is_repeated_property, setter_fn_name, ADD_SCOPE_FN, rust_doc_sanitize)
|
||||
is_repeated_property, setter_fn_name, ADD_SCOPE_FN, rust_doc_sanitize, items)
|
||||
|
||||
def get_parts(part_prop):
|
||||
if not part_prop:
|
||||
@@ -336,7 +336,7 @@ ${capture(lib.test_hub, hub_type_name, comments=show_all) | hide_filter}
|
||||
// into the respective structure. Some of the parts shown here might not be applicable !
|
||||
// ${random_value_warning}
|
||||
let mut ${rb_name} = ${request_value_type}::default();
|
||||
% for spn, sp in request_value.get('properties', dict()).items():
|
||||
% for spn, sp in items(request_value.get('properties', dict())):
|
||||
% if parts is not None and spn not in parts:
|
||||
<% continue %>
|
||||
% endif
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
IO_TYPES, activity_split, enclose_in, REQUEST_MARKER_TRAIT, mb_type, indent_all_but_first_by,
|
||||
NESTED_TYPE_SUFFIX, RESPONSE_MARKER_TRAIT, split_camelcase_s, METHODS_RESOURCE, unique_type_name,
|
||||
PART_MARKER_TRAIT, canonical_type_name, TO_PARTS_MARKER, UNUSED_TYPE_MARKER, is_schema_with_optionals,
|
||||
rust_doc_sanitize)
|
||||
rust_doc_sanitize, items)
|
||||
%>\
|
||||
## Build a schema which must be an object
|
||||
###################################################################################################################
|
||||
@@ -12,7 +12,7 @@
|
||||
<% struct = 'pub struct ' + unique_type_name(s.id) %>\
|
||||
% if properties:
|
||||
${struct} {
|
||||
% for pn, p in properties.items():
|
||||
% for pn, p in items(properties):
|
||||
${p.get('description', 'no description provided') | rust_doc_sanitize, rust_doc_comment, indent_all_but_first_by(1)}
|
||||
% if pn != mangle_ident(pn):
|
||||
#[serde(rename="${pn}")]
|
||||
@@ -111,7 +111,7 @@ impl ${TO_PARTS_MARKER} for ${s_type} {
|
||||
/// the parts you want to see in the server response.
|
||||
fn to_parts(&self) -> String {
|
||||
let mut r = String::new();
|
||||
% for pn, p in s.properties.items():
|
||||
% for pn, p in items(s.properties):
|
||||
<%
|
||||
mn = 'self.' + mangle_ident(pn)
|
||||
rt = to_rust_type(schemas, s.id, pn, p, allow_optionals=allow_optionals)
|
||||
|
||||
Reference in New Issue
Block a user