@autorest/java 4.1.18
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/LICENSE.md +21 -0
- package/androidgen/README.md +30 -0
- package/androidgen/package.json +27 -0
- package/androidgen/target/azure-autorest-androidgen-jar-with-dependencies.jar +0 -0
- package/customization-base/README.md +720 -0
- package/docs/readme.md +34 -0
- package/fluentgen/package.json +26 -0
- package/fluentgen/readme.md +25 -0
- package/fluentgen/target/azure-autorest-fluentgen-jar-with-dependencies.jar +0 -0
- package/fluentnamer/package.json +26 -0
- package/fluentnamer/readme.md +65 -0
- package/fluentnamer/target/azure-autorest-fluentnamer-jar-with-dependencies.jar +0 -0
- package/javagen/package.json +26 -0
- package/javagen/readme.md +29 -0
- package/javagen/target/azure-autorest-javagen-jar-with-dependencies.jar +0 -0
- package/package.json +45 -0
- package/postprocessor/package.json +26 -0
- package/postprocessor/readme.md +9 -0
- package/postprocessor/target/azure-autorest-postprocessor-jar-with-dependencies.jar +0 -0
- package/preprocessor/data-plane.md +21 -0
- package/preprocessor/package.json +26 -0
- package/preprocessor/readme.md +62 -0
- package/preprocessor/target/azure-autorest-preprocessor-jar-with-dependencies.jar +0 -0
- package/readme.md +450 -0
- package/typespec-extension/package.json +75 -0
- package/typespec-extension/readme.md +148 -0
- package/typespec-tests/package.json +29 -0
- package/typespec-tests/readme.md +38 -0
package/docs/readme.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# AutoRest Java Documentation
|
|
2
|
+
|
|
3
|
+
These documents are Java-specific, see [our main docs][main_docs] for more general information
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
1. Generating Java Clients with AutoRest
|
|
7
|
+
- How do I generate code? Main documents are [here][main_generate], while here are the [Java-specific docs][java_generate]
|
|
8
|
+
|
|
9
|
+
2. Using Your Generated Java Client
|
|
10
|
+
- How do I [use my Java client][java_client] now that I've generated it? Main docs are [here][main_client]
|
|
11
|
+
|
|
12
|
+
3. Migrating from AutoRest 2.0 to 3.0
|
|
13
|
+
- I have old generated code using the previous version of AutoRest. How do I upgrade my code? Main docs [here][main_migrate], Java-specific docs [here][java_migrate]
|
|
14
|
+
|
|
15
|
+
4. Developing with AutoRest
|
|
16
|
+
- How do I generate or contribute to AutoRest in [dev mode][java_dev] Main docs [here][main_dev]
|
|
17
|
+
|
|
18
|
+
5. Samples
|
|
19
|
+
- [Sample][sample] readmes and generated code for common scenarios.
|
|
20
|
+
|
|
21
|
+
6. [FAQ][faq]
|
|
22
|
+
|
|
23
|
+
<!-- LINKS -->
|
|
24
|
+
[main_docs]: https://github.com/Azure/autorest/tree/main/docs
|
|
25
|
+
[main_generate]: https://github.com/Azure/autorest/tree/main/docs/generate/readme.md
|
|
26
|
+
[java_generate]: ./generate/readme.md
|
|
27
|
+
[java_client]: ./client/readme.md
|
|
28
|
+
[main_client]: https://github.com/Azure/autorest/tree/main/docs/generate/client.md
|
|
29
|
+
[main_migrate]: https://github.com/Azure/autorest/tree/main/docs/migrate/readme.md
|
|
30
|
+
[java_migrate]: ./migrate/readme.md
|
|
31
|
+
[java_dev]: ./developer/readme.md
|
|
32
|
+
[main_dev]: https://github.com/Azure/autorest/tree/main/docs/developer/readme.md
|
|
33
|
+
[sample]: ./samples/readme.md
|
|
34
|
+
[faq]: ./faq.md
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@autorest/java.fluent",
|
|
3
|
+
"version": "4.0.0",
|
|
4
|
+
"description": "The Java extension for classic generators in AutoRest.",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"autorest": "autorest",
|
|
7
|
+
"start": "java --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED -jar target/azure-autorest-fluentgen-jar-with-dependencies.jar",
|
|
8
|
+
"debug": "java --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,quiet=y,address=5005 -jar target/azure-autorest-fluentgen-jar-with-dependencies.jar",
|
|
9
|
+
"build": "mvn package -P local"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/Azure/autorest.java"
|
|
14
|
+
},
|
|
15
|
+
"readme": "./readme.md",
|
|
16
|
+
"keywords": [
|
|
17
|
+
"autorest",
|
|
18
|
+
"java"
|
|
19
|
+
],
|
|
20
|
+
"author": "Microsoft Corporation",
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/Azure/autorest.java/issues"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://github.com/Azure/autorest.java/blob/main/readme.md"
|
|
26
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
### Java Code Formatter
|
|
2
|
+
|
|
3
|
+
Formatter depends on a customized [google-java-format](https://github.com/weidongxu-microsoft/google-java-format?organization=weidongxu-microsoft&organization=weidongxu-microsoft), which requires JRE 11.
|
|
4
|
+
|
|
5
|
+
#### Fluentgen
|
|
6
|
+
|
|
7
|
+
``` yaml
|
|
8
|
+
use: $(this-folder)/../fluentnamer
|
|
9
|
+
pipeline:
|
|
10
|
+
|
|
11
|
+
fluentgen:
|
|
12
|
+
scope: java
|
|
13
|
+
input: fluentnamer
|
|
14
|
+
output-artifact: java-files
|
|
15
|
+
|
|
16
|
+
fluentgen/emitter:
|
|
17
|
+
input: fluentgen
|
|
18
|
+
scope: scope-fluentgen/emitter
|
|
19
|
+
|
|
20
|
+
scope-fluentgen/emitter:
|
|
21
|
+
input-artifact: java-files
|
|
22
|
+
output-uri-expr: $key
|
|
23
|
+
|
|
24
|
+
output-artifact: java-files
|
|
25
|
+
```
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@autorest/java.fluentnamer",
|
|
3
|
+
"version": "4.0.0",
|
|
4
|
+
"description": "The Java extension for fluentnamer in AutoRest.",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"autorest": "autorest",
|
|
7
|
+
"start": "java -jar target/azure-autorest-fluentnamer-jar-with-dependencies.jar",
|
|
8
|
+
"debug": "java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,quiet=y,address=5005 -jar target/azure-autorest-fluentnamer-jar-with-dependencies.jar",
|
|
9
|
+
"build": "mvn package -P local"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/Azure/autorest.java"
|
|
14
|
+
},
|
|
15
|
+
"readme": "./readme.md",
|
|
16
|
+
"keywords": [
|
|
17
|
+
"autorest",
|
|
18
|
+
"java"
|
|
19
|
+
],
|
|
20
|
+
"author": "Microsoft Corporation",
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/Azure/autorest.java/issues"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://github.com/Azure/autorest.java/blob/main/README.md"
|
|
26
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
#### Fluentnamer
|
|
2
|
+
|
|
3
|
+
``` yaml
|
|
4
|
+
pass-thru:
|
|
5
|
+
- model-deduplicator
|
|
6
|
+
- subset-reducer
|
|
7
|
+
|
|
8
|
+
use-extension:
|
|
9
|
+
"@autorest/modelerfour": "4.26.2"
|
|
10
|
+
|
|
11
|
+
pipeline:
|
|
12
|
+
|
|
13
|
+
# --- extension remodeler ---
|
|
14
|
+
|
|
15
|
+
# "Shake the tree", and normalize the model
|
|
16
|
+
modelerfour:
|
|
17
|
+
input: openapi-document/multi-api/identity # the plugin where we get inputs from
|
|
18
|
+
|
|
19
|
+
# allow developer to do transformations on the code model.
|
|
20
|
+
modelerfour/new-transform:
|
|
21
|
+
input: modelerfour
|
|
22
|
+
|
|
23
|
+
fluentnamer:
|
|
24
|
+
input: modelerfour/identity
|
|
25
|
+
naming:
|
|
26
|
+
override:
|
|
27
|
+
eTag: etag
|
|
28
|
+
userName: username
|
|
29
|
+
metaData: metadata
|
|
30
|
+
timeStamp: timestamp
|
|
31
|
+
hostName: hostname
|
|
32
|
+
webHook: webhook
|
|
33
|
+
coolDown: cooldown
|
|
34
|
+
resourceregion: resourceRegion
|
|
35
|
+
sTag: stag
|
|
36
|
+
tagname: tagName
|
|
37
|
+
tagvalue: tagValue
|
|
38
|
+
|
|
39
|
+
modelerfour:
|
|
40
|
+
flatten-models: false
|
|
41
|
+
flatten-payloads: false
|
|
42
|
+
|
|
43
|
+
additional-checks: true
|
|
44
|
+
lenient-model-deduplication: false
|
|
45
|
+
remove-empty-child-schemas: false
|
|
46
|
+
seal-single-value-enum-by-default: true
|
|
47
|
+
|
|
48
|
+
naming:
|
|
49
|
+
choiceValue: upper
|
|
50
|
+
preserve-uppercase-max-length: 2
|
|
51
|
+
override:
|
|
52
|
+
ip: Ip
|
|
53
|
+
id: Id
|
|
54
|
+
|
|
55
|
+
include-x-ms-examples-original-file: true
|
|
56
|
+
|
|
57
|
+
license-header: MICROSOFT_MIT_SMALL
|
|
58
|
+
regenerate-pom: true
|
|
59
|
+
sync-methods: all
|
|
60
|
+
client-side-validations: true
|
|
61
|
+
client-logger: true
|
|
62
|
+
generate-client-interfaces: true
|
|
63
|
+
required-parameter-client-methods: true
|
|
64
|
+
client-flattened-annotation-target: none
|
|
65
|
+
```
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@autorest/java.vanilla",
|
|
3
|
+
"version": "4.0.0",
|
|
4
|
+
"description": "The Java extension for classic generators in AutoRest.",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"autorest": "autorest",
|
|
7
|
+
"start": "java -jar target/azure-autorest-javagen-jar-with-dependencies.jar",
|
|
8
|
+
"debug": "java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,quiet=y,address=5005 -jar target/azure-autorest-javagen-jar-with-dependencies.jar",
|
|
9
|
+
"build": "mvn package -Dlocal"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/Azure/autorest.java"
|
|
14
|
+
},
|
|
15
|
+
"readme": "./readme.md",
|
|
16
|
+
"keywords": [
|
|
17
|
+
"autorest",
|
|
18
|
+
"java"
|
|
19
|
+
],
|
|
20
|
+
"author": "Microsoft Corporation",
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/Azure/autorest.java/issues"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://github.com/Azure/autorest.java/blob/main/readme.md"
|
|
26
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#### Javagen
|
|
2
|
+
|
|
3
|
+
``` yaml
|
|
4
|
+
use:
|
|
5
|
+
- $(this-folder)/../preprocessor
|
|
6
|
+
- $(this-folder)/../postprocessor
|
|
7
|
+
|
|
8
|
+
pipeline:
|
|
9
|
+
|
|
10
|
+
# --- extension remodeler ---
|
|
11
|
+
javagen:
|
|
12
|
+
scope: java
|
|
13
|
+
input: preprocessor
|
|
14
|
+
output-artifact: java-files
|
|
15
|
+
|
|
16
|
+
postprocessor:
|
|
17
|
+
input: javagen
|
|
18
|
+
output-artifact: java-files
|
|
19
|
+
|
|
20
|
+
postprocess/emitter:
|
|
21
|
+
input: postprocessor
|
|
22
|
+
scope: scope-javagen/emitter
|
|
23
|
+
|
|
24
|
+
scope-javagen/emitter:
|
|
25
|
+
input-artifact: java-files
|
|
26
|
+
output-uri-expr: $key
|
|
27
|
+
|
|
28
|
+
output-artifact: java-files
|
|
29
|
+
```
|
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@autorest/java",
|
|
3
|
+
"version": "4.1.18",
|
|
4
|
+
"description": "The Java extension for classic generators in AutoRest.",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"autorest": "autorest",
|
|
7
|
+
"start": "java -jar javagen/target/azure-autorest-javagen-jar-with-dependencies.jar",
|
|
8
|
+
"debug": "java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,quiet=y,address=5005 -jar javagen/target/azure-autorest-javagen-jar-with-dependencies.jar",
|
|
9
|
+
"build": "mvn package -P local",
|
|
10
|
+
"generate": "./generate",
|
|
11
|
+
"testserver-run": "autorest-testserver run",
|
|
12
|
+
"testserver-stop": "autorest-testserver stop",
|
|
13
|
+
"testserver-coverage-publish": "autorest-testserver-coverage publish"
|
|
14
|
+
},
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/Azure/autorest.java"
|
|
18
|
+
},
|
|
19
|
+
"readme": "./readme.md",
|
|
20
|
+
"keywords": [
|
|
21
|
+
"autorest",
|
|
22
|
+
"java"
|
|
23
|
+
],
|
|
24
|
+
"author": "Microsoft Corporation",
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"bugs": {
|
|
27
|
+
"url": "https://github.com/Azure/autorest.java/issues"
|
|
28
|
+
},
|
|
29
|
+
"homepage": "https://github.com/Azure/autorest.java/blob/main/readme.md",
|
|
30
|
+
"files": [
|
|
31
|
+
"*/package.json",
|
|
32
|
+
"/readme.md",
|
|
33
|
+
"/androidgen/*.md",
|
|
34
|
+
"/fluentgen/*.md",
|
|
35
|
+
"/fluentnamer/*.md",
|
|
36
|
+
"/javagen/*.md",
|
|
37
|
+
"/postprocessor/*.md",
|
|
38
|
+
"/preprocessor/*.md",
|
|
39
|
+
"*/target/*-jar-with-dependencies.jar"
|
|
40
|
+
],
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"autorest": "^3.0.0",
|
|
43
|
+
"@microsoft.azure/autorest.testserver": "3.3.45"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@autorest/java.postprocessor",
|
|
3
|
+
"version": "4.0.0",
|
|
4
|
+
"description": "The Java extension for postprocessor in AutoRest.",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"autorest": "autorest",
|
|
7
|
+
"start": "java -jar target/azure-autorest-postprocessor-jar-with-dependencies.jar",
|
|
8
|
+
"debug": "java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,quiet=y,address=5005 -jar target/azure-autorest-postprocessor-jar-with-dependencies.jar",
|
|
9
|
+
"build": "mvn package -Dlocal"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/Azure/autorest.java"
|
|
14
|
+
},
|
|
15
|
+
"readme": "./readme.md",
|
|
16
|
+
"keywords": [
|
|
17
|
+
"autorest",
|
|
18
|
+
"java"
|
|
19
|
+
],
|
|
20
|
+
"author": "Microsoft Corporation",
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/Azure/autorest/issues"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://github.com/Azure/autorest.java/blob/main/README.md"
|
|
26
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#### data-plane
|
|
2
|
+
|
|
3
|
+
```yaml
|
|
4
|
+
azure-arm: false
|
|
5
|
+
|
|
6
|
+
license-header: MICROSOFT_MIT_SMALL
|
|
7
|
+
|
|
8
|
+
generate-client-interfaces: false
|
|
9
|
+
generate-client-as-impl: true
|
|
10
|
+
generate-sync-async-clients: true
|
|
11
|
+
generate-builder-per-client: true
|
|
12
|
+
sync-methods: all
|
|
13
|
+
enable-sync-stack: true
|
|
14
|
+
|
|
15
|
+
use-default-http-status-code-to-exception-type-mapping: true
|
|
16
|
+
polling: {}
|
|
17
|
+
|
|
18
|
+
models-subpackage: implementation.models
|
|
19
|
+
client-logger: true
|
|
20
|
+
required-fields-as-ctor-args: true
|
|
21
|
+
```
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@autorest/java.preprocessor",
|
|
3
|
+
"version": "4.0.0",
|
|
4
|
+
"description": "The Java extension for preprocessor in AutoRest.",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"autorest": "autorest",
|
|
7
|
+
"start": "java -jar target/azure-autorest-preprocessor-jar-with-dependencies.jar",
|
|
8
|
+
"debug": "java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,quiet=y,address=5005 -jar target/azure-autorest-preprocessor-jar-with-dependencies.jar",
|
|
9
|
+
"build": "mvn package -Dlocal"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/Azure/autorest.java"
|
|
14
|
+
},
|
|
15
|
+
"readme": "./readme.md",
|
|
16
|
+
"keywords": [
|
|
17
|
+
"autorest",
|
|
18
|
+
"java"
|
|
19
|
+
],
|
|
20
|
+
"author": "Microsoft Corporation",
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/Azure/autorest/issues"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://github.com/Azure/autorest.java/blob/main/README.md"
|
|
26
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
#### Preprocessor
|
|
2
|
+
|
|
3
|
+
``` yaml
|
|
4
|
+
pass-thru:
|
|
5
|
+
- model-deduplicator
|
|
6
|
+
- subset-reducer
|
|
7
|
+
|
|
8
|
+
use-extension:
|
|
9
|
+
"@autorest/modelerfour": "4.26.2"
|
|
10
|
+
|
|
11
|
+
pipeline:
|
|
12
|
+
|
|
13
|
+
# --- extension remodeler ---
|
|
14
|
+
|
|
15
|
+
# "Shake the tree", and normalize the model
|
|
16
|
+
modelerfour:
|
|
17
|
+
input: openapi-document/multi-api/identity # the plugin where we get inputs from
|
|
18
|
+
|
|
19
|
+
# allow developer to do transformations on the code model.
|
|
20
|
+
modelerfour/new-transform:
|
|
21
|
+
input: modelerfour
|
|
22
|
+
|
|
23
|
+
preprocessor:
|
|
24
|
+
input: modelerfour/identity
|
|
25
|
+
|
|
26
|
+
modelerfour:
|
|
27
|
+
seal-single-value-enum-by-default: true
|
|
28
|
+
|
|
29
|
+
skip-special-headers:
|
|
30
|
+
- Repeatability-Request-ID
|
|
31
|
+
- Repeatability-First-Sent
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
```yaml !$(data-plane)
|
|
35
|
+
modelerfour:
|
|
36
|
+
flatten-models: true
|
|
37
|
+
flatten-payloads: true
|
|
38
|
+
group-parameters: true
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
```yaml $(data-plane)
|
|
42
|
+
modelerfour:
|
|
43
|
+
flatten-models: false
|
|
44
|
+
flatten-payloads: false
|
|
45
|
+
group-parameters: false
|
|
46
|
+
|
|
47
|
+
lenient-model-deduplication: true
|
|
48
|
+
|
|
49
|
+
naming:
|
|
50
|
+
choiceValue: upper
|
|
51
|
+
preserve-uppercase-max-length: 2
|
|
52
|
+
override:
|
|
53
|
+
ip: Ip
|
|
54
|
+
id: Id
|
|
55
|
+
|
|
56
|
+
require:
|
|
57
|
+
- $(this-folder)data-plane.md
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
```yaml $(data-plane) && $(sdk-integration)
|
|
61
|
+
regenerate-pom: true
|
|
62
|
+
```
|