Skip to content

Commit 0616db6

Browse files
feat: remove x-expect from spot (#1815)
* feat: remove x-expect from spot * Update .changeset/curvy-beans-jump.md * chore: update changeset --------- Co-authored-by: Jacek Łękawa <[email protected]>
1 parent b5ae573 commit 0616db6

File tree

6 files changed

+7
-25
lines changed

6 files changed

+7
-25
lines changed

.changeset/curvy-beans-jump.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@redocly/openapi-core": patch
3+
---
4+
5+
Removed the support of the `x-expect` extension for Arazzo.

__tests__/check-config/wrong-config-type-extensions-in-assertions/snapshot.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

__tests__/lint-config/invalid-config-assertation-config-type/snapshot.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/core/src/types/arazzo.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ const Step: NodeType = {
142142
onSuccess: 'OnSuccessActionList',
143143
onFailure: 'OnFailureActionList',
144144
outputs: 'Outputs',
145-
'x-expect': 'ExpectSchema',
146145
'x-operation': 'ExtendedOperation',
147146
requestBody: 'RequestBody',
148147
},
@@ -201,15 +200,6 @@ const ExtendedOperation: NodeType = {
201200
},
202201
required: ['url', 'method'],
203202
};
204-
const ExpectSchema: NodeType = {
205-
properties: {
206-
statusCode: { type: 'number' },
207-
mimeType: { type: 'string' },
208-
body: {},
209-
schema: 'Schema',
210-
},
211-
requiredOneOf: ['statusCode', 'mimeType', 'body', 'schema'],
212-
};
213203
const CriterionObject: NodeType = {
214204
properties: {
215205
condition: { type: 'string' },
@@ -300,7 +290,6 @@ export const ArazzoTypes: Record<string, NodeType> = {
300290
RequestBody,
301291
Replacement,
302292
ExtendedOperation,
303-
ExpectSchema,
304293
Outputs,
305294
CriterionObject,
306295
XPathCriterion,

packages/core/src/typings/arazzo.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,6 @@ export interface ExtendedOperation {
5959
| 'CONNECT';
6060
}
6161

62-
export interface ExpectSchema {
63-
statusCode?: number;
64-
mimeType?: string;
65-
body?: any;
66-
schema?: {
67-
[key: string]: any;
68-
};
69-
}
70-
7162
export interface Replacement {
7263
target: string;
7364
value: string | object | any[];
@@ -129,7 +120,6 @@ export interface Step {
129120
outputs?: {
130121
[key: string]: string | object | any[] | boolean | number;
131122
};
132-
'x-expect'?: ExpectSchema;
133123
'x-operation'?: ExtendedOperation;
134124
requestBody?: RequestBody;
135125
}

packages/core/src/visitors.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ import type {
5555
ArazzoDefinition,
5656
ArazzoSourceDescription,
5757
CriteriaObject,
58-
ExpectSchema,
5958
ExtendedOperation,
6059
InfoObject,
6160
NoneSourceDescription,
@@ -244,7 +243,6 @@ type ArazzoFlatVisitor = {
244243
ArazzoSourceDescription?: VisitFunctionOrObject<ArazzoSourceDescription>;
245244
SourceDescription?: VisitFunctionOrObject<SourceDescription>;
246245
ExtendedOperation?: VisitFunctionOrObject<ExtendedOperation>;
247-
ExpectSchema?: VisitFunctionOrObject<ExpectSchema>;
248246
Replacement?: VisitFunctionOrObject<Replacement>;
249247
RequestBody?: VisitFunctionOrObject<RequestBody>;
250248
CriteriaObject?: VisitFunctionOrObject<CriteriaObject>;

0 commit comments

Comments
 (0)