Compatible with the OpenAPI Specification version 3. formerly known as Swagger. Enhanced errors messages with hints and context. Generate OpenAPI documentation for your RESTful API using attributes or annotations. swagger-php allows to generate specs either for OpenAPI 3.0.0 or OpenAPI 3.1.0. By default the spec will be in version 3.0.0. The command-line option, version may be used to change this to 3.1.0. For cli usage from anywhere install swagger-php globally and make sure to place the ~/.composer/vendor/bin directory in your PATH so the open API executable can be located by your system. Generate the OpenApi annotation object from a JSON string, which makes it easier to manipulate objects programmatically. Generate the swagger documentation to a static JSON file.

Features

  • Compatible with the OpenAPI 3.0 and 3.1 specification
  • Extracts information from code & existing phpdoc annotations
  • Command-line interface available
  • Documentation site with a getting started guide
  • Exceptional error reporting (with hints, context)
  • As of PHP 8.1 all annotations are also available as PHP attributes

Project Samples

Project Activity

See All Activity >

License

Apache License V2.0

Follow swagger-php

swagger-php Web Site

Other Useful Business Software
Gemini 3 and 200+ AI Models on One Platform Icon
Gemini 3 and 200+ AI Models on One Platform

Access Google's best plus Claude, Llama, and Gemma. Fine-tune and deploy from one console.

Build generative AI apps with Vertex AI. Switch between models without switching platforms.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of swagger-php!

Additional Project Details

Registered

2022-02-03