@autorest/java 4.1.25 → 4.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/androidgen/target/azure-autorest-androidgen-jar-with-dependencies.jar +0 -0
- package/fluentgen/target/azure-autorest-fluentgen-jar-with-dependencies.jar +0 -0
- package/javagen/target/azure-autorest-javagen-jar-with-dependencies.jar +0 -0
- package/package.json +2 -2
- package/typespec-extension/package.json +22 -14
- package/typespec-extension/readme.md +2 -2
- package/typespec-tests/package.json +12 -13
- package/typespec-tests/readme.md +15 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autorest/java",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.26",
|
|
4
4
|
"description": "The Java extension for classic generators in AutoRest.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"autorest": "autorest",
|
|
@@ -40,6 +40,6 @@
|
|
|
40
40
|
],
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"autorest": "^3.0.0",
|
|
43
|
-
"@microsoft.azure/autorest.testserver": "3.3.
|
|
43
|
+
"@microsoft.azure/autorest.testserver": "3.3.48"
|
|
44
44
|
}
|
|
45
45
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure-tools/typespec-java",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.2",
|
|
4
4
|
"description": "TypeSpec library for emitting Java client from the TypeSpec REST protocol binding",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"TypeSpec"
|
|
@@ -42,15 +42,16 @@
|
|
|
42
42
|
"lib/*.tsp",
|
|
43
43
|
"dist/**",
|
|
44
44
|
"!dist/test/**",
|
|
45
|
-
"target/
|
|
45
|
+
"target/emitter.jar"
|
|
46
46
|
],
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@typespec/compiler": ">=0.
|
|
49
|
-
"@typespec/
|
|
50
|
-
"@typespec/
|
|
51
|
-
"@typespec/
|
|
52
|
-
"@
|
|
53
|
-
"@azure-tools/typespec-
|
|
48
|
+
"@typespec/compiler": ">=0.51.0 <1.0.0",
|
|
49
|
+
"@typespec/http": ">=0.51.0 <1.0.0",
|
|
50
|
+
"@typespec/rest": ">=0.51.0 <1.0.0",
|
|
51
|
+
"@typespec/openapi": ">=0.51.0 <1.0.0",
|
|
52
|
+
"@typespec/versioning": ">=0.51.0 <1.0.0",
|
|
53
|
+
"@azure-tools/typespec-azure-core": ">=0.37.2 <1.0.0",
|
|
54
|
+
"@azure-tools/typespec-client-generator-core": ">=0.37.0 <1.0.0"
|
|
54
55
|
},
|
|
55
56
|
"dependencies": {
|
|
56
57
|
"@autorest/codemodel": "~4.20.0",
|
|
@@ -62,14 +63,21 @@
|
|
|
62
63
|
"@types/lodash": "~4.14.202",
|
|
63
64
|
"@types/js-yaml": "~4.0.9",
|
|
64
65
|
"@types/mocha": "~10.0.6",
|
|
65
|
-
"@types/node": "~20.10.
|
|
66
|
+
"@types/node": "~20.10.3",
|
|
66
67
|
"c8": "~8.0.1",
|
|
67
|
-
"eslint": "~8.
|
|
68
|
+
"eslint": "~8.55.0",
|
|
68
69
|
"mocha": "~10.2.0",
|
|
69
70
|
"rimraf": "~5.0.5",
|
|
70
|
-
"typescript": "~5.3.
|
|
71
|
-
"@typescript-eslint/parser": "~6.
|
|
72
|
-
"@typescript-eslint/eslint-plugin": "~6.
|
|
73
|
-
"eslint-plugin-deprecation": "~2.0.0"
|
|
71
|
+
"typescript": "~5.3.3",
|
|
72
|
+
"@typescript-eslint/parser": "~6.13.2",
|
|
73
|
+
"@typescript-eslint/eslint-plugin": "~6.13.2",
|
|
74
|
+
"eslint-plugin-deprecation": "~2.0.0",
|
|
75
|
+
"@azure-tools/typespec-azure-core": "0.37.2",
|
|
76
|
+
"@azure-tools/typespec-client-generator-core": "0.37.0",
|
|
77
|
+
"@typespec/compiler": "0.51.0",
|
|
78
|
+
"@typespec/http": "0.51.0",
|
|
79
|
+
"@typespec/openapi": "0.51.0",
|
|
80
|
+
"@typespec/rest": "0.51.0",
|
|
81
|
+
"@typespec/versioning": "0.51.0"
|
|
74
82
|
}
|
|
75
83
|
}
|
|
@@ -4,7 +4,7 @@ Install [Node.js](https://nodejs.org/en/download/) 16 or above. (Verify by `node
|
|
|
4
4
|
|
|
5
5
|
Install [Java](https://docs.microsoft.com/java/openjdk/download) 11 or above. (Verify by `java --version`)
|
|
6
6
|
|
|
7
|
-
Install [TypeSpec](https://github.com/microsoft/typespec/) 0.
|
|
7
|
+
Install [TypeSpec](https://github.com/microsoft/typespec/) 0.51.
|
|
8
8
|
|
|
9
9
|
# Initialize TypeSpec Project
|
|
10
10
|
|
|
@@ -61,8 +61,8 @@ options:
|
|
|
61
61
|
generate-samples: true
|
|
62
62
|
generate-tests: true
|
|
63
63
|
examples-directory: "./examples"
|
|
64
|
-
namer: false
|
|
65
64
|
partial-update: false
|
|
65
|
+
models-subpackage: "models"
|
|
66
66
|
custom-types-subpackage: "implementation.models"
|
|
67
67
|
custom-types: InternalModel1,InternalModel2
|
|
68
68
|
```
|
|
@@ -9,24 +9,23 @@
|
|
|
9
9
|
"testserver-run": "npx cadl-ranch serve ./node_modules/@azure-tools/cadl-ranch-specs/http --coverageFile ./cadl-ranch-coverage-java.json"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@
|
|
13
|
-
"@azure-tools/typespec-
|
|
14
|
-
"@azure-tools/cadl-ranch-specs": "0.27.1",
|
|
15
|
-
"@azure-tools/typespec-java": "file:/../typespec-extension/azure-tools-typespec-java-0.12.0.tgz"
|
|
12
|
+
"@azure-tools/cadl-ranch-specs": "0.28.6",
|
|
13
|
+
"@azure-tools/typespec-java": "file:/../typespec-extension/azure-tools-typespec-java-0.12.2.tgz"
|
|
16
14
|
},
|
|
17
15
|
"devDependencies": {
|
|
18
|
-
"@typespec/prettier-plugin-typespec": "~0.
|
|
16
|
+
"@typespec/prettier-plugin-typespec": "~0.51.0",
|
|
19
17
|
"prettier-plugin-organize-imports": "3.2.4",
|
|
20
|
-
"prettier": "~3.1.0"
|
|
18
|
+
"prettier": "~3.1.0",
|
|
19
|
+
"@azure-tools/typespec-azure-resource-manager": ">=0.37.1 <1.0.0"
|
|
21
20
|
},
|
|
22
21
|
"overrides": {
|
|
23
|
-
"@typespec/compiler": ">=0.
|
|
24
|
-
"@typespec/http": ">=0.
|
|
25
|
-
"@typespec/rest": ">=0.
|
|
26
|
-
"@typespec/versioning": ">=0.
|
|
27
|
-
"@typespec/openapi": ">=0.
|
|
28
|
-
"@azure-tools/typespec-azure-core": ">=0.
|
|
29
|
-
"@azure-tools/typespec-client-generator-core": ">=0.
|
|
22
|
+
"@typespec/compiler": ">=0.51.0 <1.0.0",
|
|
23
|
+
"@typespec/http": ">=0.51.0 <1.0.0",
|
|
24
|
+
"@typespec/rest": ">=0.51.0 <1.0.0",
|
|
25
|
+
"@typespec/versioning": ">=0.51.0 <1.0.0",
|
|
26
|
+
"@typespec/openapi": ">=0.51.0 <1.0.0",
|
|
27
|
+
"@azure-tools/typespec-azure-core": ">=0.37.2 <1.0.0",
|
|
28
|
+
"@azure-tools/typespec-client-generator-core": ">=0.37.0 <1.0.0"
|
|
30
29
|
},
|
|
31
30
|
"private": true
|
|
32
31
|
}
|
package/typespec-tests/readme.md
CHANGED
|
@@ -38,6 +38,21 @@ This is usually to do a quick check whether the modified TypeSpec-Java works as
|
|
|
38
38
|
|
|
39
39
|
Generated code will be at `./typespec-tests/tsp-output/` folder for inspect.
|
|
40
40
|
|
|
41
|
+
## Debugging Java code
|
|
42
|
+
|
|
43
|
+
`tspconfig.yaml` already configured
|
|
44
|
+
```yaml
|
|
45
|
+
dev-options:
|
|
46
|
+
generate-code-model: true
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
With this option, a `code-model.yaml` file is kept in `./typespec-tests/tsp-output/` folder after `tsp compile <target.tsp>`.
|
|
50
|
+
|
|
51
|
+
`Main.java` under `./typespec-extension` would load this `code-model.yaml` file as default, and run the Java code to generate the code.
|
|
52
|
+
At this stage, one can modify or debug the Java code (`./typespec-extension/src/main/java/`) in IDE. The code generated in `./typespec-tests/tsp-output/` would reflect the modified Java code.
|
|
53
|
+
|
|
54
|
+
Notice: there maybe some difference of other option between `tspconfig.yaml` and `EmitterOptions.java`. Remember to temporary modify `EmitterOptions.java` to reflect the option in `tspconfig.yaml` when running `Main.java` this way. (e.g. set `streamStyleSerialization` to `true`)
|
|
55
|
+
|
|
41
56
|
## Troubleshooting
|
|
42
57
|
|
|
43
58
|
### New version of `@typespec/compiler` etc.
|