Skip to content

Commit 3ad4cc0

Browse files
vxfieldXField
authored andcommitted
Azure Quantum: Fix data-plane readme.md AutoRest configs & mark optional data model fields as nullable (Azure#17388)
* Update data-plane configurations * Update Job Cost Estimate field description * Add basic-setup-py: true * Add generate-metadata: true * Fix Python readme.md settings * Update Typescript config * Remove payload flatenning * Disable client-side validation * Allow job metadata to be null * Allow metadata to be null * Rollback * Mark fields as nullable * Remove C# client-validation parameter Co-authored-by: XField <[email protected]>
1 parent 1b6c53c commit 3ad4cc0

File tree

7 files changed

+43
-54
lines changed

7 files changed

+43
-54
lines changed

specification/quantum/data-plane/Microsoft.Quantum/preview/2021-11-01-preview/quantum.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@
408408
},
409409
"metadata": {
410410
"type": "object",
411+
"x-nullable": true,
411412
"additionalProperties": {
412413
"type": "string"
413414
},
@@ -446,33 +447,39 @@
446447
"beginExecutionTime": {
447448
"type": "string",
448449
"readOnly": true,
450+
"x-nullable": true,
449451
"format": "date-time",
450452
"description": "The time when the job began execution."
451453
},
452454
"endExecutionTime": {
453455
"type": "string",
454456
"readOnly": true,
457+
"x-nullable": true,
455458
"format": "date-time",
456459
"description": "The time when the job finished execution."
457460
},
458461
"cancellationTime": {
459462
"type": "string",
460463
"readOnly": true,
464+
"x-nullable": true,
461465
"format": "date-time",
462466
"description": "The time when a job was successfully cancelled."
463467
},
464468
"costEstimate": {
465469
"$ref": "#/definitions/CostEstimate",
466470
"readOnly": true,
467-
"description": "The job billing data."
471+
"x-nullable": true,
472+
"description": "The job cost billed by the provider. The final cost on your bill might be slightly different due to added taxes and currency conversion rates."
468473
},
469474
"errorData": {
470475
"$ref": "#/definitions/ErrorData",
471476
"readOnly": true,
477+
"x-nullable": true,
472478
"description": "The error data for the job. This is expected only when Status 'Failed'."
473479
},
474480
"tags": {
475481
"type": "array",
482+
"x-nullable": true,
476483
"items": {
477484
"type": "string"
478485
},
@@ -681,7 +688,7 @@
681688
"description": "The estimated total."
682689
}
683690
},
684-
"description": "A job cost estimate."
691+
"description": "The job cost billed by the provider. The final cost on your bill might be slightly different due to added taxes and currency conversion rates."
685692
},
686693
"UsageEvent": {
687694
"properties": {

specification/quantum/data-plane/readme.csharp.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@ Please also specify `--csharp-sdks-folder=<path to "SDKs" directory of your azur
55

66
```yaml $(csharp)
77
csharp:
8-
azure-arm: true
98
license-header: MICROSOFT_MIT_NO_VERSION
10-
payload-flattening-threshold: 1
119
clear-output-folder: true
12-
client-side-validation: true
13-
namespace: Microsoft.Azure.Quantum.Client
14-
output-folder: $(csharp-sdks-folder)/quantum/Microsoft.Azure.Quantum.Client/src/Generated
10+
namespace: Azure.Quantum.Jobs
11+
output-folder: $(csharp-sdks-folder)/quantum/Azure.Quantum.Jobs/src/Generated
1512
```

specification/quantum/data-plane/readme.java.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ Please also specify `--azure-libraries-for-java-folder=<path to the root directo
55

66
``` yaml $(java)
77
java:
8-
azure-arm: true
98
fluent: true
10-
namespace: com.microsoft.azure.quantum
9+
namespace: com.azure.quantum.jobs
1110
license-header: MICROSOFT_MIT_NO_CODEGEN
12-
payload-flattening-threshold: 1
13-
output-folder: $(azure-libraries-for-java-folder)/azure-quantum
14-
```
11+
output-folder: $(azure-libraries-for-java-folder)/quantum/azure-quantum-jobs
12+
```

specification/quantum/data-plane/readme.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ These are the global settings for the quantum.
2626

2727
```yaml
2828
openapi-type: data-plane
29-
tag: package-2019-11-04-preview
29+
tag: package-2021-11-01-preview
3030
```
3131
3232
### Tag: package-2019-11-04-preview
@@ -68,10 +68,9 @@ This is not used by Autorest itself.
6868
```yaml $(swagger-to-sdk)
6969
swagger-to-sdk:
7070
- repo: azure-sdk-for-python
71-
- repo: azure-sdk-for-net-track2
71+
- repo: azure-sdk-for-net
7272
- repo: azure-sdk-for-java
7373
- repo: azure-sdk-for-js
74-
- repo: azure-sdk-for-node
7574
```
7675

7776
## Python
@@ -84,13 +83,9 @@ See configuration in [readme.csharp.md](./readme.csharp.md)
8483

8584
## Java
8685

87-
See configuration in [readme.go.md](./readme.java.md)
86+
See configuration in [readme.java.md](./readme.java.md)
8887

8988
## TypeScript
9089

9190
See configuration in [readme.typescript.md](./readme.typescript.md)
9291

93-
94-
## Node.js
95-
96-
See configuration in [readme.go.md](./readme.nodejs.md)

specification/quantum/data-plane/readme.nodejs.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

specification/quantum/data-plane/readme.python.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,24 @@ Please also specify `--python-sdks-folder=<path to the root directory of your az
66
``` yaml $(python)
77
python-mode: create
88
python:
9-
azure-arm: true
9+
package-version: 0.0.0b1
1010
license-header: MICROSOFT_MIT_NO_VERSION
11-
payload-flattening-threshold: 2
12-
namespace: azure.quantum
13-
package-name: azure-quantum
11+
namespace: azure.quantum._client
12+
package-name: azure-quantum-_client
1413
clear-output-folder: true
14+
no-namespace-folders: false
15+
add-credentials: true
16+
credential-scopes: ["https://quantum.microsoft.com/.default"]
17+
output-folder: $(python-sdks-folder)/quantum/azure-quantum
18+
basic-setup-py: true
1519
```
16-
``` yaml $(python) && $(python-mode) == 'update'
17-
python:
18-
no-namespace-folders: true
19-
output-folder: $(python-sdks-folder)/quantum/azure-quantum/azure/quantum
20+
21+
```yaml $(python) && $(python-mode) == 'update'
22+
no-namespace-folders: true
23+
output-folder: $(python-sdks-folder)/quantum/azure-quantum/azure/quantum/_client
2024
```
21-
``` yaml $(python) && $(python-mode) == 'create'
22-
python:
23-
basic-setup-py: true
24-
output-folder: $(python-sdks-folder)/quantum/azure-quantum
25+
26+
```yaml $(python) && $(python-mode) == 'create'
27+
basic-setup-py: true
28+
output-folder: $(python-sdks-folder)/quantum/azure-quantum
2529
```

specification/quantum/data-plane/readme.typescript.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@ Please also specify `--typescript-sdks-folder=<path to root folder of your azure
55

66
```yaml $(typescript)
77
typescript:
8-
azure-arm: true
9-
license-header: MICROSOFT_MIT_NO_VERSION
10-
package-name: "@azure/quantum"
11-
output-folder: "$(typescript-sdks-folder)/sdk/quantum/quantum"
12-
payload-flattening-threshold: 1
13-
generate-metadata: true
14-
generate-license-txt: true
8+
azure-arm: false
159
generate-package-json: false
1610
generate-readme-md: false
11+
generate-metadata: true
12+
generate-license-txt: true
13+
output-folder: "$(typescript-sdks-folder)/sdk/quantum/quantum-jobs"
14+
package-name: "@azure/quantum-jobs"
15+
license-header: MICROSOFT_MIT_NO_VERSION
16+
add-credentials: true
17+
credential-scopes: ["https://quantum.microsoft.com/.default"]
18+
title: QuantumJobClient
19+
v3: true
1720
```

0 commit comments

Comments
 (0)