This commit is contained in:
qiaozha 2021-01-15 17:25:43 +08:00
Родитель 2c8015ec25
Коммит 9bfc9eab9a
4 изменённых файлов: 1237 добавлений и 1229 удалений

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

@ -5,8 +5,6 @@
import { Operation, OperationGroup, Parameter, Schema } from '@azure-tools/codemodel';
import { CodeModelTypes, DataGraph, GenerationMode, RenderInput } from '../utils/models';
import { ResourcePool } from './renders/tests/ScenarioTool';
import { CommandExample } from './climodels/ExampleType';
export interface CodeModelAz {
init(): any;
@ -26,10 +24,7 @@ export interface CodeModelAz {
Extension_Name: string;
Extension_Parent: string;
Extension_NameUnderscored: string;
ConfiguredScenario: boolean;
Extension_NameClass: string;
Extension_TestScenario: any;
Extension_DefaultTestScenario: any;
Extension_ClientSubscriptionBound: boolean;
Extension_ClientBaseUrlBound: boolean;
Extension_ClientAuthenticationPolicy: string;
@ -165,30 +160,17 @@ export interface CodeModelAz {
GetModuleOperationNamePythonUpper(): string;
GetPythonNamespace(): string;
GetPythonPackageName(): string;
GetResourcePool(): ResourcePool;
// Python
PythonMgmtClient: string;
GenerateTestInit(): void;
SelectFirstExample(): boolean;
SelectNextExample(): boolean;
FindExampleById(id: string, commandParams: any, examples: any[], minimum: boolean): string[][];
Example_Body: string[];
Example_Title: string;
Example_Params: any;
GetExamples(): CommandExample[];
GetSubscriptionKey(): string;
GetPreparerEntities(): any[];
GatherInternalResource();
FindExampleWaitById(id: string): string[][];
GetExampleItems(example: CommandExample, isTest: boolean, commandParams: any): string[];
GetExampleChecks(example: CommandExample): string[];
RandomizeNames: boolean;
// readme config
CliCoreLib: string;
GenMinTest: boolean;
GetMetaData(): { [key: string]: any };
getRenderData(
layer: CodeModelTypes,

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -126,6 +126,18 @@ export enum CodeGenConstants {
m4CodeModelName = 'code-model-v4-no-tags.yaml',
DEFAULT_CLI_CORE_LIB = 'azure.cli.core',
AZ_ENTRY_CODE_MODEL_NAME = 'az-entry-code-model.yaml',
TEST_SCENARIO_CONFIG_KEY = 'test-scenario',
RANDOMIZE_NAMES_CONFIG_KEY = 'randomize-names',
FORMALIZE_NAMES_CONFIG_KEY = 'formalize-names',
DISABLE_CHECKS_CONFIG_KEY = 'disable-checks',
GEN_MIN_TEST_CONFIG_KEY = 'gen-min-test',
RESOURCE_TYPE_CONFIG_KEY = 'resource-type',
PACKAGE_NAME_CONFIG_KEY = 'package-name',
}
export function getAZConfiguration(configKey: CodeGenConstants) {
const options = AzConfiguration.getValue(CodeGenConstants.az);
return options[configKey];
}
export interface AzextMetadata {