Skip to content

Conversation

@dwickelhaus
Copy link
Collaborator

update to correct the issue "Webocket does not respond to asset or assets request #578" #580

 Changes to be committed:
	modified:   src/mtconnect/sink/rest_sink/rest_service.cpp

	- RestService::createAssetRoutings
		- added asset, assets commands to the handler routings
		- added assetsById command to to the idHandler routings

        - RestService::createSampleRoutings
		- added code to set the request->parameter<int32_t>("count") parameter to 100 if it's not instantiated.
Copy link
Member

@wsobel wsobel left a comment

Choose a reason for hiding this comment

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

I'll review and test the changes. We need to have some test cases to validate that this works. I will see about the test framework to make that happen. The current WebSocket tests are just for the websocket layer. We need to have a headless test environment as well where we pass JSON commands and they get parsed.

@dwickelhaus
Copy link
Collaborator Author

It does require adding an additional websocket command "assetsById". I was actually considering expanding my current Websocket program to test all of the Websocket Functionality.

@wsobel
Copy link
Member

wsobel commented Dec 17, 2025

I would like to build a test framework so we can also run it headless like we do with the REST requests. It would bypass the connection and upgrading to websockets and just send the JSON commands directly through to the parser and dispatcher. This will make it easier to validate that all the routes are working correctly.

@dwickelhaus
Copy link
Collaborator Author

dwickelhaus commented Dec 17, 2025 via email

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.

3 participants