It is a useful habit to restrict the input of your REST interface as much as possible. Therefore I use java enumeration classes as field type for REST input classes, whenever it is possible. It also has the advantage, that you can document the possible values of a given field. It makes impossible to the… Continue reading Java Enum in REST input
Tag: JSON
Restrict number of connected clients for Websocket
Recently I needed to implement a custom check for WebSocket connection of a Spring Boot application. The logic had to check if a configured connection limit has been reached, and reject opening further connections if so. The connections were opened by a mobile application client, and the developer wanted to get the error message in… Continue reading Restrict number of connected clients for Websocket
Implementing inheritance for JSON objects
Our App developers wanted to send slightly different JSON elements in a single list, in order to make the App side implementation far less complicated. In order to make it possible to, I decided to implement inheritance hierarchy for the JSON input and the related java DTO classes. The other possibility would be to have… Continue reading Implementing inheritance for JSON objects
Using Application Link in Atlassian plugins
When implementing complex plug-ins for the Atlassian suite, it might be needed to request information from another Atlassian application. You can see examples for it, when JIRA shows Stash commits, of Confluence pages. As all Atlassian applications has a REST API, it is possible to make JSON calls directly. Using Application Links for communication between… Continue reading Using Application Link in Atlassian plugins