Skip to main content

CodeGen FAQs

How to create a single SDK from multiple API specification definitions?

If you have multiple APIs, you can stitch them up into a single API spec and use that specification to create a single SDK.

In APIMatic definition, what do API and an endpoint equate to?

  • API: API is the API specification that contains endpoints and models e.g an open API file. You can group as many endpoints as you'd like in a single API specification and call them as a single API. For APIMatic CodeGen, 1 API = 1 API spec (swagger, RAML, etc.)
  • Endpoint: 1 unique HTTP request to a server. E.g. 1 post request and 1 get request are 2 unique API endpoints.

Do SDKs support GraphQL, Webhooks, streaming APIs, or AsyncAPI?

Currently, we do not have support in SDK generation for GraphQL, Webhooks, streaming APIs, or AsyncAPI.

Which discriminators are supported in SDKs?

allOf discriminators are supported in all generated SDKs. We do not have support of oneOf and anyOf discriminators yet.

Why do example values for some parameters not show up in code even though valid examples are added in the spec?

By default, SDKs don't show example values for optional parameters. To enable this feature, you can use the GenerateExamplesForOptionalFields CodeGen setting.

How does the GitHub deployment work?

Deploying an SDK to GitHub is quite seamless. Simply provide access to your GitHub account and we can either push the source code to a repository of your choice or automatically create a new repository under your account. For more details refer to our GitHub deployment documentation.

What branch does APIMatic publish the SDKs to?

APIMatic creates a new branch in the format CodeGen-{platform} e.g., CodeGen-JAVA. The SDK will be published to this branch. The format of branch name cannot be changed.

Can I make changes on the generated branch?

As part of the deployment process, we remove the contents of the branch and replace them with the SDK's contents. This means changes made on the generated branch will be lost in the next deployment. Ideally, you should maintain your changes on a different branch (e.g master) and then pull/merge the generated branch.