Skip to content

Commit

Permalink
upgrade to typespec 0.43.0 syntax (#23574)
Browse files Browse the repository at this point in the history
Feels valid to me, thanks @chunyu3 !
  • Loading branch information
chunyu3 authored Apr 17, 2023
1 parent 747357b commit fda3145
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ model VariableState {
effectiveCount?: int32;

@doc("First valid time stamp with a value of input data.")
firstTimestamp?: zonedDateTime;
firstTimestamp?: utcDateTime;

@doc("Last valid time stamp with a value of input data.")
lastTimestamp?: zonedDateTime;
lastTimestamp?: utcDateTime;
}

@doc("""
Expand All @@ -133,19 +133,19 @@ variables for one anomalous time stamp in the response. The default is
Start date/time of data for detection, which should
be in ISO 8601 format.
""")
startTime: zonedDateTime;
startTime: utcDateTime;

@doc("""
End date/time of data for detection, which should
be in ISO 8601 format.
""")
endTime: zonedDateTime;
endTime: utcDateTime;
}

@doc("Anomaly status and information.")
model AnomalyState {
@doc("Time stamp for this anomaly.")
timestamp: zonedDateTime;
timestamp: utcDateTime;
@doc("Detailed value of this anomalous time stamp.")
value?: AnomalyValue;

Expand Down Expand Up @@ -218,13 +218,13 @@ is OneTable.
Start date/time of training data, which should be
in ISO 8601 format.
""")
startTime: zonedDateTime;
startTime: utcDateTime;

@doc("""
End date/time of training data, which should be
in ISO 8601 format.
""")
endTime: zonedDateTime;
endTime: utcDateTime;

@doc("""
Display name of the model. Maximum length is 24
Expand Down Expand Up @@ -315,10 +315,10 @@ model AnomalyDetectionModel {
modelId: string;

@doc("Date and time (UTC) when the model was created.")
createdTime: zonedDateTime;
createdTime: utcDateTime;

@doc("Date and time (UTC) when the model was last updated.")
lastUpdatedTime: zonedDateTime;
lastUpdatedTime: utcDateTime;

@doc("""
Training result of a model, including its status, errors, and diagnostics
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ and imputeMode is \"fixed\".
@doc("Definition of input time series points.")
model TimeSeriesPoint {
@doc("Argument that indicates the time stamp of a data point (ISO8601 format).")
timestamp?: zonedDateTime;
timestamp?: utcDateTime;

@doc("Measurement of that point.")
value: float32;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ model PatientDocument {
language?: string;

@doc("The date and time when the document was created.")
createdDateTime?: zonedDateTime;
createdDateTime?: utcDateTime;

@doc("The content of the patient document.")
content: DocumentContent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ alias Response = {

@doc("The date and time when the processing job was created.")
@visibility("read")
createdDateTime: zonedDateTime;
createdDateTime: utcDateTime;

@doc("The date and time when the processing job is set to expire.")
@visibility("read")
expirationDateTime: zonedDateTime;
expirationDateTime: utcDateTime;

@doc("The date and time when the processing job was last updated.")
@visibility("read")
lastUpdateDateTime: zonedDateTime;
lastUpdateDateTime: utcDateTime;

@doc("The status of the processing job.")
@visibility("read")
Expand Down
4 changes: 1 addition & 3 deletions specification/cognitiveservices/OpenAI.Authoring/main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ using TypeSpec.Versioning;
}]>)
@service({title: "Azure OpenAI API"})
@versioned(Azure.OpenAI.Versions)
@versionedDependency(
[[Azure.OpenAI.Versions.v2022_06_01_preview, Azure.Core.Versions.v1_0_Preview_1]]
)
@server(
"{endpoint}/openai",
"API for managing and utilizing Azure Open AI endpoints",
Expand All @@ -38,5 +35,6 @@ https://westus.api.cognitive.microsoft.com).
namespace Azure.OpenAI;

enum Versions {
@useDependency(Azure.Core.Versions.v1_0_Preview_1)
v2022_06_01_preview: "2022-06-01-preview",
}
9 changes: 1 addition & 8 deletions specification/cognitiveservices/OpenAI.Inference/main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,11 @@ https://westus.api.cognitive.microsoft.com).
}
)
@versioned(ServiceApiVersions)
@versionedDependency(
[
[
ServiceApiVersions.v2022_12_01,
Azure.Core.Versions.v1_0_Preview_1
]
]
)
@doc("Azure OpenAI APIs for completions and search")
namespace Azure.OpenAI;

enum ServiceApiVersions {
@useDependency(Azure.Core.Versions.v1_0_Preview_1)
v2022_12_01: "2022-12-01",
}

Expand Down

0 comments on commit fda3145

Please sign in to comment.