Skip to content

Commit

Permalink
Hide values of common link target fields
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Jul 13, 2017
1 parent 4757154 commit 124aaae
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
13 changes: 10 additions & 3 deletions src/schemas/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,16 @@ export const schema = {
responses
}
},
'enum-item': enumItem,
'types-allof': allOf,
'parameter-item-definition': hiddenParameterItemDefinition,
// Common fields that are only used as lazylink targets.
'common': {
'type': 'object',
'showValueInParent': false,
'children': {
'enum-item': enumItem,
'types-allof': allOf,
'parameter-item-definition': hiddenParameterItemDefinition
}
},
'parameters': {
'type': 'link',
'target': '/global-definitions/parameters'
Expand Down
2 changes: 1 addition & 1 deletion src/schemas/parameters.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const parameterItemDefinition = {
'collectionFormat': parameterCollectionFormat,
'items': {
'type': 'lazylink',
'target': '/parameter-item-definition',
'target': '/common/parameter-item-definition',
'conditions': {
'../type': 'array'
}
Expand Down
4 changes: 2 additions & 2 deletions src/schemas/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export const enumItem = {
'type': 'array',
'item': {
'type': 'lazylink',
'target': '/enum-item'
'target': '/common/enum-item'
},
'hideValueIfEmpty': false,
'i18n': blankLabel
Expand Down Expand Up @@ -271,7 +271,7 @@ export const types = {
},
'allOf': {
'type': 'lazylink',
'target': '/types-allof',
'target': '/common/types-allof',
'conditions': {
'../x-oad-type': 'allOf'
}
Expand Down

0 comments on commit 124aaae

Please sign in to comment.