Skip to content

Commit

Permalink
Azure Quantum: Fix data-plane readme.md AutoRest configs & mark opt…
Browse files Browse the repository at this point in the history
…ional data model fields as nullable (#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]>
  • Loading branch information
vxfield and XField authored Jan 19, 2022
1 parent 7e3958a commit 0bca06c
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@
},
"metadata": {
"type": "object",
"x-nullable": true,
"additionalProperties": {
"type": "string"
},
Expand Down Expand Up @@ -446,33 +447,39 @@
"beginExecutionTime": {
"type": "string",
"readOnly": true,
"x-nullable": true,
"format": "date-time",
"description": "The time when the job began execution."
},
"endExecutionTime": {
"type": "string",
"readOnly": true,
"x-nullable": true,
"format": "date-time",
"description": "The time when the job finished execution."
},
"cancellationTime": {
"type": "string",
"readOnly": true,
"x-nullable": true,
"format": "date-time",
"description": "The time when a job was successfully cancelled."
},
"costEstimate": {
"$ref": "#/definitions/CostEstimate",
"readOnly": true,
"description": "The job billing data."
"x-nullable": true,
"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."
},
"errorData": {
"$ref": "#/definitions/ErrorData",
"readOnly": true,
"x-nullable": true,
"description": "The error data for the job. This is expected only when Status 'Failed'."
},
"tags": {
"type": "array",
"x-nullable": true,
"items": {
"type": "string"
},
Expand Down Expand Up @@ -681,7 +688,7 @@
"description": "The estimated total."
}
},
"description": "A job cost estimate."
"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."
},
"UsageEvent": {
"properties": {
Expand Down
7 changes: 2 additions & 5 deletions specification/quantum/data-plane/readme.csharp.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ Please also specify `--csharp-sdks-folder=<path to "SDKs" directory of your azur

```yaml $(csharp)
csharp:
azure-arm: true
license-header: MICROSOFT_MIT_NO_VERSION
payload-flattening-threshold: 1
clear-output-folder: true
client-side-validation: true
namespace: Microsoft.Azure.Quantum.Client
output-folder: $(csharp-sdks-folder)/quantum/Microsoft.Azure.Quantum.Client/src/Generated
namespace: Azure.Quantum.Jobs
output-folder: $(csharp-sdks-folder)/quantum/Azure.Quantum.Jobs/src/Generated
```
8 changes: 3 additions & 5 deletions specification/quantum/data-plane/readme.java.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ Please also specify `--azure-libraries-for-java-folder=<path to the root directo

``` yaml $(java)
java:
azure-arm: true
fluent: true
namespace: com.microsoft.azure.quantum
namespace: com.azure.quantum.jobs
license-header: MICROSOFT_MIT_NO_CODEGEN
payload-flattening-threshold: 1
output-folder: $(azure-libraries-for-java-folder)/azure-quantum
```
output-folder: $(azure-libraries-for-java-folder)/quantum/azure-quantum-jobs
```
11 changes: 3 additions & 8 deletions specification/quantum/data-plane/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ These are the global settings for the quantum.

```yaml
openapi-type: data-plane
tag: package-2019-11-04-preview
tag: package-2021-11-01-preview
```
### Tag: package-2019-11-04-preview
Expand Down Expand Up @@ -68,10 +68,9 @@ This is not used by Autorest itself.
```yaml $(swagger-to-sdk)
swagger-to-sdk:
- repo: azure-sdk-for-python
- repo: azure-sdk-for-net-track2
- repo: azure-sdk-for-net
- repo: azure-sdk-for-java
- repo: azure-sdk-for-js
- repo: azure-sdk-for-node
```

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

## Java

See configuration in [readme.go.md](./readme.java.md)
See configuration in [readme.java.md](./readme.java.md)

## TypeScript

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


## Node.js

See configuration in [readme.go.md](./readme.nodejs.md)
15 changes: 0 additions & 15 deletions specification/quantum/data-plane/readme.nodejs.md

This file was deleted.

28 changes: 16 additions & 12 deletions specification/quantum/data-plane/readme.python.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,24 @@ Please also specify `--python-sdks-folder=<path to the root directory of your az
``` yaml $(python)
python-mode: create
python:
azure-arm: true
package-version: 0.0.0b1
license-header: MICROSOFT_MIT_NO_VERSION
payload-flattening-threshold: 2
namespace: azure.quantum
package-name: azure-quantum
namespace: azure.quantum._client
package-name: azure-quantum-_client
clear-output-folder: true
no-namespace-folders: false
add-credentials: true
credential-scopes: ["https://quantum.microsoft.com/.default"]
output-folder: $(python-sdks-folder)/quantum/azure-quantum
basic-setup-py: true
```
``` yaml $(python) && $(python-mode) == 'update'
python:
no-namespace-folders: true
output-folder: $(python-sdks-folder)/quantum/azure-quantum/azure/quantum
```yaml $(python) && $(python-mode) == 'update'
no-namespace-folders: true
output-folder: $(python-sdks-folder)/quantum/azure-quantum/azure/quantum/_client
```
``` yaml $(python) && $(python-mode) == 'create'
python:
basic-setup-py: true
output-folder: $(python-sdks-folder)/quantum/azure-quantum
```yaml $(python) && $(python-mode) == 'create'
basic-setup-py: true
output-folder: $(python-sdks-folder)/quantum/azure-quantum
```
17 changes: 10 additions & 7 deletions specification/quantum/data-plane/readme.typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ Please also specify `--typescript-sdks-folder=<path to root folder of your azure

```yaml $(typescript)
typescript:
azure-arm: true
license-header: MICROSOFT_MIT_NO_VERSION
package-name: "@azure/quantum"
output-folder: "$(typescript-sdks-folder)/sdk/quantum/quantum"
payload-flattening-threshold: 1
generate-metadata: true
generate-license-txt: true
azure-arm: false
generate-package-json: false
generate-readme-md: false
generate-metadata: true
generate-license-txt: true
output-folder: "$(typescript-sdks-folder)/sdk/quantum/quantum-jobs"
package-name: "@azure/quantum-jobs"
license-header: MICROSOFT_MIT_NO_VERSION
add-credentials: true
credential-scopes: ["https://quantum.microsoft.com/.default"]
title: QuantumJobClient
v3: true
```

0 comments on commit 0bca06c

Please sign in to comment.