EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
api spec team
Yuri Kuznetsovc095ec93348b
diff --git a/application/Espo/Resources/metadata/entityDefs/Team.json b/application/Espo/Resources/metadata/entityDefs/Team.jsonindex 96254132b5..fb8a2be90f 100644--- a/application/Espo/Resources/metadata/entityDefs/Team.json+++ b/application/Espo/Resources/metadata/entityDefs/Team.json@@ -48,7 +48,8 @@"foreign": "teams","columnAttributeMap": {"role": "userRole"- }+ },+ "apiSpecDisabled": true},"roles": {"type": "hasMany",diff --git a/application/Espo/Tools/OpenApi/Provider.php b/application/Espo/Tools/OpenApi/Provider.phpindex dc21536001..5009ff75b1 100644--- a/application/Espo/Tools/OpenApi/Provider.php+++ b/application/Espo/Tools/OpenApi/Provider.php@@ -51,6 +51,8 @@ class Provider{private const string CACHE_KEY = 'openApiSpec';+ private const string PARAM_SPEC_DISABLED = 'apiSpecDisabled';+/** @var string[] */private array $mandatoryEntityTypeList = [Team::ENTITY_TYPE,@@ -264,7 +266,7 @@ class Providerif ($fieldDefs->getParam(FieldParam::DISABLED) ||$fieldDefs->getParam(FieldParam::UTILITY) ||- $fieldDefs->getParam('apiSpecDisabled')+ $fieldDefs->getParam(self::PARAM_SPEC_DISABLED)) {continue;}@@ -944,7 +946,8 @@ class Provider$this->metadata->get("entityDefs.$entityType.links.$link.readOnly") ||$this->metadata->get("entityDefs.$entityType.links.$link.disabled")) ||- $params->skipCustom && $defs->getParam('isCustom')+ $params->skipCustom && $defs->getParam('isCustom') ||+ $this->metadata->get("entityDefs.$entityType.links.$link." . self::PARAM_SPEC_DISABLED)) {continue;}diff --git a/schema/metadata/entityDefs.json b/schema/metadata/entityDefs.jsonindex 18782bcdb2..2a1091b3c0 100644--- a/schema/metadata/entityDefs.json+++ b/schema/metadata/entityDefs.json@@ -1122,7 +1122,7 @@},"apiSpecDisabled": {"type": "boolean",- "description": "Disable field definitions in API specification. As of v9.3."+ "description": "Do not print the field in the API specification. As of v9.3."},"isPersonalData": {"type": "boolean",@@ -1421,7 +1421,11 @@},"utility": {"type": "boolean",- "description": "The link will be hidden from a user on the UI but not disabled."+ "description": "The link will be hidden from the user on the UI but not disabled."+ },+ "apiSpecDisabled": {+ "type": "boolean",+ "description": "Do not print the link in the API specification. As of v9.3."}},"allOf": [