5 of 6 standards met
Checklist [โ ] I've read the Contributing Guidelines and the Code of Conduct [ โ] I've completed the Contributor License Agreement Pull Request Details This PR adds C# language support to the Facebook Business SDK Codegen, enabling automatic generation of the C# SDK for the Facebook Marketing API. Changes New C# Language Support CodeGenLanguageCs.js: Language processor with C# type mappings and code generation logic C# Templates (): : Main template for API object classes : API context configuration with template variables : Base class for API resources : HTTP request handling with proper error handling : Configuration constants : .NET project file Configuration Updates : Added C# version detection : Added 'csharp' to supported languages : Registered C# processor : Updated to reflect 6 language support Critical Bug Fix SpecOverridingProcessor.js**: Fixed jsonpath-plus v10.3.0 breaking change This fix unblocks code generation for ALL languages (Java, Python, Node.js, Ruby, PHP) API Request Improvements Added explicit PUT HTTP method handling (was incorrectly defaulting to GET) Added JsonException catching for deserialization errors Consistent exception handling through APIException wrapper Source Code Restoration Restored directory for language extensibility All source files rebuilt to via At the same time, the build is present here - https://github.com/BranislavMateas/facebook-business-sdk-dotnet Test Plan Test Plan 1. Codegen Execution [ ] Run successfully [ ] Execute generates 952 C# classes without errors [ ] All files generated in correct structure: 2. Generated Code Validation [ ] APIContext.cs uses dynamic template variable [ ] APIConfig.cs contains correct API version, base URLs, and user agent [ ] APIRequest.cs properly handles GET, POST, PUT, and DELETE methods [ ] Exception handling catches HttpRequestException and JsonException [ ] Generated code follows C# naming conventions 3. Configuration Verification [ ] has csharp entry pointing to correct version file [ ] includes 'csharp' in supported languages [ ] registers C# processor [ ] Version detection reads from FacebookBusinessSDK.csproj 4. Bug Fix Verification [ ] jsonpath-plus v10.3.0 fix works (SpecOverridingProcessor.js uses new API) [ ] All languages still generate without errors: Java, Python, Node.js, Ruby, PHP 5. Generated SDK Repository [ ] Generated C# SDK is available at: https://github.com/BranislavMateas/facebook-business-sdk-dotnet [ ] SDK can be built with [ ] All 952 classes compile without errors [ ] Package can be created with
Repository: facebook/facebook-business-sdk-codegen. Description: Codegen project for our business SDKs Stars: 106, Forks: 62. Primary language: PHP. Languages: PHP (37.6%), Java (16.4%), Mustache (12.7%), Python (12.6%), JavaScript (12.2%). Homepage: https://developers.facebook.com/docs/business-sdk Open PRs: 19, open issues: 11. Last activity: 3w ago. Community health: 87%. Top contributors: jingping2015, stcheng, marksliva, HeyMultiverse, satwikareddy3, kongxinzhu, dependabot[bot], davit-y, donglinw-fb, alanho and others.
Last 12 weeks ยท 8 commits
Checklist [ x] I've updated to the latest released version [x ] I've searched for existing GitHub issues [ x] I've looked for existing answers on Stack Overflow and the Facebook Developers Group [x ] I've read the Code of Conduct [x ] This issue is not security related and can safely be disclosed publicly on GitHub Environment I'm using the Java Business sdk v10.0.1. Goals Use a call to action type of CALL_NOW, as shown in examples here: https://developers.facebook.com/docs/marketing-api/guides/event-ads#create Expected Results SDKs contain an enum value of CALL_NOW in EnumType for AdCreativeLinkDataCallToAction Code Samples & Details The enum_types.json file in this project doesn't contain the CALL_NOW call-to-action enum value. Related to this, the Java Business SDK method has only one implementation where the first argument is the EnumType. A different solution might be to include an overloaded method in the SDK with a String type argument instead. Also reported here https://github.com/facebook/facebook-java-business-sdk/issues/338
Checklist [x] I've read the Contributing Guidelines and the Code of Conduct [x] I've completed the Contributor License Agreement Pull Request Details Using rector/jack dependency reports: The "phpunit/phpunit" package is outdated Your version 9.6.25 is 2 weeks old Bump to 12.3.8 The "symfony/finder" package is outdated Your version v2.8.52 is 6 years old Bump to v7.3.2 I just open up versions in require dev to next versions (this doesnt break anything, just allow to install new versions) Opened "symfony/finder" package to "~2.6|3.0.*" version Opened "phpunit/phpunit" package to "~9|^10.0" version Also allowing a more recent version of guzzlehttp/guzzle for Symfony 7.x and others with PHP 8.4+ The current composer still allows PHP 8.0 which is EOL, and upcoming EOL for PHP 8.1. So please for security this should be addresed for more updated versions. Original PR in PHP repo