Upgrade app version and api version. (#918)

This commit is contained in:
Buddha Wang 2021-04-29 11:48:47 +08:00 коммит произвёл GitHub
Родитель 53035399b1
Коммит 82d4ad2ddc
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
7 изменённых файлов: 12 добавлений и 17 удалений

Просмотреть файл

@ -837,15 +837,15 @@ ___
**Given** I open the prebuilt analyze page.
**When** I click the "Browse for a file..." then selecte a supported file.
**When** I change the composed API value to "/formrecognizer/v2.1-preview.3/prebuilt/invoice/analyze?".
**When** I change the composed API value to "/formrecognizer/v2.1/prebuilt/invoice/analyze?".
**When** I open a browser inspector, then click the "Run analysis" button.
**Then** I can see the request URI in the browser inspector is equal to "/formrecognizer/v2.1-preview.3/prebuilt/invoice/analyze?".
**Then** I can see the request URI in the browser inspector is equal to "/formrecognizer/v2.1/prebuilt/invoice/analyze?".
**When** I click the "Page range" checkbox, then type in "1".
**Then** I can see the composed API request is equal to "/formrecognizer/v2.1-preview.3/prebuilt/invoice/analyze?pages=1".
**Then** I can see the composed API request is equal to "/formrecognizer/v2.1/prebuilt/invoice/analyze?pages=1".
**When** I click the "Form Type" list and selected "Business card".
**When** I click the "Locale" list and selected "en-CA".
**When** I click the "Run analysis" button.
**Then** I can see the request URI in the browser inspector is equal to "/formrecognizer/v2.1-preview.3/prebuilt/businessCard/analyze?pages=1&locale=en-CA".
**Then** I can see the request URI in the browser inspector is equal to "/formrecognizer/v2.1/prebuilt/businessCard/analyze?pages=1&locale=en-CA".

Просмотреть файл

@ -1,6 +1,6 @@
{
"name": "oflt",
"version": "2.1.3",
"version": "2.1",
"author": {
"name": "Microsoft",
"url": "https://github.com/microsoft/OCR-Form-Tools"

Просмотреть файл

@ -3,14 +3,10 @@
import { appInfo } from "./appInfo"
const appVersionRaw = appInfo.version
const appVersionArr = appVersionRaw.split(".");
appVersionArr[1] = appVersionArr[1] + "-preview";
const appVersion = appVersionArr.join(".");
const appVersion = appInfo.version;
const enableAPIVersionSelection = appInfo.enableAPIVersionSelection;
const enablePredictionResultUpload = appInfo.enablePredictionResultUpload;
const apiVersion = "v2.1-preview.3";
const apiVersion = "v2.1";
const supportedFieldsSchemas = new Set(["http://www.azure.com/schema/formrecognizer/fields.json", "https://schema.cognitiveservices.azure.com/formrecognizer/2021-03-01/fields.json"]);
const supportedLabelsSchemas = new Set(["http://www.azure.com/schema/formrecognizer/labels.json", "https://schema.cognitiveservices.azure.com/formrecognizer/2021-03-01/labels.json"]);
@ -19,7 +15,6 @@ const supportedLabelsSchemas = new Set(["http://www.azure.com/schema/formrecogni
*/
export const constants = {
version: "pubpreview_1.0",
appVersionRaw,
appVersion,
apiVersion,
enableAPIVersionSelection,
@ -60,6 +55,6 @@ export const constants = {
return `https://fotts.azureedge.net/npm/pdfjs-dist/${version}/cmaps/`;
},
insightsKey: "",
prebuiltServiceVersion: "v2.1-preview.3",
prebuiltServiceVersion: "v2.1",
pages: "pages"
};

Просмотреть файл

@ -566,7 +566,7 @@ export const english: IAppStrings = {
}
},
warings: {
drawRegionUnsupportedAPIVersion: "Region labeling is not supported with API ${apiVersion}. It will be supported with the release of v2.1-preview.3",
drawRegionUnsupportedAPIVersion: "Region labeling is not supported with API ${apiVersion}. It will be supported with the release of v2.1",
}
}
},

Просмотреть файл

@ -568,7 +568,7 @@ export const spanish: IAppStrings = {
}
},
warings: {
drawRegionUnsupportedAPIVersion: "Las regiones de dibujo no son compatibles con la versión de API ${apiVersion}. Será compatible con el lanzamiento de v2.1-preview.3",
drawRegionUnsupportedAPIVersion: "Las regiones de dibujo no son compatibles con la versión de API ${apiVersion}. Será compatible con el lanzamiento de v2.1",
}
}
},

Просмотреть файл

@ -28,7 +28,7 @@ interface IAPIVersions {
const APIVersions: IAPIVersions = {
versions: [APIVersionPatches.patch1, APIVersionPatches.patch2, APIVersionPatches.patch3, APIVersionPatches.patch4],
defaultIndex: 2
defaultIndex: 3,
}
export class APIVersionPicker extends React.Component<IAPIVersionPickerProps> {

Просмотреть файл

@ -159,7 +159,7 @@ export class PrebuiltPredictPage extends React.Component<IPrebuiltPredictPagePro
withPageRange: false,
pageRange: "",
predictionEndpointUrl: "/formrecognizer/v2.1-preview.3/prebuilt/invoice/analyze?includeTextDetails=true",
predictionEndpointUrl: "/formrecognizer/v2.1/prebuilt/invoice/analyze?includeTextDetails=true",
liveMode: true,