Skip to content

v0.12.0

Choose a tag to compare

@cristi-boboc cristi-boboc released this 18 Aug 10:19
· 4 commits to main since this release

PidginHost PHP SDK v0.12.0

Install from Packagist:

composer require pidginhost/sdk:0.12.0

Changed (breaking)

  • The eight /api/cloud/buckets/ routes now describe their real request and
    response bodies.
    The bucket viewset advertised its fully read-only Bucket
    serializer as the body of every route, so create, resize and visibility
    documented no writable field to send, and credentials/reveal and
    credentials/rotate claimed to return Bucket while really returning an
    access key and secret. Any client that trusted the documented shape
    read a credential response that could not contain credentials -- and on
    rotate the old keys are already invalidated by then.

    New components: BucketCreate (name, quota_gb, public_read),
    BucketResize (quota_gb), BucketVisibility (public_read),
    BucketCredentials (bucket, endpoint, region, access_key,
    secret_key) and BucketCancelResponse (id, status). create documents
    the 202 it really answers; DELETE returns 202 with a body rather than
    204; the two credential routes take no request body and declare
    Cache-Control: no-store.

  • Decimal fields are now string instead of float. The API serialises every
    DecimalField as a JSON string (Django REST Framework's
    COERCE_DECIMAL_TO_STRING default), and the schema says so:
    type: string, format: decimal. This generator mapped that to float anyway,
    which cannot decode "12.50" -- so every response carrying a price failed
    to parse
    , including Deposit, Invoice, Subscription, Service,
    Profile.funds, TLD pricing, ClusterDetail.price_per_month and
    FundsBalanceResponse.balance. 35 properties across 22 components were
    affected. The Python, JS and Rust SDKs already produced strings; only this
    one and Go did not.

    Read the value as a string and parse it with a decimal type of your choosing.
    Do not use a binary float for money.

Fixed

  • Generator bumped to openapi-generator 7.24.0, which fixes the escaping of
    validate:"regexp=..." struct tags on pattern-constrained fields. No API
    shapes changed.