Closed DJFliX closed 3 years ago
@DJFliX thank you for reporting it, we are working on improving this part of our OpenAPI specs.
It is solved in today's update:
"responses" : {
"200" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/GenericResponse"
}
}
},
"description" : "OK - the request has succeeded."
},
"400" : {
"content" : {
"application/json" : {
"examples" : {
"generic-400" : {
"$ref" : "#/components/examples/generic-400"
}
},
"schema" : {
"$ref" : "#/components/schemas/ServiceError"
}
}
},
"description" : "Bad Request - a problem reading or understanding the request."
},
"401" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ServiceError"
}
}
},
"description" : "Unauthorized - authentication required."
},
"403" : {
"content" : {
"application/json" : {
"examples" : {
"generic-403" : {
"$ref" : "#/components/examples/generic-403"
}
},
"schema" : {
"$ref" : "#/components/schemas/ServiceError"
}
}
},
"description" : "Forbidden - insufficient permissions to process the request."
},
"422" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ServiceError"
}
}
},
"description" : "Unprocessable Entity - a request validation error."
},
"500" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ServiceError"
}
}
},
"description" : "Internal Server Error - the server could not process the request."
}
}
In specs for AccountService, CheckoutService and probably others as well the Response for status code
400
does not map to a model or even to a string. This makes debugging an integration with these services frustrating.As a workaround we patch some of the specs to use
#/components/schemas/GenericResponse
as a model for the400
status code. In specs that don't contain that model we add the model to the spec or we map it tostring
.