swagger-php VS apiDoc

Compare swagger-php vs apiDoc and see what are their differences.

swagger-php

A php swagger annotation and parsing library (by zircote)

apiDoc

RESTful web API Documentation Generator. (by apidoc)
Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
swagger-php apiDoc
10 5
4,946 9,708
- 0.1%
8.1 5.3
2 days ago about 1 month ago
PHP JavaScript
Apache License 2.0 GNU General Public License v3.0 or later
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

swagger-php

Posts with mentions or reviews of swagger-php. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-10-31.
  • Workplaces for digital nomads: the API
    9 projects | dev.to | 31 Oct 2022
    Native PHP attributes allowed OpenAPI markup to be much more compact than in DocBlocks. The resulting openapi.yaml is created with swagger-php and used to test the API.
  • Pragmatic development
    6 projects | dev.to | 13 Oct 2022
    First, swagger-php generates openapi.yaml based on code attributes, and then the spectator checks API responses to match openapi specification. The popular L5-Swagger is redundant in this case, as it is based on the same swagger-php with the addition of Swagger UI.
  • Swagger/Open api integration in laravel
    3 projects | /r/laravel | 25 May 2022
    I do this except use https://github.com/zircote/swagger-php for writing the open api spec. I can enter the Spatie Data Object classes into the parameters, responses, and properties. Like op said though, it's a lot of comments and stuff to keep updated. Entirely using reflection (or reflection plus ability to manually specify certain extra things) like you're talking about sounds great.
  • OpenAPI Specification: The Complete Guide
    19 projects | dev.to | 18 May 2022
    wagger-php is a php swagger annotation and parsing library which generates interactive OpenAPI documentation for your RESTful API using doctrine annotations. - GitHub - zircote/swagger-php
  • Validate your PHP API tests against OpenAPI definitions – a Laravel example
    10 projects | dev.to | 22 Mar 2022
    The second one is L5 Swagger, a popular package bringing Swagger PHP and Swagger UI to Laravel. We actually don't need Swagger PHP here, as it uses Doctrine annotations to generate OpenAPI definitions and we're going to manually write our own instead. We do need Swagger UI, however, and the package conveniently adapts it to work with Laravel (the -W option is simply here to also update related dependencies, to avoid conflicts).
  • Dynamic class property with phpdoc included
    3 projects | /r/PHPhelp | 31 Jul 2021
    It is possible that there is a library doing this already. I am not PHP coder so would like to avoid complex frameworks and stick with barebone solution doing only this Swagger/JSON stuff. For swagger, I decided to go with zircote/swagger-php. I would like my schema and model classes to have nice Swagger doc and at the same time I can use them to prepare objects to interact with the DB by loading/dumping from JSON.
  • Creating API documentation from php files?
    4 projects | /r/PHP | 3 Feb 2021
    Ah right, so you're building a (presumably REST) API and you want to generate docs for the endpoints from your code. Slightly different scenario to what I assumed. There are a couple of libraries to generate OpenAPI specs from source files, I think this is the main one https://github.com/zircote/swagger-php though FWIW I prefer to maintain my API specs separately from the code and use those to guide what I'm building, rather than 'tother way round.
    4 projects | /r/PHP | 3 Feb 2021
    I'm using this library to generate an open api 3 (swagger) yaml file. You add @OA markup to your doc blocks and then can have this generate a file or produce it on the fly. It's a bit sparse on documentation but is working really well with my MVC set up for a REST API I'm developing. https://github.com/zircote/swagger-php

apiDoc

Posts with mentions or reviews of apiDoc. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-03-28.
  • The Best API Documentation Tools for Dev Teams in 2023
    5 projects | dev.to | 28 Mar 2023
    Compared to the first three tools, apiDoc takes a different approach towards generating documentation. Rather than rely on an API definition file like OAS, apiDoc is a package that allows you to add documentation directly into your source code through annotations. While there are third-party libraries that can create OAS files based on code annotations, having this built-in makes apiDoc slightly better if you want to control documentation through code instead of having a separate tool.
  • Rest API : After CRUD
    6 projects | dev.to | 1 Mar 2022
    You can find it here : https://apidocjs.com/
  • Creating API documentation from php files?
    4 projects | /r/PHP | 3 Feb 2021
    This one works well: https://github.com/apidoc/apidoc

What are some alternatives?

When comparing swagger-php and apiDoc you can also consider the following projects:

JSDoc - An API documentation generator for JavaScript.

L5-Swagger - OpenApi or Swagger integration to Laravel

laminas-code - Extensions to the PHP Reflection API, static code scanning, and code generation

Docusaurus - Easy to maintain open source documentation websites.

documentation.js - :book: documentation for modern JavaScript

ESDoc - ESDoc - Good Documentation for JavaScript

YUIDoc - YUI Javascript Documentation Tool

docco - Literate Programming can be Quick and Dirty.

dox - JavaScript documentation generator for node using markdown and jsdoc

Gitdown - GitHub markdown preprocessor.

webdoc - Documentation generator for the web

jsdox - simplified jsdoc 3