Skip to content

Commit 124aaae

Browse files
committed
Hide values of common link target fields
1 parent 4757154 commit 124aaae

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

src/schemas/index.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,16 @@ export const schema = {
4444
responses
4545
}
4646
},
47-
'enum-item': enumItem,
48-
'types-allof': allOf,
49-
'parameter-item-definition': hiddenParameterItemDefinition,
47+
// Common fields that are only used as lazylink targets.
48+
'common': {
49+
'type': 'object',
50+
'showValueInParent': false,
51+
'children': {
52+
'enum-item': enumItem,
53+
'types-allof': allOf,
54+
'parameter-item-definition': hiddenParameterItemDefinition
55+
}
56+
},
5057
'parameters': {
5158
'type': 'link',
5259
'target': '/global-definitions/parameters'

src/schemas/parameters.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export const parameterItemDefinition = {
7070
'collectionFormat': parameterCollectionFormat,
7171
'items': {
7272
'type': 'lazylink',
73-
'target': '/parameter-item-definition',
73+
'target': '/common/parameter-item-definition',
7474
'conditions': {
7575
'../type': 'array'
7676
}

src/schemas/types.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export const enumItem = {
139139
'type': 'array',
140140
'item': {
141141
'type': 'lazylink',
142-
'target': '/enum-item'
142+
'target': '/common/enum-item'
143143
},
144144
'hideValueIfEmpty': false,
145145
'i18n': blankLabel
@@ -271,7 +271,7 @@ export const types = {
271271
},
272272
'allOf': {
273273
'type': 'lazylink',
274-
'target': '/types-allof',
274+
'target': '/common/types-allof',
275275
'conditions': {
276276
'../x-oad-type': 'allOf'
277277
}

0 commit comments

Comments
 (0)