azure-rest-api-specs
azure-rest-api-specs copied to clipboard
Add 2023-02-27-preview for DigitalTwins
Data Plane API - Pull Request
Add new API version 2023-02-27-preview for data plane APIs of Azure Digital Twins
Private spec link: https://github.com/Azure/azure-rest-api-specs-pr/pull/10145
API Info: The Basics
Most of the information about your service should be captured in the issue that serves as your engagement record.
- Link to engagement record issue: https://github.com/Azure/azure-rest-api-specs-pr/pull/10145#:~:text=engagement%20record%20issue%3A-,%5BMCIGET%20%2D%20DigitalTwins%5D%20New%20Private%20Preview%20Data%20Plane%20Version%202023%2D02%2D28%2Dpreview%20for%20Event%20Handlers%20and%20Bulk%20Import%C2%A0%239749,-Is%20this%20review
Is this review for (select one):
- [ ] a private preview
- [x] a public preview
- [ ] GA release
Change Scope
This section will help us focus on the specific parts of your API that are new or have been modified.
Please share a link to the design document for the new APIs, a link to the previous Open API document (swagger) if applicable, and the root paths that have been updated.
Previous Open API Doc: 2022-05-31 stable
Updated paths: /jobs/imports
❔Got questions? Need additional info?? We are here to help!
Contact us!
The Azure API Review Board is dedicated to helping you create amazing APIs. You can read about our mission and learn more about our process on our wiki.
- 💬 Teams Channel
Click here for links to tools, specs, guidelines & other good stuff
Tooling
- Open API validation tools were run on this PR. Go here to see how to fix errors
- Spectral Linting
- Open API Hub
Guidelines & Specifications
Helpful Links
Hi, @abhinav-ghai Thanks for your PR. I am workflow bot for review process. Here are some small tips.
Swagger Validation Report
️️✔️
BreakingChange succeeded [Detail] [Expand]
There are no breaking changes.
️⚠️
Breaking Change(Cross-Version): 78 Warnings warning [Detail]
compared swaggers (via Oad v0.10.2)] | new version | base version |
---|---|---|
digitaltwins.json | 2023-02-27-preview(f91d8f1) | 2022-05-31(main) |
digitaltwins.json | 2023-02-27-preview(f91d8f1) | 2021-06-30-preview(main) |
The following breaking changes are detected by comparison with the latest stable version:
The following breaking changes are detected by comparison with the latest preview version:
Only 30 items are listed, please refer to log for more details.
️️✔️
CredScan succeeded [Detail] [Expand]
There is no credential detected.
️⚠️
LintDiff: 18 Warnings warning [Detail]
compared tags (via openapi-validator v2.0.0) | new version | base version |
---|---|---|
package-preview-2023-02-27 | package-preview-2023-02-27(f91d8f1) | default(main) |
[must fix]The following errors/warnings are introduced by current PR:
Rule | Message | Related RPC [For API reviewers] |
---|---|---|
:warning: PutRequestResponseScheme | A PUT operation request body schema should be the same as its 200 response schema, to allow reusing the same entity between GET and PUT. If the schema of the PUT request body is a superset of the GET response body, make sure you have a PATCH operation to make the resource updatable. Operation: 'DigitalTwins_Add' Request Model: 'parameters[1].schema' Response Model: 'responses[200].schema' Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L369 |
|
:warning: PutRequestResponseScheme | A PUT operation request body schema should be the same as its 200 response schema, to allow reusing the same entity between GET and PUT. If the schema of the PUT request body is a superset of the GET response body, make sure you have a PATCH operation to make the resource updatable. Operation: 'DigitalTwins_AddRelationship' Request Model: 'parameters[2].schema' Response Model: 'responses[200].schema' Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L569 |
|
:warning: ErrorResponse | Error response should contain a x-ms-error-code header. Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L1275 |
|
:warning: ErrorResponse | Error schema should define code and message properties as required.Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L1277 |
|
:warning: OperationId | OperationId for put method should contain 'Create' Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L1300 |
|
:warning: PutInOperationName | 'PUT' operation 'ImportJobs_Add' should use method name 'Create'. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L1300 |
|
:warning: PathParameterSchema | Path parameter should specify a maximum length (maxLength) and characters allowed (pattern). Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L1308 |
|
:warning: ErrorResponse | Error response should contain a x-ms-error-code header. Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L1331 |
|
:warning: ErrorResponse | Error schema should define code and message properties as required.Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L1333 |
|
:warning: PathParameterSchema | Path parameter should specify a maximum length (maxLength) and characters allowed (pattern). Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L1351 |
|
:warning: ErrorResponse | Error response should contain a x-ms-error-code header. Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L1365 |
|
:warning: ErrorResponse | Error schema should define code and message properties as required.Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L1367 |
|
:warning: PathParameterSchema | Path parameter should specify a maximum length (maxLength) and characters allowed (pattern). Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L1385 |
|
:warning: ErrorResponse | Error response should contain a x-ms-error-code header. Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L1396 |
|
:warning: ErrorResponse | Error schema should define code and message properties as required.Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L1398 |
|
:warning: PathParameterSchema | Path parameter should specify a maximum length (maxLength) and characters allowed (pattern). Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L1426 |
|
:warning: ErrorResponse | Error response should contain a x-ms-error-code header. Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L1440 |
|
:warning: ErrorResponse | Error schema should define code and message properties as required.Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L1442 |
The following errors/warnings exist before current PR submission:
Only 30 items are listed, please refer to log for more details.
Rule | Message |
---|---|
OperationIdNounVerb |
Per the Noun_Verb convention for Operation Ids, the noun 'Query' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L268 |
MissingTypeObject |
The schema 'ErrorResponse' is considered an object but without a 'type:object', please add the missing 'type:object'. Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L1762 |
MissingTypeObject |
The schema 'Error' is considered an object but without a 'type:object', please add the missing 'type:object'. Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L1774 |
MissingTypeObject |
The schema 'InnerError' is considered an object but without a 'type:object', please add the missing 'type:object'. Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L1801 |
XmsParameterLocation |
The parameter 'api-version' is defined in global parameters section without 'x-ms-parameter-location' extension. This would add the parameter as the client property. Please ensure that this is exactly you want. If so, apply the extension 'x-ms-parameter-location': 'client'. Else, apply the extension 'x-ms-parameter-location': 'method'. Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L1880 |
IntegerTypeMustHaveFormat |
The integer type does not have a format, please add it. Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L1888 |
XmsEnumValidation |
The enum types should have x-ms-enum type extension set with appropriate options. Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L1900 |
:warning: Post201Response | Using post for a create operation is discouraged. Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L59 |
:warning: ErrorResponse | Error response should contain a x-ms-error-code header. Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L65 |
:warning: ErrorResponse | Error schema should define code and message properties as required.Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L67 |
:warning: ErrorResponse | Error response should contain a x-ms-error-code header. Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L119 |
:warning: ErrorResponse | Error schema should define code and message properties as required.Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L121 |
:warning: PathParameterSchema | Path parameter should specify a maximum length (maxLength) and characters allowed (pattern). Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L152 |
:warning: ErrorResponse | Error response should contain a x-ms-error-code header. Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L169 |
:warning: ErrorResponse | Error schema should define code and message properties as required.Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L171 |
:warning: PatchContentType | A patch operation should consume 'application/merge-patch+json' content type. Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L183 |
:warning: PathParameterSchema | Path parameter should specify a maximum length (maxLength) and characters allowed (pattern). Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L192 |
:warning: ErrorResponse | Error response should contain a x-ms-error-code header. Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L215 |
:warning: ErrorResponse | Error schema should define code and message properties as required.Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L217 |
:warning: PathParameterSchema | Path parameter should specify a maximum length (maxLength) and characters allowed (pattern). Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L235 |
:warning: ErrorResponse | Error response should contain a x-ms-error-code header. Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L246 |
:warning: ErrorResponse | Error schema should define code and message properties as required.Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L248 |
:warning: ListInOperationName | Since operation response has model definition in array type, it should be of the form '_list'. Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L264 |
:warning: PaginationResponse | Operation might be pageable. Consider adding the x-ms-pageable extension. Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L264 |
:warning: ErrorResponse | Error response should contain a x-ms-error-code header. Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L311 |
:warning: ErrorResponse | Error schema should define code and message properties as required.Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L313 |
:warning: PathParameterSchema | Path parameter should specify a maximum length (maxLength) and characters allowed (pattern). Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L341 |
:warning: ErrorResponse | Error response should contain a x-ms-error-code header. Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L361 |
:warning: ErrorResponse | Error schema should define code and message properties as required.Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L363 |
:warning: OperationId | OperationId for put method should contain 'Create' or 'Update' Location: Microsoft.DigitalTwins/preview/2023-02-27-preview/digitaltwins.json#L373 |
️️✔️
Avocado succeeded [Detail] [Expand]
Validation passes for Avocado.
️️✔️
ApiReadinessCheck succeeded [Detail] [Expand]
️⚠️
~[Staging] ServiceAPIReadinessTest: 0 Warnings warning [Detail]
API Test is not triggered due to precheck failure. Check pipeline log for details.
️️✔️
~[Staging] SwaggerAPIView succeeded [Detail] [Expand]
️️✔️
ModelValidation succeeded [Detail] [Expand]
Validation passes for ModelValidation.
️️✔️
SemanticValidation succeeded [Detail] [Expand]
Validation passes for SemanticValidation.
️️✔️
PoliCheck succeeded [Detail] [Expand]
Validation passed for PoliCheck.
️️✔️
PrettierCheck succeeded [Detail] [Expand]
Validation passes for PrettierCheck.
️️✔️
SpellCheck succeeded [Detail] [Expand]
Validation passes for SpellCheck.
️️✔️
Lint(RPaaS) succeeded [Detail] [Expand]
Validation passes for Lint(RPaaS).
️️✔️
CadlValidation succeeded [Detail] [Expand]
Validation passes for CadlValidation.
️️✔️
PR Summary succeeded [Detail] [Expand]
Validation passes for Summary.
Swagger Generation Artifacts
️️✔️
ApiDocPreview succeeded [Detail] [Expand]
Please click here to preview with your @microsoft account.
️️✔️
SDK Breaking Change Tracking succeeded [Detail] [Expand]
Breaking Changes Tracking
️️✔️
azure-sdk-for-net-track2 succeeded [Detail] [Expand]
️✔️
Succeeded [Logs]Release - Generate from 0bd0dcf8e3a9c71f418f660359907c1b7a9781ab. SDK Automation 14.0.0command pwsh ./eng/scripts/Automation-Sdk-Init.ps1 ../azure-sdk-for-net_tmp/initInput.json ../azure-sdk-for-net_tmp/initOutput.json command pwsh ./eng/scripts/Invoke-GenerateAndBuildV2.ps1 ../azure-sdk-for-net_tmp/generateInput.json ../azure-sdk-for-net_tmp/generateOutput.json
️✔️
Azure.DigitalTwins.Core [View full logs] [Release SDK Changes]info [Changelog]
Generated ApiView
Language | Package Name | ApiView Link |
---|---|---|
.Net | Azure.DigitalTwins.Core | There is no API change compared with the previous version |
Hi, @abhinav-ghai, For review efficiency consideration, when creating a new api version, it is required to place API specs of the base version in the first commit, and push new version updates into successive commits. You can use OpenAPIHub to initialize the PR for adding a new version. For more details refer to the wiki. Or you could onboard API spec pipeline
Hi @abhinav-ghai, Your PR has some issues. Please fix the CI sequentially by following the order of Avocado, semantic validation, model validation, breaking change, lintDiff
. If you have any questions, please post your questions in this channel https://aka.ms/swaggersupport.
Task | How to fix | Priority |
---|---|---|
Avocado | Fix-Avocado | High |
Semantic validation | Fix-SemanticValidation-Error | High |
Model validation | Fix-ModelValidation-Error | High |
LintDiff | Fix-LintDiff | high |
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
@abhinav-ghai -- A couple of qq for you...
Have you run the spectral linter on this? There are a few "cleanliness" things that should be addressed before GA, e.g. adding the x-ms-error-code
header.
Also... did you change eventRoute
to be "required":true
? If so, keep in mind that this is a breaking change--any previous clients may now get errors if they are not sending it to you.
We should look at trying to clean as much of this up as we can before GA.