Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion samples/AnomalyDetector/src/Generated/tspCodeModel.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"$id": "1",
"Name": "AnomalyDetector",
"Description": "The Anomaly Detector API detects anomalies automatically in time series data.\nIt supports two kinds of mode, one is for stateless using, another is for\nstateful using. In stateless mode, there are three functionalities. Entire\nDetect is for detecting the whole series with model trained by the time series,\nLast Detect is detecting last point with model trained by points before.\nChangePoint Detect is for detecting trend changes in time series. In stateful\nmode, user can store time series, the stored time series will be used for\ndetection anomalies. Under this mode, user can still use the above three\nfunctionalities by only giving a time range without preparing time series in\nclient side. Besides the above three functionalities, stateful model also\nprovide group based detection and labeling service. By leveraging labeling\nservice user can provide labels for each detection result, these labels will be\nused for retuning or regenerating detection models. Inconsistency detection is\na kind of group based detection, this detection will find inconsistency ones in\na set of time series. By using anomaly detector service, business customers can\ndiscover incidents and establish a logic flow for root cause analysis.",
"ApiVersions": [
"v1.1"
],
Expand Down
1 change: 0 additions & 1 deletion src/AutoRest.CSharp/Common/Input/CodeModelConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ private InputNamespace CreateNamespace(Dictionary<ServiceRequest, InputOperation
var clients = CreateClients(_codeModel.OperationGroups, serviceRequestToInputOperation, inputOperationToOperation);

return new(Name: _codeModel.Language.Default.Name,
Description: _codeModel.Language.Default.Description,
Clients: clients,
Models: models,
Enums: enums,
Expand Down
4 changes: 2 additions & 2 deletions src/AutoRest.CSharp/Common/Input/InputTypes/InputNamespace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace AutoRest.CSharp.Common.Input;

internal record InputNamespace(string Name, string Description, IReadOnlyList<string> ApiVersions, IReadOnlyList<InputEnumType> Enums, IReadOnlyList<InputModelType> Models, IReadOnlyList<InputClient> Clients, InputAuth Auth)
internal record InputNamespace(string Name, IReadOnlyList<string> ApiVersions, IReadOnlyList<InputEnumType> Enums, IReadOnlyList<InputModelType> Models, IReadOnlyList<InputClient> Clients, InputAuth Auth)
{
public InputNamespace() : this(Name: string.Empty, Description: string.Empty, ApiVersions: Array.Empty<string>(), Enums: Array.Empty<InputEnumType>(), Models: Array.Empty<InputModelType>(), Clients: Array.Empty<InputClient>(), Auth: new InputAuth()) { }
public InputNamespace() : this(Name: string.Empty, ApiVersions: Array.Empty<string>(), Enums: Array.Empty<InputEnumType>(), Models: Array.Empty<InputModelType>(), Clients: Array.Empty<InputClient>(), Auth: new InputAuth()) { }
}
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,6 @@ export function createModelForService(
}
: undefined;

const description = getDoc(program, serviceNamespaceType);

const servers = getServers(program, serviceNamespaceType);
const namespace = getNamespaceFullName(serviceNamespaceType) || "client";
const authentication = getAuthentication(program, serviceNamespaceType);
Expand Down Expand Up @@ -210,7 +208,6 @@ export function createModelForService(

const clientModel = {
Name: namespace,
Description: description,
ApiVersions: Array.from(apiVersions.values()),
Enums: Array.from(enumMap.values()),
Models: Array.from(modelMap.values()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { InputEnumType, InputModelType } from "./input-type.js";

export interface CodeModel {
Name: string;
Description?: string;
ApiVersions: string[];
Enums: InputEnumType[];
Models: InputModelType[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public void ModelTypeCollectionProperties(string expectedModelCodes, string expe
},
null, new List<InputModelType>(), null, null, null, false);

var library = new DpgOutputLibraryBuilder(new InputNamespace("Cadl.TestServer.ModelCollectionProperties.Models", null, new List<string>(),
var library = new DpgOutputLibraryBuilder(new InputNamespace("Cadl.TestServer.ModelCollectionProperties.Models", new List<string>(),
new List<InputEnumType>(), new List<InputModelType> { elementModelType, collectionModelType }, new List<InputClient>(), new InputAuth()), default).Build(true);

ValidateGeneratedCodes("ModelCollectionModel", expectedModelCodes, expectedSerializationCodes, library);
Expand All @@ -85,7 +85,7 @@ public void ModelType2DCollectionProperties(string expectedModelCodes, string ex
},
null, new List<InputModelType>(), null, null, null, false);

var library = new DpgOutputLibraryBuilder(new InputNamespace("Cadl.TestServer.ModelCollectionProperties.Models", null, new List<string>(),
var library = new DpgOutputLibraryBuilder(new InputNamespace("Cadl.TestServer.ModelCollectionProperties.Models", new List<string>(),
new List<InputEnumType>(), new List<InputModelType> { elementModelType, collectionModelType }, new List<InputClient>(), new InputAuth()), default).Build(true);

ValidateGeneratedCodes("ModelCollectionModel", expectedModelCodes, expectedSerializationCodes, library);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public void RoundTripDictionaryProperties(string expectedModelCodes, string expe
var model = new InputModelType("RoundTripModel", "Cadl.TestServer.DictionaryProperties.Models", "public", null, "Round-trip model with dictionary properties", InputModelTypeUsage.RoundTrip,
DictionaryProperties, null, new List<InputModelType>(), null, null, null, false);

var library = new DpgOutputLibraryBuilder(new InputNamespace("Cadl.TestServer.DictionaryProperties.Models", null, new List<string>(),
var library = new DpgOutputLibraryBuilder(new InputNamespace("Cadl.TestServer.DictionaryProperties.Models", new List<string>(),
new List<InputEnumType>(), new List<InputModelType> { model, ElementModelType }, new List<InputClient>(), new InputAuth()), default).Build(true);

ValidateGeneratedCodes("RoundTripModel", expectedModelCodes, expectedSerializationCodes, library);
Expand All @@ -29,7 +29,7 @@ public void InputDictionaryProperties(string expectedModelCodes, string expected
var model = new InputModelType("InputModel", "Cadl.TestServer.DictionaryProperties.Models", "public", null, "Input model with dictionary properties", InputModelTypeUsage.Input,
DictionaryProperties, null, new List<InputModelType>(), null, null, null, false);

var library = new DpgOutputLibraryBuilder(new InputNamespace("Cadl.TestServer.DictionaryProperties.Models", null, new List<string>(),
var library = new DpgOutputLibraryBuilder(new InputNamespace("Cadl.TestServer.DictionaryProperties.Models", new List<string>(),
new List<InputEnumType>(), new List<InputModelType> { model, ElementModelType }, new List<InputClient>(), new InputAuth()), default).Build(true);

ValidateGeneratedCodes("InputModel", expectedModelCodes, expectedSerializationCodes, library);
Expand All @@ -42,7 +42,7 @@ public void OutputDictionaryProperties(string expectedModelCodes, string expecte
var model = new InputModelType("OutputModel", "Cadl.TestServer.DictionaryProperties.Models", "public", null, "Output model with dictionary properties", InputModelTypeUsage.Output,
DictionaryProperties, null, new List<InputModelType>(), null, null, null, false);

var library = new DpgOutputLibraryBuilder(new InputNamespace("Cadl.TestServer.DictionaryProperties.Models", null, new List<string>(),
var library = new DpgOutputLibraryBuilder(new InputNamespace("Cadl.TestServer.DictionaryProperties.Models", new List<string>(),
new List<InputEnumType>(), new List<InputModelType> { model, ElementModelType }, new List<InputClient>(), new InputAuth()), default).Build(true);

ValidateGeneratedCodes("OutputModel", expectedModelCodes, expectedSerializationCodes, library);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public void RoundTripEnumProperties(string expectedModelCodes, string expectedSe
new InputModelProperty("Language", "Language", "Required string enum value.", ExtensibleEnumType, null, true, false, false)
},
null, new List<InputModelType>(), null, null, null, false);
var library = new DpgOutputLibraryBuilder(new InputNamespace("Cadl.TestServer.EnumPropertiesBasic", null, new List<string>(),
var library = new DpgOutputLibraryBuilder(new InputNamespace("Cadl.TestServer.EnumPropertiesBasic", new List<string>(),
new List<InputEnumType> { FixedEnumType, ExtensibleEnumType }, new List<InputModelType> { modelType }, new List<InputClient>(), new InputAuth()), default).Build(true);

ValidateGeneratedCodes("RoundTripModel", expectedModelCodes, expectedSerializationCodes, library);
Expand All @@ -48,7 +48,7 @@ public void InputEnumProperties(string expectedModelCodes, string expectedSerial
new InputModelProperty("Language", "Language", "Required string enum value.", ExtensibleEnumType, null, true, false, false)
},
null, new List<InputModelType>(), null, null, null, false);
var library = new DpgOutputLibraryBuilder(new InputNamespace("Cadl.TestServer.EnumPropertiesBasic", null, new List<string>(),
var library = new DpgOutputLibraryBuilder(new InputNamespace("Cadl.TestServer.EnumPropertiesBasic", new List<string>(),
new List<InputEnumType> { FixedEnumType, ExtensibleEnumType }, new List<InputModelType> { modelType }, new List<InputClient>(), new InputAuth()), default).Build(true);

ValidateGeneratedCodes("InputModel", expectedModelCodes, expectedSerializationCodes, library);
Expand All @@ -64,7 +64,7 @@ public void OutputEnumProperties(string expectedModelCodes, string expectedSeria
new InputModelProperty("Language", "Language", "Required string enum value.", ExtensibleEnumType, null, true, false, false)
},
null, new List<InputModelType>(), null, null, null, false);
var library = new DpgOutputLibraryBuilder(new InputNamespace("Cadl.TestServer.EnumPropertiesBasic", null, new List<string>(),
var library = new DpgOutputLibraryBuilder(new InputNamespace("Cadl.TestServer.EnumPropertiesBasic", new List<string>(),
new List<InputEnumType> { FixedEnumType, ExtensibleEnumType }, new List<InputModelType> { modelType }, new List<InputClient>(), new InputAuth()), default).Build(true);

ValidateGeneratedCodes("OutputModel", expectedModelCodes, expectedSerializationCodes, library);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public void RoundTripModel(string expectedModelCodes, string expectedSerializati
},
null, new List<InputModelType>(), null, null, null, false);

var library = new DpgOutputLibraryBuilder(new InputNamespace("NestedModelsBasic.Models", null, new List<string>(),
var library = new DpgOutputLibraryBuilder(new InputNamespace("NestedModelsBasic.Models", new List<string>(),
new List<InputEnumType>(), new List<InputModelType> { model, NestedRoundTripOnlyModelType, NestedRoundTripSharedModelType }, new List<InputClient>(), new InputAuth()), default).Build(true);

ValidateGeneratedCodes("RoundTripModel", expectedModelCodes, expectedSerializationCodes, library);
Expand All @@ -40,7 +40,7 @@ public void InputModel(string expectedModelCodes, string expectedSerializationCo
},
null, new List<InputModelType>(), null, null, null, false);

var library = new DpgOutputLibraryBuilder(new InputNamespace("NestedModelsBasic.Models", null, new List<string>(),
var library = new DpgOutputLibraryBuilder(new InputNamespace("NestedModelsBasic.Models", new List<string>(),
new List<InputEnumType>(), new List<InputModelType> { model, NestedInputOnlyModelType, NestedRoundTripSharedModelType }, new List<InputClient>(), new InputAuth()), default).Build(true);

ValidateGeneratedCodes("InputModel", expectedModelCodes, expectedSerializationCodes, library);
Expand All @@ -58,7 +58,7 @@ public void OutpuModel(string expectedModelCodes, string expectedSerializationCo
},
null, new List<InputModelType>(), null, null, null, false);

var library = new DpgOutputLibraryBuilder(new InputNamespace("NestedModelsBasic.Models", null, new List<string>(),
var library = new DpgOutputLibraryBuilder(new InputNamespace("NestedModelsBasic.Models", new List<string>(),
new List<InputEnumType>(), new List<InputModelType> { model, NestedOutputOnlyModelType, NestedRoundTripSharedModelType }, new List<InputClient>(), new InputAuth()), default).Build(true);

ValidateGeneratedCodes("OutputModel", expectedModelCodes, expectedSerializationCodes, library);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public void RoundTripModel(string expectedModelCodes, string expectedSerializati
var model = new InputModelType("RoundTripModel", "Cadl.TestServer.OptionalProperties.Models", "public", null, "Round-trip model with optional properties.", InputModelTypeUsage.RoundTrip,
OptionalProperties, null, Array.Empty<InputModelType>(), null, null, null, false);

var library = new DpgOutputLibraryBuilder(new InputNamespace("Cadl.TestServer.OptionalProperties.Models", null, new List<string>(),
var library = new DpgOutputLibraryBuilder(new InputNamespace("Cadl.TestServer.OptionalProperties.Models", new List<string>(),
new List<InputEnumType>(), new List<InputModelType> { ElementModelType, model }, new List<InputClient>(), new InputAuth()), default).Build(true);

ValidateGeneratedCodes("RoundTripModel", expectedModelCodes, expectedSerializationCodes, library);
Expand All @@ -28,7 +28,7 @@ public void InputModel(string expectedModelCodes, string expectedSerializationCo
var model = new InputModelType("InputModel", "Cadl.TestServer.OptionalProperties.Models", "public", null, "Input model with optional properties.", InputModelTypeUsage.Input,
OptionalProperties, null, Array.Empty<InputModelType>(), null, null, null, false);

var library = new DpgOutputLibraryBuilder(new InputNamespace("Cadl.TestServer.OptionalProperties.Models", null, new List<string>(),
var library = new DpgOutputLibraryBuilder(new InputNamespace("Cadl.TestServer.OptionalProperties.Models", new List<string>(),
new List<InputEnumType>(), new List<InputModelType> { ElementModelType, model }, new List<InputClient>(), new InputAuth()), default).Build(true);

ValidateGeneratedCodes("InputModel", expectedModelCodes, expectedSerializationCodes, library);
Expand All @@ -41,7 +41,7 @@ public void OutputModel(string expectedModelCodes, string expectedSerializationC
var model = new InputModelType("OutputModel", "Cadl.TestServer.OptionalProperties.Models", "public", null, "Output model with optional properties.", InputModelTypeUsage.Output,
OptionalProperties, null, Array.Empty<InputModelType>(), null, null, null, false);

var library = new DpgOutputLibraryBuilder(new InputNamespace("Cadl.TestServer.OptionalProperties.Models", null, new List<string>(),
var library = new DpgOutputLibraryBuilder(new InputNamespace("Cadl.TestServer.OptionalProperties.Models", new List<string>(),
new List<InputEnumType>(), new List<InputModelType> { ElementModelType, model }, new List<InputClient>(), new InputAuth()), default).Build(true);

ValidateGeneratedCodes("OutputModel", expectedModelCodes, expectedSerializationCodes, library);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public void RoundTripModel(string expectedModelCodes, string expectedSerializati
var model = new InputModelType("RoundTripModel", "Cadl.TestServer.ReadonlyProperties.Models", "public", null, "Readonly model", InputModelTypeUsage.RoundTrip,
ReadOnlyProperties, null, Array.Empty<InputModelType>(), null, null, null, false);

var library = new DpgOutputLibraryBuilder(new InputNamespace("Cadl.TestServer.ReadonlyProperties.Models", null, new List<string>(),
var library = new DpgOutputLibraryBuilder(new InputNamespace("Cadl.TestServer.ReadonlyProperties.Models", new List<string>(),
new List<InputEnumType>(), new List<InputModelType> { ReadonlyModel, model }, new List<InputClient>(), new InputAuth()), default).Build(true);

ValidateGeneratedCodes("RoundTripModel", expectedModelCodes, expectedSerializationCodes, library);
Expand All @@ -28,7 +28,7 @@ public void OutputModel(string expectedModelCodes, string expectedSerializationC
var model = new InputModelType("OutputModel", "Cadl.TestServer.ReadonlyProperties.Models", "public", null, "Readonly model", InputModelTypeUsage.Output,
ReadOnlyProperties, null, Array.Empty<InputModelType>(), null, null, null, false);

var library = new DpgOutputLibraryBuilder(new InputNamespace("Cadl.TestServer.ReadonlyProperties.Models", null, new List<string>(),
var library = new DpgOutputLibraryBuilder(new InputNamespace("Cadl.TestServer.ReadonlyProperties.Models", new List<string>(),
new List<InputEnumType>(), new List<InputModelType> { ReadonlyModel, model }, new List<InputClient>(), new InputAuth()), default).Build(true);

ValidateGeneratedCodes("OutputModel", expectedModelCodes, expectedSerializationCodes, library);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"$id": "1",
"Name": "Authentication.ApiKey",
"Description": "Illustrates clients generated with ApiKey authentication.",
"ApiVersions": [],
"Enums": [],
"Models": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"$id": "1",
"Name": "Authentication.Http.Custom",
"Description": "Illustrates clients generated with generic HTTP auth.",
"ApiVersions": [],
"Enums": [],
"Models": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"$id": "1",
"Name": "Authentication.OAuth2",
"Description": "Illustrates clients generated with OAuth2 authentication.",
"ApiVersions": [],
"Enums": [],
"Models": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"$id": "1",
"Name": "Authentication.Union",
"Description": "Illustrates clients generated with ApiKey and OAuth2 authentication.",
"ApiVersions": [],
"Enums": [],
"Models": [],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"$id": "1",
"Name": "_Specs_.Azure.ClientGenerator.Core.Access",
"Description": "Test for internal decorator.",
"ApiVersions": [],
"Enums": [],
"Models": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"$id": "1",
"Name": "_Specs_.Azure.ClientGenerator.Core.Usage",
"Description": "Test for internal decorator.",
"ApiVersions": [],
"Enums": [],
"Models": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"$id": "1",
"Name": "_Specs_.Azure.Core.Basic",
"Description": "Illustrates bodies templated with Azure Core",
"ApiVersions": [
"2022-12-01-preview"
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"$id": "1",
"Name": "_Specs_.Azure.Core.Lro.Standard",
"Description": "Illustrates bodies templated with Azure Core with long-running operation",
"ApiVersions": [
"2022-12-01-preview"
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"$id": "1",
"Name": "_Specs_.Azure.Core.Traits",
"Description": "Illustrates Azure Core operation customizations by traits",
"ApiVersions": [
"2022-12-01-preview"
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"$id": "1",
"Name": "Azure.SpecialHeaders.XmsClientRequestId",
"Description": "Azure client request id header configurations.",
"ApiVersions": [],
"Enums": [],
"Models": [],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"$id": "1",
"Name": "Client.Naming",
"Description": "Describe changing names of types in a client with `@clientName`",
"ApiVersions": [],
"Enums": [
{
Expand Down
Loading