Config file with Port number.

Started implementing typespec for OpenAPI spec.
This commit is contained in:
Martin Berg Alstad
2024-06-07 14:37:47 +02:00
parent 9cb0fa0a59
commit 4fe388aca3
8 changed files with 1031 additions and 2 deletions

39
spec/main.tsp Normal file
View File

@ -0,0 +1,39 @@
import "@typespec/openapi3";
using TypeSpec.OpenAPI;
enum BinaryOperator {
AND,
OR,
IMPLICATION
}
model ExpressionNot {
not: Expression;
}
// TODO tuple type, possible in OpenAPI 3.1, but unsupported in typespec
model ExpressionBinary {
operator: BinaryOperator;
left: Expression;
right: Expression;
}
model ExpressionAtomic {
atomic: string;
}
@oneOf
union Expression {
ExpressionNot;
ExpressionBinary;
ExpressionAtomic;
}
model SimplifyResponse {
before: string;
after: string;
orderOfOperations: string[];
expression: Expression;
}
op simplify(): SimplifyResponse;