Skip to content

Commit f98e51a

Browse files
committed
feat: remove defined-in if not used
1 parent 9c6418c commit f98e51a

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

templates/md/property.ejs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* of the License at http://www.apache.org/licenses/LICENSE-2.0
66
*/ %>
77

8-
## <%=name %>
8+
## `<%=name %>`
99

1010
<% if (schema.title) { %>
1111
### <%= schema.title %>
@@ -16,10 +16,12 @@
1616
<%- schema.description.replace(/\n/g, '\n\n') %>
1717
<% } %>
1818

19-
`<%=name %>`
20-
2119

2220
* is <% if (required) { %>**required**<% } else { %>optional<% } %>
21+
<% if (schema.default!==undefined) { %>
22+
* default: `<%- JSON.stringify(schema.default) %>`
23+
<% } -%>
24+
<% if (schema.$oSchema) { %>* defined in [<%= schema.$oSchema.$linkVal %>](<%= schema.$oSchema.$linkPath %>#<%= nameSlug %>)<% } %>
2325
* type: <%=schema.simpletype %><% if (schema.simpletype.match(/\[\]\[\]/)||schema.simpletype==="`array[]`") { %> (nested array)<% } %>
2426
<% if (schema.type==='array') { %><% if (schema.maxItems!==undefined&&schema.minItems!==undefined) { %>
2527
* between `<%=schema.minItems %>` and `<%=schema.maxItems %>` items in the array
@@ -28,10 +30,6 @@
2830
<% } else if (schema.minItems!==undefined) { %>
2931
* at least `<%=schema.minItems %>` items in the array<% } %>
3032
<% } -%>
31-
<% if (schema.default!==undefined) { %>
32-
* default: `<%- JSON.stringify(schema.default) %>`
33-
<% } -%>
34-
* defined in <% if (schema.$oSchema) { %>[<%= schema.$oSchema.$linkVal %>](<%= schema.$oSchema.$linkPath %>#<%= nameSlug %>)<% } else { %>this schema<% } %>
3533

3634
<% if (schema.const!==undefined) { %>
3735
The value of this property **must** be equal to:
@@ -104,4 +102,3 @@ Unknown type `<%= schema.type %>`.
104102
105103
<% }); %>
106104
<% } %>
107-

0 commit comments

Comments
 (0)