Iterate through marshmallow schema fields.

        Generates: name, field pairs
2601
def iter_fields(self, schema: Schema) -> Iterable[Tuple[str, Field]]:
        
        for name in sorted(schema.fields.keys()):
            field = schema.fields[name]
            yield field.dump_to or name, field
675783
def get_marshmallow_schema_name(self, plugin, schema):
        
        try:
            return plugin.openapi.refs[schema]
        except KeyError:
            plugin.spec.definition(schema.__name__, schema=schema)
            return schema.__name__
1188931
def loadedfields(self):
        ''''''
        if self._loadedfields is None:
            for field in self._meta.scalarfields:
                yield field
        else:
            fields = self._meta.dfields
            processed = set()
            for name in self._loadedfields:
                if name in processed:
                    continue
                if name in fields:
                    processed.add(name)
                    yield fields[name]
                else:
                    name = name.split(JSPLITTER)[0]
                    if name in fields and name not in processed:
                        field = fields[name]
                        if field.type == 'json object':
                            processed.add(name)
                            yield field
645869
def iterfields(klass):
    
    is_field = lambda x: isinstance(x, TypedField)

    for name, field in inspect.getmembers(klass, predicate=is_field):
        yield name, field
1255066
def iter_fields(node):
    """"""
    # CPython 2.5 compat
    if not hasattr(node, '_fields') or not node._fields:
        return
    for field in node._fields:
        try:
            yield field, getattr(node, field)
        except AttributeError:
            pass
1035916
def schema
      UrlScraper::TYPES.each_pair do |schema, types|
        return schema if types.include?(self.type)
      end
      nil
    end
1036643
def derive_fields(self):
        
        if self.fields:
            return self.fields

        else:
            fields = []
            for field in self.object_list.model._meta.fields:
                if field.name != 'id':
                    fields.append(field.name)
            return fields
1150421
def get_fields(node, fields_tag="field_list"):
    
    fields_nodes = [c for c in node.children if c.tagname == fields_tag]
    if len(fields_nodes) == 0:
        return {}
    assert len(fields_nodes) == 1, "multiple nodes with tag " + fields_tag
    fields_node = fields_nodes[0]
    fields = [
        {f.tagname: f.rawsource.strip() for f in n.children}
        for n in fields_node.children
        if n.tagname == "field"
    ]
    return {f["field_name"]: f["field_body"] for f in fields}
475996
function convertFields (infields) {
  const fields = {}

  _.each(infields, (field) => {
    field.outName = convertFieldName(field.name)
    fields[field.name] = field
  })
  return fields
}
868699
function(requestId, fieldNames) {
		return protocol.implodeMessage(requestId,
			metadataMethods.GET_SCHEMA,
			protocol.implodeDataArray(fieldNames));
	}
1220519
def parse_fields(attributes):
        """"""
        return tuple(field.bind_name(name)
                     for name, field in six.iteritems(attributes)
                     if isinstance(field, fields.Field))
534063
def fieldnames(self):
        ''' 
        '''
        if not self._fields:
            if self._item_class is not None:
                for m in inspect.getmembers(self._item_class):
                    if m[0] == 'fields' and isinstance(m[1], dict):
                        self._fields = m[1]
                if not self._fields:
                    raise RuntimeError('Unknown item type, no fields: %s' % self._item_class)
            else:
                raise RuntimeError('Item class is not defined, %s' % self._item_class)
        return self._fields.keys()
775058
def get_fields(cls, inlcude_base=False, include_id=False):
        """"""
        for field in cls._meta.fields:
            if field.name == 'deleted':
                continue
            if not include_id and field.name == 'id':
                continue
            if not inlcude_base and field.name in ['created_at', 'updated_at']:
                continue
            yield field
690814
function initFields () {
    // skip if no model
    if (!this.model) {
        return
    }
    // if not fields list was passed in args then add all model properties
    if (!this.fields.length && this.model.schemaData) {
        // get data properites from schema
        var properties = this.model.schemaData.properties
        // add each property from data schema as form field
        _.each(properties, (schema, property) => {
            this.fields.push(property)
        })
    }
    // iterate over fields building spec based on args and schema
    this.fields = _.map(this.fields, field => {
        // field group
        if (Array.isArray(field)) {
            // build spec for each field in group
            field = _.map(field, field => initField(this, field))
            // set correct width units for fields
            setUnits(this, field)
        }
        // individual field
        else {
            field = initField(this, field)
        }
        // return field specification
        return field
    })
}
957553
def _parse_fields(self, result, field_name):
        
        field_list = []
        for key, value in result.get('schema', {}).get(field_name, {}).items():
            if key not in field_list:
                field_list.append(key)
        return field_list
753599
def extract_fields(self):
        

        # get the proper data manager for the object
        dm = IDataManager(self.context)

        # filter out ignored fields
        fieldnames = filter(lambda name: name not in self.ignore, self.keys)

        # schema mapping
        out = dict()

        for fieldname in fieldnames:
            try:
                # get the field value with the data manager
                fieldvalue = dm.json_data(fieldname)
            # https://github.com/collective/plone.jsonapi.routes/issues/52
            # -> skip restricted fields
            except Unauthorized:
                logger.debug("Skipping restricted field '%s'" % fieldname)
                continue
            except ValueError:
                logger.debug("Skipping invalid field '%s'" % fieldname)
                continue

            out[fieldname] = api.to_json_value(self.context, fieldname, fieldvalue)

        return out
809327
private void generateSchema(Class clazz) {
    try {
      File targetFile = new File(getGeneratedResourcesDirectory(), clazz.getName() + ".json");
      getLog().info("Generate JSON schema: " + targetFile.getName());
      SchemaFactoryWrapper schemaFactory = new SchemaFactoryWrapper();
      OBJECT_MAPPER.acceptJsonFormatVisitor(OBJECT_MAPPER.constructType(clazz), schemaFactory);
      JsonSchema jsonSchema = schemaFactory.finalSchema();
      OBJECT_MAPPER.writerWithDefaultPrettyPrinter().writeValue(targetFile, jsonSchema);
    }
    catch (IOException ex) {
      throw new RuntimeException(ex);
    }
  }