ybelenko/openapi-data-mocker-interfaces

Package with OpenApiDataMocker interfaces.

1.1.0 2021-08-05 10:46 UTC

This package is auto-updated.

Last update: 2024-11-19 06:08:44 UTC


README

Coding Style

This repository holds interfaces to generate fake data from OpenAPI Specification(OAS3). Note that this is not an implementation.

Requirements

PHP 7.3 or newer. It could work with older versions, but it's not worth to support EOL(end of life) PHP.

Important notice! While PHP 8.0 declared in composer.json this package hasn't been tested against it.

Interfaces

OpenAPIServer\Mock\OpenApiDataMockerInterface Constants

OpenAPISpecification - Data Types

OpenAPIServer\Mock\OpenApiDataMockerInterface Methods

* constant class is omitted, so mockData(DATA_TYPE_INTEGER) means mockData(\OpenAPIServer\Mock\OpenApiDataMockerInterface\DATA_TYPE_INTEGER).

OpenAPIServer\Mock\OpenApiModelInterface Methods

OpenAPIServer\Mock\OpenApiServerMockerInterface Methods

Same methods as OpenAPIServer\Mock\OpenApiDataMockerInterface + following methods:

OpenAPIServer\Mock\Exceptions\OpenApiDataMockerException

This class makes possible to catch exceptions related to mocking feature only. It's highly encouraged not to throw builtin PHP exceptions like Exception, InvalidArgumentException etc. Use this class or extend it with your own exceptions to fit your needs.

Related Packages

Copyright

While author of this package is top contributor to OpenAPI-Generator project he's not member of OpenAPI Initiative (OAI).