Skip to content

Commit f1af967

Browse files
mssfangweshaggardChenxiJiang333msyycJieZhou000
authored
Added TypeSpec customization support for Java (#26916)
* Update spell checking instructions (#26874) Having one custom-words.txt for the entire repo has been causing a number of merging issues so we are trying to move away from it and instead have teams use override in the cspell configuration file directly. * Update readme.python.md (#26894) * Update readme.python.md * Update readme.python.md * Update readme.python.md * Update readme.python.md --------- Co-authored-by: Yuchao Yan <yuchaoyan@microsoft.com> * [Cognitive Services - Azure AI Content Safety] Update package print name. (#26911) * Update package print name. * update. * update name. * Added TypeSpec customization support for Java --------- Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com> Co-authored-by: ChenxiJiang333 <119990644+ChenxiJiang333@users.noreply.github.com> Co-authored-by: Yuchao Yan <yuchaoyan@microsoft.com> Co-authored-by: jiezhou_microsoft <94604058+JieZhou000@users.noreply.github.com>
1 parent 024434b commit f1af967

4 files changed

Lines changed: 36 additions & 28 deletions

File tree

documentation/ci-fix.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,31 @@ Most guides here require for you to have `npm` installed, which you can get by i
1010

1111
## Spell check
1212

13-
Please add your words to `./custom-words.txt` if you think you have the correct spell.
13+
If you receive a spelling failure either fix the spelling to match or if there are words that need to be suppressed for your service then add the word to the override list in [cspell.json](https://github.com/Azure/azure-rest-api-specs/blob/main/cSpell.json). Either
14+
add to your existing section or create a new section for your specific spec or service family if the work is more generally used in losts of files under your service.
15+
```
16+
"overrides": [
17+
... example of specific file override
18+
{
19+
"filename": "**/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2015-03-01-preview/cluster.json",
20+
"words": [
21+
"saskey"
22+
]
23+
}
24+
... example of specific service family override
25+
{
26+
"filename": "**/specification/cognitiveservices/**/*.json",
27+
"words": [
28+
"flac",
29+
"mpga"
30+
]
31+
}
32+
```
33+
Words are case-insensitive so use lower case for the word list.
34+
35+
If you need more information on see [cspell configuration](https://cspell.org/configuration/).
1436

15-
If your problem is some existing error name that is not a word and need to suppress the error in that file (and don't want to add to custom-words.txt), you can add it to `./cSpell.txt`.
37+
*Note*: We are trying to move away from one shared dictionary file so try and avoid editing custom-words.txt in the root as it will likely go away in the future.
1638

1739
## Prettier check
1840

specification/cognitiveservices/ContentSafety/tspconfig.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ options:
1616
package-dir: "azure-ai-contentsafety"
1717
package-version: "1.0.0"
1818
package-name: "{package-dir}"
19+
package-pprint-name: "\"Azure AI Content Safety\""
1920
"@azure-tools/typespec-csharp":
2021
package-dir: "Azure.AI.ContentSafety"
2122
namespace: "{package-dir}"

specification/cognitiveservices/OpenAI.Inference/tspconfig.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ options:
2929
generate-tests: false
3030
custom-types-subpackage: "implementation.models"
3131
custom-types: "FunctionCallPreset"
32+
customization-class: customization/src/main/java/MyCustomization.java
3233
"@azure-tools/typespec-ts":
3334
package-dir: "openai"
3435
generateMetadata: false

specification/edgemarketplace/resource-manager/readme.python.md

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,16 @@ These settings apply only when `--python` is specified on the command line.
44
Please also specify `--python-sdks-folder=<path to the root directory of your azure-sdk-for-python clone>`.
55

66
```yaml $(python)
7-
python:
8-
azure-arm: true
9-
license-header: MICROSOFT_MIT_NO_VERSION
10-
payload-flattening-threshold: 2
11-
namespace: azure.mgmt.edgemarketplace
12-
package-name: azure-mgmt-edgemarketplace
13-
package-version: 2023-08-01
14-
clear-output-folder: true
7+
title: EdgeMarketPlaceMgmtClient
8+
azure-arm: true
9+
license-header: MICROSOFT_MIT_NO_VERSION
10+
namespace: azure.mgmt.edgemarketplace
11+
package-name: azure-mgmt-edgemarketplace
12+
package-version: 1.0.0b1
13+
clear-output-folder: true
1514
```
1615
17-
### Python multi-api
18-
19-
Generate all API versions currently shipped for this package
20-
21-
```yaml $(python) && $(multiapi)
22-
batch:
23-
- tag: package-2023-08-01
16+
``` yaml $(python)
17+
no-namespace-folders: true
18+
output-folder: $(python-sdks-folder)/edgemarketplace/azure-mgmt-edgemarketplace/azure/mgmt/edgemarketplace
2419
```
25-
26-
### Tag: package-2023-08-01 and python
27-
28-
These settings apply only when `--tag=package-2023-08-01 --python` is specified on the command line.
29-
Please also specify `--python-sdks-folder=<path to the root directory of your azure-sdk-for-python clone>`.
30-
31-
``` yaml $(tag) == 'package-2023-08-01' && $(python)
32-
python:
33-
namespace: azure.mgmt.edgemarketplace.v2023_04_01_preview
34-
output-folder: $(python-sdks-folder)/edgemarketplace/azure-mgmt-edgemarketplace/azure/mgmt/edgemarketplace/v2023_08_01
35-
```

0 commit comments

Comments
 (0)