ybelenko / openapi-data-mocker-interfaces
Package with OpenApiDataMocker interfaces.
Installs: 14 746
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: ^7.3 || ^8.0
- psr/http-message: ^1.0.0
Requires (Dev)
This package is auto-updated.
Last update: 2024-11-19 06:08:44 UTC
README
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
- Openapi Data Mocker - first implementation of OAS3 fake data generator.
- Openapi Data Mocker Server Middleware - PSR-15 HTTP server middleware.
Copyright
While author of this package is top contributor to OpenAPI-Generator project he's not member of OpenAPI Initiative (OAI).