зеркало из https://github.com/Azure/autorest.git
Fix startSession
This commit is contained in:
Родитель
8fa598dab2
Коммит
79a9e52d84
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@autorest/extension-base",
|
||||
"version": "3.4.2",
|
||||
"version": "3.4.3",
|
||||
"description": "Library for creating AutoRest extensions",
|
||||
"main": "dist/index.js",
|
||||
"exports": {
|
||||
|
|
|
@ -154,6 +154,10 @@ export async function startSession<TInputModel>(
|
|||
schema: Schema = DEFAULT_SCHEMA,
|
||||
artifactType?: string,
|
||||
) {
|
||||
// This is just to make it work with older version so the older method definition is also valid.
|
||||
if (schema === undefined || (schema as any) === {}) {
|
||||
schema = artifactType as any;
|
||||
}
|
||||
const { model, filename } = await getModel<TInputModel>(host, schema, artifactType);
|
||||
const configuration = await host.getValue("");
|
||||
return new Session<TInputModel>({ host, filename, model, configuration });
|
||||
|
|
Загрузка…
Ссылка в новой задаче