Skip to content

Commit

Permalink
feat: changes to x-operation Spot extension
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitryAnansky committed Oct 14, 2024
1 parent 6a4fa9d commit b1f6393
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 9 deletions.
6 changes: 6 additions & 0 deletions .changeset/cyan-grapes-knock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@redocly/openapi-core": patch
"@redocly/cli": patch
---

Changed the `x-operation` extention format in Arazzo.
27 changes: 22 additions & 5 deletions packages/core/src/types/arazzo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,31 @@ const Replacement: NodeType = {
};
const ExtendedOperation: NodeType = {
properties: {
path: { type: 'string' },
url: { type: 'string' },
method: {
enum: ['get', 'post', 'put', 'delete', 'patch'],
enum: [
'get',
'post',
'put',
'delete',
'patch',
'GET',
'POST',
'PUT',
'DELETE',
'PATCH',
'options',
'OPTIONS',
'head',
'HEAD',
'trace',
'TRACE',
'connect',
'CONNECT',
],
},
sourceDescriptionName: { type: 'string' },
serverUrl: { type: 'string' },
},
required: ['path', 'method'],
required: ['url', 'method'],
};
const ExpectSchema: NodeType = {
properties: {
Expand Down
24 changes: 20 additions & 4 deletions packages/core/src/typings/arazzo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,26 @@ export interface Parameter {
}

export interface ExtendedOperation {
path: string;
method: 'get' | 'post' | 'put' | 'delete' | 'patch';
sourceDescriptionName?: string;
serverUrl?: string;
url: string;
method:
| 'get'
| 'post'
| 'put'
| 'delete'
| 'patch'
| 'head'
| 'options'
| 'trace'
| 'connect'
| 'GET'
| 'POST'
| 'PUT'
| 'DELETE'
| 'PATCH'
| 'HEAD'
| 'OPTIONS'
| 'TRACE'
| 'CONNECT';
}

export interface ExpectSchema {
Expand Down

0 comments on commit b1f6393

Please sign in to comment.