zero-to-prod/data-model-adapter-swagger

Adapter for the Swagger 2.0 for DataModelGenerator

v0.1.16 2025-02-07 19:24 UTC

This package is auto-updated.

Last update: 2025-02-20 19:27:55 UTC


README

Repo GitHub Actions Workflow Status GitHub Actions Workflow Status Packagist Downloads Packagist Version License wakatime Hits-of-Code

Contents

Introduction

Adapter for the Swagger 2.0 for DataModelGenerator.

Requirements

  • PHP 8.1 or higher.

Installation

You can install this package via Composer.

composer require zero-to-prod/data-model-adapter-swagger

Usage

Generate components from a Swagger 2.0 schema.

namespace Zerotoprod\DataModelAdapterSwagger;

$Components = Swagger::adapt(file_get_contents(__DIR__.'/schema.json'))

This will add the package to your project’s dependencies and create an autoloader entry for it.

Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page if you want to contribute.

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Commit changes (git commit -m 'Add some feature').
  4. Push to the branch (git push origin feature-branch).
  5. Create a new Pull Request.