Updated tsp
This commit is contained in:
@ -1,27 +1,38 @@
|
||||
import "@typespec/http";
|
||||
import "@typespec/versioning";
|
||||
import "./models.tsp";
|
||||
using TypeSpec.Http;
|
||||
using TypeSpec.Versioning;
|
||||
using Models;
|
||||
|
||||
enum Version {
|
||||
v2
|
||||
}
|
||||
|
||||
@versioned(Version)
|
||||
@service({
|
||||
title: "Simplify Truth Expressions",
|
||||
description: "Simplify truth expressions",
|
||||
})
|
||||
namespace Simplify {
|
||||
model SimplifyResponse {
|
||||
before: string;
|
||||
after: string;
|
||||
orderOfOperations?: string[] = [];
|
||||
expression: Expression;
|
||||
}
|
||||
before: string;
|
||||
after: string;
|
||||
orderOfOperations?: string[] = [];
|
||||
expression: Expression;
|
||||
}
|
||||
|
||||
model SimplifyOptions {
|
||||
lang: "en" | "nb" = "en";
|
||||
simplify: boolean = true;
|
||||
caseSensitive: boolean = false;
|
||||
}
|
||||
model SimplifyOptions {
|
||||
lang: "en" | "nb" = "en";
|
||||
simplify: boolean = true;
|
||||
caseSensitive: boolean = false;
|
||||
}
|
||||
|
||||
op simplify(
|
||||
@path exp: string,
|
||||
@query query?: SimplifyOptions
|
||||
): SimplifyResponse;
|
||||
@route("/simplify")
|
||||
interface Simplify {
|
||||
@get op simplify(
|
||||
@path exp: string,
|
||||
@query query?: SimplifyOptions
|
||||
): SimplifyResponse;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user