private void generateProperties(List<FieldInfo> fields, Map<TypeSignature, String> visited, String path,
                                    ObjectNode parent) {
        final ObjectNode objectNode = mapper.createObjectNode();
        final ArrayNode required = mapper.createArrayNode();

        for (FieldInfo field : fields) {
            if (VALID_FIELD_LOCATIONS.contains(field.location())) {
                generateField(field, visited, path + "/properties", objectNode, required);
            }
        }

        parent.set("properties", objectNode);
        parent.set("required", required);
    }
Generate properties for the given fields and writes to the object node.

@param fields list of fields that the child has.
@param visited a map of visited fields, required for cycle detection.
@param path current path as defined in JSON Schema spec, required for cyclic references.
@param parent object node that the results will be written to.
core/src/main/java/com/linecorp/armeria/server/docs/JsonSchemaGenerator.java