Skip to content

Commit

Permalink
Spec tooling and specs (microsoft#3068)
Browse files Browse the repository at this point in the history
Added tooling so that we can generate specs from our schema, so that our spec'ing process starts with updating the schema first, leading to less errors and mistakes in the end :)

In `schemas\src`, add your new properties/elements to the schema

![UpdateSchema](https://user-images.githubusercontent.com/13246069/59529888-0fee6b80-8e97-11e9-8925-d29264c57b4d.gif)


### 3. Generate the updated spec

If you followed the setup instructions, simply save the file and the spec will be updated! Add any necessary rendering details to the spec.

![UpdatedSpec](https://user-images.githubusercontent.com/13246069/59530207-e2ee8880-8e97-11e9-8957-de92911c2935.gif)


## Review spec

Submit a pull request for your updated spec/schema. The proposed schema in the proposal becomes outdated and should be replaced with a link to the PR.

![image](https://user-images.githubusercontent.com/13246069/59530515-a8392000-8e98-11e9-8d25-62d40d550517.png)


I'll share more details about this at Monday's meeting. Lots of details about the new proposed spec'ing process are captured here: https://github.com/microsoft/AdaptiveCards/wiki/Project-Management

###### Microsoft Reviewers: [Open in CodeFlow](http://wpcp.azurewebsites.net/CodeFlowProtocolProxy2.php?pullrequest=https://github.com/microsoft/AdaptiveCards/pull/3068)
  • Loading branch information
andrewleader authored Jun 18, 2019
1 parent 8efc5bc commit a6383af
Show file tree
Hide file tree
Showing 62 changed files with 13,448 additions and 3,160 deletions.
13 changes: 11 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,14 @@
"editor.insertSpaces": false,
"editor.formatOnSave": false, // only if you want auto fomattting on saving the file
"editor.detectIndentation": false,
"C_Cpp.default.cppStandard": "c++17"
}
"C_Cpp.default.cppStandard": "c++17",
"runOnSave.statusMessageTimeout": 18000,
"runOnSave.commands": [
{
"match": ".*schemas\\\\src\\\\.*\\.json$",
"command": "powershell cd ${workspaceFolder}\\source\\nodejs\\spec-generator; .\\generate.cmd",
"runningStatusMessage": "Updating specs...",
"finishStatusMessage": "Updated specs!"
}
]
}
3 changes: 3 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion schemas/src/AdaptiveCard.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"properties": {
"version": {
"type": "string",
"description": "Schema version that this card requires. If a client is **lower** than this version, the `fallbackText` will be rendered. NOTE: Version is not required for cards within an `Action.ShowCard`. However, it *is* required for the top-level card.",
"description": "Schema version that this card requires. If a client is **lower** than this version, the `fallbackText` will be rendered. NOTE: Version is not required for cards within an `Action.ShowCard`. However, it *is* required for the top-level card.",
"examples": [
"1.0",
"1.1",
Expand Down
Loading

0 comments on commit a6383af

Please sign in to comment.