Skip to content

Ruby scripts that generate C# SDK classes based on Cloud Foundry documentation

Notifications You must be signed in to change notification settings

cloudfoundry-community/cf-dotnet-sdk-builder

Repository files navigation

CF SDK Builder

Running the SDK builder

Run the following (note that if you're generating csharp output, you can omit the language variable). After the docker run, you'll be dropped in a shell.

docker run -v ${PWD}:/root/cf-dotnet-sdk-builder -it helioncf/hcf-sdk-builder
language=csharp ./cf-doc-generation/update-code.sh

You'll find your output (on your dev box): ./Generated and tests

It's best to keep the container around - it runs a mysql server, and it also makes your dev cycle shorter, since you don't need to re-install gems every time you want to run update-code.sh. Installing gems takes a really long time ...

NOTE: the generation creates some junk in cloud_controller_ng. It's safe to ignore that.

Building the Docker image

docker build -t helioncf/hcf-sdk-builder .

If you need more rubies, add them to versions.txt.

Writing extra output languages

  1. Defining the new language: make a copy of the lib/languages/csharp directory
  2. Rename the csharp_types.rb and csharp.rb files
  3. Include your new language in:
  • bin/codegen: you need to require the files and modify parameter validation
  • lib/config.rb: mention it in the self.language function
  1. Update the type definitions, file extensions, etc. for your new language
  2. Run

Upgrading the target API version

TBD

About

Ruby scripts that generate C# SDK classes based on Cloud Foundry documentation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published