Skip to content
TypeSpec
Use cases
OpenAPI
Data Validation
Tooling support
Docs
Playground
Blog
Community
Version 0.62 is now available!
Search...
Getting started
Installation
Editor
TypeSpec VSCode extension
TypeSpec Visual Studio Extension
Guides
TypeSpec for REST
Getting Started with TypeSpec For REST APIs
Operations and Responses
Handling Errors
Common Parameters
Authentication
Versioning
Custom Response Models
Conclusion
TypeSpec For OpenAPI Developer
Handbook
Cli usage
Style guide
Formatter
Reproducibility
Configuration
Configuration
Tracing
Releases
FAQ
📐 Language Basics
Overview
Built-in types
Identifiers
Imports
Namespaces
Decorators
Documentation
Scalars
Models
Operations
Interfaces
Templates
Enums
Unions
Intersections
Type Literals
Aliases
Values
Type Relations
📘 Standard Library
Built-in Decorators
Built-in Data types
Js api
Classes
[C] DuplicateTracker
[C] EventEmitter
[C] ProjectionError
[C] Queue
[C] ResolveModuleError
Enumerations
[E] IdentifierKind
[E] ListenerFlow
[E] ModifierFlags
[E] NodeFlags
[E] ResolutionResultFlags
[E] SemanticTokenKind
[E] SymbolFlags
[E] SyntaxKind
[E] Token
[E] TokenFlags
[E] UsageFlags
Functions
[F] $deprecated
[F] $discriminator
[F] $doc
[F] $encode
[F] $error
[F] $errorsDoc
[F] $example
[F] $format
[F] $friendlyName
[F] $inspectType
[F] $inspectTypeName
[F] $key
[F] $knownValues
[F] $maxItems
[F] $maxLength
[F] $maxValue
[F] $maxValueExclusive
[F] $minItems
[F] $minLength
[F] $minValue
[F] $minValueExclusive
[F] $opExample
[F] $overload
[F] $parameterVisibility
[F] $pattern
[F] $projectedName
[F] $returnTypeVisibility
[F] $returnsDoc
[F] $secret
[F] $service
[F] $summary
[F] $tag
[F] $visibility
[F] $withDefaultKeyVisibility
[F] $withOptionalProperties
[F] $withPickedProperties
[F] $withUpdateableProperties
[F] $withVisibility
[F] $withoutDefaultValues
[F] $withoutOmittedProperties
[F] Numeric
[F] addService
[F] assertType
[F] cadlTypeToJson
[F] checkFormatCadl
[F] checkFormatTypeSpec
[F] compile
[F] compilerAssert
[F] createCadlLibrary
[F] createChecker
[F] createDecoratorDefinition
[F] createDiagnosticCollector
[F] createProjectedNameProgram
[F] createRekeyableMap
[F] createRule
[F] createScanner
[F] createServer
[F] createSourceFile
[F] createTypeSpecLibrary
[F] defineCodeFix
[F] defineLinter
[F] definePackageFlags
[F] emitFile
[F] ensureTrailingDirectorySeparator
[F] explainStringTemplateNotSerializable
[F] exprIsBareIdentifier
[F] filterModelProperties
[F] finishTypeForProgram
[F] formatDiagnostic
[F] formatIdentifier
[F] formatTypeSpec
[F] getAllTags
[F] getAnyExtensionFromPath
[F] getBaseFileName
[F] getDeprecated
[F] getDeprecationDetails
[F] getDirectoryPath
[F] getDiscriminatedTypes
[F] getDiscriminatedUnion
[F] getDiscriminator
[F] getDoc
[F] getDocData
[F] getEffectiveModelType
[F] getEncode
[F] getEntityName
[F] getErrorsDoc
[F] getErrorsDocData
[F] getExamples
[F] getFirstAncestor
[F] getFormat
[F] getFriendlyName
[F] getFullyQualifiedSymbolName
[F] getIdentifierContext
[F] getKeyName
[F] getKnownValues
[F] getLocationContext
[F] getMaxItems
[F] getMaxItemsAsNumeric
[F] getMaxLength
[F] getMaxLengthAsNumeric
[F] getMaxValue
[F] getMaxValueAsNumeric
[F] getMaxValueExclusive
[F] getMaxValueExclusiveAsNumeric
[F] getMinItems
[F] getMinItemsAsNumeric
[F] getMinLength
[F] getMinLengthAsNumeric
[F] getMinValue
[F] getMinValueAsNumeric
[F] getMinValueExclusive
[F] getMinValueExclusiveAsNumeric
[F] getNamespaceFullName
[F] getNodeAtPosition
[F] getNodeAtPositionDetail
[F] getNormalizedAbsolutePath
[F] getNormalizedAbsolutePathWithoutRoot
[F] getNormalizedPathComponents
[F] getOpExamples
[F] getOverloadedOperation
[F] getOverloads
[F] getOverriddenProperty
[F] getPagingOperation
[F] getParameterVisibility
[F] getParentTemplateNode
[F] getPathComponents
[F] getPathFromPathComponents
[F] getPattern
[F] getPatternData
[F] getPositionBeforeTrivia
[F] getProjectedName
[F] getProjectedNames
[F] getProperty
[F] getPropertyType
[F] getRelativePathFromDirectory
[F] getReturnTypeVisibility
[F] getReturnsDoc
[F] getReturnsDocData
[F] getRootLength
[F] getService
[F] getSourceFileKindFromExt
[F] getSourceLocation
[F] getSummary
[F] getTags
[F] getTypeName
[F] getVisibility
[F] hasParseError
[F] hasProjectedName
[F] hasTrailingDirectorySeparator
[F] ignoreDiagnostics
[F] interpolatePath
[F] isAnyDirectorySeparator
[F] isArrayModelType
[F] isCadlValueTypeOf
[F] isComment
[F] isDeclaredInNamespace
[F] isDeclaredType
[F] isDeprecated
[F] isErrorModel
[F] isErrorType
[F] isGlobalNamespace
[F] isImportStatement
[F] isIntrinsicType
[F] isKey
[F] isKeyword
[F] isList
[F] isModifier
[F] isNeverType
[F] isNullType
[F] isNumeric
[F] isNumericType
[F] isPathAbsolute
[F] isProjectedProgram
[F] isPunctuation
[F] isRecordModelType
[F] isSecret
[F] isService
[F] isStatementKeyword
[F] isStdNamespace
[F] isStringType
[F] isTemplateDeclaration
[F] isTemplateDeclarationOrInstance
[F] isTemplateInstance
[F] isTrivia
[F] isType
[F] isTypeSpecValueTypeOf
[F] isUnknownType
[F] isUrl
[F] isValue
[F] isVisible
[F] isVoidType
[F] joinPaths
[F] listOperationsIn
[F] listServices
[F] logDiagnostics
[F] logVerboseTestOutput
[F] mapEventEmitterToNodeListener
[F] markDeprecated
[F] navigateProgram
[F] navigateType
[F] navigateTypesInNamespace
[F] normalizePath
[F] normalizeSlashes
[F] paramMessage
[F] parse
[F] parseStandaloneTypeReference
[F] positionInRange
[F] projectProgram
[F] reducePathComponents
[F] removeTrailingDirectorySeparator
[F] reportDeprecated
[F] resolveCompilerOptions
[F] resolveEncodedName
[F] resolveLinterDefinition
[F] resolveModule
[F] resolvePath
[F] resolveUsages
[F] scopeNavigationToNamespace
[F] serializeValueAsJson
[F] setCadlNamespace
[F] setTypeSpecNamespace
[F] skipContinuousIdentifier
[F] skipTrivia
[F] skipTriviaBackward
[F] skipWhiteSpace
[F] stringTemplateToString
[F] typespecTypeToJson
[F] validateDecoratorNotOnType
[F] validateDecoratorParamCount
[F] validateDecoratorParamType
[F] validateDecoratorTarget
[F] validateDecoratorTargetIntrinsic
[F] validateDecoratorUniqueOnNode
[F] visitChildren
[F] walkPropertiesInherited
[P] JS API
Interfaces
[I] AliasStatementNode
[I] AnyKeywordNode
[I] ArrayExpressionNode
[I] ArrayLiteralNode
[I] ArrayModelType
[I] ArrayValue
[I] AugmentDecoratorStatementNode
[I] BaseNode
[I] BaseType
[I] BlockComment
[I] BooleanLiteral
[I] BooleanLiteralNode
[I] BooleanValue
[I] CallExpressionNode
[I] CallableMessage
[I] Checker
[I] CodeFix
[I] CodeFixContext
[I] CompileResult
[I] CompilerHost
[I] CompilerLocationContext
[I] CompilerOptions
[I] ConstStatementNode
[I] DeclarationNode
[I] DecoratedType
[I] Decorator
[I] DecoratorApplication
[I] DecoratorArgument
[I] DecoratorContext
[I] DecoratorDeclarationStatementNode
[I] DecoratorDefinition
[I] DecoratorExpressionNode
[I] DecoratorFunction
[I] DecoratorImplementations
[I] DecoratorParamDefinition
[I] DecoratorValidator
[I] DeprecatedDirective
[I] DeprecationDetails
[I] Diagnostic
[I] DiagnosticCollector
[I] DiagnosticCreator
[I] DiagnosticDefinition
[I] DiagnosticMessages
[I] DirectiveBase
[I] DirectiveExpressionNode
[I] Dirent
[I] DiscriminatedUnion
[I] Discriminator
[I] DocErrorsTagNode
[I] DocNode
[I] DocParamTagNode
[I] DocPropTagNode
[I] DocReturnsTagNode
[I] DocTagBaseNode
[I] DocTemplateTagNode
[I] DocTextNode
[I] DocUnknownTagNode
[I] EmitContext
[I] EmitFileOptions
[I] EmptyStatementNode
[I] EncodeData
[I] Enum
[I] EnumMember
[I] EnumMemberNode
[I] EnumSpreadMemberNode
[I] EnumStatementNode
[I] EnumValue
[I] ErrorType
[I] Example
[I] ExampleOptions
[I] ExternKeywordNode
[I] FileLibraryMetadata
[I] FilePos
[I] FunctionDeclarationStatementNode
[I] FunctionParameterBase
[I] FunctionParameterNode
[I] FunctionType
[I] IdentifierContext
[I] IdentifierNode
[I] ImportStatementNode
[I] IndeterminateEntity
[I] InsertTextCodeFixEdit
[I] Interface
[I] InterfaceStatementNode
[I] IntersectionExpressionNode
[I] IntrinsicType
[I] InvalidStatementNode
[I] JsNamespaceDeclarationNode
[I] JsSourceFileNode
[I] LibraryInstance
[I] LibraryLocationContext
[I] LineAndCharacter
[I] LineComment
[I] LinterDefinition
[I] LinterResolvedDefinition
[I] LinterRule
[I] LinterRuleContext
[I] LinterRuleDefinition
[I] LinterRuleSet
[I] ListOperationOptions
[I] LogInfo
[I] LogSink
[I] Logger
[I] MemberExpressionNode
[I] MetaMembersTable
[I] MixedFunctionParameter
[I] MixedParameterConstraint
[I] Model
[I] ModelExpressionNode
[I] ModelProperty
[I] ModelPropertyNode
[I] ModelSpreadPropertyNode
[I] ModelStatementNode
[I] ModuleLibraryMetadata
[I] MutableSymbolTable
[I] Namespace
[I] NamespaceNavigationOptions
[I] NamespaceStatementNode
[I] NavigationOptions
[I] NeverKeywordNode
[I] NeverType
[I] NodeLinks
[I] NullType
[I] NullValue
[I] Numeric
[I] NumericLiteral
[I] NumericLiteralNode
[I] NumericValue
[I] ObjectLiteralNode
[I] ObjectLiteralPropertyNode
[I] ObjectLiteralSpreadPropertyNode
[I] ObjectType
[I] ObjectValue
[I] ObjectValuePropertyDescriptor
[I] OpExample
[I] Operation
[I] OperationSignatureDeclarationNode
[I] OperationSignatureReferenceNode
[I] OperationStatementNode
[I] PackageFlags
[I] PackageJson
[I] PagingOperation
[I] PagingProperty
[I] ParseOptions
[I] PatternData
[I] PositionDetail
[I] ProcessedLog
[I] Program
[I] ProjectLocationContext
[I] ProjectedNameView
[I] ProjectedProgram
[I] Projection
[I] ProjectionApplication
[I] ProjectionArithmeticExpressionNode
[I] ProjectionBlockExpressionNode
[I] ProjectionCallExpressionNode
[I] ProjectionDecoratorReferenceExpressionNode
[I] ProjectionEnumMemberSelectorNode
[I] ProjectionEnumSelectorNode
[I] ProjectionEqualityExpressionNode
[I] ProjectionExpressionStatementNode
[I] ProjectionIfExpressionNode
[I] ProjectionInterfaceSelectorNode
[I] ProjectionLambdaExpressionNode
[I] ProjectionLambdaParameterDeclarationNode
[I] ProjectionLogicalExpressionNode
[I] ProjectionMemberExpressionNode
[I] ProjectionModelExpressionNode
[I] ProjectionModelPropertyNode
[I] ProjectionModelPropertySelectorNode
[I] ProjectionModelSelectorNode
[I] ProjectionModelSpreadPropertyNode
[I] ProjectionNode
[I] ProjectionOperationSelectorNode
[I] ProjectionParameterDeclarationNode
[I] ProjectionReferenceNode
[I] ProjectionRelationalExpressionNode
[I] ProjectionScalarSelectorNode
[I] ProjectionStatementNode
[I] ProjectionTupleExpressionNode
[I] ProjectionUnaryExpressionNode
[I] ProjectionUnionSelectorNode
[I] ProjectionUnionVariantSelectorNode
[I] Projector
[I] RecordModelType
[I] ReplaceTextCodeFixEdit
[I] ResolutionResult
[I] ResolveCompilerOptionsOptions
[I] ResolveModuleHost
[I] ResolveModuleOptions
[I] ResolvedFile
[I] ResolvedModule
[I] ReturnExpressionNode
[I] ReturnRecord
[I] RmOptions
[I] Scalar
[I] ScalarConstructor
[I] ScalarConstructorNode
[I] ScalarStatementNode
[I] ScalarValue
[I] Scanner
[I] SemanticToken
[I] Server
[I] ServerHost
[I] ServerLog
[I] ServerSourceFile
[I] ServerWorkspaceFolder
[I] Service
[I] ServiceDetails
[I] SignatureFunctionParameter
[I] SourceFile
[I] SourceLocation
[I] SourceLocationOptions
[I] SourceModel
[I] StateDef
[I] StringLiteral
[I] StringLiteralNode
[I] StringTemplate
[I] StringTemplateExpressionNode
[I] StringTemplateHeadNode
[I] StringTemplateLiteralLikeNode
[I] StringTemplateMiddleNode
[I] StringTemplateSpanLiteral
[I] StringTemplateSpanNode
[I] StringTemplateSpanValue
[I] StringTemplateTailNode
[I] StringValue
[I] SuppressDirective
[I] Sym
[I] SymbolLinks
[I] SyntheticLocationContext
[I] TemplateArgumentNode
[I] TemplateDeclarationNode
[I] TemplateInstanceTarget
[I] TemplateParameter
[I] TemplateParameterDeclarationNode
[I] TemplatedTypeBase
[I] TextRange
[I] Tracer
[I] TracerOptions
[I] Tuple
[I] TupleExpressionNode
[I] TypeInstantiationMap
[I] TypeMapper
[I] TypeNameOptions
[I] TypeOfExpressionNode
[I] TypeReferenceNode
[I] TypeSpecCompletionItem
[I] TypeSpecLibrary
[I] TypeSpecLibraryDef
[I] TypeSpecManifest
[I] TypeSpecScriptNode
[I] Union
[I] UnionExpressionNode
[I] UnionStatementNode
[I] UnionVariant
[I] UnionVariantNode
[I] UnknownType
[I] UsageTracker
[I] UsingStatementNode
[I] ValueOfExpressionNode
[I] VoidKeywordNode
[I] VoidType
Type aliases
[T] BytesKnownEncoding
[T] CadlCompletionItem
[T] CadlLibrary
[T] CadlLibraryDef
[T] CadlManifest
[T] CadlScriptNode
[T] CadlValue
[T] CodeFixEdit
[T] Comment
[T] CreateTypeProps
[T] DateTimeKnownEncoding
[T] Declaration
[T] DecoratorArgumentValue
[T] DiagnosticFormat
[T] DiagnosticHandler
[T] DiagnosticMap
[T] DiagnosticReport
[T] DiagnosticReportWithoutTarget
[T] DiagnosticResult
[T] DiagnosticSeverity
[T] DiagnosticTarget
[T] Directive
[T] DirectiveArgument
[T] DocContent
[T] DocTag
[T] DocToken
[T] DurationKnownEncoding
[T] EmitOptionsFor
[T] EmitterFunc
[T] Entity
[T] Expression
[T] FunctionParameter
[T] InferredCadlValue
[T] InferredTypeSpecValue
[T] IntrinsicScalarName
[T] JSONSchemaType
[T] LibraryMetadata
[T] LinterRuleDiagnosticFormat
[T] LinterRuleDiagnosticReport
[T] LinterRuleDiagnosticReportWithoutTarget
[T] LiteralNode
[T] LiteralType
[T] LocationContext
[T] LogLevel
[T] MarshalledValue
[T] MemberContainerNode
[T] MemberContainerType
[T] MemberNode
[T] MemberType
[T] MetaMemberKey
[T] ModelIndexer
[T] Modifier
[T] ModuleResolutionResult
[T] NeverIndexer
[T] NewLine
[T] Node
[T] NodeCallback
[T] OperationContainer
[T] OperationSignature
[T] ProjectionExpression
[T] ProjectionStatementItem
[T] ReferenceExpression
[T] RuleRef
[T] ScopeNode
[T] SemanticNodeListener
[T] ServerLogLevel
[T] SourceFileKind
[T] Statement
[T] StdTypeName
[T] StdTypes
[T] StringTemplateSpan
[T] StringTemplateToken
[T] TemplateableNode
[T] TemplatedType
[T] TrackableType
[T] Type
[T] TypeKind
[T] TypeListeners
[T] TypeOfDiagnostics
[T] TypeOrReturnRecord
[T] TypeSpecDiagnosticTarget
[T] TypeSpecValue
[T] Value
[T] WriteLine
Variables
[V] CadlPrettierPlugin
[V] MANIFEST
[V] NoTarget
[V] NodeHost
[V] TypeSpecPrettierPlugin
[V] altDirectorySeparator
[V] cadlVersion
[V] directorySeparator
[V] namespace
[V] typespecVersion
Encoded names
Discriminated Types
Examples
Pagination
📚 Libraries
Events
Overview
Decorators
Js api
Functions
[F] $onValidate
[F] getContentType
[F] isEventData
[F] isEvents
[P] JS API
Variables
[V] $decorators
[V] $lib
Http
Overview
Rules
op-reference-container-route
Data types
Decorators
Js api
Enumerations
[E] Visibility
Functions
[F] $body
[F] $bodyIgnore
[F] $bodyRoot
[F] $cookie
[F] $delete
[F] $get
[F] $head
[F] $header
[F] $multipartBody
[F] $patch
[F] $path
[F] $post
[F] $put
[F] $query
[F] $route
[F] $server
[F] $sharedRoute
[F] $statusCode
[F] $useAuth
[F] DefaultRouteProducer
[F] addQueryParamsToUriTemplate
[F] createMetadataInfo
[F] getAllHttpServices
[F] getAllRoutes
[F] getAuthentication
[F] getAuthenticationForOperation
[F] getContentTypes
[F] getCookieParamOptions
[F] getHeaderFieldName
[F] getHeaderFieldOptions
[F] getHttpFileModel
[F] getHttpOperation
[F] getHttpPart
[F] getHttpService
[F] getOperationParameters
[F] getOperationVerb
[F] getPathParamName
[F] getPathParamOptions
[F] getQueryParamName
[F] getQueryParamOptions
[F] getRequestVisibility
[F] getResponsesForOperation
[F] getRouteOptionsForNamespace
[F] getRoutePath
[F] getRouteProducer
[F] getServers
[F] getStatusCodeDescription
[F] getStatusCodes
[F] getStatusCodesWithDiagnostics
[F] getUriTemplatePathParam
[F] getVisibilitySuffix
[F] includeInapplicableMetadataInPayload
[F] includeInterfaceRoutesInNamespace
[F] isApplicableMetadata
[F] isApplicableMetadataOrBody
[F] isBody
[F] isBodyIgnore
[F] isBodyRoot
[F] isContentTypeHeader
[F] isCookieParam
[F] isHeader
[F] isHttpFile
[F] isMetadata
[F] isMultipartBodyProperty
[F] isOrExtendsHttpFile
[F] isOverloadSameEndpoint
[F] isPathParam
[F] isQueryParam
[F] isSharedRoute
[F] isStatusCode
[F] isVisible
[F] joinPathSegments
[F] listHttpOperationsIn
[F] reportIfNoRoutes
[F] resolveAuthentication
[F] resolvePathAndParameters
[F] resolveRequestVisibility
[F] setAuthentication
[F] setRoute
[F] setRouteOptionsForNamespace
[F] setRouteProducer
[F] setSharedRoute
[F] setStatusCode
[F] validateRouteUnique
[P] JS API
Interfaces
[I] AnyHttpAuthRef
[I] ApiKeyAuth
[I] Authentication
[I] AuthenticationOption
[I] AuthenticationOptionReference
[I] AuthenticationReference
[I] AuthorizationCodeFlow
[I] BasicAuth
[I] BearerAuth
[I] ClientCredentialsFlow
[I] CookieParameterOptions
[I] HeaderFieldOptions
[I] HttpAuthBase
[I] HttpBody
[I] HttpOperation
[I] HttpOperationBody
[I] HttpOperationBodyBase
[I] HttpOperationMultipartBody
[I] HttpOperationParameters
[I] HttpOperationPart
[I] HttpOperationResponse
[I] HttpOperationResponseContent
[I] HttpPart
[I] HttpPartOptions
[I] HttpServer
[I] HttpService
[I] HttpServiceAuthentication
[I] HttpStatusCodeRange
[I] ImplicitFlow
[I] MetadataInfo
[I] MetadataInfoOptions
[I] NoAuth
[I] NoHttpAuthRef
[I] OAuth2HttpAuthRef
[I] OAuth2Scope
[I] Oauth2Auth
[I] OpenIDConnectAuth
[I] OperationParameterOptions
[I] PasswordFlow
[I] PathParameterOptions
[I] QueryParameterOptions
[I] RouteOptions
[I] RoutePath
[I] RouteProducerResult
[I] RouteResolutionOptions
Type aliases
[T] HttpAuth
[T] HttpAuthRef
[T] HttpOperationCookieParameter
[T] HttpOperationHeaderParameter
[T] HttpOperationParameter
[T] HttpOperationPathParameter
[T] HttpOperationQueryParameter
[T] HttpOperationRequestBody
[T] HttpOperationResponseBody
[T] HttpProperty
[T] HttpStatusCodes
[T] HttpStatusCodesEntry
[T] HttpVerb
[T] OAuth2Flow
[T] OAuth2FlowType
[T] OperationContainer
[T] OperationDetails
[T] OperationVerbSelector
[T] RouteProducer
[T] ServiceAuthentication
[T] StatusCode
Variables
[V] $lib
[V] $linter
[V] namespace
Linter usage
Cheat sheet
Authentication
Operations
Content types
Multipart requests
Encoding of types
Examples
Rest
Overview
Data types
Decorators
Interfaces and Operations
Js api
Functions
[F] $action
[F] $actionSegment
[F] $actionSeparator
[F] $autoRoute
[F] $collectionAction
[F] $copyResourceKeyParameters
[F] $createsOrReplacesResource
[F] $createsOrUpdatesResource
[F] $createsResource
[F] $deletesResource
[F] $listsResource
[F] $parentResource
[F] $readsResource
[F] $resource
[F] $resourceLocation
[F] $resourceTypeForKeyParam
[F] $segment
[F] $segmentOf
[F] $updatesResource
[F] getAction
[F] getActionDetails
[F] getActionSegment
[F] getActionSeparator
[F] getCollectionAction
[F] getCollectionActionDetails
[F] getParentResource
[F] getResourceLocationType
[F] getResourceOperation
[F] getResourceTypeForKeyParam
[F] getResourceTypeKey
[F] getSegment
[F] isAutoRoute
[F] isListOperation
[F] setResourceOperation
[F] setResourceTypeKey
[P] JS API
Interfaces
[I] ActionDetails
[I] AutoRouteOptions
[I] FilteredRouteParam
[I] ResourceKey
[I] ResourceOperation
Type aliases
[T] ResourceOperations
Variables
[V] $lib
Cheat sheet
Resource and routes
OpenAPI
Overview
Data types
Decorators
Js api
Functions
[F] $defaultResponse
[F] $extension
[F] $externalDocs
[F] $info
[F] $operationId
[F] checkDuplicateTypeName
[F] getExtensions
[F] getExternalDocs
[F] getInfo
[F] getOpenAPITypeName
[F] getOperationId
[F] getParameterKey
[F] getTagsMetadata
[F] isDefaultResponse
[F] isReadonlyProperty
[F] resolveInfo
[F] resolveOperationId
[F] setExtension
[F] setInfo
[F] shouldInline
[P] JS API
Interfaces
[I] AdditionalInfo
[I] Contact
[I] ExternalDocs
[I] License
Type aliases
[T] DefaultResponseDecorator
[T] ExtensionDecorator
[T] ExtensionKey
[T] ExternalDocsDecorator
[T] InfoDecorator
Server-Sent Events
Overview
Data types
Decorators
Js api
Functions
[F] $onValidate
[F] isTerminalEvent
[P] JS API
Variables
[V] $decorators
[V] $lib
Streams
Overview
Data types
Decorators
Js api
Functions
[F] getStreamOf
[F] isStream
[P] JS API
Variables
[V] $decorators
[V] $lib
Versioning
Overview
Decorators
Js api
Classes
[C] VersionMap
Enumerations
[E] Availability
Functions
[F] $added
[F] $madeOptional
[F] $madeRequired
[F] $onValidate
[F] $removed
[F] $renamedFrom
[F] $returnTypeChangedFrom
[F] $typeChangedFrom
[F] $useDependency
[F] $versioned
[F] buildVersionProjections
[F] findVersionedNamespace
[F] getAddedOnVersions
[F] getAvailabilityMap
[F] getAvailabilityMapInTimeline
[F] getMadeOptionalOn
[F] getRemovedOnVersions
[F] getRenamedFrom
[F] getRenamedFromVersions
[F] getReturnTypeChangedFrom
[F] getTypeChangedFrom
[F] getUseDependencies
[F] getVersion
[F] getVersionDependencies
[F] getVersionForEnumMember
[F] getVersions
[F] getVersionsForEnum
[F] resolveVersions
[P] JS API
Interfaces
[I] Version
[I] VersionProjections
[I] VersionResolution
Tutorial
Xml
Overview
Decorators
Js api
Functions
[F] $attribute
[F] $name
[F] $ns
[F] $nsDeclarations
[F] $unwrapped
[F] getNs
[F] getXmlEncoding
[F] isAttribute
[F] isUnwrapped
[P] JS API
Interfaces
[I] XmlEncodeData
[I] XmlNamespace
Type aliases
[T] AttributeDecorator
[T] NameDecorator
[T] NsDeclarationsDecorator
[T] NsDecorator
[T] UnwrappedDecorator
[T] XmlEncoding
Variables
[V] $lib
Guide
🖨️ Emitters
JSON Schema
Overview
Data types
Decorators
Emitter usage
Js api
Functions
[F] $baseUri
[F] $contains
[F] $contentEncoding
[F] $contentMediaType
[F] $contentSchema
[F] $extension
[F] $id
[F] $jsonSchema
[F] $maxContains
[F] $maxProperties
[F] $minContains
[F] $minProperties
[F] $multipleOf
[F] $onEmit
[F] $oneOf
[F] $prefixItems
[F] $uniqueItems
[F] findBaseUri
[F] getBaseUri
[F] getContains
[F] getContentEncoding
[F] getContentMediaType
[F] getContentSchema
[F] getExtensions
[F] getId
[F] getJsonSchema
[F] getJsonSchemaTypes
[F] getMaxContains
[F] getMaxProperties
[F] getMinContains
[F] getMinProperties
[F] getMultipleOf
[F] getMultipleOfAsNumeric
[F] getPrefixItems
[F] getUniqueItems
[F] isJsonSchemaDeclaration
[F] isOneOf
[F] setExtension
[P] JS API
Interfaces
[I] ExtensionRecord
[I] JSONSchemaEmitterOptions
Type aliases
[T] BaseUriDecorator
[T] ContainsDecorator
[T] ContentEncodingDecorator
[T] ContentMediaTypeDecorator
[T] ContentSchemaDecorator
[T] ExtensionDecorator
[T] IdDecorator
[T] JsonSchemaDeclaration
[T] JsonSchemaDecorator
[T] MaxContainsDecorator
[T] MaxPropertiesDecorator
[T] MinContainsDecorator
[T] MinPropertiesDecorator
[T] MultipleOfDecorator
[T] OneOfDecorator
[T] PrefixItemsDecorator
[T] UniqueItemsDecorator
Variables
[V] $flags
[V] $lib
[V] EmitterOptionsSchema
OpenAPI3
Overview
Data types
Decorators
Emitter usage
Js api
Functions
[F] $onEmit
[F] $oneOf
[F] $useRef
[F] convertOpenAPI3Document
[F] getOneOf
[F] getOpenAPI3
[F] getRef
[F] resolveOptions
[P] JS API
Interfaces
[I] ResolvedOpenAPI3EmitterOptions
Variables
[V] $lib
[V] namespace
Emitter operation
OpenAPI3 to TypeSpec
Diagnostics
Protobuf
Overview
Data types
Decorators
Emitter usage
Js api
Functions
[F] $externRef
[F] $field
[F] $message
[F] $onEmit
[F] $onValidate
[F] $package
[F] $reserve
[F] $service
[F] $stream
[F] isMap
[P] JS API
Interfaces
[I] PackageDetails
Type aliases
[T] Reservation
Variables
[V] $lib
[V] PROTO_FULL_IDENT
[V] namespace
Guide
🛠️ Writing TypeSpec Libraries
Creating a TypeSpec Library
Diagnostics
Decorators
Linters
Code fixes
Emitters
Emitter framework
Managing metadata and visibility in REST API emitters
Scaffolding templates
🚀 Release Notes
0.62 - November 2024
0.61 - October 2024
0.60 - September 2024
0.59 - August 2024
0.58 - July 2024
0.57 - June 2024
0.56 - May 2024
0.55 - April 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
October 2022
September 2022
August 2022
July 2022
Cadl to TypeSpec rename completed in March 2023 release
Select theme
Dark
Light
Auto
[T] HttpOperationCookieParameter
type
HttpOperationCookieParameter
: CookieParameterOptions & object;
Type declaration
Name
Type
param
ModelProperty