amritk / scalar-test
Minimal API used to test the generated Ruby SDK release pipeline.
Requires
- php: >=8.1
Requires (Dev)
- phpunit/phpunit: ^10.5 || ^11.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-08-24 01:37:16 UTC
README
This package provides convenient access to the ScalarPhpTest REST API from PHP applications. It is generated from your OpenAPI document with typed models, resource clients, pagination helpers, and PHP 8.1+ support.
The full generated API reference is available in api.md and the operation inventory is available in reference.md.
Installation
composer require amritk/scalar-test
Usage
Instantiate the generated client and call methods from resource clients.
<?php use ScalarPhpTest\ScalarPhpTest; $client = new ScalarPhpTest( ); $client->ping->ping();
Request and Response Types
Request params and response bodies are generated as typed PHP classes with strict types enabled. Models include array conversion helpers for working with JSON payloads.
Handling Errors
Non-success responses throw generated API exceptions that expose status code, headers, raw response body, and request id metadata when available.
Retries and Timeouts
The runtime supports client-level and per-request timeout, retry, header, query, base URL, and idempotency options.
Retryable responses honor Retry-After before exponential backoff.
Pagination
Paginated operations return page helpers that expose response data and next-page metadata when pagination is described by the OpenAPI document.
Raw Responses and Custom Requests
Raw response helpers are available when callers need status, headers, or unparsed response bodies. Per-request options provide an escape hatch for extra headers and query params.
Requirements
PHP 8.1+ with Composer PSR-4 autoloading.