Skip to content

chore: next to main - #210

Draft
Erlend Ellefsen (erlendellefsen) wants to merge 24 commits into
mainfrom
next
Draft

chore: next to main#210
Erlend Ellefsen (erlendellefsen) wants to merge 24 commits into
mainfrom
next

Conversation

@erlendellefsen

Copy link
Copy Markdown
Collaborator

No description provided.

- publish NuGet + JSR snapshots on every push to next
- rename TS client to @intility/json-api-client, prepare for JSR
- reset unpublished TypeGen version to 0.1.0
…217)

feat(typegen): emit resource descriptors and use them for honest hydration
The backend only parses one flat level of or/not; and() and nesting
serialized to shapes it silently dropped. Groups now take flat filter
lists only, enforced at the type level.
Remove .and() and nested filter groups (backend only parses one flat
level of or/not); add filterNull()/filterNotNull() and filterIncluded();
support multi-level dot-path filters via a checked-first-segment escape
hatch; restrict sort() to direct attributes; serialize Date values to
ISO 8601; make sort()/include() append on repeat calls like filter().
…post/patch/delete

Match HTTP verb names instead of CRUD names, consistent with the
client's internal method-string usage and the original design sketch.
…ion document

client.resource(...).get/post/patch/delete silently returned an array as T
when the endpoint answered with a list document instead of a single one.
The default message showed the generic title ("Bad Request") instead of
the specific detail, so createJsonApiErrorHandler toasted the wrong text.
Or()/not() groups had no typed way to filter a to-many relationship's
field; the backend already parses the bracket form inside groups.
Closes the asymmetry with JsonApiErrors.NotFound; JsonApiOkAsync's
not-found path used the uncoded variant.
Previously printed "Unknown argument: --help" instead of usage.
Lets a declared filter key skip strict-mode rejection without becoming a
real filter, for keys a controller reads and applies itself.
JsonApiNotFound() gained a RESOURCE_NOT_FOUND code; the contract test
still expected the old codeless shape and failed against a real backend.
…hips

NestedAttributeKeys excluded to-many relationships, forcing an untyped cast
for a filter like "tags.label". filterIncluded() looked like the fix in the
prior round but has different semantics (trims included, doesn't restrict
the primary resources); the backend already walks a one-dot to-many path via
Any() correctly, so this was a pure client type gap. Reuses
IncludedAttributeKeys, which already covers to-one and to-many.
MapAttributeType always emitted an enum as a string literal union, but
AddJsonApiToolkit() never registers JsonStringEnumConverter, so an enum
serializes as a number by default unless a consumer opts in themselves.
Warns per property when no [JsonConverter] confirms string conversion on
the enum type or the property; global registration in the consumer's own
Program.cs is invisible to reflection, so the warning says it may be a
false positive in that case.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant