counterfact 0.21.1 → 0.21.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -101,7 +101,8 @@ export class OperationTypeCoder extends Coder {
|
|
|
101
101
|
|
|
102
102
|
const responseType = new ResponseTypeCoder(
|
|
103
103
|
this.requirement.get("responses"),
|
|
104
|
-
this.requirement.get("produces")?.data
|
|
104
|
+
this.requirement.get("produces")?.data ??
|
|
105
|
+
this.requirement.specification?.rootRequirement?.get("produces")?.data
|
|
105
106
|
).write(script);
|
|
106
107
|
|
|
107
108
|
const proxyType = "(url: string) => { proxyUrl: string }";
|
|
@@ -53,15 +53,27 @@ exports[`an OperationTypeCoder generates a complex post operation (OpenAPI 2 wit
|
|
|
53
53
|
response: ResponseBuilderFactory<{
|
|
54
54
|
200: {
|
|
55
55
|
headers: {};
|
|
56
|
-
content: {
|
|
56
|
+
content: {
|
|
57
|
+
\\"application/json\\": {
|
|
58
|
+
schema: Type;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
57
61
|
};
|
|
58
62
|
400: {
|
|
59
63
|
headers: {};
|
|
60
|
-
content: {
|
|
64
|
+
content: {
|
|
65
|
+
\\"application/json\\": {
|
|
66
|
+
schema: Type;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
61
69
|
};
|
|
62
70
|
[statusCode in Exclude<HttpStatusCode, 200 | 400>]: {
|
|
63
71
|
headers: {};
|
|
64
|
-
content: {
|
|
72
|
+
content: {
|
|
73
|
+
\\"application/json\\": {
|
|
74
|
+
schema: Type;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
65
77
|
};
|
|
66
78
|
}>;
|
|
67
79
|
proxy: (url: string) => { proxyUrl: string };
|