Skip to content

Commit

Permalink
EES-5494 Prevent referenced enum schemas showing options in property …
Browse files Browse the repository at this point in the history
…descriptions
  • Loading branch information
ntsim committed Sep 12, 2024
1 parent 9b059d8 commit 709a7f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion source/partials/_schema_description.html.md.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<%= description %>

<% if schema.enum %>
<% is_referenced_schema = schema.node_context.document_location != schema.node_context.source_location %>

<% if !is_referenced_schema && schema.enum %>
Available options:

<% schema.enum.each do |item| %>
Expand Down
2 changes: 1 addition & 1 deletion source/schemas/template.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Available options:
<% end %>
<% end %>

<% properties = get_schema_properties(schema) %>
<% properties = get_schema_properties(schema) %>

<% if properties.any? %>
## Properties
Expand Down

0 comments on commit 709a7f1

Please sign in to comment.