Balog Tamás
07/19/2024, 12:12 PM{ "mockApi": { "name": "..." } }
),
• the responses I received from the endpoint expose the FQNs of internal classes, e.g. mocklab.api.user.NewMockApiRequest
and mocklab.api.user.NewMockApiRequestBody
.
POST <https://api.wiremock.cloud/v1/mock-apis>
Authorization: Basic <credentials>
Content-Type: application/json
{
"name": "Mock API for some service",
"hostname": "a-custom-hostname"
}
Response:
HTTP/2 400 Bad Request
{
"code": 400,
"message": "Unable to process JSON",
"details": "Instantiation of [simple type, class mocklab.api.user.NewMockApiRequest] value failed for JSON property mockApi due to missing (therefore NULL) value for creator parameter mockApi which is a non-nullable type"
}
-----------------------------------------------------
POST <https://api.wiremock.cloud/v1/mock-apis>
Authorization: Basic <credentials>
Content-Type: application/json
{
"mockApi": "Mock API for some service",
"hostname": "a-custom-hostname"
}
Response:
HTTP/2 400 Bad Request
{
"code": 400,
"message": "Unable to process JSON",
"details": "Cannot construct instance of `mocklab.api.user.NewMockApiRequestBody` (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('Mock API for some service')"
}
-----------------------------------------------------
As for the collaborator related endpoints:
• Get and Add collaborators: Error 404 is returned for the free account for a valid API ID. It may be as expected but I personally expected at least my user to be returned for the 'Get all collaborators' endpoint, or a more meaningful error message for any of them, if the 'issue' is that collaborators are not supported on the free account.
• Add collaborator: there is no schema mentioned in the documentation, only an example snippet. Does the example cover all available properties, or is there more to it?
GET <https://api.wiremock.cloud/v1/mock-apis/><apiId>/collaborators
Authorization: Basic <credentials>
Response:
HTTP/2 404 Not Found
{
"code": 404,
"message": "HTTP 404 Not Found"
}
Tom
07/19/2024, 1:21 PMTom
07/19/2024, 1:22 PMBalog Tamás
07/19/2024, 9:17 PMTom
07/20/2024, 10:09 AMBalog Tamás
07/20/2024, 10:22 AM