[swagger-cpp] Add new port version 0.2.1#51189
Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
72af640 to
52e315c
Compare
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
Drafting due to build failures. Please go ahead and press Ready for review when you're ready for a vcpkg maintainer to look |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Thanks for the new port submission! This looks good to me but for the following nitpicks:
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)
| @@ -0,0 +1,4 @@ | |||
| swaggercpp provides CMake integration via find_package: | |||
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
|
Thanks! |
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
cpp-httplib,nlohmann-json,yaml-cppCMake Usage
Owner-Projectform.vcpkg.json, or explicitly disabled through patches or build system arguments such as CMAKE_DISABLE_FIND_PACKAGE_Xxx or VCPKG_LOCK_FIND_PACKAGEvcpkg.jsonmatches what upstream says.vcpkg.jsonmatches what upstream says../vcpkg x-add-version --alland committing the result.