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

[AutoPR Azure.AI.FormRecognizer] Dev/markonikolic/aliasswagger #7621

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions sdk/formrecognizer/Azure.AI.FormRecognizer/src/autorest.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,13 @@ directive:
# Service V3 swagger
``` yaml
input-file:
- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/8e73bccfad3f6873b9f91d3920ce0f96af554378/specification/cognitiveservices/data-plane/FormRecognizer/preview/2022-01-30-preview/FormRecognizer.json
- https://github.com/Azure/azure-rest-api-specs/blob/f95171612c7ba83ff31bdd84c19c2cc34941285e/specification/cognitiveservices/data-plane/FormRecognizer/preview/2022-01-30-preview/FormRecognizer.json
```

## Make generated models internal by default
``` yaml
directive:
from: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/8e73bccfad3f6873b9f91d3920ce0f96af554378/specification/cognitiveservices/data-plane/FormRecognizer/preview/2022-01-30-preview/FormRecognizer.json
from: https://github.com/Azure/azure-rest-api-specs/blob/f95171612c7ba83ff31bdd84c19c2cc34941285e/specification/cognitiveservices/data-plane/FormRecognizer/preview/2022-01-30-preview/FormRecognizer.json
where: $.definitions.*
transform: >
$["x-accessibility"] = "internal";
Expand All @@ -165,7 +165,7 @@ directive:
## Rename operationIds
``` yaml
directive:
- from: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/8e73bccfad3f6873b9f91d3920ce0f96af554378/specification/cognitiveservices/data-plane/FormRecognizer/preview/2022-01-30-preview/FormRecognizer.json
- from: https://github.com/Azure/azure-rest-api-specs/blob/f95171612c7ba83ff31bdd84c19c2cc34941285e/specification/cognitiveservices/data-plane/FormRecognizer/preview/2022-01-30-preview/FormRecognizer.json
where: $.paths.*
transform: >
const prefix = "DocumentAnalysis_";
Expand All @@ -179,23 +179,23 @@ directive:
## Rename duplicated types
``` yaml
directive:
from: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/8e73bccfad3f6873b9f91d3920ce0f96af554378/specification/cognitiveservices/data-plane/FormRecognizer/preview/2022-01-30-preview/FormRecognizer.json
from: https://github.com/Azure/azure-rest-api-specs/blob/f95171612c7ba83ff31bdd84c19c2cc34941285e/specification/cognitiveservices/data-plane/FormRecognizer/preview/2022-01-30-preview/FormRecognizer.json
where: $.definitions.ModelInfo
transform: >
$["x-ms-client-name"] = "DocumentModel"
```

``` yaml
directive:
from: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/8e73bccfad3f6873b9f91d3920ce0f96af554378/specification/cognitiveservices/data-plane/FormRecognizer/preview/2022-01-30-preview/FormRecognizer.json
from: https://github.com/Azure/azure-rest-api-specs/blob/f95171612c7ba83ff31bdd84c19c2cc34941285e/specification/cognitiveservices/data-plane/FormRecognizer/preview/2022-01-30-preview/FormRecognizer.json
where: $.definitions.ErrorResponse
transform: >
$["x-ms-client-name"] = "DocumentErrorResponse"
```

``` yaml
directive:
- from: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/8e73bccfad3f6873b9f91d3920ce0f96af554378/specification/cognitiveservices/data-plane/FormRecognizer/preview/2022-01-30-preview/FormRecognizer.json
- from: https://github.com/Azure/azure-rest-api-specs/blob/f95171612c7ba83ff31bdd84c19c2cc34941285e/specification/cognitiveservices/data-plane/FormRecognizer/preview/2022-01-30-preview/FormRecognizer.json
where: $.definitions..properties.*
transform: >
if ($.enum && $["x-ms-enum"].name == "OperationStatus") {
Expand All @@ -208,15 +208,15 @@ directive:

``` yaml
directive:
- from: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/8e73bccfad3f6873b9f91d3920ce0f96af554378/specification/cognitiveservices/data-plane/FormRecognizer/preview/2022-01-30-preview/FormRecognizer.json
- from: https://github.com/Azure/azure-rest-api-specs/blob/f95171612c7ba83ff31bdd84c19c2cc34941285e/specification/cognitiveservices/data-plane/FormRecognizer/preview/2022-01-30-preview/FormRecognizer.json
where: $.definitions.DocumentPage.properties.unit
transform: >
$["x-ms-enum"].name = "V3LengthUnit";
```

``` yaml
directive:
- from: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/8e73bccfad3f6873b9f91d3920ce0f96af554378/specification/cognitiveservices/data-plane/FormRecognizer/preview/2022-01-30-preview/FormRecognizer.json
- from: https://github.com/Azure/azure-rest-api-specs/blob/f95171612c7ba83ff31bdd84c19c2cc34941285e/specification/cognitiveservices/data-plane/FormRecognizer/preview/2022-01-30-preview/FormRecognizer.json
where: $.definitions.DocumentSelectionMarkState
transform: >
$["x-ms-enum"].name = "V3SelectionMarkState";
Expand All @@ -225,7 +225,7 @@ directive:
## Make enums internal and in the right namespace
``` yaml
directive:
- from: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/8e73bccfad3f6873b9f91d3920ce0f96af554378/specification/cognitiveservices/data-plane/FormRecognizer/preview/2022-01-30-preview/FormRecognizer.json
- from: https://github.com/Azure/azure-rest-api-specs/blob/f95171612c7ba83ff31bdd84c19c2cc34941285e/specification/cognitiveservices/data-plane/FormRecognizer/preview/2022-01-30-preview/FormRecognizer.json
where: $.definitions..properties.*
transform: >
if ($.enum) {
Expand All @@ -237,7 +237,7 @@ directive:
## Rename QueryStringIndexType
``` yaml
directive:
- from: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/8e73bccfad3f6873b9f91d3920ce0f96af554378/specification/cognitiveservices/data-plane/FormRecognizer/preview/2022-01-30-preview/FormRecognizer.json
- from: https://github.com/Azure/azure-rest-api-specs/blob/f95171612c7ba83ff31bdd84c19c2cc34941285e/specification/cognitiveservices/data-plane/FormRecognizer/preview/2022-01-30-preview/FormRecognizer.json
where: $.parameters.QueryStringIndexType
transform: >
$["x-namespace"] = "Azure.AI.FormRecognizer.DocumentAnalysis"
Expand Down