Skip to content

9.0.0 - Versioned API endpoints and renamed ExposeType arguments

Choose a tag to compare

@stephanschuler stephanschuler released this 28 May 23:47
· 3 commits to main since this release
adb4766

Couple resource configuration to an explicit api version: a single
typeName can now be exposed multiple times under different apiVersion
strings, and the endpoint discovery, generic model controller and
write paths all honor that. Versioned type names like
"package/command@v1" are accepted in POST bodies; unversioned type
names work inside versioned URLs.

Requires netlogix/jsonapiorg ^7.0 for the matching ExposableType
support.

BREAKING CHANGE: ExposeType has been reshaped:

  • It is now final and built around PHP 8 attributes with
    constructor-promoted public readonly properties.

  • The infrastructure-side arguments have been prefixed with
    "request" to separate them from the domain-side ones:

    packageKey -> requestPackageKey
    controllerName -> requestControllerName
    subPackageKey -> requestSubPackageKey
    actionName -> requestActionName
    argumentName -> requestArgumentName

  • Two new properties apiVersion and replaces drive the
    versioning behaviour.

BREAKING CHANGE: The endpoint discovery route argument changed from
{packageKey} to {apiVersion} (accepting "all", "next" or a concrete
version); existing route configurations need to be updated.

BREAKING CHANGE: The internal Configuration array has been replaced by
a typed Configuration object; any code consuming the previous array
shape needs to be adjusted.