springdoc-openapi VS swagger-php

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

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
springdoc-openapi swagger-php
18 10
3,086 4,959
2.3% -
8.9 8.1
2 days ago 6 days ago
Java PHP
Apache License 2.0 Apache License 2.0
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.

springdoc-openapi

Posts with mentions or reviews of springdoc-openapi. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-01-07.
  • Creation and Usage of BOM in Gradle
    4 projects | dev.to | 7 Jan 2024
    The issue is that the springdoc-openapi BOM brings an old version of the Spring Framework 6.0, which is incompatible with Spring Boot 3.2. There are several ways to solve this problem: update springdoc, change the order of BOM imports, but the best, in my opinion, is to avoid using the io.spring.dependency-management plugin.
  • Setting up swagger
    1 project | /r/SpringBoot | 25 Jun 2023
    I would suggest using Springdoc
  • How to deal with toxicity within the community, in context of big open source projects?
    3 projects | /r/SoftwareEngineering | 10 Mar 2023
  • Spring Boot – Black Box Testing
    9 projects | dev.to | 13 Nov 2022
    The SpringDoc library comes with lots of annotations to tune your REST API specification precisely. Anyway, that's out of context of this article.
  • What do you think about generating OpenAPI specs from code?
    6 projects | /r/java | 2 Nov 2022
    I found SpringDoc, a library that automates the generation of the spec from the source code. It relies on annotations for textual bits (like tags and descriptions), but it also infers stuff from Spring annotations.
  • Removies
    5 projects | dev.to | 28 Aug 2022
    This is an API made with Spring Web, uses springdoc-openapi-ui to expose a swagger-ui on http://localhost:8080/swagger-ui/index.html
  • Pulling out OpenAPI 3.0 Specifications from SpringBoot
    1 project | /r/SpringBoot | 11 Jul 2022
    Libraries like Springdoc or Springfox can do this. These libraries generate the OpenAPI documentation based on your controllers (+ you can apply the OpenAPI annotations on your controllers). This documentation is then exposed as a REST API, for Springdoc these can be found at /v3/api-docs.
  • Eureka Service Registration and Discovery
    1 project | /r/SpringBoot | 15 Jun 2022
    Retrieving all endpoints of a service isn't the goal of a service registry like Eureka, so no, you can't get all endpoints of a service. You can use a library like Springfox or Springdoc to enable Swagger/OpenAPI for your project. These libraries generate a JSON REST API (and a user interface) to view all your endpoints. You can even provide additional information (eg. default values, descriptions, ...) by adding some additional annotations on your controllers.
  • OpenAPI Specification: The Complete Guide
    19 projects | dev.to | 18 May 2022
    The springdoc-openapi helps automating the generation of API documentation using Spring Boot projects GitHub - springdoc/springdoc-openapi
  • Java Spring EventSourcing and CQRS Clean Architecture microservice 👋⚡️💫
    9 projects | dev.to | 18 Apr 2022
    Our microservice accept http requests: For swagger used Swagger OpenAPI 3. The bank account REST controller, which accept requests, validate it using Hibernate Validator, then call command or query service. The main reason for CQRS gaining popularity is the ability to handle reads and writes separately due to severe differences in optimization techniques for those much more distinct operations.

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).
  • Need to create OpenAPI documentation with Zend Framework 2
    1 project | /r/OpenAPI | 25 Nov 2021
    I need to create REST API documentation for a legacy Zend Framework 2 project. I tried to use zircote/swagger-php . It works with the new zf2 skeleton project but it fails when I use it in the legacy zf2 project. It adds Symfony/polyfill-php80 and it generates to issue. Anybody could help me on this issue. If you can suggest another package for API documentation also be a great help. Thanks.
  • 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
    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
  • Json schema out of an entity or DTO
    1 project | /r/symfony | 12 Jan 2021
    I like the swagger way of generating schema's by annotating classes.. Swagger/OpenApi 3.0 uses a slightly modified subset of json schema, would that be of use to you?

What are some alternatives?

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

springfox - Automated JSON API documentation for API's built with Spring

L5-Swagger - OpenApi or Swagger integration to Laravel

swagger-core - Examples and server integrations for generating the Swagger API Specification, which enables easy access to your REST API

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

javalin - A simple and modern Java and Kotlin web framework [Moved to: https://github.com/javalin/javalin]

apiDoc - RESTful web API Documentation Generator.

hibernate-validator - Hibernate Validator - Jakarta Bean Validation Reference Implementation

openapi-psr7-validator - It validates PSR-7 messages (HTTP request/response) against OpenAPI specifications

Elide - Elide is a Java library that lets you stand up a GraphQL/JSON-API web service with minimal effort.

Nyholm PSR-7 - A super lightweight PSR-7 implementation

openapi-generator - OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)

flask-restx - Fork of Flask-RESTPlus: Fully featured framework for fast, easy and documented API development with Flask