Config file with Port number.
Started implementing typespec for OpenAPI spec.
This commit is contained in:
39
spec/main.tsp
Normal file
39
spec/main.tsp
Normal 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;
|
Reference in New Issue
Block a user