Commit graph spaceapid/go.mod
Author SHA1 Message Date
11046cb501 feat: Allow setting state->open to unknown via DELETE
The schema defines the absence of state->open to represent the unknown
state. Previously it was not possible to explicitly set this state via
the HTTP endpoints.

types.SpaceAPIState.Open is now an enum which is either unknown, closed,
or open. Custom IsZero() and MarshalJSON() methods on the type ensure
marshaling the value yields a boolean for open/closed and an empty byte
slice for unknown (resulting in the field being absent from the final
response).

The handlers.StateOpenDELETE() function has been added to expose this
behavior.

Switching to encoding/json/v2 required raising the minimum Go version in
go.mod to 1.27.

Closes: CCCHH/spaceapid!37
Fixes:  CCCHH/spaceapid#38
2026-10-09 00:30:26 +02:00
74a8db7d2b refactor: Add Go 1.22 HTTP method matching 2024-08-03 17:55:28 +02:00
8c1adae040
Rename module 2024-05-26 20:52:15 +02:00
be29af436f
Initial commit 2023-11-04 21:07:27 +01:00