Driftwatch

Square / Square API /

Breakingdirection flip: their tools call this safe

value can now return "MOST_EXPENSIVE_LOWEST_VALUE"

What changed

Producer-side tools call this additive. It breaks exhaustive switches, strict parsers and generated client enums.

Affects this value on ExcludeStrategy reachable from 10 operations.

New value: MOST_EXPENSIVE_LOWEST_VALUE.

can now return "MOST_EXPENSIVE_LOWEST_VALUE"

Who is affected

Code that reads Square's ExcludeStrategy objects, used by 10 Square operations.

Before and after

WhereBeforeAfter
ExcludeStrategy"LEAST_EXPENSIVE", "MOST_EXPENSIVE""LEAST_EXPENSIVE", "MOST_EXPENSIVE", "MOST_EXPENSIVE_LOWEST_VALUE"

Code that breaks

switch (response) {
  // existing branches …
  // no branch for "MOST_EXPENSIVE_LOWEST_VALUE"
  default:
    throw new Error("unexpected value");
}

Based on Square’s published API specification. How severity is decided.