I have REST api with User model – DTO and Create / update form. My userService checks if user is administrator, then allow to getAllUsers in List. When I want to get all users, I get Bad request 400, but it should return Forbidden. It used to work but when I added some changes to my code I got bad
Tag: rest
JSONPatch escape slash ‘/’ from JSONPatch+JSON
I’ve below JSON and I wanted to update few fields from it using postman PATCH API call with below JSONPatch payload API is working fine But, I want to implement same using Java .. I tried It evaluates to : This doc mentioned that http://jsonpatch.com/#json-pointer we MUST use escape the characters with ~0 and ~1 but no luck yet, I
Rest Assured – JSON Schema Validation – java.lang.NoSuchMethodError: com.github.fge.jsonschema.core.processing.CachingProcessor
I have generated schema for the the JSON response and have stored it in project directory . No error shown in eclipse. But while running am getting below error. As it states method its looking for is not present. But I have imported the Jar which it shows as missing. Not sure if I am using incorrect version of that.
Can we uniquely identify request to send respond from a POST method?
I am working on a web-service which is asynchronous. In my client code, I am using a boto3 session client to call a GET API of my Jetty Server which is S3 alike service. GET API fetched original data from S3 and modifies the request so as to be able to forward the request to flask server. Python flask then
How to ignore a field from DB [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 1 year ago. Improve this question I have a list of persons in DB everyone having a CV field which is a MultiPart File in Spring. I’m trying to get all
Merge map properties to Java POJO
I’d like to implement UPDATE (method PUT) operation for REST api. From front-end application my controller method expects map of values, for example: I’d like to use map as the request body and not POJO because with help opf map I can declare 3 states for each property: property is absent in the map – property is not change, do
400 Bad Request when using Spring Boot
I am sending a Http POST request to my RESTful API build with Spring Boot and get the “400 Bad Request” response. My POST request is made with Postman, send to with the body I want to pass the filename variable to my Java Method. My RESTful api is build in Java with Spring Boot I tried with and with
Servlet mapping not found error while deploying JAX RS application to web sphere 8.5
I am new to web services. have developed a simple rest web svc in java using Eclipse, Tomcat following this link. Application successfully runs on Tomcat but when i deploy it to IBM WebSphere 8.5.5. It deploys successfully but fails to start. I know its something with my Web.xml so i am adding it for rectification. Tried this but to
Internal Server Error When Adding WebMvcConfigurer To Spring Boot Rest Application
I have a Spring Boot app and I wanted to allow other origins to make requests because I got the ‘cors’ error. So I searched and I found this answer: Annotation CrossOrigin not working in Spring boot witch helped for the endpoints that have no body. On the other hand, those who have a body I get Internal Server Error.
Spring boot app stops with UnknownContentTypeException when trying to return JSON response from endpoint
I am trying to make a Spring boot app that uses the API endpoints of SWAPI and refine the results to some of them. To explain better I want to take the name of a character the user provided from a GET request and return to him the Starships this character has piloted. I am trying to use RestTemplate to