Skip to content
This repository was archived by the owner on Sep 27, 2023. It is now read-only.
This repository was 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

@MikeRalphson

Description

@MikeRalphson

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions