1.7.0 • Published 1 month ago

@salesforce/schemas v1.7.0

Weekly downloads
44,797
License
ISC
Repository
github
Last release
1 month ago

Salesforce DX Schemas

Commitizen friendly

JSON Schemas help with validation and code completion of json files. Below are the schemas that are available in this repository.

Using the Schemas

If you are using the Salesforce Extensions for Visual Studio Code these schemas are already included for you.

For most other editors, you can use the schemas by adding the $schema property to the top of your JSON file with the link to the schema document as shown below.

{
  "$schema": "https://raw.githubusercontent.com/forcedotcom/schemas/main/sfdx-project.schema.json"
  //...
}

You can also use these schemas programatically. For example, Salesforce CLI uses these schema to do certain validation.

const schemas = require('@salesforce/schemas');
const projectJsonSchema = require(schemas['sfdx-project']);
// OR
const projectJsonSchema = require('@salesforce/schema/sfdx-project-schema.json']);

Updating project-scratch-def.schema.json

Run the features-update and settings-update scripts on every major release and open a PR with the new changes against the main branch to keep the schema files up to date

Generating Schema from TS files

the /src folder contains the TS type used to generate the replacements project property.

You can define (or import and re-export) TS types and then use this extension. It adds a "Generate JSON Schema from type" action to your palette.

The results go into /compiled, which can be used to copy-paste into the project.

Bugs and Feedback

To report issues or feedback with the schemas, open a bug on GitHub.

1.7.0

1 month ago

1.6.1

7 months ago

1.6.0

11 months ago

1.5.1

1 year ago

1.5.0

1 year ago

1.4.0

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.1.1

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.2.0

2 years ago

1.1.0

3 years ago

1.0.4

3 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago