Replaced binary tuple with struct
This commit is contained in:
31
spec/models.tsp
Normal file
31
spec/models.tsp
Normal file
@ -0,0 +1,31 @@
|
||||
import "@typespec/openapi3";
|
||||
using TypeSpec.OpenAPI;
|
||||
|
||||
namespace Models;
|
||||
|
||||
enum BinaryOperator {
|
||||
AND,
|
||||
OR,
|
||||
IMPLICATION
|
||||
}
|
||||
|
||||
model ExpressionNot {
|
||||
not: Expression;
|
||||
}
|
||||
|
||||
model ExpressionBinary {
|
||||
left: Expression;
|
||||
operator: BinaryOperator;
|
||||
right: Expression;
|
||||
}
|
||||
|
||||
model ExpressionAtomic {
|
||||
atomic: string;
|
||||
}
|
||||
|
||||
@oneOf
|
||||
union Expression {
|
||||
ExpressionNot;
|
||||
ExpressionBinary;
|
||||
ExpressionAtomic;
|
||||
}
|
Reference in New Issue
Block a user