Add C# language support to the Facebook Business SDK Codegen#128
Open
BranislavMateas wants to merge 2 commits intofacebook:mainfrom
Open
Add C# language support to the Facebook Business SDK Codegen#128BranislavMateas wants to merge 2 commits intofacebook:mainfrom
BranislavMateas wants to merge 2 commits intofacebook:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
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
templates/csharp/):codegen.mustache: Main template for API object classesAPIContext.cs.versioned.mustache: API context configuration with template variablesAPINode.cs.versioned.mustache: Base class for API resourcesAPIRequest.cs.versioned.mustache: HTTP request handling with proper error handlingAPIConfig.cs.versioned.mustache: Configuration constantsFacebookBusinessSDK.csproj.mustache: .NET project fileConfiguration Updates
api_specs/version_path.json: Added C# version detectionsrc/common/Utils.js: Added 'csharp' to supported languagessrc/processors/CodeGenLanguages.js: Registered C# processorREADME.md: Updated to reflect 6 language supportCritical Bug Fix
API Request Improvements
Source Code Restoration
src/directory for language extensibilitylib/vianpm run buildAt the same time, the build is present here - https://github.com/BranislavMateas/facebook-business-sdk-dotnet
Test Plan
Test Plan
1. Codegen Execution
npm install && npm run buildsuccessfullynode lib/CodeGenerator.js csharpgenerates 952 C# classes without errorssrc/Meta/Ads/SDK/2. Generated Code Validation
{{api_version}}template variable3. Configuration Verification
api_specs/version_path.jsonhas csharp entry pointing to correct version filesrc/common/Utils.jsincludes 'csharp' in supported languagessrc/processors/CodeGenLanguages.jsregisters C# processor4. Bug Fix Verification
5. Generated SDK Repository
dotnet builddotnet pack