make generated fields public
This commit is contained in:
		
							parent
							
								
									a0fbf64fce
								
							
						
					
					
						commit
						92c913c457
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -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(¶m.name);
 | 
			
		||||
            let required = param.required.unwrap_or_default();
 | 
			
		||||
            fields.push_str("pub ");
 | 
			
		||||
            fields.push_str(&field_name);
 | 
			
		||||
            fields.push_str(": ");
 | 
			
		||||
            if required {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue