|
743 | 743 | isNestedProperty: '=', |
744 | 744 | hideTypeLinks: '=', |
745 | 745 | hidePropertyDetails: '=', |
746 | | - showExamples: '=' |
| 746 | + showExamples: '=', |
| 747 | + showSecuritySchemaProperties: '=' |
747 | 748 | }, |
748 | 749 | controller: ['$scope', '$rootScope', function ($scope, $rootScope) { |
749 | 750 | if (!Array.isArray($scope.list)) { |
750 | 751 | $scope.listArray = Object.keys($scope.list).map(function (key) { |
751 | 752 | return $scope.list[key]; |
752 | 753 | }); |
753 | 754 |
|
754 | | - $scope.listArray = RAML.Inspector.Properties.normalizeNamedParameters($scope.list); |
| 755 | + $scope.listArray = RAML.Inspector.Properties.normalizeNamedParameters($scope.listArray); |
755 | 756 | } else { |
756 | 757 | $scope.listArray = $scope.list; |
757 | 758 | } |
|
778 | 779 | return newType; |
779 | 780 | }; |
780 | 781 |
|
| 782 | + var isPattern = function (propertyName) { |
| 783 | + return propertyName.match(PATTERN_PATTERN); |
| 784 | + }; |
| 785 | + |
| 786 | + $scope.isPropertyVisible = function(property) { |
| 787 | + return ($scope.showSecuritySchemaProperties || !property[0].isFromSecurityScheme) |
| 788 | + && !isPattern(property[0].displayName); |
| 789 | + }; |
| 790 | + |
781 | 791 | $scope.mergeType = function (type) { |
782 | 792 | var newType = angular.copy(type); |
783 | 793 |
|
|
789 | 799 |
|
790 | 800 | $scope.isNativeType = RAML.Inspector.Types.isNativeType; |
791 | 801 |
|
792 | | - $scope.isPattern = function (propertyName) { |
793 | | - return propertyName.match(PATTERN_PATTERN); |
794 | | - }; |
795 | | - |
796 | 802 | $scope.isSchema = RAML.Inspector.Types.isSchema; |
797 | 803 |
|
798 | 804 | $scope.isCollapsible = function isCollapsible(property) { |
@@ -6516,16 +6522,16 @@ angular.module('ramlConsoleApp').run(['$templateCache', function($templateCache) |
6516 | 6522 | " <li class=\"raml-console-documentation-scheme\" ng-class=\"{'raml-console-is-active':isSchemeSelected(value)}\" ng-click=\"selectDocumentationScheme(value)\" ng-repeat=\"(key, value) in securitySchemes\">{{value.name}}</li>\n" + |
6517 | 6523 | " </ol>\n" + |
6518 | 6524 | "\n" + |
6519 | | - " <p ng-if\"documentationSchemeSelected.description\" markdown=\"documentationSchemeSelected.description\" class=\"raml-console-marked-content\"></p>\n" + |
| 6525 | + " <p ng-if=\"documentationSchemeSelected.description\" markdown=\"documentationSchemeSelected.description\" class=\"raml-console-marked-content\"></p>\n" + |
6520 | 6526 | "\n" + |
6521 | 6527 | " <section class=\"raml-console-resource-section raml-console-scheme-headers\" ng-if=\"documentationSchemeSelected.describedBy.headers\">\n" + |
6522 | 6528 | " <h4 class=\"raml-console-resource-heading-a\">Headers</h4>\n" + |
6523 | | - " <properties list=\"documentationSchemeSelected.describedBy.headers\" show-examples=\"true\"></properties>\n" + |
| 6529 | + " <properties list=\"documentationSchemeSelected.describedBy.headers\" show-security-schema-properties=\"true\" show-examples=\"true\"></properties>\n" + |
6524 | 6530 | " </section>\n" + |
6525 | 6531 | "\n" + |
6526 | 6532 | " <section class=\"raml-console-resource-section raml-console-scheme-query-parameters\" ng-if=\"documentationSchemeSelected.describedBy.queryParameters\">\n" + |
6527 | 6533 | " <h4 class=\"raml-console-resource-heading-a\">Query Parameters</h4>\n" + |
6528 | | - " <properties list=\"documentationSchemeSelected.describedBy.queryParameters\" show-examples=\"true\"></properties>\n" + |
| 6534 | + " <properties list=\"documentationSchemeSelected.describedBy.queryParameters\" show-security-schema-properties=\"true\" show-examples=\"true\"></properties>\n" + |
6529 | 6535 | " </section>\n" + |
6530 | 6536 | "\n" + |
6531 | 6537 | " <section class=\"raml-console-resource-section raml-console-scheme-responses\" ng-if=\"documentationSchemeSelected.describedBy.responses\">\n" + |
@@ -6725,7 +6731,9 @@ angular.module('ramlConsoleApp').run(['$templateCache', function($templateCache) |
6725 | 6731 |
|
6726 | 6732 | $templateCache.put('directives/properties.tpl.html', |
6727 | 6733 | "<div>\n" + |
6728 | | - " <div class=\"raml-console-resource-param\" ng-repeat=\"property in listArray\" ng-if=\"!property[0].isFromSecurityScheme && !isPattern(property[0].displayName)\" ng-init=\"vm.isCollapsed = !!collapsible\">\n" + |
| 6734 | + " <div class=\"raml-console-resource-param\" ng-repeat=\"property in listArray\"\n" + |
| 6735 | + " ng-if=\"isPropertyVisible(property)\"\n" + |
| 6736 | + " ng-init=\"vm.isCollapsed = !!collapsible\">\n" + |
6729 | 6737 | " <div ng-init=\"type = getType(property[0])\">\n" + |
6730 | 6738 | " <h4 class=\"raml-console-resource-param-heading\" style=\"position: relative\">\n" + |
6731 | 6739 | " <span ng-if=\"isCollapsible(type)\" ng-click=\"vm.isCollapsed = !vm.isCollapsed\" style=\"cursor: pointer\">{{ vm.isCollapsed ? '▶' : '▼' }}</span> {{type.displayName}}\n" + |
|
0 commit comments