Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Api center #27617

Merged
merged 17 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
cae0299
Merge branch 'main' of github.com:Azure/azure-rest-api-specs into api…
markcowl Jan 9, 2024
4c8ad6c
Removing deuplicate definition
markcowl Jan 9, 2024
1cd09db
Fix example formatting and some operation signatures
markcowl Jan 9, 2024
1d5a06a
Merge branch 'api-center-tsp' of github.com:Azure/azure-rest-api-spec…
markcowl Jan 9, 2024
ec77ee4
Merge branch 'api-center-tsp' of github.com:Azure/azure-rest-api-spec…
markcowl Jan 31, 2024
17c165f
Add API version 2023-10-01-preview [Import] (#27385)
pracagrawal Jan 31, 2024
1fc2f86
Mjmadhu playwrighttesting microsoft.azure playwright service 2023 10 …
mjmadhu Jan 31, 2024
f3cd692
HDInsight: onboard new apiversion 2023-11-01-preview (#27306)
dw511214992 Jan 31, 2024
3efb341
[Azure AI - Health Insights] - Typespec revision for Health Insights …
asaflevi-ms Jan 31, 2024
68030f1
[ci-fix.md] Add known issues to "Swagger LintDiff for TypeSpec" (#27573)
mikeharder Jan 31, 2024
dfd7afd
Adding new version 2024-01-01-preview for updating monitor Properties…
apoorvasingh130 Feb 1, 2024
eca452e
[Hub Generated] Review request for Microsoft.ContainerService/aks to …
FumingZhang Feb 1, 2024
6a5d5f0
Add AppPlatform 2024-01-01-preview (#27113)
saragluna Feb 1, 2024
b422f17
Azure Deployment Manager is being decommissioned. Deleting the Rest A…
rohantagaru Feb 1, 2024
784dcbc
updating preview tag (#27555)
mwesigwaguma Feb 1, 2024
750a829
Fixing response codes for importSpecification
markcowl Feb 1, 2024
fc289fd
Merging with upstream
markcowl Feb 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 13 additions & 0 deletions cSpell.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,13 @@
"Noreuse"
]
},
{
"filename": "**/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/**/*json",
"words": [
"vtpm",
"trustedlaunch"
]
},
{
"filename": "**/specification/containerregistry/data-plane/Microsoft.ContainerRegistry/preview/2018-08-10/containerregistry.json",
"words": [
Expand Down Expand Up @@ -983,6 +990,12 @@
"mpga"
]
},
{
"filename": "**/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-01-01-preview/appplatform.json",
"words": [
"springboot"
]
},
{
"filename": "**/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/**/*.json",
"words": [
Expand Down
5 changes: 5 additions & 0 deletions custom-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3108,6 +3108,7 @@ usermetadata
userpreference
userprincipalname
usersetting
usersync
usertime
usql
usuk
Expand Down Expand Up @@ -3979,3 +3980,7 @@ proto
msvideo
SOQL
Mulesoft
retroperitoneal
codeable
telehealth
loinc
44 changes: 40 additions & 4 deletions documentation/ci-fix.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
- [`Record<unkown>` causes `AvoidAdditionalProperties` and `PropertiesTypeObjectNoDefinition`](#recordunkown-causes-avoidadditionalproperties-and-propertiestypeobjectnodefinition)
- [`RequestBodyMustExistForPutPatch`](#requestbodymustexistforputpatch)
- [`PatchPropertiesCorrespondToPutProperties`](#patchpropertiescorrespondtoputproperties)
- [`@singleton` causes `EvenSegmentedPathForPutOperation` and `XmsPageableForListCalls`](#singleton-causes-evensegmentedpathforputoperation-and-xmspageableforlistcalls)
- [`AvoidAnonymousParameter`, `AvoidAnonymousTypes`, `IntegerTypeMustHaveFormat`](#avoidanonymousparameter-avoidanonymoustypes-integertypemusthaveformat)
- [`AvoidAnonymousTypes` inside a 202 response](#avoidanonymoustypes-inside-a-202-response)
- [`OAuth2Auth` causes `XmsEnumValidation`](#oauth2auth-causes-xmsenumvalidation)
- [`Swagger Avocado`](#swagger-avocado)
- [Get help fixing Avocado validation failures](#get-help-fixing-avocado-validation-failures)
- [Run avocado locally](#run-avocado-locally)
Expand Down Expand Up @@ -155,21 +159,53 @@ To reproduce LintDiff failures locally, see [CONTRIBUTING.md / How to locally re

## `Swagger LintDiff` for TypeSpec: troubleshooting guides

Check `Swagger LintDiff` may fail for the OpenAPI generated from TypeSpec, even if there are no warnings or errors reported from the TypeSpec compiler. Causes include bugs in the TypeSpec OpenAPI emitter, bugs in LintDiff rules, incompatibilities between TypeSpec and LintDiff, or checks duplicated in TypeSpec and LintDiff.

We are working to address the root causes (where possible). Until then, we recommend you [suppress](#suppression-process) these LintDiff errors, using a "permanent suppression" with a descriptive "reason", so we can revert your suppression when the root cause is fixed.

### `Record<unkown>` causes `AvoidAdditionalProperties` and `PropertiesTypeObjectNoDefinition`

The use of `Record<unkown>` in TypeSpec is discouraged, and there is a TypeSpec lint rule to enforce this. If you still need to use `Record<unknown>`, the OpenAPI spec generated will cause many LintDiff errors of types `AvoidAdditionalProperties` and `PropertiesTypeObjectNoDefinition`. You will need to suppress both the TypeSpec violation (in TypeSpec source code) and the LintDiff violations (in `readme.md`).
The use of `Record<unkown>` in TypeSpec is discouraged, and there is a TypeSpec lint rule to enforce this. If you still need to use `Record<unknown>`, the OpenAPI spec generated will cause many LintDiff errors of types `AvoidAdditionalProperties` and `PropertiesTypeObjectNoDefinition`. You will need to suppress both the TypeSpec violation (in TypeSpec source code) and the LintDiff violations.

### `RequestBodyMustExistForPutPatch`

We believe this is a false positive: https://github.com/Azure/azure-openapi-validator/issues/641. Until fixed, spec authors should **not** suppress the violations in `readme.md`, but rather have label `Approved-LintDiff` applied to their PR to ignore the errors.
We believe this is a false positive: https://github.com/Azure/azure-openapi-validator/issues/641

### `PatchPropertiesCorrespondToPutProperties`

We believe this is a false positive: https://github.com/Azure/azure-openapi-validator/issues/642. Until fixed, spec authors should **not** suppress the violations in `readme.md`, but rather have label `Approved-LintDiff` applied to their PR to ignore the errors.
We believe this is a false positive: https://github.com/Azure/azure-openapi-validator/issues/642

### `@singleton` causes `EvenSegmentedPathForPutOperation` and `XmsPageableForListCalls`

If `EvenSegmentedPathForPutOperation` and/or `XmsPageableForListCalls` are failing for OpenAPI generated from TypeSpec using `@singleton` (OpenAPI path ends with `/default`), we believe this is a false positive: https://github.com/Azure/azure-openapi-validator/issues/646. Until fixed, spec authors should **not** suppress the violations in `readme.md`, but rather have label `Approved-LintDiff` applied to their PR to ignore the errors.
If `EvenSegmentedPathForPutOperation` and/or `XmsPageableForListCalls` are failing for OpenAPI generated from TypeSpec using `@singleton` (OpenAPI path ends with `/default`), we believe this is a false positive: https://github.com/Azure/azure-openapi-validator/issues/646

### `AvoidAnonymousParameter`, `AvoidAnonymousTypes`, `IntegerTypeMustHaveFormat`

Data-plane specs can suppress violations of the following rules, since they only exist for the benefit of SDKs generated from swagger, and data-plane SDKs are generated directly from TypeSpec. Resource-manager specs should **not** suppress violations of these rules, since resource-manager SDKs are generated from OpenAPI, and rely on these errors being fixed.

* `AvoidAnonymousParameter`
* `AvoidAnonymousTypes`
* `IntegerTypeMustHaveFormat`

### `AvoidAnonymousTypes` inside a 202 response

As an exception to the previous note, resource-manager specs **may** be able to suppress `AvoidAnonymousTypes`, but only if the error is inside a 202 response from a long-running operation (LRO). It is known that SDKs do not need to generate type names for such responses.

### `OAuth2Auth` causes `XmsEnumValidation`

TypeSpec using `OAuth2Auth` may generate the following OpenAPI:

```
"type": {
"type": "string",
"description": "OAuth2 authentication",
"enum": [
"oauth2"
]
},
```

Which causes error `XmsEnumValidation`. The recommended workaround is to add `omit-unreachable-types: true` to your `tspconfig.yaml`.

## `Swagger Avocado`

Expand Down
Loading
Loading