Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Check for a successful response code appears to be more strict than the specification #41

Open
MikeRalphson opened this issue Oct 25, 2017 · 0 comments

Comments

@MikeRalphson
Copy link
Contributor

public void AddOperation(OperationType operationType, Operation operation)
{
var successResponse = operation.Responses.Keys.Where(k => k.StartsWith("2")).Any();
if (!successResponse)
{
throw new DomainParseException("An operation requires a successful response");
}

From the spec.:

The Responses Object MUST contain at least one response code, and it SHOULD be the response for a successful operation call.

This doesn't seem to allow for the default response potentially covering the successful case, and the API MAY choose to ignore the SHOULD advice anyway.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant