Skip to content

feat (samples/webhooks): Report 'webhooks' server template from quickstart repository#302

Open
JPPortier wants to merge 4 commits intofeat/V2.0-nextfrom
jpportier/DEVXP-1199-move-server-template-from-quickstart-repo
Open

feat (samples/webhooks): Report 'webhooks' server template from quickstart repository#302
JPPortier wants to merge 4 commits intofeat/V2.0-nextfrom
jpportier/DEVXP-1199-move-server-template-from-quickstart-repo

Conversation

@JPPortier
Copy link
Contributor

No description provided.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2026

Dependency Review

✅ No vulnerabilities or license issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA bebc511.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

Scanned Manifest Files

examples/webhooks/pom.xml
  • com.diffplug.spotless:spotless-maven-plugin@2.40.0
  • com.sinch.sdk:sinch-sdk-java@>= 1.0.0
  • org.springframework.boot:spring-boot-maven-plugin@
  • org.springframework.boot:spring-boot-starter@
  • org.springframework.boot:spring-boot-starter-web@

value = "/SmsEvent",
consumes = MediaType.APPLICATION_JSON_VALUE,
produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<Void> smsDeliveryEvent(
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: events are not about delivery reports only.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Comment on lines +14 to +16
public void processInboundEvent(InboundMessage event) {
trace(event);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

As you are splitting the inbounds and the delivery reports, do you think it makes sense to also showcase the different kinds of inbounds and delivery reports?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure, I could have think to reduce snippet to simple "SmsEvent"

The current trace will display the type of event (because of part of the toString from classes)


LOGGER.finest("JSON response: " + serializedResponse);

return ResponseEntity.ok().body(serializedResponse);
Copy link
Contributor

Choose a reason for hiding this comment

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

Same question for DICE, PIE and notification events: does it make sense to return "null" in the 200 OK JSON response body?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right.

Replaced with empty bodies too.


LOGGER.info("Handle event :" + event);

return SvamlControl.builder().build();
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a place where you showcase the construction of a SVAML response (action + multiple instructions)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Comment on lines +22 to +23
application-api-key:
application-api-secret:
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: referred as application key and application secret in the documentation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Snippets are also based onto "xxx-api-xxx"; if going to this direction will be part of dedicated ticket

@@ -0,0 +1,79 @@
# Backend application built using Sinch Java SDK to handle incoming webhooks

This directory contains a server application based onto [Sinch SDK java](https://github.com/sinch/sinch-sdk-java)
Copy link
Contributor

Choose a reason for hiding this comment

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

English: don't use onto but on:

Suggested change
This directory contains a server application based onto [Sinch SDK java](https://github.com/sinch/sinch-sdk-java)
This directory contains a server application based on the [Sinch SDK java](https://github.com/sinch/sinch-sdk-java)

Onto implies movement toward a surface or position, this is not the case here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Comment on lines +21 to +23
- `project-id`: YOUR_project_id
- `key-id`: YOUR_access_key_id
- `key-secret`: YOUR_access_key_secret
Copy link
Contributor

Choose a reason for hiding this comment

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

For most of the use cases, they are not needed

Copy link
Contributor Author

@JPPortier JPPortier Feb 4, 2026

Choose a reason for hiding this comment

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

Yes but here we are delivering a general purpose skeleton

Added a dedicated comment for this section to help users/AIs to consume it properly

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.

4 participants