Skip to content

Commit

Permalink
Add help string for entities returned by the API
Browse files Browse the repository at this point in the history
Closes #16
  • Loading branch information
thebe14 committed Apr 27, 2023
1 parent 53ecd33 commit 492fc39
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/eosc/eu/model/StorageElement.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,14 @@ public class StorageElement extends StorageElementBase {
public String downloadUrl;

@JsonInclude(JsonInclude.Include.NON_EMPTY)
@Schema(description="File checksum in the form `algorithm:value`")
public String checksum;

@JsonInclude(JsonInclude.Include.NON_EMPTY)
public String checksumType;
@Schema(description="Can be used to group files in file sets (collections). This only " +
"allows one level of grouping, for a deeper hierarchical structure " +
"use the field 'path'.")
public String collection;


/**
Expand Down
14 changes: 14 additions & 0 deletions src/main/java/eosc/eu/model/StorageElementBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import org.eclipse.microprofile.openapi.annotations.media.Schema;


/**
Expand All @@ -13,8 +14,21 @@ public class StorageElementBase {
public String kind;

@JsonInclude(JsonInclude.Include.NON_EMPTY)
@Schema(description="The name of the file. Can be used, together with the field 'path', " +
"to construct the destination path when this file is included in a " +
"data transfer.")
public String name;

/***
* The path of the file. Can be used, together with the field "name",
* to construct the destination path when this file is included in a
* data transfer.
*/
@Schema(description="The path of the file in the data repository. Can be used, together with the field 'path', " +
"to construct the destination path when this file is included in a " +
"data transfer.")
public String path = "/";


/**
* Constructor
Expand Down

0 comments on commit 492fc39

Please sign in to comment.