You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 11, 2018. It is now read-only.
I create an endpoint: POST /api/search/trips. When I send a request to this endpoint, swagger-server shows this in the console:
swagger:middleware The "timing" property ("2016-09-14T13:00:00") appears to be the REST resource's name +0ms
swagger:middleware Saving data at /api/search/trips/2016-09-14T13%3A00%3A00 +0ms
swagger:middleware /api/search/trips/2016-09-13T09%3A00%3A00 successfully updated +1ms
And it takes the POST request's content to response for my request, although I already provided a mock data for this request.
Here is the content of my POST request:
{"origin":{"latitude":21.1155282,"longitude":-101.65414780000003},"originDescription":"Boulevard Adolfo López Mateos Oriente G, Las Bugambilias, Leon, Mexico","destination":{"latitude":48.1489574,"longitude":16.381546399999934},"destinationDescription":"Favoritenstraße G, Vienna, Austria","timing":"2016-09-14T13:00:00","currency":"EUR","locale":"en-US","targetDate":false}
How can I prevent this behavior ?
The text was updated successfully, but these errors were encountered:
davidtran
changed the title
The "timing" property ("2016-09-14T13:00:00") appears to be the REST resource's name
Swagger-server response the POST content instead of mock data
Sep 12, 2016
See the documentation for how the mock middleware determiens primary keys. In your case the timing property meets the criteria for the primary key (I'm guessing because it's a required property).
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I create an endpoint: POST /api/search/trips. When I send a request to this endpoint, swagger-server shows this in the console:
And it takes the POST request's content to response for my request, although I already provided a mock data for this request.
Here is the content of my POST request:
How can I prevent this behavior ?
The text was updated successfully, but these errors were encountered: