Skip to content

Commit

Permalink
mgmt, java, fix invalid swagger (#22204)
Browse files Browse the repository at this point in the history
  • Loading branch information
weidongxu-microsoft authored Jan 17, 2023
1 parent 74b23e2 commit 6134321
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 62 deletions.
76 changes: 21 additions & 55 deletions specification/datamigration/resource-manager/readme.java.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,27 @@
## Java

These settings apply only when `--java` is specified on the command line.
Please also specify `--azure-libraries-for-java-folder=<path to the root directory of your azure-libraries-for-java clone>`.

``` yaml $(java)
azure-arm: true
fluent: true
namespace: com.microsoft.azure.management.datamigration
license-header: MICROSOFT_MIT_NO_CODEGEN
payload-flattening-threshold: 1
output-folder: $(azure-libraries-for-java-folder)/azure-mgmt-datamigration
```
### Java multi-api
``` yaml $(java) && $(multiapi)
batch:
- tag: package-2018-07-15-preview
- tag: package-2017-11-15-preview
- tag: package-2018-03-31-preview
```
### Tag: package-2018-07-15-preview and java
These settings apply only when `--tag=package-2018-07-15-preview --java` is specified on the command line.
Please also specify `--azure-libraries-for-java=<path to the root directory of your azure-sdk-for-java clone>`.

``` yaml $(tag) == 'package-2018-07-15-preview' && $(java) && $(multiapi)
java:
namespace: com.microsoft.azure.management.datamigration.v2018_07_15_preview
output-folder: $(azure-libraries-for-java-folder)/sdk/datamigration/mgmt-v2018_07_15_preview
regenerate-manager: true
generate-interface: true
```

### Tag: package-2017-11-15-preview and java

These settings apply only when `--tag=package-2017-11-15-preview --java` is specified on the command line.
Please also specify `--azure-libraries-for-java=<path to the root directory of your azure-sdk-for-java clone>`.

``` yaml $(tag) == 'package-2017-11-15-preview' && $(java) && $(multiapi)
java:
namespace: com.microsoft.azure.management.datamigration.v2017_11_15_preview
output-folder: $(azure-libraries-for-java-folder)/sdk/datamigration/mgmt-v2017_11_15_preview
regenerate-manager: true
generate-interface: true
```

### Tag: package-2018-03-31-preview and java

These settings apply only when `--tag=package-2018-03-31-preview --java` is specified on the command line.
Please also specify `--azure-libraries-for-java=<path to the root directory of your azure-sdk-for-java clone>`.

``` yaml $(tag) == 'package-2018-03-31-preview' && $(java) && $(multiapi)
java:
namespace: com.microsoft.azure.management.datamigration.v2018_03_31_preview
output-folder: $(azure-libraries-for-java-folder)/sdk/datamigration/mgmt-v2018_03_31_preview
regenerate-manager: true
generate-interface: true
directive:
- from: swagger-document
where: $.definitions.MigrateMySqlAzureDbForMySqlSyncTaskOutput
transform: >
$['required'] = ['resultType'];
- from: swagger-document
where: $.definitions.MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput
transform: >
$['required'] = ['resultType'];
- from: swagger-document
where: $.definitions.MigrateSqlServerSqlDbSyncTaskOutput
transform: >
$['required'] = ['resultType'];
- from: swagger-document
where: $.definitions.MigrateSqlServerSqlMITaskOutput
transform: >
$['required'] = ['resultType'];
- from: swagger-document
where: $.definitions.MigrateSqlServerSqlMISyncTaskOutput
transform: >
$['required'] = ['resultType'];
```
12 changes: 5 additions & 7 deletions specification/devspaces/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,13 @@ See configuration in [readme.go.md](./readme.go.md)
## Java

These settings apply only when `--java` is specified on the command line.
Please also specify `--azure-libraries-for-java-folder=<path to the root directory of your azure-libraries-for-java clone>`.

``` yaml $(java)
azure-arm: true
fluent: true
namespace: com.microsoft.azure.management.devspaces
license-header: MICROSOFT_MIT_NO_CODEGEN
payload-flattening-threshold: 1
output-folder: $(azure-libraries-for-java-folder)/azure-mgmt-devspaces
directive:
- from: swagger-document
where: $.definitions.OrchestratorSpecificConnectionDetails
transform: >
$['required'] = ['instanceType'];
```

### Java multi-api
Expand Down

0 comments on commit 6134321

Please sign in to comment.