Updated tsp
This commit is contained in:
parent
b16a4eefe4
commit
912cf6f1e5
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -1,12 +1,12 @@
|
||||
openapi: 3.0.0
|
||||
info:
|
||||
title: Simplify Truth Expressions
|
||||
version: 0.0.0
|
||||
version: v2
|
||||
tags: []
|
||||
paths:
|
||||
/{exp}:
|
||||
/simplify/{exp}:
|
||||
get:
|
||||
operationId: simplify
|
||||
operationId: Simplify_simplify
|
||||
parameters:
|
||||
- name: exp
|
||||
in: path
|
Loading…
x
Reference in New Issue
Block a user