Skip to content

/api/Class/v1 bug on URI of external Properties #142

@c-mellueh

Description

@c-mellueh

Describe the bug
When Requesting a Class withIncludeClassProperties = Truethe URI of ClassProperties that reference external Properties is wrong

To Reproduce
Steps to reproduce the behavior:

  1. request
curl -X "GET" ^
  "https://api.bsdd.buildingsmart.org/api/Class/v1?Uri=https%3A%2F%2Fidentifier.buildingsmart.org%2Furi%2Fhw%2Fsom%2F0.2.2%2Fclass%2FAlarm&IncludeClassProperties=true" ^
  -H "accept: text/plain"
  1. look at result["classProperties"][8]["uri"]
>>> from bsdd import Client
>>> client = Client()
>>> class_uri = 'https://identifier.buildingsmart.org/uri/hw/som/0.2.2/class/Alarm'
>>> result = client.get_class(
...     class_uri,
...     include_class_properties=True,
...     include_class_relations=False,
...     include_reverse_relations=False,
... )
>>> print(result["classProperties"][8]["uri"])
https://identifier.buildingsmart.org/uri/hw/som/0.2.2/class/Alarm/prop/Pset_AlarmTypeCommon/uri/buildingsmart/ifc/4.3/prop/AlarmCondition

Expected behavior
the URI should be 'https://identifier.buildingsmart.org/uri/hw/som/0.2.2/class/Alarm/prop/Pset_AlarmTypeCommon/AlarmCondition'
instead, parts of the URI of the IFC Property are added

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