javaswift / joss

Java library for OpenStack Storage, aka Swift
http://javaswift.org
117 stars 108 forks source link

StoredObjectListElement in Javaswift/JOSS does not match openstack swift API? #152

Open chengchengpei opened 6 years ago

chengchengpei commented 6 years ago

The definition of StoredObjectListElement is here https://github.com/javaswift/joss/blob/master/src/main/java/org/javaswift/joss/command/shared/container/StoredObjectListElement.java

public class StoredObjectListElement {

    public String subdir;

    public String name;

    public String hash;

    public long bytes;

    @JsonProperty(value="content_type")
    public String contentType;

    @JsonProperty(value="last_modified")
    public String lastModified;
}

but the response of API listing objects look like (GET API here https://developer.openstack.org/api-ref/object-store/index.html#containers):

[
    {
        "hash": "451e372e48e0f6b1114fa0724aa79fa1",
        "last_modified": "2014-01-15T16:41:49.390270",
        "bytes": 14,
        "name": "goodbye",
        "content_type": "application/octet-stream"
    },
    {
        "hash": "ed076287532e86365e841e92bfc50d8c",
        "last_modified": "2014-01-15T16:37:43.427570",
        "bytes": 12,
        "name": "helloworld",
        "content_type": "application/octet-stream"
    }
]

The fields (subdir) seem not not match. and there may be symbol_link in the response body when listing objects.