Skip to content
This repository was archived by the owner on May 1, 2025. It is now read-only.
This repository was archived by the owner on May 1, 2025. It is now read-only.

MetadataUpdateMetadataRequestItemsProperties has wrong value type #27

Description

@poppiol

Hi,
when I use this code:

 String title_1_propertyID = "57f3fb8efa3416c06701d616";
 HashMap<String, String> valueMap = new HashMap<>();
 valueMap.put("value", valueForTittle1);

 MetadataUpdateMetadataRequestItemsProperties property = MetadataUpdateMetadataRequestItemsProperties.builder().propertyId(title_1_propertyID).value(valueMap).build();
 MetadataUpdateMetadataRequestItemsProperties[] properties = new MetadataUpdateMetadataRequestItemsProperties[1];
 properties[0] = property;

 String href = "https://cad.onshape.com/api/metadata/d/99999/w/99999/e/99999";
 MetadataUpdateMetadataRequestItems item = MetadataUpdateMetadataRequestItems.builder().href(href).properties(properties).build();
	
 MetadataUpdateMetadataRequestItems[] items = new MetadataUpdateMetadataRequestItems[1];
 items[0] = item;
 OnshapeDocument onshapeDocument = new OnshapeDocument("99999", "99999", "99999");

 CLIENT.metadata().updateMetadata().items(items).call(onshapeDocument);

the value of this field is stored in this way:
obraz

it is the memory location value of the specified map.

When looking for a solution in API Explorer, I noticed that the value is stored as Object type (for example Number, String, Boolean etc.)
I think value should be Object type instead of Map type.
Could you please take a look?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions