@microsoft.azure/autorest.testserver
Version:
Autorest test server.
11 lines (9 loc) • 350 B
text/typescript
import { app, ValidationError } from "../../api";
app.category("vanilla", () => {
app.put("/reqopt/implicit/optional/header", "OptionalImplicitHeader", async (req) => {
if (req.headers.headerParameter) {
throw new ValidationError("Expected header to be null", null, req.query.queryParameter);
}
return { status: 200 };
});
});