Skip to content

Data types

TypeSpec.JsonSchema

Json

Specify that the provided template argument should be emitted as raw JSON or YAML as opposed to a schema. Use in combination with the

model TypeSpec.JsonSchema.Json<Data>

Template Parameters

NameDescription
Datathe type to convert to raw JSON

Properties

NameTypeDescription
valueData

Format

Well-known JSON Schema formats.

enum TypeSpec.JsonSchema.Format
NameValueDescription
dateTime"date-time"
date"date"
time"time"
duration"duration"
email"email"
idnEmail"idn-email"
hostname"hostname"
idnHostname"idn-hostname"
ipv4"ipv4"
ipv6"ipv6"
uri"uri"
uriReference"uri-reference"
iri"iri"
iriReference"iri-reference"
uuid"uuid"
jsonPointer"json-pointer"
relativeJsonPointer"relative-json-pointer"
regex"regex"