Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow to process AID submodel only #892

Merged
merged 1 commit into from
Jan 10, 2023

Conversation

danielpeintner
Copy link
Member

fixes #888

@danielpeintner
Copy link
Member Author

@sebastiankb you should be able to test this locally with

npm install https://github.com/eclipse/thingweb.node-wot.git#pull/892/head

@@ -125,7 +153,7 @@ class AssetInterfaceDescriptionUtilTest {
.to.have.lengthOf(1);

// filter Modbus and HTTP and submodel only
const td3 = this.assetInterfaceDescriptionUtil.transformToTD(modelAID, `{"title": "myTitle"}`, "Modbus|HTTP");
const td3 = this.assetInterfaceDescriptionUtil.transformAAS2TD(modelAID, `{"title": "myTitle"}`, "Modbus|HTTP");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it also possible to filter by interface name?

Copy link
Member Author

@danielpeintner danielpeintner Dec 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's what it is doing...
We currently have for example the following term in JSON

"idShort": "Interface1 (Modbus; s. slides from 21.6.2022)"

The regex "Modbus|HTTP" looks into this idShort and tries to find either Modbus or HTTP...

One could also use "Interface1" for the regex to select Modbus.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, perfect. From my view we can merge this PR

@danielpeintner danielpeintner changed the title feat: allow to process submodel only feat: allow to process AID submodel only Jan 10, 2023
@danielpeintner danielpeintner merged commit 4a12de3 into eclipse-thingweb:master Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow to pass AID submodel only to assetInterfaceDescriptionUtil.transformToTD()
2 participants