@autorest/java 4.1.18 → 4.1.20

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autorest/java",
3
- "version": "4.1.18",
3
+ "version": "4.1.20",
4
4
  "description": "The Java extension for classic generators in AutoRest.",
5
5
  "scripts": {
6
6
  "autorest": "autorest",
@@ -11,11 +11,12 @@ generate-sync-async-clients: true
11
11
  generate-builder-per-client: true
12
12
  sync-methods: all
13
13
  enable-sync-stack: true
14
+ required-fields-as-ctor-args: true
15
+ enable-page-size: true
14
16
 
15
17
  use-default-http-status-code-to-exception-type-mapping: true
16
18
  polling: {}
17
19
 
18
20
  models-subpackage: implementation.models
19
21
  client-logger: true
20
- required-fields-as-ctor-args: true
21
22
  ```
package/readme.md CHANGED
@@ -54,6 +54,8 @@ To debug, add `--java.debugger` to the argument list. The JVM will suspend at th
54
54
  - `required-fields-as-ctor-args`, create a constructor taking required properties, for model classes. The correctness of this constructor highly depends on the correctness of Swagger.
55
55
  - `output-model-immutable: true`, make model classes immutable, if model is used only in response.
56
56
  - `enable-sync-stack: true`, let sync method invoke sync RestProxy method.
57
+ - `enable-page-size: true`, let `maxpagesize` query parameter be supplied via `byPage` API in `PagedFlux` or `PagedIterable`.
58
+ - `use-key-credential: true`, use `KeyCredential` in builder for API key.
57
59
 
58
60
  - `generate-client-as-impl: true`, generate Client in implementation package, for customization.
59
61
  - `models-subpackage: implementation.models`, generate model classes in implementation package.
@@ -94,13 +96,15 @@ Settings can be provided on the command line through `--name:value` or in a READ
94
96
  |`--required-fields-as-ctor-args`|Indicates that class models have constructor taking required properties.|
95
97
  |`--output-model-immutable`|Indicates that output-only models be generated as immutable, and without public constructor.|
96
98
  |`--use-input-stream-for-binary`|Indicates that `InputStream` is used for binary response body. By default, `BinaryData` is used.|
99
+ |`--enable-page-size`|Indicates that `maxpagesize` query parameter be supplied via `byPage` API in `PagedFlux` or `PagedIterable`, instead of via client method parameter.|
100
+ |`--use-key-credential`|Indicates that builder uses `KeyCredential` for API key.|
97
101
 
98
102
  ## Settings for minimal data-plane clients
99
103
 
100
104
  `data-plane` option enables the generator to generate code for minimal data-plane clients.
101
105
 
102
106
  `data-plane` option will change the default value for some vanilla options.
103
- For example, `generate-client-interfaces`, `generate-client-as-impl`, `generate-sync-async-clients`, `generate-builder-per-client` option is by default `true`.
107
+ For example, `generate-client-interfaces`, `generate-client-as-impl`, `generate-sync-async-clients`, `generate-builder-per-client`, `enable-sync-stack`, `required-fields-as-ctor-args` option is by default `true`.
104
108
  `polling` is by default enabled as default settings globally (`polling={}`).
105
109
 
106
110
  `sdk-integration` option can be used for integrating to [azure-sdk-for-java](https://github.com/Azure/azure-sdk-for-java/).
@@ -133,6 +137,7 @@ Following settings only works when `fluent` option is specified.
133
137
  | `--preserve-model` | CSV. Preserve classes from clean-up. |
134
138
  | `--remove-operation-group` | CSV. Remove operation groups. |
135
139
  | `--name-for-ungrouped-operations` | String. Name for ungrouped operation group. Default to `ResourceProviders` for Lite. |
140
+ | `--resource-collection-associations` | Array. Prioritized association from resource model to resource collection. |
136
141
 
137
142
  `fluent` option will change the default value for some vanilla options.
138
143
  For example, `generate-client-interfaces`, `required-parameter-client-methods` option is by default `true`.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure-tools/typespec-java",
3
- "version": "0.8.5",
3
+ "version": "0.9.0",
4
4
  "description": "TypeSpec library for emitting Java client from the TypeSpec REST protocol binding",
5
5
  "keywords": [
6
6
  "TypeSpec"
@@ -58,18 +58,18 @@
58
58
  "js-yaml": "~4.1.0"
59
59
  },
60
60
  "devDependencies": {
61
- "@types/lodash": "~4.14.195",
61
+ "@types/lodash": "~4.14.198",
62
62
  "@types/js-yaml": "~4.0.5",
63
63
  "@types/mocha": "~10.0.1",
64
- "@types/node": "~20.4.0",
64
+ "@types/node": "~20.6.0",
65
65
  "@types/prettier": "~2.7.3",
66
- "c8": "~8.0.0",
67
- "eslint": "~8.44.0",
66
+ "c8": "~8.0.1",
67
+ "eslint": "~8.49.0",
68
68
  "mocha": "~10.2.0",
69
69
  "rimraf": "~5.0.1",
70
- "typescript": "~5.1.6",
71
- "@typescript-eslint/parser": "~5.61.0",
72
- "@typescript-eslint/eslint-plugin": "~5.61.0",
73
- "eslint-plugin-deprecation": "~1.4.1"
70
+ "typescript": "~5.2.2",
71
+ "@typescript-eslint/parser": "~6.7.0",
72
+ "@typescript-eslint/eslint-plugin": "~6.7.0",
73
+ "eslint-plugin-deprecation": "~1.5.0"
74
74
  }
75
75
  }
@@ -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.46.
7
+ Install [TypeSpec](https://github.com/microsoft/typespec/) 0.47.
8
8
 
9
9
  # Initialize TypeSpec Project
10
10
 
@@ -123,7 +123,7 @@ and breaks at all applicable breakpoints.
123
123
 
124
124
  The remote debugger configuration is shown below for reference.
125
125
 
126
- ![img.png](../docs/images/remote-debugger-config.png)
126
+ ![img.png](https://raw.githubusercontent.com/Azure/autorest.java/main/docs/images/remote-debugger-config.png)
127
127
 
128
128
  ```yaml
129
129
  emit:
@@ -1,29 +1,31 @@
1
1
  {
2
- "name": "typespec-java-tests",
2
+ "name": "@azure-tools/typespec-java-tests",
3
3
  "version": "0.0.1",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "format": "npm run -s prettier -- --write",
7
7
  "check-format": "npm run prettier -- --check",
8
8
  "prettier": "prettier --config ./.prettierrc.yaml **/*.tsp",
9
- "start-test-server": "npx cadl-ranch serve ./node_modules/@azure-tools/cadl-ranch-specs/http --coverageFile ./cadl-ranch-coverage-java.json"
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
- "@typespec/openapi": ">=0.45.0 <1.0.0",
13
- "@azure-tools/typespec-autorest": ">=0.31.0 <1.0.0",
14
- "@azure-tools/cadl-ranch-specs": "0.16.2",
15
- "@azure-tools/typespec-java": "file:/../typespec-extension/azure-tools-typespec-java-0.8.5.tgz"
12
+ "@typespec/openapi": ">=0.48.0 <1.0.0",
13
+ "@azure-tools/typespec-autorest": ">=0.34.0 <1.0.0",
14
+ "@azure-tools/cadl-ranch-specs": "0.22.0",
15
+ "@azure-tools/typespec-java": "file:/../typespec-extension/azure-tools-typespec-java-0.9.0.tgz"
16
16
  },
17
17
  "devDependencies": {
18
- "@typespec/prettier-plugin-typespec": ">=0.45.0 <1.0.0",
19
- "prettier": "~2.8.8"
18
+ "@typespec/prettier-plugin-typespec": "~0.48.0",
19
+ "prettier-plugin-organize-imports": "3.2.3",
20
+ "prettier": "~3.0.3"
20
21
  },
21
22
  "overrides": {
22
- "@typespec/compiler": ">=0.45.0 <1.0.0",
23
- "@typespec/http": ">=0.45.0 <1.0.0",
24
- "@typespec/rest": ">=0.45.0 <1.0.0",
25
- "@typespec/versioning": ">=0.45.0 <1.0.0",
26
- "@azure-tools/typespec-azure-core": ">=0.31.0 <1.0.0"
23
+ "@typespec/compiler": ">=0.48.0 <1.0.0",
24
+ "@typespec/http": ">=0.48.0 <1.0.0",
25
+ "@typespec/rest": ">=0.48.0 <1.0.0",
26
+ "@typespec/versioning": ">=0.48.0 <1.0.0",
27
+ "@azure-tools/typespec-azure-core": ">=0.34.0 <1.0.0",
28
+ "@azure-tools/typespec-client-generator-core": ">=0.34.0 <1.0.0"
27
29
  },
28
30
  "private": true
29
31
  }