The SDK config
latitude10.sdk.json is the body of every generation request, at most 16 KB. An unknown key is a warning; a field that fails its check refuses the request with 422 and a sentence that says what to fix.
{
"generator": 1,
"package": "@acme/sdk",
"clientName": "Acme",
"firstVersion": "0.1.0",
"license": { "holder": "Acme, Inc." },
"homepage": "https://docs.acme.example",
"exclude": { "operations": ["getInternalStats"] },
"python": { "package": "acme-sdk", "module": "acme_sdk" }
}The fields
| Field | What it sets | Checked |
|---|---|---|
package | The npm package name. Required. | A valid npm name, scoped or not, in lowercase. |
clientName | The client class's name. | A JavaScript identifier, and not a reserved word. |
firstVersion | The version of the first package. Default 0.1.0. | A version such as 1.0.0, with no prerelease. |
include | Only these operations: { "tags": […], "operations": […] }. | Lists of names. |
exclude | Leave these out, in the same shape. | Lists of names. |
license | { "holder": "…" }, the copyright holder in the MIT licence. Default: the workspace. | A name. |
repository | The package's repository link. | An https:// URL. |
homepage | The package's homepage link. | An https:// URL. |
generator | The generator's version. | 1, the only one so far. |
python | The Python package, below. Without it, no Python package can be made. | An object with at least package. |
The python section
| Field | What it sets | Checked |
|---|---|---|
python.package | The PyPI project name, normalised as PyPI does. Required. | A valid PyPI name. |
python.module | The import name. Default: the package name with - as _. | A Python identifier, not a keyword or a standard library module. |
python.firstVersion | The first Python package's version. Default 0.1.0. | As firstVersion. |
python.include | Python's own include filter, in place of the shared one. | As include. |
python.exclude | Python's own exclude filter, in place of the shared one. | As exclude. |
One file, two languages
Each language builds from its own view of the file. TypeScript's is the top-level keys. Python's is the same keys with the python section's name, module, first version and filters in their place. A package is identified by its own view, so changing a Python key never moves the TypeScript version line, and the reverse.
Where this comes from
app/sdk/_lib/config.tsapp/sdk/_lib/names.tsapp/sdk/_lib/builds.tsopenapi/latitude10.sdk.json