All Projects â†’ canvural â†’ Php Openapi Faker

canvural / Php Openapi Faker

Licence: mit
Library to generate fake data for OpenAPI request/response/schemas

Projects that are alternatives of or similar to Php Openapi Faker

Full Stack Fastapi Postgresql
Full stack, modern web application generator. Using FastAPI, PostgreSQL as database, Docker, automatic HTTPS and more.
Stars: ✭ 7,635 (+14038.89%)
Mutual labels:  openapi, openapi3
Rolodex
📇API Documentation Generator for Phoenix
Stars: ✭ 34 (-37.04%)
Mutual labels:  openapi, openapi3
Kin Openapi
OpenAPI 3.0 implementation for Go (parsing, converting, validation, and more)
Stars: ✭ 776 (+1337.04%)
Mutual labels:  openapi, openapi3
Oas Kit
Convert Swagger 2.0 definitions to OpenAPI 3.0 and resolve/validate/lint
Stars: ✭ 516 (+855.56%)
Mutual labels:  openapi, openapi3
Widdershins
OpenAPI / Swagger, AsyncAPI & Semoasa definitions to (re)Slate compatible markdown
Stars: ✭ 856 (+1485.19%)
Mutual labels:  openapi, openapi3
Apisprout
Lightweight, blazing fast, cross-platform OpenAPI 3 mock server with validation
Stars: ✭ 519 (+861.11%)
Mutual labels:  openapi, openapi3
Oapi Codegen
Generate Go client and server boilerplate from OpenAPI 3 specifications
Stars: ✭ 806 (+1392.59%)
Mutual labels:  openapi, openapi3
Swagger Parser
Swagger Spec to Java POJOs
Stars: ✭ 468 (+766.67%)
Mutual labels:  openapi, openapi3
Swagger Core
Examples and server integrations for generating the Swagger API Specification, which enables easy access to your REST API
Stars: ✭ 6,898 (+12674.07%)
Mutual labels:  openapi, openapi3
Openapi Gui
GUI / visual editor for creating and editing OpenAPI / Swagger definitions
Stars: ✭ 891 (+1550%)
Mutual labels:  openapi, openapi3
Fastapi
FastAPI framework, high performance, easy to learn, fast to code, ready for production
Stars: ✭ 39,588 (+73211.11%)
Mutual labels:  openapi, openapi3
Spectral
A flexible JSON/YAML linter for creating automated style guides, with baked in support for OpenAPI v2 & v3.
Stars: ✭ 876 (+1522.22%)
Mutual labels:  openapi, openapi3
Create Openapi Repo
🤖 Generator for GH repo to help you manage the OpenAPI definition lifecycle
Stars: ✭ 513 (+850%)
Mutual labels:  openapi, openapi3
Generator Express No Stress
🚂 A Yeoman generator for Express.js based 12-factor apps and apis
Stars: ✭ 534 (+888.89%)
Mutual labels:  openapi, openapi3
Awesome Openapi3
😎 A list of awesome projects related to OpenAPI 3.0.x, curated by the community
Stars: ✭ 469 (+768.52%)
Mutual labels:  openapi, openapi3
Schemathesis
A modern API testing tool for web applications built with Open API and GraphQL specifications.
Stars: ✭ 768 (+1322.22%)
Mutual labels:  openapi, openapi3
Swagger Ui
Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
Stars: ✭ 21,279 (+39305.56%)
Mutual labels:  openapi, openapi3
Studio
The modern editor for API Design and Technical Writing.
Stars: ✭ 459 (+750%)
Mutual labels:  openapi, openapi3
Apispec
A pluggable API specification generator. Currently supports the OpenAPI Specification (f.k.a. the Swagger specification)..
Stars: ✭ 831 (+1438.89%)
Mutual labels:  openapi, openapi3
Gnostic
A compiler for APIs described by the OpenAPI Specification with plugins for code generation and other API support tasks.
Stars: ✭ 870 (+1511.11%)
Mutual labels:  openapi, openapi3

php-openapi-faker

Tests codecov Infection MSI PHPStan

Library to generate fake data for your OpenAPI requests, responses and schemas.

$faker = \Vural\OpenAPIFaker\OpenAPIFaker::createFromJson($yourSchemaAsJson);
$fakeData = $faker->mockResponse('/todos','GET');

Installation

You can install the package via composer:

composer require --dev canvural/php-openapi-faker

Usage

First you need to create an instance of OpenAPIFaker with your schema that you want to fake data from.

$faker = \Vural\OpenAPIFaker\OpenAPIFaker::createFromJson($yourSchemaAsJson);

Then you can use mockResponse, mockRequest and mockSchema methods on it to generate fake data for your requests, responses and schemas. Like so:

$fakeData = $faker->mockResponse('/todos','GET');

Options

There are some options you can use to modify some behaviour. You can pass options as an associative array to setOptions method in OpenAPIFaker. For example:

$faker = \Vural\OpenAPIFaker\OpenAPIFaker::createFromJson($yourSchemaAsJson)
    ->setOptions(['minItems' => 5]);

Below you can find explanation for each option.

minItems

Overrides minItems property if it's less than this value.

maxItems

Override maxItems if it's greater than this value.

alwaysFakeOptionals

If enabled, every property or item will be generated regardless if they are required or not. Default: false

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

People:

Resources:

License

The MIT License (MIT). Please see License File for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].