Skip to content

Commit

Permalink
updating to jsonPath
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Hawkins <[email protected]>
  • Loading branch information
shawkins committed Oct 16, 2024
1 parent bd559a8 commit 5b79029
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void addPrinterColumn(String path, String column, String format,

protected void handlePrinterColumns(AbstractJsonSchema<?, ?> resolver, PrinterColumnHandler handler) {
TreeMap<String, AnnotationMetadata> sortedCols = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
resolver.getAdditionalPrinterColumns().forEach(apc -> sortedCols.put(apc.path(), new AnnotationMetadata(apc, null)));
resolver.getAdditionalPrinterColumns().forEach(apc -> sortedCols.put(apc.jsonPath(), new AnnotationMetadata(apc, null)));
sortedCols.putAll(resolver.getAllPaths(PrinterColumn.class));
sortedCols.forEach((path, property) -> {
if (property.annotation instanceof AdditionalPrinterColumn) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
@Group("samples.javaoperatorsdk.io")
@Version("v1alpha1")
@ShortNames("jr")
@AdditionalPrinterColumn(name = "Age", path = ".metadata.creationTimestamp", type = Type.DATE)
@AdditionalPrinterColumn(name = "Age", jsonPath = ".metadata.creationTimestamp", type = Type.DATE)
public class JokeRequest extends CustomResource<JokeRequestSpec, JokeRequestStatus> implements Namespaced {

}
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public String getValue() {
*
* @return
*/
String path();
String jsonPath();

/**
* The type of the printer column
Expand Down

0 comments on commit 5b79029

Please sign in to comment.