CA Developer Portal: Adding custom code samples

Document ID : KB000076523
Last Modified Date : 05/04/2018
Show Technical Document Details
Question:
How can custom language code samples be added to the CA Developer Portal 3.5?
Answer:
1. Login to the CMS and navigate to /resources/code_sample_templates
2. Create a new item
3. Name the file as LANG.mustache where LANG will be the name of your desired language, ie: if using C Sharp you can name the file csharp.mustache
4. Edit the template-language-list.json and add a new section for the lanuage

        {
            "value" : "csharp",
            "label" : "C Sharp",
            "quoteStyle": "double"
        }

Where the label is what will be displayed in the drop down menu and quoteStyle denotes if the language uses single or double-quotes for strings so it knows how to properly escape them.

5. Save and publish the changes
6. Confirm in API Explorer that the new language is now available in the drop down menu