buildingSMART / BCF-API

Web service specification for BIM Collaboration Format
Other
212 stars 61 forks source link

BIM Snippets problems #356

Closed cosmo0 closed 3 months ago

cosmo0 commented 3 months ago

Hello

There are problems with the BIM Snippets.

Mainly, the API spec says that a topic can have only one snippet, but the XML spec says there can be multiple? It can create lots of problems for snippets management.

In the 3.2.6 GET Topic BIM Snippet Service section: what happens when there is no snippet? What happens where the snippet is external?

More generally, is it really useful?

GeorgDangl commented 3 months ago

Hey @cosmo0, as for the BIM snippets, they're scheduled to be removed with the next version.

I just checked the BCF XML schema, that seems to properly mark the BIM snippet as either zero or one: https://github.com/buildingSMART/BCF-XML/blob/release_3_0/Schemas/markup.xsd#L81 If not present, as far as I know, maxOccurs defaults to 1.

If you try to retrieve a non-existing BIM snippet via the API, you'll most likely get either a 404 - Not Found or maybe 400 - Bad Request status code back.

External snippets are still returned as JSON, the external reference would then just point to e.g. some other url, meaning the data of the actual snippet is not directly embedded.

GeorgDangl commented 3 months ago

And, for your last question, about the usefulness, my personal opinion: I think the idea was good, but there has never been any effort by anyone to actually come up with a use case. There have been some that would be fitting, but those were always either directly within a single vendors ecosystem or between just two, so bidirectional solutions were found. So it basically never had a real use case, and was just kept alive in case someone would be using it some day. Which didn't happen in the last 10 years😀

cosmo0 commented 3 months ago

Thanks! I didn't realize that maxOccurs defaults to 1. We'll have to amend our structure.