Removed unused feature.

Optimized use statements in main.

Simplified truth_combinations code a little.

Updated OpenAPI spec
This commit is contained in:
Martin Berg Alstad
2024-06-22 20:38:55 +02:00
parent 38fc8ce383
commit 1b94e63915
11 changed files with 566 additions and 86 deletions

69
spec/response.tsp Normal file
View File

@ -0,0 +1,69 @@
import "@typespec/http";
import "./models.tsp";
using TypeSpec.Http;
using Models;
namespace Responses;
/**
* Returns a response as HTML, with the content type set to "text/html".
*/
@summary("Returns a response as HTML")
model HTML {
@header contentType: "text/html";
@body _: string;
}
/**
* Information about this API.
*/
@summary("Information")
model InfoResponse {
message: string;
docs: string;
createdBy: string;
}
/**
* If an expression is valid.
*/
@summary("If an expression is valid")
model IsValidResponse {
isValid: boolean;
}
/**
* Response after simplifying an expression.
*/
@summary("Simplify Response")
model SimplifyResponse {
@summary("Before simplification")
before: string;
@summary("After simplification")
after: string;
@summary("Steps taken to simplify")
operations: string[];
@summary("The simplified expression")
expression: Expression;
}
/**
* Response after generating a truth table.
*/
@summary("Truth Table Response")
model TruthTableResponse {
@summary("The truth table")
truthTable: Models.TruthTable;
}
/**
* Response after simplifying an expression and generating a truth table.
*/
@summary("Simplify and Table Response")
model SimplifyTableResponse {
...SimplifyResponse;
...TruthTableResponse;
}