Skip to content

Commit a725275

Browse files
committed
fix: Mention that the values of a field of type object are referenceable
in the field's description
1 parent 3aecda0 commit a725275

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/convert_json_schema.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,13 @@ def convert_to_json_schema(props, parent)
6969
end
7070
end
7171

72+
if props['type'] == 'map'
73+
if props['values']['referenceable'] && props.key?('description')
74+
values_desc = 'The values are [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).'
75+
props['description'] = "#{props['description']} #{values_desc}"
76+
end
77+
end
78+
7279
# Remove required if default is set
7380
is_required = false unless props['default'].nil?
7481

@@ -104,7 +111,6 @@ def convert_to_json_schema(props, parent)
104111
fields['format'] = 'uuid'
105112
end
106113

107-
108114
if !@options[:skip_custom_annotations]
109115
if k == 'encrypted'
110116
note = 'This field is [encrypted](/gateway/keyring/).'

0 commit comments

Comments
 (0)