Skip to content
TypeSpec Azure
Docs
Playground
TypeSpec Core Docs
Search...
Introduction
Get started
Installation
Creating a project
Azure Data Plane Service
1. Writing Your First Service
2. Create the service namespace
3. Using the versioned Azure.Core types
4. Defining your first resource
5. Defining standard resource operations
6. Defining long-running resource operations
7. Defining child resources
8. Defining custom resource actions
9. Customizing operations with traits
10. Versioning
11. Complete Example
Advanced Topics
ARM Service
1. Installing Tools
2. Defining the Service
3. Defining the Resources
4. Defining Child Resource Types
5. Defining Custom Actions
6. Complete Example and Generate OpenApi 2.0 spec
Howtos & Examples
ARM
ARM Rules, TypeSpec Linting, and Suppression
Change the provider namespace
ARM Resource Operations
ARM Resource Types
Azure Core
Content Type Negotiation
Deep Dive: Long-running (Asynchronous) Operations
Generate client libraries
How to generate client libraries
Setup for SDK customization
Client hierarchy
Convenient method generation
Renaming
One path for multiple input/output
Generated Types
TypeSpec Type Representation in TCGC
Method Inputs
Versioning
Long-Running Operations
Conditional Request Header
Multipart
Generate with tsp client
Quick Start
Usage & Configuration
Rest api publish
Using Build Pipelines with TypeSpec
Checking in typespec and generated OpenAPI to azure-rest-api-specs repo
Azure TypeSpec Style Guide
Convert Swagger to TypeSpec
Getting started
Checklists
Migrate ARM spec
Migrate data-plane specs
Faq
Resolving Swagger Breaking Change Violations
Resolving Swagger Lint Diff Violations
x-ms-examples example files
📚 Libraries
Azure.Core
Overview
Rules
auth-required
bad-record-type
casing-style
no-closed-literal-union
no-enum
no-generic-numeric
no-multiple-discriminator
no-nullable
no-openapi
no-private-usage
no-query-explode
no-string-discriminator
non-breaking-versioning
operation-missing-api-version
prevent-format
require-versioned
spread-discriminated-model
use-standard-names
use-standard-operations
Data types
Decorators
Interfaces and Operations
Js api
Enumerations
[E] FinalStateValue
[E] pollingOptionsKind
Functions
[F] $addTraitProperties
[F] $applyTraitOverride
[F] $defaultFinalStateVia
[F] $ensureAllHeaderParams
[F] $ensureAllQueryParams
[F] $ensureResourceType
[F] $ensureTraitsPresent
[F] $ensureVerb
[F] $finalLocation
[F] $finalOperation
[F] $fixed
[F] $items
[F] $lroCanceled
[F] $lroErrorResult
[F] $lroFailed
[F] $lroResult
[F] $lroStatus
[F] $lroSucceeded
[F] $needsRoute
[F] $nextLink
[F] $nextPageOperation
[F] $omitKeyProperties
[F] $operationLink
[F] $pagedResult
[F] $pollingLocation
[F] $pollingOperation
[F] $pollingOperationParameter
[F] $requestParameter
[F] $responseProperty
[F] $spreadCustomParameters
[F] $spreadCustomResponseProperties
[F] $trait
[F] $traitAdded
[F] $traitContext
[F] $traitLocation
[F] $traitSource
[F] $useFinalStateVia
[F] checkEnsureVerb
[F] checkRpcRoutes
[F] extractLroStates
[F] filterModelProperties
[F] filterResponseModels
[F] getAllProperties
[F] getArmResourceIdentifierConfig
[F] getAsEmbeddingVector
[F] getFinalLocationValue
[F] getFinalStateOverride
[F] getHttpMetadata
[F] getItems
[F] getLongRunningStates
[F] getLroErrorResult
[F] getLroMetadata
[F] getLroResult
[F] getLroStatusProperty
[F] getNextLink
[F] getOperationLink
[F] getOperationLinks
[F] getOperationResponse
[F] getPagedResult
[F] getPollingLocationInfo
[F] getPollingOperationParameter
[F] getRequestParameter
[F] getResponseProperty
[F] getResultModelWithProperty
[F] getSourceTraitName
[F] getSuccessResponse
[F] getTraitContexts
[F] getTraitLocation
[F] getTraitName
[F] getUnionAsEnum
[F] isFinalLocation
[F] isFixed
[F] isLroCanceledState
[F] isLroFailedState
[F] isLroSucceededState
[F] isPollingLocation
[F] isResourceOperation
[F] isTraitModel
[P] JS API
Interfaces
[I] ArmResourceIdentifierAllowedResource
[I] ArmResourceIdentifierConfig
[I] EmbeddingVectorMetadata
[I] FinalOperationLink
[I] FinalOperationReference
[I] HttpTerminationStatus
[I] LogicalOperationStep
[I] LongRunningStates
[I] LroMetadata
[I] ModelPropertyTerminationStatus
[I] NextOperationLink
[I] NextOperationReference
[I] NoPollingSuccessProperty
[I] OperationLink
[I] OperationLinkMetadata
[I] OperationReference
[I] PagedResultMetadata
[I] ParameterSource
[I] PollingLocationBase
[I] PollingOperationStep
[I] PollingSuccessNoResult
[I] PollingSuccessProperty
[I] StatusMonitorPollingLocationInfo
Type aliases
[T] ArmResourceDeploymentScope
[T] FinalOperationStep
[T] OperationStep
[T] PollingLocationInfo
[T] TerminationStatus
[T] UnionEnum
[T] nextOperationStep
Variables
[V] $lib
[V] $linter
[V] FinalOperationKey
[V] PollingOperationKey
[V] namespace
[V] preventRestLibraryInterfaces
[V] useStandardOperations
Linter usage
Azure.ResourceManager
Overview
Rules
arm-no-record
arm-resource-invalid-action-verb
arm-resource-provisioning-state
delete-operation-response-codes
lro-location-header
missing-x-ms-identifiers
no-empty-model
post-operation-response-codes
put-operation-response-codes
resource-name-pattern
unsupported-types
Data types
Decorators
Interfaces and Operations
Js api
Enumerations
[E] ResourceBaseType
Functions
[F] $armCommonTypesVersion
[F] $armLibraryNamespace
[F] $armProviderNameValue
[F] $armProviderNamespace
[F] $armResourceAction
[F] $armResourceCollectionAction
[F] $armResourceCreateOrUpdate
[F] $armResourceDelete
[F] $armResourceList
[F] $armResourceOperations
[F] $armResourceRead
[F] $armResourceUpdate
[F] $armVirtualResource
[F] $extensionResource
[F] $locationResource
[F] $resourceBaseType
[F] $resourceGroupResource
[F] $singleton
[F] $subscriptionResource
[F] $tenantResource
[F] $useLibraryNamespace
[F] armRenameListByOperationInternal
[F] getArmCommonTypeOpenAPIRef
[F] getArmCommonTypesVersion
[F] getArmCommonTypesVersions
[F] getArmProviderNamespace
[F] getArmResource
[F] getArmResourceInfo
[F] getArmResourceKind
[F] getArmResources
[F] getResourceBaseType
[F] getSingletonResourceKey
[F] getUsedLibraryNamespaces
[F] isArmCollectionAction
[F] isArmCommonType
[F] isArmLibraryNamespace
[F] isArmVirtualResource
[F] isAzureResource
[F] isConditionallyFlattened
[F] isSingletonResource
[F] resolveResourceBaseType
[F] resolveResourceOperations
[P] JS API
Interfaces
[I] ArmCommonTypeVersions
[I] ArmCommonTypesResolutionOptions
[I] ArmLifecycleOperations
[I] ArmResourceDetails
[I] ArmResourceDetailsBase
[I] ArmResourceOperation
[I] ArmResourceOperations
Type aliases
[T] ArmLifecycleOperationKind
[T] ArmOperationKind
[T] ArmResourceKind
Variables
[V] $lib
[V] $linter
[V] namespace
Linter usage
Azure.ClientGenerator.Core
Overview
Decorators
Js api
Enumerations
[E] UsageFlags
Functions
[F] $access
[F] $client
[F] $clientInitialization
[F] $clientName
[F] $clientNamespace
[F] $convenientAPI
[F] $flattenProperty
[F] $operationGroup
[F] $override
[F] $protocolAPI
[F] $usage
[F] $useSystemTextJsonConverter
[F] addEncodeInfo
[F] createDiagnostic
[F] createSdkContext
[F] createStateSymbol
[F] createTCGCContext
[F] getAccess
[F] getAccessOverride
[F] getAllModels
[F] getAllModelsWithDiagnostics
[F] getAllReferencedTypes
[F] getClient
[F] getClientInitialization
[F] getClientNameOverride
[F] getClientNamespace
[F] getClientNamespaceString
[F] getClientType
[F] getClientTypeWithDiagnostics
[F] getCrossLanguageDefinitionId
[F] getCrossLanguagePackageId
[F] getDefaultApiVersion
[F] getEffectivePayloadType
[F] getEmitterTargetName
[F] getGeneratedName
[F] getHttpOperationExamples
[F] getHttpOperationWithCache
[F] getInitializationType
[F] getKnownScalars
[F] getLibraryName
[F] getOperationGroup
[F] getOverriddenClientMethod
[F] getParamAlias
[F] getPropertyNames
[F] getSdkArrayOrDict
[F] getSdkArrayOrDictWithDiagnostics
[F] getSdkBuiltInType
[F] getSdkConstant
[F] getSdkCredentialParameter
[F] getSdkDurationType
[F] getSdkEnum
[F] getSdkEnumValue
[F] getSdkModel
[F] getSdkModelPropertyType
[F] getSdkModelPropertyTypeBase
[F] getSdkModelWithDiagnostics
[F] getSdkTuple
[F] getSdkTupleWithDiagnostics
[F] getSdkUnion
[F] getSdkUnionEnum
[F] getSdkUnionEnumWithDiagnostics
[F] getSdkUnionWithDiagnostics
[F] getTypeSpecBuiltInType
[F] getUsage
[F] getUsageOverride
[F] getWireName
[F] handleAllTypes
[F] isApiVersion
[F] isAzureCoreModel
[F] isInOperationGroup
[F] isOperationGroup
[F] isReadOnly
[F] isSdkBuiltInKind
[F] isSdkDateTimeEncodings
[F] isSdkFloatKind
[F] isSdkIntKind
[F] listClients
[F] listOperationGroups
[F] listOperationsInOperationGroup
[F] listSubClients
[F] paramAliasDecorator
[F] reportDiagnostic
[F] shouldFlattenProperty
[F] shouldGenerateConvenient
[F] shouldGenerateProtocol
[P] JS API
Interfaces
[I] CreateSdkContextOptions
[I] DecoratorInfo
[I] MultipartOptions
[I] SdkArrayExampleValue
[I] SdkArrayType
[I] SdkBasicServiceMethod
[I] SdkBodyModelPropertyType
[I] SdkBodyParameter
[I] SdkBooleanExampleValue
[I] SdkBuiltInType
[I] SdkClient
[I] SdkClientAccessor
[I] SdkClientType
[I] SdkConstantType
[I] SdkContext
[I] SdkCredentialParameter
[I] SdkCredentialType
[I] SdkDictionaryExampleValue
[I] SdkDictionaryType
[I] SdkDurationType
[I] SdkEmitterOptions
[I] SdkEndpointParameter
[I] SdkEndpointType
[I] SdkEnumType
[I] SdkEnumValueType
[I] SdkHeaderParameter
[I] SdkHttpErrorResponse
[I] SdkHttpOperation
[I] SdkHttpOperationExample
[I] SdkHttpParameterExampleValue
[I] SdkHttpResponse
[I] SdkHttpResponseExampleValue
[I] SdkHttpResponseHeaderExampleValue
[I] SdkInitializationType
[I] SdkLroPagingServiceMethod
[I] SdkLroServiceFinalResponse
[I] SdkLroServiceFinalStep
[I] SdkLroServiceMetadata
[I] SdkLroServiceMethod
[I] SdkLroServicePollingStep
[I] SdkMethodParameter
[I] SdkMethodResponse
[I] SdkModelExampleValue
[I] SdkModelPropertyTypeBase
[I] SdkModelType
[I] SdkNamespace
[I] SdkNullExampleValue
[I] SdkNullableType
[I] SdkNumberExampleValue
[I] SdkOperationGroup
[I] SdkPackage
[I] SdkPagingServiceMethod
[I] SdkPathParameter
[I] SdkQueryParameter
[I] SdkServiceResponse
[I] SdkServiceResponseHeader
[I] SdkStringExampleValue
[I] SdkTupleType
[I] SdkUnionExampleValue
[I] SdkUnionType
[I] SdkUnknownExampleValue
[I] TCGCContext
Type aliases
[T] AccessFlags
[T] CollectionFormat
[T] LanguageScopes
[T] SdkBuiltInKinds
[T] SdkDateTimeType
[T] SdkExampleValue
[T] SdkHttpPackage
[T] SdkHttpParameter
[T] SdkMethod
[T] SdkModelPropertyType
[T] SdkParameter
[T] SdkServiceMethod
[T] SdkServiceOperation
[T] SdkServiceParameter
[T] SdkType
Variables
[V] $lib
[V] namespace
Azure.Portal
Overview
Data types
Decorators
Js api
Functions
[F] $about
[F] $browse
[F] $displayName
[F] $marketplaceOffer
[F] $onValidate
[F] $promotion
[F] checkIsArmResource
[F] checkIsArmTrackedResource
[F] checkIsValidApiVersion
[F] getAbout
[F] getAboutDisplayNames
[F] getAboutKeywords
[F] getAboutLearnMoreDocs
[F] getBrowse
[F] getBrowseArgQuery
[F] getDisplayName
[F] getMarketplaceOfferId
[F] getPromotion
[F] isFileExist
[P] JS API
Interfaces
[I] AboutOptions
[I] BrowseOptions
[I] DisplayNamesOptions
[I] FilePath
[I] LearnMoreDocsOptions
[I] MarketplaceOfferOptions
[I] PromotionOptions
Variables
[V] $lib
[V] PortalCoreKeys
[V] namespace
🖨️ Emitters
Autorest / Swagger
Overview
Decorators
Emitter usage
Js api
Functions
[F] $example
[F] $onEmit
[F] $useRef
[F] getAllServicesAtAllVersions
[F] getExamples
[F] getOpenAPIForService
[F] getRef
[F] resolveAutorestOptions
[F] sortOpenAPIDocument
[P] JS API
Interfaces
[I] AutorestDocumentEmitterOptions
[I] AutorestEmitterContext
[I] AutorestEmitterOptions
[I] Example
[I] OpenAPI2ApiKeySecurityScheme
[I] OpenAPI2BasicAuthenticationSecurityScheme
[I] OpenAPI2BodyParameter
[I] OpenAPI2Document
[I] OpenAPI2Example
[I] OpenAPI2ExternalDocs
[I] OpenAPI2FormDataParameter
[I] OpenAPI2HeaderDefinition
[I] OpenAPI2HeaderParameter
[I] OpenAPI2Info
[I] OpenAPI2OAuth2AccessCodeSecurityScheme
[I] OpenAPI2OAuth2ApplicationSecurityScheme
[I] OpenAPI2OAuth2ImplicitSecurityScheme
[I] OpenAPI2OAuth2PasswordSecurityScheme
[I] OpenAPI2OAuthSecurityBase
[I] OpenAPI2ParameterBase
[I] OpenAPI2PathParameter
[I] OpenAPI2QueryParameter
[I] OpenAPI2Response
[I] OpenAPI2SecuritySchemeBase
[I] OpenAPI2Tag
[I] PrimitiveItems
[I] Ref
[I] XMSParameterizedHost
Type aliases
[T] Extensions
[T] HttpMethod
[T] JsonType
[T] OpenAPI2FileSchema
[T] OpenAPI2OAuth2FlowType
[T] OpenAPI2Operation
[T] OpenAPI2Parameter
[T] OpenAPI2ParameterType
[T] OpenAPI2PathItem
[T] OpenAPI2Responses
[T] OpenAPI2Schema
[T] OpenAPI2SchemaProperty
[T] OpenAPI2SchemaRefProperty
[T] OpenAPI2SecurityRequirement
[T] OpenAPI2SecurityScheme
[T] OpenAPI2StatusCode
[T] Refable
[T] XMSLongRunningFinalState
[T] XMSLongRunningOperationOptions
[T] XmsPageable
Variables
[V] $decorators
[V] $lib
[V] namespace
🔎 Troubleshoot
Duplicate Body Error When Instantiating `ProxyResourceOperations`
My enums are not extensible anymore
OneBranch SDL
`ProvisioningStateMustBeReadOnly` lintdiff violation in TypeSpec for ARM Service
How to suppress warnings
How can I change the operation template of an operation in newer versions
🚀 Release Notes
0.48.0 November 2024
0.47.0 October 2024
0.46.0 September 2024
0.45.0 August 2024
0.44.0 July 2024
0.43.0 June 2024
0.42.0 May 2024
0.41.0 March 2024
March 2024
February 2024
January 2024
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
Cadl to TypeSpec rename completed in March 2023 release
GitHub
Select theme
Dark
Light
Auto
[F] resolveResourceBaseType
function
resolveResourceBaseType
(
type
?
)
:
ResourceBaseType
Parameters
Parameter
Type
type
?
string
Returns
ResourceBaseType