Widgets
This page details information about customization and error handling of APIMatic markdown widgets.
Customization
You can customize the widgets themselves or their functionality.
Code Generation Settings Profile
The code generated is already fully functional. However, you may customize it with our CodeGen Settings. The flexibility offered helps you generate code the way you want it. In order to modify these settings you need you navigate to the CodeGen Profile page in the account settings.
Image Icon Settings
You can use your icon by replacing the image URLs with your own icon URLs. You can also change the size of your image icon by changing the size parameter in the image URL, as shown below.
https://www.apimatic.io/anypoint/image?template=java&size=small
https://www.apimatic.io/anypoint/image?template=java&size=medium
https://www.apimatic.io/anypoint/image?template=java&size=large
Caching Settings
By default, APIMatic uses smart caching to reduce code generation costs. However, if your API is in development mode, or you are facing issues with getting up-to-date SDKs, you can disable the cache temporarily. It is not advised to disable cache permanently as this could incur higher costs of code generation. Disabling cashing is done by altering the URL as shown in the example below.
[![Java SDK](https://www.apimatic.io/anypoint/image?template={TEMPLATE})](https://www.apimatic.io/anypoint/sdk?template={TEMPLATE}&token={TOKEN}&url={RAML_URL}&cache=no)
Error Handling
APIMatic displays custom useful error messages in case of errors. Some of the most common errors are:
- Using an invalid or a private URL for RAML description, which cannot be read by APIMatic.
- Using a token that is configured for another Organization ID. This may often be case if you have more than one accounts/organizations in Anypoint platform. In this case, you need to update your integration token with the new Organization ID.
- Forgetting to specify, or specifying incorrect values of {TEMPLATE}. The allowed values are listed above.
- SDK is not up-to-date from JSONified RAML URL. This is caused by having your Mock Server turned off while making changes to your API. This makes the JSON version of your API definition get out of sync.