Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion cmd/kosli/getAttestationType.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,11 @@ func printVersionedAttestationTypeAsTable(raw map[string]interface{}, rows []str
rows = append(rows, fmt.Sprintf(" Created By:\t%s", attestationType["created_by"]))

if typeSchema, ok := attestationType["type_schema"]; ok {
rows = append(rows, fmt.Sprintf(" Type schema:\t%s", typeSchema))
typeSchemaJSON, err := json.Marshal(typeSchema)
if err != nil {
return []string{}, err
}
rows = append(rows, fmt.Sprintf(" Type schema:\t%s", string(typeSchemaJSON)))
}

if evaluator, ok := attestationType["evaluator"].(map[string]interface{}); ok {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Versions:
Version: 1
Timestamp: Sat, 16 Jan 2016 00:00:00 UTC • 2016-01-16
Created By: docs-cmd-test-user
Type schema: {'type': 'object', 'additionalProperties': True, 'properties': {'name': {'type': 'string'}, 'age': {'type': 'integer'}}}
Type schema: \{"additionalProperties":true,"properties":\{"age":\{"type":"integer"\},"name":\{"type":"string"\}\},"type":"object"\}
Evaluator:
Content Type: jq
Rules:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Versions:
Version: 1
Timestamp: Sat, 16 Jan 2016 00:00:00 UTC • 2016-01-16
Created By: docs-cmd-test-user
Type schema: {'type': 'object', 'additionalProperties': True, 'properties': {'name': {'type': 'string'}, 'age': {'type': 'integer'}}}
Type schema: \{"additionalProperties":true,"properties":\{"age":\{"type":"integer"\},"name":\{"type":"string"\}\},"type":"object"\}
Evaluator:
Content Type: jq
Rules:
Expand Down
2 changes: 1 addition & 1 deletion cmd/kosli/testdata/output/get/get-attestation-type.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Versions:
Version: 1
Timestamp: Sat, 16 Jan 2016 00:00:00 UTC • 2016-01-16
Created By: docs-cmd-test-user
Type schema: {'type': 'object', 'additionalProperties': True, 'properties': {'name': {'type': 'string'}, 'age': {'type': 'integer'}}}
Type schema: \{"additionalProperties":true,"properties":\{"age":\{"type":"integer"\},"name":\{"type":"string"\}\},"type":"object"\}
Evaluator:
Content Type: jq
Rules:
Expand Down
Loading