mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-08-22 19:34:03 +02:00
fix(openapi): wrap root XML arrays
This commit is contained in:
@@ -1071,6 +1071,23 @@ describe("importer-openapi", () => {
|
||||
responses: {},
|
||||
},
|
||||
},
|
||||
"/values": {
|
||||
post: {
|
||||
requestBody: {
|
||||
content: {
|
||||
"application/xml": {
|
||||
schema: {
|
||||
type: "array",
|
||||
example: ["one", "two"],
|
||||
xml: { name: "values", wrapped: false },
|
||||
items: { type: "string", xml: { name: "value" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
responses: {},
|
||||
},
|
||||
},
|
||||
},
|
||||
}),
|
||||
);
|
||||
@@ -1083,6 +1100,9 @@ describe("importer-openapi", () => {
|
||||
'<a:alias xmlns:a="urn:aliases">A</a:alias>' +
|
||||
"</c:catalog>",
|
||||
});
|
||||
expect(imported?.resources.httpRequests[1]?.body).toEqual({
|
||||
text: "<values><value>one</value><value>two</value></values>",
|
||||
});
|
||||
});
|
||||
|
||||
test("Omits read-only properties from generated request bodies", async () => {
|
||||
|
||||
Reference in New Issue
Block a user