Skip to content

[swagger-cpp] Add new port version 0.2.1#51189

Merged
BillyONeal merged 6 commits intomicrosoft:masterfrom
stescobedo92:add-swaggercpp-0.2.1
Apr 17, 2026
Merged

[swagger-cpp] Add new port version 0.2.1#51189
BillyONeal merged 6 commits intomicrosoft:masterfrom
stescobedo92:add-swaggercpp-0.2.1

Conversation

@stescobedo92
Copy link
Copy Markdown
Contributor

@stescobedo92 stescobedo92 commented Apr 15, 2026

Summary

Adds a new port for swaggercpp version 0.2.1.

swaggercpp is a modern C++23 library for reading, writing, validating, traversing, and serializing Swagger/OpenAPI documents (JSON + YAML). It provides a typed document model, a validation pipeline, a visitor/walker API, and an embedded Swagger UI server.

Details

CMake Usage

find_package(swaggercpp CONFIG REQUIRED)
target_link_libraries(main PRIVATE swaggercpp::swaggercpp)
  • Changes comply with the maintainer guide.
  • The packaged project shows strong association with the chosen port name. Check this box if at least one of the following criteria is met:
    • The project is in Repology: https://repology.org//versions
    • The project is amongst the first web search results for "" or " C++". Include a screenshot of the search engine results in the PR.
    • The port name follows the 'GitHubOrg-GitHubRepo' form or equivalent Owner-Project form.
  • Optional dependencies of the build are all controlled by the port. A dependency is controlled if it is declared an unconditional dependency in vcpkg.json, or explicitly disabled through patches or build system arguments such as CMAKE_DISABLE_FIND_PACKAGE_Xxx or VCPKG_LOCK_FIND_PACKAGE
  • The versioning scheme in vcpkg.json matches what upstream says.
  • The license declaration in vcpkg.json matches what upstream says.
  • The installed as the "copyright" file matches what upstream says.
  • The source code of the component installed comes from an authoritative source.
  • The generated "usage text" is brief and accurate. See adding-usage for context. Don't add a usage file if the automatically generated usage is correct.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Exactly one version is added in each modified versions file.
image

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 1 pipeline(s).

@stescobedo92 stescobedo92 force-pushed the add-swaggercpp-0.2.1 branch from 72af640 to 52e315c Compare April 15, 2026 22:32
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 1 pipeline(s).

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 1 pipeline(s).

@BillyONeal
Copy link
Copy Markdown
Member

Drafting due to build failures. Please go ahead and press Ready for review when you're ready for a vcpkg maintainer to look

@BillyONeal BillyONeal marked this pull request as draft April 15, 2026 23:04
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 1 pipeline(s).

@stescobedo92 stescobedo92 marked this pull request as ready for review April 15, 2026 23:20
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 1 pipeline(s).

Copy link
Copy Markdown
Member

@BillyONeal BillyONeal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the new port submission! This looks good to me but for the following nitpicks:

stescobedo92#1

Can you explain why "swaggercpp" rather than "swagger-cpp" as the upstream repo is named? (To be clear, I think the name you have chosen is fine, I just want to make sure the other one was considered and get why we went with this one on the record)

Comment thread ports/swaggercpp/usage Outdated
@@ -0,0 +1,4 @@
swaggercpp provides CMake integration via find_package:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This usage block is worse than the generated one because it omits the pkgconfig modules and thus should be removed.

swaggercpp provides CMake targets:

  # this is heuristically generated, and may not be correct
  find_package(swaggercpp CONFIG REQUIRED)
  target_link_libraries(main PRIVATE swaggercpp::swaggercpp)

swaggercpp provides pkg-config modules:

  # Professional C++23 library for Swagger/OpenAPI handling
  swaggercpp

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @BillyONeal thanks for your observation:

On the swaggercpp vs swagger-cpp naming: The upstream library consistently uses swaggercpp (no hyphen) everywhere except the GitHub repo slug — CMake project name, target (swaggercpp::swaggercpp), exported config (swaggercppConfig.cmake), install path (lib/cmake/swaggercpp), public headers directory (include/swaggercpp/), and the pkg-config module are all swaggercpp. Only the repo URL is hyphenated (swagger-cpp), which is purely a URL-slug convention. Matching the port name to the CMake target — so consumers write find_package(swaggercpp CONFIG REQUIRED) — seemed like the least-surprising choice. Happy to rename if you'd prefer, but this keeps vcpkg install consistent with what the library itself exposes.

Happy to rename to swagger-cpp

@BillyONeal BillyONeal enabled auto-merge (squash) April 16, 2026 23:41
@BillyONeal
Copy link
Copy Markdown
Member

Thanks!

@stescobedo92 stescobedo92 changed the title [swaggercpp] Add new port version 0.2.1 [swagger-cpp] Add new port version 0.2.1 Apr 17, 2026
@BillyONeal BillyONeal merged commit 34b81e6 into microsoft:master Apr 17, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants