openservicebrokerapi / servicebroker

Open Service Broker API Specification
https://openservicebrokerapi.org/
Apache License 2.0
1.19k stars 436 forks source link

Undefined HTTP Response code when the X-Broker-API-Version HTTP header is missing #673

Closed aaukhatov closed 5 years ago

aaukhatov commented 5 years ago

What is the problem? Undefined HTTP Response code when the X-Broker-API-Version HTTP header is missing.

Who does this affect? If the response code will change to another code then it could break backward compatibility.

Do you have any proposed solutions? More clearly define the response code when the X-Broker-API-Version header is missing, like 412 Precondition or 400 Bad Request.

waterlink commented 5 years ago

@aukhatov

Thank you for opening this issue!

It shouldn’t be a 412 Precondition because it implies that client provided a pre-condition header, which it didn’t in this scenario.

So 400 Bad Request sounds like a more legit response status code in this case.

What do you think?

baleev commented 5 years ago

I think, according to the spec the 400 status is more relevant, however it would be more clear to give note about what - "mandatory data" is meant there. Including headers and request body

aaukhatov commented 5 years ago

Hi @waterlink, it would be okay.

mattmcneeney commented 5 years ago

@waterlink has kindly agreed to open a PR for this one