Skip to content

Commit 19a0f44

Browse files
authored
docs: add section about schema changes (#2686)
1 parent 5d700f7 commit 19a0f44

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

DEVELOPMENT_GUIDE.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,22 @@ conventions are best practices that we have learnt over time.
189189
strong reason to do. You must explain the reason in great detail in
190190
comments.
191191

192+
## Making schema changes
193+
194+
The AWS SAM specification includes a JSON schema (see https://github.com/aws/serverless-application-model/discussions/2645). All test templates must validate against it.
195+
196+
To add new properties, do the following:
197+
198+
1. Add the property to the relevant resource schema under [`samtranslator/schema`](https://github.com/aws/serverless-application-model/tree/develop/samtranslator/schema) (e.g. [`samtranslator/schema/aws_serverless_function.py`](https://github.com/aws/serverless-application-model/blob/develop/samtranslator/schema/aws_serverless_function.py) for `AWS::Serverless::Function`).
199+
2. You can leave out the assignement part; it adds documentation to the schema properties. The team will take care of documentation updates. Typically we update documentation by running:
200+
201+
```bash
202+
git clone https://github.com/awsdocs/aws-sam-developer-guide.git
203+
bin/parse_docs.py aws-sam-developer-guide/doc_source > samtranslator/schema/docs.json
204+
```
205+
206+
3. Run `make schema`.
207+
192208
Profiling
193209
---------
194210

0 commit comments

Comments
 (0)