Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ using TypeSpec.Rest;
namespace AzureHealthInsights;

alias Response = {
#suppress "@azure-tools/typespec-azure-core/no-format" "This is an old spec"
@doc("A processing job identifier.")
@visibility("read")
@key
Expand Down Expand Up @@ -32,7 +33,6 @@ alias Response = {
errors?: Azure.Core.Foundations.Error[];
};


@doc("An inference made by the model regarding a patient.")
model Inference {
@doc("The value of the inference, as relevant for the given inference type.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ using Azure.Core;
using TypeSpec.Http;
namespace AzureHealthInsights;

#suppress "@azure-tools/typespec-azure-core/long-running-polling-operation-required" "This is a template"
@doc("Long running RPC operation template")
op LongRunningRpcOperation<
TParams extends object,
TResponse extends object,
Traits extends object = {}
> is RpcOperation<
TParams & Traits,
Foundations.AcceptedResponse<Traits &
Foundations.LongRunningStatusLocation &
Foundations.RetryAfterHeader &
RepeatabilityResponseHeaders> | TResponse,
Traits
>;
TParams,
TResponse
> is Azure.Core.Foundations.Operation<
TParams & RepeatabilityRequestHeaders,
(Foundations.AcceptedResponse<Foundations.LongRunningStatusLocation &
Foundations.RetryAfterHeader> &
RepeatabilityResponseHeaders) | TResponse,
RepeatabilityRequestHeaders & RepeatabilityResponseHeaders,
Azure.Core.Foundations.ErrorResponse
>;
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,21 @@ interface OncoPhenotype {
@summary("Get Onco Phenotype job details")
@tag("OncoPhenotype")
@doc("Gets the status and details of the Onco Phenotype job.")
@example("./examples/SuccessfulOncoPhenotypeResponse.json", "SuccessfulOncoPhenotypeGetAnalyzeStatus")
@example(
"./examples/SuccessfulOncoPhenotypeResponse.json",
"SuccessfulOncoPhenotypeGetAnalyzeStatus"
)
GetJob is Azure.Core.ResourceRead<OncoPhenotypeResult>;

#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "There is no long-running RPC template in Azure.Core"
@summary("Create Onco Phenotype job")
@tag("OncoPhenotype")
@doc("Creates an Onco Phenotype job with the given request body.")
@pollingOperation(OncoPhenotype.GetJob)
@route("/oncophenotype/jobs")
@example("./examples/SuccessfulOncoPhenotypeRequest.json", "SuccessfulOncoPhenotypeAnalyzeRequest")
CreateJob is LongRunningRpcOperation<OncoPhenotypeData, OncoPhenotypeResult, RepeatabilityRequestHeaders>;
@example(
"./examples/SuccessfulOncoPhenotypeRequest.json",
"SuccessfulOncoPhenotypeAnalyzeRequest"
)
CreateJob is LongRunningRpcOperation<OncoPhenotypeData, OncoPhenotypeResult>;
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ emit: [

options:
"@azure-tools/typespec-autorest":
output-file: "openapi.json"
azure-resource-provider-folder: "./data-plane"
emitter-output-dir: "{project-root}/../.."
output-file: "{azure-resource-provider-folder}/HealthInsights/{version-status}/{version}/openapi.json"
examples-directory: "./examples"
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,21 @@ interface TrialMatcher {
@summary("Get Trial Matcher job details")
@tag("TrialMatcher")
@doc("Gets the status and details of the Trial Matcher job.")
@example("./examples/SuccessfulTrialMatcherResponse.json", "SuccessfulTrialMatcherGetAnalyzeStatus")
@example(
"./examples/SuccessfulTrialMatcherResponse.json",
"SuccessfulTrialMatcherGetAnalyzeStatus"
)
GetJob is Azure.Core.ResourceRead<TrialMatcherResult>;

#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "There is no long-running RPC template in Azure.Core"
@summary("Create Trial Matcher job")
@tag("TrialMatcher")
@doc("Creates a Trial Matcher job with the given request body.")
@pollingOperation(TrialMatcher.GetJob)
@route("/trialmatcher/jobs")
@example("./examples/SuccessfulTrialMatcherRequest.json", "SuccessfulTrialMatcherAnalyzeRequest")
CreateJob is LongRunningRpcOperation<TrialMatcherData, TrialMatcherResult, RepeatabilityRequestHeaders>;
@example(
"./examples/SuccessfulTrialMatcherRequest.json",
"SuccessfulTrialMatcherAnalyzeRequest"
)
CreateJob is LongRunningRpcOperation<TrialMatcherData, TrialMatcherResult>;
}