@microsoft.azure/autorest.testserver
Version:
Autorest test server.
66 lines • 2.35 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const api_1 = require("../../api");
api_1.app.category("dpg", () => {
api_1.app.get("/customization/model/raw", "GetRawModel", (req) => {
return {
status: 200,
body: (0, api_1.json)({ received: "raw" }),
};
});
api_1.app.get("/customization/model/model", "GetHandwrittenModel", (req) => {
return {
status: 200,
body: (0, api_1.json)({ received: "model" }),
};
});
api_1.app.post("/customization/model/raw", "PostRawModel", (req) => {
req.expect.bodyEquals({ hello: `world!` });
return {
status: 200,
body: (0, api_1.json)({ received: "raw" }),
};
});
api_1.app.post("/customization/model/model", "PostHandwrittenModel", (req) => {
req.expect.bodyEquals({ hello: `world!` });
return {
status: 200,
body: (0, api_1.json)({ received: "model" }),
};
});
api_1.app.get("/customization/paging/:mode/", "", (req) => {
var _a;
return {
status: 200,
body: (0, api_1.json)({
values: [{ received: (_a = req.params.mode) === null || _a === void 0 ? void 0 : _a.toString() }],
nextLink: req.baseUrl + "/customization/paging/" + req.params.mode + "/2",
}),
};
});
api_1.app.get("/customization/paging/raw/2", "GetRawPages", (req) => {
return {
status: 200,
body: (0, api_1.json)({ values: [{ received: "raw" }] }),
};
});
api_1.app.get("/customization/paging/model/2", "GetHandwrittenModelPages", (req) => {
return {
status: 200,
body: (0, api_1.json)({ values: [{ received: "model" }] }),
};
});
api_1.app.put("/customization/lro/raw", "RawLRO", (req) => {
return {
status: 200,
body: (0, api_1.json)({ provisioningState: "Succeeded", received: "raw" }),
};
});
api_1.app.put("/customization/lro/model", "HandwrittenModelLRO", (req) => {
return {
status: 200,
body: (0, api_1.json)({ provisioningState: "Succeeded", received: "model" }),
};
});
});
//# sourceMappingURL=customization.js.map