Skip to content

Commit 2a98db2

Browse files
committed
fix: Fix Metadata Taxonomy GET options path (box/box-openapi#573)
1 parent d97f493 commit 2a98db2

File tree

3 files changed

+8
-15
lines changed

3 files changed

+8
-15
lines changed

.codegen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "engineHash": "c370934", "specHash": "a4bdc72", "version": "4.2.0" }
1+
{ "engineHash": "c370934", "specHash": "f3c7c76", "version": "4.2.0" }

box_sdk_gen/managers/metadata_taxonomies.py

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from enum import Enum
2-
31
from typing import Optional
42

53
from typing import Dict
@@ -49,11 +47,6 @@
4947
from box_sdk_gen.serialization.json import sd_to_json
5048

5149

52-
class GetMetadataTemplateFieldOptionsScope(str, Enum):
53-
GLOBAL = 'global'
54-
ENTERPRISE = 'enterprise'
55-
56-
5750
class MetadataTaxonomiesManager:
5851
def __init__(
5952
self,
@@ -799,7 +792,7 @@ def delete_metadata_taxonomy_node(
799792

800793
def get_metadata_template_field_options(
801794
self,
802-
scope: GetMetadataTemplateFieldOptionsScope,
795+
namespace: str,
803796
template_key: str,
804797
field_key: str,
805798
*,
@@ -824,9 +817,9 @@ def get_metadata_template_field_options(
824817
825818
With a `query` parameter specified, results are sorted in order of relevance.
826819
827-
:param scope: The scope of the metadata template.
828-
Example: "global"
829-
:type scope: GetMetadataTemplateFieldOptionsScope
820+
:param namespace: The namespace of the metadata taxonomy.
821+
Example: "enterprise_123456"
822+
:type namespace: str
830823
:param template_key: The name of the metadata template.
831824
Example: "properties"
832825
:type template_key: str
@@ -882,7 +875,7 @@ def get_metadata_template_field_options(
882875
[
883876
self.network_session.base_urls.base_url,
884877
'/2.0/metadata_templates/',
885-
to_string(scope),
878+
to_string(namespace),
886879
'/',
887880
to_string(template_key),
888881
'/fields/',

docs/box_sdk_gen/metadata_taxonomies.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,8 +502,8 @@ _Currently we don't have an example for calling `get_metadata_template_field_opt
502502

503503
### Arguments
504504

505-
- scope `GetMetadataTemplateFieldOptionsScope`
506-
- The scope of the metadata template. Example: "global"
505+
- namespace `str`
506+
- The namespace of the metadata taxonomy. Example: "enterprise_123456"
507507
- template_key `str`
508508
- The name of the metadata template. Example: "properties"
509509
- field_key `str`

0 commit comments

Comments
 (0)