code: private void visit(XmlSchemaSimpleType xsdType, final int level,
              final String avroFieldName, long minOccurs, long maxOccurs,
              ArrayNode avroFields) throws Xsd2AvroTranslatorException {
  
          Object avroType = getAvroPrimitiveType(avroFieldName, xsdType,
                  maxOccurs > 1, minOccurs == 0 && maxOccurs == 1);
  
          ObjectNode avroField = MAPPER.createObjectNode();
          avroField.put("name", avroFieldName);
          if (avroType != null) {
              if (avroType instanceof String) {
                  avroField.put("type", (String) avroType);
              } else if (avroType instanceof JsonNode) {
                  avroField.put("type", (JsonNode) avroType);
              }
          }
  
          avroFields.add(avroField);
      }
docs: Create an avro primitive type field using an XML schema type.
  
  @param xsdType the XML schema simple type
  @param level the depth in the hierarchy
  @param avroFieldName to use as the field name for this avro field
  @param minOccurs lower dimension for arrays & zero for optional fields
  @param maxOccurs dimension for arrays
  @param avroFields array of avro fields being populated
  @throws Xsd2AvroTranslatorException if something abnormal in the xsd