Skip to content

Commit ca9423f

Browse files
committed
merge with master
2 parents 050bd1d + db511f9 commit ca9423f

File tree

323 files changed

+35880
-475
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

323 files changed

+35880
-475
lines changed

.github/fabricbot.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2362,7 +2362,6 @@
23622362
"Search"
23632363
],
23642364
"mentionees": [
2365-
"brjohnstmsft",
23662365
"bleroy",
23672366
"tjacobhi",
23682367
"markheff",

CODEOWNERS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
/specification/schemaregistry/ @hmlam @nickghardwick @lmazuel @deyaaeldeen @JoshLove-msft @swathipil @conniey
1515

1616
# PRLabel: %Cognitive Services
17-
/dev/cognitiveservices/data-plane/Language/ @assafi @rokulka @ChongTang @annatisch @heaths @deyaaeldeen @kristapratico @mssfang @Azure/api-stewardship-board
17+
/dev/cognitiveservices/data-plane/Language/ @assafi @rokulka @ChongTang @annatisch @heaths @deyaaeldeen @kristapratico @mssfang @joseharriaga @Azure/api-stewardship-board
1818

1919
/specification/adp/ @Azure/adp
2020

@@ -65,7 +65,7 @@
6565
/specification/cognitiveservices/ @felixwa @yangyuan
6666

6767
# PRLabel: %Cognitive - Language
68-
/specification/cognitiveservices/data-plane/Language/ @assafi @rokulka @ChongTang @annatisch @heaths @deyaaeldeen @kristapratico @mssfang @Azure/api-stewardship-board
68+
/specification/cognitiveservices/data-plane/Language/ @assafi @rokulka @ChongTang @annatisch @heaths @deyaaeldeen @kristapratico @mssfang @joseharriaga @Azure/api-stewardship-board
6969

7070
# PRLabel: %Compute
7171
/specification/compute/ @bilaakpan-ms @sandido @dkulkarni-ms @haagha @madewithsmiles @MS-syh2qs @grizzlytheodore @hyonholee @mabhard @danielli90 @smotwani @ppatwa @vikramd-ms @yunusm @ZhidongPeng @nkuchta @maheshnemichand @najams @changov
@@ -199,7 +199,7 @@
199199
/specification/scheduler/ @pinwang81
200200

201201
# PRLabel: %Search
202-
/specification/search/data-plane/ @brjohnstmsft @arv100kri @bleroy @AlexGhiondea @Mohit-Chakraborty @Azure/api-stewardship-board
202+
/specification/search/data-plane/ @arv100kri @bleroy @AlexGhiondea @Mohit-Chakraborty @Azure/api-stewardship-board
203203

204204
# PRLabel: %Search
205205
/specification/search/resource-manager/ @abhi1509 @tjacobhi

custom-words.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,8 @@ CMAF
394394
Cmdkey
395395
cmdlet
396396
cmdlets
397+
cmek
398+
Cmek
397399
CMKDW
398400
CMKHS
399401
CMMI
@@ -1380,6 +1382,7 @@ netbios
13801382
netbsd
13811383
netdev
13821384
Netdev
1385+
Netezza
13831386
netfilter
13841387
Netfilter
13851388
networkinterfaces
@@ -2069,6 +2072,7 @@ subtree
20692072
subtrees
20702073
subvolume
20712074
subvolumes
2075+
subwoofer
20722076
subword
20732077
subwords
20742078
suggesters

dev/cognitiveservices/data-plane/Language/examples/questionanswering/authoring/SuccessfulDeleteProject.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
"projectName": "proj1"
88
},
99
"responses": {
10-
"202": {}
10+
"202": {
11+
"description": "A successful call results with an Operation-Location header used to check the status of the analysis job.",
12+
"headers": {
13+
"Operation-Location": "https://<resource-endpoint>/language/authoring/query-knowledgebases/projects/deletion-jobs/job1?api-version=2023-05-01"
14+
}
15+
}
1116
}
1217
}

dev/cognitiveservices/data-plane/Language/examples/questionanswering/authoring/SuccessfulGetSources.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,16 @@
1515
"displayName": "source1",
1616
"sourceUri": "https://docs.microsoft.com/en-us/azure/cognitive-services/qnamaker/overview/overview",
1717
"sourceKind": "url",
18-
"lastUpdatedDateTime": "2021-05-01T15:13:22Z"
18+
"lastUpdatedDateTime": "2021-05-01T15:13:22Z",
19+
"source": "https://docs.microsoft.com/en-us/azure/cognitive-services/qnamaker/overview/overview"
1920
},
2021
{
2122
"displayName": "source2",
2223
"sourceUri": "https://download.microsoft.com/download/2/9/B/29B20383-302C-4517-A006-B0186F04BE28/surface-pro-4-user-guide-EN.pdf",
2324
"sourceKind": "file",
2425
"contentStructureKind": "unstructured",
25-
"lastUpdatedDateTime": "2021-05-01T15:13:22Z"
26+
"lastUpdatedDateTime": "2021-05-01T15:13:22Z",
27+
"source": "surface-guide.pdf"
2628
}
2729
]
2830
}

dev/cognitiveservices/data-plane/Language/examples/questionanswering/authoring/SuccessfulUpdateSources.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"value": {
1212
"displayName": "source3",
1313
"sourceUri": "https://docs.microsoft.com/en-us/azure/cognitive-services/cognitive-services-support-options?context=/azure/cognitive-services/qnamaker/context/context",
14-
"sourceKind": "url"
14+
"sourceKind": "url",
15+
"source": "https://docs.microsoft.com/en-us/azure/cognitive-services/cognitive-services-support-options?context=/azure/cognitive-services/qnamaker/context/context"
1516
}
1617
},
1718
{
@@ -20,15 +21,17 @@
2021
"displayName": "source1",
2122
"sourceUri": "https://docs.microsoft.com/en-us/azure/cognitive-services/qnamaker/overview/overview",
2223
"sourceKind": "url",
23-
"refresh": true
24+
"refresh": true,
25+
"source": "https://docs.microsoft.com/en-us/azure/cognitive-services/qnamaker/overview/overview"
2426
}
2527
},
2628
{
2729
"op": "delete",
2830
"value": {
2931
"displayName": "source2",
3032
"sourceUri": "https://download.microsoft.com/download/2/9/B/29B20383-302C-4517-A006-B0186F04BE28/surface-pro-4-user-guide-EN.pdf",
31-
"sourceKind": "file"
33+
"sourceKind": "file",
34+
"source": "surface-guide.pdf"
3235
}
3336
}
3437
]

dev/cognitiveservices/data-plane/Language/questionanswering-authoring.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1650,7 +1650,8 @@
16501650
"additionalProperties": false,
16511651
"required": [
16521652
"sourceUri",
1653-
"sourceKind"
1653+
"sourceKind",
1654+
"source"
16541655
],
16551656
"properties": {
16561657
"displayName": {
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# How to use API Scenario Test and test-proxy to make traffic recording
2+
3+
In this section, we'll show you how to make traffic recording with API Scenario Test and test-proxy, assuming you've already learnt how to use API Scenario test. If not, please go to [QuickStart](./QuickStart.md).
4+
5+
Test-proxy is a tool that provides out-of-process record/playback capabilities compatible with any language. It also supports pushing/restoring the API test recordings from external git repository. Traffic recording can be an evidence of running API test, and also help validate Swagger consistency. See [how to install test-proxy](https://github.com/Azure/azure-sdk-tools/blob/main/tools/test-proxy/Azure.Sdk.Tools.TestProxy/README.md#installation)
6+
7+
## Prepare assets.json file
8+
9+
The assets.json file is a configuration file used by test-proxy to push/restore recording to/from external git repository. Create an assets.json file under `scenarios/` folder with following content:
10+
11+
```json
12+
{
13+
"AssetsRepo": "Azure/azure-sdk-assets",
14+
"AssetsRepoPrefixPath": "",
15+
"TagPrefix": "apitest/<ServiceName>/<package>"
16+
}
17+
```
18+
19+
Take appConfiguration as an example,
20+
21+
```
22+
specification/appconfiguration/data-plane
23+
├── Microsoft.AppConfiguration
24+
│ └── stable
25+
│ └── 1.0
26+
│ ├── appconfiguration.json
27+
│ ├── examples
28+
│ │ ├── CheckKeyValue.json
29+
│ │ ├── PutLock.json
30+
│ │ └── PutLock_IfMatch.json
31+
│ └── scenarios
32+
│ └── assets.json <----- check-in assets.json here
33+
└── readme.md
34+
```
35+
36+
## Make recording
37+
38+
1. Start test-proxy under the repository root folder
39+
40+
```bash
41+
test-proxy start
42+
```
43+
44+
By default, it listens to 5000/5001 ports for http/https respectively.
45+
46+
2. Run API Scenario test
47+
48+
```bash
49+
oav run <your-scenario-file>.yaml -e <your-env>.json --testProxy http://localhost:5000 --testProxyAssets <your-assets-file>.json
50+
```
51+
52+
3. Check the recording file
53+
54+
The recording file can be found in the `<repository-root>/.assets` folder.
55+
56+
## Push recording
57+
58+
1. Delete secrets from recording files
59+
60+
Please ensure no secrets in the recording file, before trying to push to external git repository.
61+
62+
2. Push recording to the git repository
63+
64+
```bash
65+
test-proxy push -a <your-assets-file>.json
66+
```
67+
68+
3. Commit updated assets.json file
69+
70+
After pushing the recording, test-proxy will write the latest git tag to assets.json file. Check the content of recording on github assets repository if as expected. If no problem, commit and push the updated assets.json file.
71+
72+
## Restore recording
73+
74+
Use following command to fetch recording:
75+
76+
```bash
77+
test-proxy restore -a <your-assets-file>.json
78+
```
79+
80+
or reset if any weird thing happens:
81+
82+
```bash
83+
test-proxy reset -a <your-assets-file>.json
84+
```
85+
## Playback recording
86+
87+
TBA

documentation/api-scenario/readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ API Scenario is a YAML file defining RESTful API usage scenarios of your service
1717
- [Example: Write and run your first API scenario file](./how-to/QuickStart.md)
1818
- [Example: Generate a basic API scenario file](./how-to/GenerateABasicApiScenario.md)
1919
- [Example: Resolve external dependencies](./how-to/ResolveDependencies.md)
20+
- [Example: Make traffic recording with test-proxy](./how-to/MakeTestProxyRecording.md)
2021
- [API scenario file sample](../samplefiles/Microsoft.YourServiceName/stable/YYYY-MM-DD/scenarios/quickStart.yaml)
2122

2223
## References
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@doc("Faked shared model")
2+
model FakedSharedModel {
3+
@doc("The tag.")
4+
tag: string;
5+
6+
@doc("The created date.")
7+
createdDate: zonedDateTime;
8+
}

0 commit comments

Comments
 (0)