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

[TypeSpec] Upgrade to 0.49.0 #26200

Merged
merged 19 commits into from
Oct 12, 2023
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
243 changes: 114 additions & 129 deletions package-lock.json

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
"name": "azure-rest-api-specs",
"devDependencies": {
"@azure-tools/typespec-apiview": "0.4.4",
"@azure-tools/typespec-autorest": "0.34.0",
"@azure-tools/typespec-azure-core": "0.34.0",
"@azure-tools/typespec-azure-resource-manager": "0.34.0",
"@azure-tools/typespec-client-generator-core": "0.34.0",
"@azure-tools/typespec-providerhub": "0.34.0",
"@typespec/compiler": "0.48.0",
"@typespec/http": "0.48.0",
"@typespec/openapi": "0.48.0",
"@typespec/rest": "0.48.0",
"@typespec/versioning": "0.48.0",
"@azure-tools/typespec-autorest": "0.35.0",
"@azure-tools/typespec-azure-core": "0.35.0",
"@azure-tools/typespec-azure-resource-manager": "0.35.0",
"@azure-tools/typespec-client-generator-core": "0.35.0",
"@azure-tools/typespec-providerhub": "0.35.0",
"@typespec/compiler": "0.49.0",
"@typespec/http": "0.49.0",
"@typespec/openapi": "0.49.0",
"@typespec/rest": "0.49.0",
"@typespec/versioning": "0.49.0",
"@azure/avocado": "^0.8.4",
"azure-rest-api-specs-eng-tools": "file:eng/tools",
"prettier": "~3.0.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,18 +150,18 @@
{
"$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter"
},
{
"$ref": "#/parameters/CodeSigningOptions.codeSigningAccountName"
},
{
"$ref": "#/parameters/CodeSigningOptions.certificateProfileName"
},
{
"name": "operationId",
"in": "path",
"description": "The unique ID of the operation.",
"required": true,
"type": "string"
},
{
"$ref": "#/parameters/CodeSigningOptions.codeSigningAccountName"
},
{
"$ref": "#/parameters/CodeSigningOptions.certificateProfileName"
}
],
"responses": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ using Azure.ResourceManager;
using Azure.ResourceManager.Foundations;
using Azure.Core;
using Azure.Core.Traits;
using OpenAPI;
using TypeSpec.OpenAPI;

namespace Microsoft.ContainerService;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ using TypeSpec.Versioning;
using Azure.Core;
using Azure.ResourceManager;
using Azure.ResourceManager.Foundations;
using OpenAPI;
using TypeSpec.OpenAPI;

namespace Microsoft.ContainerService;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import "@typespec/rest";

using OpenAPI;
using TypeSpec.OpenAPI;
using TypeSpec.Http;
using TypeSpec.Rest;
using TypeSpec.Versioning;
Expand Down
2 changes: 1 addition & 1 deletion specification/containerservice/Fleet.Management/main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import "./update/strategy.tsp";
using Azure.ResourceManager;
using TypeSpec.Http;
using TypeSpec.Versioning;
using OpenAPI;
using TypeSpec.OpenAPI;

@armProviderNamespace
@service({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import "@typespec/openapi";
using OpenAPI;
using TypeSpec.OpenAPI;

namespace Microsoft.ContainerService;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ using Azure.ResourceManager;
using Azure.ResourceManager.Foundations;
using Azure.Core;
using Azure.Core.Traits;
using OpenAPI;
using TypeSpec.OpenAPI;

namespace Microsoft.ContainerService;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ using Azure.ResourceManager;
using Azure.ResourceManager.Foundations;
using Azure.Core;
using Azure.Core.Traits;
using OpenAPI;
using TypeSpec.OpenAPI;

namespace Microsoft.ContainerService;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "@typespec/versioning";
import "@azure-tools/typespec-providerhub";
import "@azure-tools/typespec-azure-resource-manager";

using OpenAPI;
using TypeSpec.OpenAPI;
using TypeSpec.Http;
using TypeSpec.Rest;
using TypeSpec.Versioning;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import "@typespec/rest";
import "@typespec/versioning";
import "@azure-tools/typespec-azure-core";

#suppress "@azure-tools/typespec-autorest/unsupported-http-auth-scheme" "SharedAccessKey is not supported by typespec-autorest"
@useAuth(
{
type: AuthType.http,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@
"application/json"
],
"security": [
{
"http": []
},
{
"OAuth2Auth": [
"https://eventgrid.azure.net/.default"
Expand All @@ -52,9 +49,6 @@
"scopes": {
"https://eventgrid.azure.net/.default": ""
}
},
"http": {
"type": "basic"
}
},
"tags": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ using TypeSpec.Versioning;
using Azure.ResourceManager;
using Azure.ResourceManager.Foundations;
using Azure.Core;
using OpenAPI;
using TypeSpec.OpenAPI;

namespace Microsoft.MobilePacketCore;

Expand Down Expand Up @@ -74,8 +74,8 @@ model NetworkFunctionResourceProperties {
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-operation" "This is a valid template"
@autoRoute
@doc("Create a {name}", TResource)
@OpenAPI.extension("x-ms-long-running-operation", true)
@OpenAPI.extension(
@TypeSpec.OpenAPI.extension("x-ms-long-running-operation", true)
@TypeSpec.OpenAPI.extension(
"x-ms-long-running-operation-options",
{
`final-state-via`: "azure-async-operation",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,22 @@ enum Versions {
enum ProvisioningState {
/** Represents a succeeded operation. */
Succeeded,

/** Represents a failed operation. */
Failed,

/** Represents a canceled operation. */
Canceled,

/** Represents a pending operation. */
Provisioning,

/** Represents a pending operation. */
Updating,

/** Represents an operation under deletion. */
Deleting,

/** Represents an accepted operation. */
Accepted,
}
Expand Down
11 changes: 10 additions & 1 deletion specification/sphere/Sphere.Management/common.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ using TypeSpec.Versioning;
using Azure.ResourceManager.Foundations;
using Azure.Core;
using Azure.ResourceManager;
using OpenAPI;
using TypeSpec.OpenAPI;

namespace Microsoft.AzureSphere;

Expand All @@ -21,12 +21,16 @@ interface Operations extends Azure.ResourceManager.Operations {}
@lroStatus
enum ProvisioningState {
...ResourceProvisioningState,

/** The resource is being provisioned */
Provisioning,

/** The resource is being updated */
Updating,

/** The resource is being deleted */
Deleting,

/** The resource create request has been accepted */
Accepted,
}
Expand All @@ -35,6 +39,7 @@ enum ProvisioningState {
enum RegionalDataBoundary {
/** No data boundary */
None,

/** EU data boundary */
EU,
}
Expand All @@ -43,6 +48,7 @@ enum RegionalDataBoundary {
enum AllowCrashDumpCollection {
/** Crash dump collection enabled */
Enabled,

/** Crash dump collection disabled */
Disabled,
}
Expand All @@ -51,10 +57,13 @@ enum AllowCrashDumpCollection {
enum CertificateStatus {
/** Certificate is active */
Active,

/** Certificate is inactive */
Inactive,

/** Certificate has expired */
Expired,

/** Certificate has been revoked */
Revoked,
}
Expand Down
3 changes: 2 additions & 1 deletion specification/sphere/Sphere.Management/device.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ using TypeSpec.Versioning;
using Azure.ResourceManager.Foundations;
using Azure.Core;
using Azure.ResourceManager;
using OpenAPI;
using TypeSpec.OpenAPI;

namespace Microsoft.AzureSphere;

Expand Down Expand Up @@ -115,6 +115,7 @@ model SignedCapabilityImageResponse {
enum CapabilityType {
/** Application development capability */
ApplicationDevelopment,

/** Field servicing capability */
FieldServicing,
}
Expand Down
4 changes: 3 additions & 1 deletion specification/sphere/Sphere.Management/deviceGroup.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ using TypeSpec.Versioning;
using Azure.ResourceManager.Foundations;
using Azure.Core;
using Azure.ResourceManager;
using OpenAPI;
using TypeSpec.OpenAPI;

namespace Microsoft.AzureSphere;

Expand Down Expand Up @@ -108,6 +108,7 @@ model DeviceGroupProperties {
enum OSFeedType {
/** Retail OS feed type. */
Retail,

/** Retail evaluation OS feed type. */
RetailEval,
}
Expand All @@ -116,6 +117,7 @@ enum OSFeedType {
enum UpdatePolicy {
/** Update all policy. */
UpdateAll,

/** No update for 3rd party app policy. */
No3rdPartyAppUpdates,
}
Expand Down
23 changes: 23 additions & 0 deletions specification/sphere/Sphere.Management/image.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -79,50 +79,73 @@ model ImageUploadRequestBody {
enum ImageType {
/** Invalid image. */
InvalidImageType,

/** One Bl image type */
OneBl,

/** Pluton image type */
PlutonRuntime,

/** Wifi firmware image type */
WifiFirmware,

/** Security monitor image type */
SecurityMonitor,

/** Normal world loader image type */
NormalWorldLoader,

/** Normal world dtb image type */
NormalWorldDtb,

/** Normal world kernel image type */
NormalWorldKernel,

/** Root FS image type */
RootFs,

/** Services image type */
Services,

/** Applications image type */
Applications,

/** FW config image type */
FwConfig,

/** Boot manifest image type */
BootManifest,

/** Nwfs image type */
Nwfs,

/** Trusted key store image type */
TrustedKeystore,

/** Policy image type */
Policy,

/** Customer board config image type */
CustomerBoardConfig,

/** Update certificate store image type */
UpdateCertStore,

/** Base system update manifest image type */
BaseSystemUpdateManifest,

/** Firmware update manifest image type */
FirmwareUpdateManifest,

/** Customer update manifest image type */
CustomerUpdateManifest,

/** Recovery manifest image type */
RecoveryManifest,

/** manifest set image type */
ManifestSet,

/** Other image type */
Other,
}
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ model CommunicationsGatewayProperties is ResourceProperties {
status?: Status;

@doc("The regions in which to deploy the resources needed for Teams Calling")
@OpenAPI.extension("x-ms-identifiers", ["name"])
@TypeSpec.OpenAPI.extension("x-ms-identifiers", ["name"])
@visibility("read", "update", "create")
serviceLocations: ServiceRegionProperties[];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ model OperatorVoicemailVoipConnection {
@doc("Details of the OperatorVoicemailInstance resource.")
model OperatorVoicemailInstanceProperties is ResourceProperties {
@doc("The set of SIP trunks to be configured on this deployment")
@OpenAPI.extension("x-ms-identifiers", ["remoteDomain"])
@TypeSpec.OpenAPI.extension("x-ms-identifiers", ["remoteDomain"])
@visibility("read", "update", "create")
@minItems(1)
voipConnections: OperatorVoicemailVoipConnection[];
Expand Down