Skip to content

Commit e4e9fbf

Browse files
authored
fix(openapi): wrong spec for "Meta" object for rpc-style generation (#1673)
1 parent c411111 commit e4e9fbf

File tree

5 files changed

+20
-37
lines changed

5 files changed

+20
-37
lines changed

packages/plugins/openapi/src/rpc-generator.ts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -637,18 +637,13 @@ export class RPCOpenAPIGenerator extends OpenAPIGeneratorBase {
637637

638638
schemas['_Meta'] = {
639639
type: 'object',
640+
description: 'Meta information about the request or response',
640641
properties: {
641-
meta: {
642-
type: 'object',
643-
description: 'Meta information about the request or response',
644-
properties: {
645-
serialization: {
646-
description: 'Serialization metadata',
647-
},
648-
},
649-
additionalProperties: true,
642+
serialization: {
643+
description: 'Serialization metadata',
650644
},
651645
},
646+
additionalProperties: true,
652647
};
653648

654649
schemas['_Error'] = {

packages/plugins/openapi/tests/baseline/rpc-3.0.0.baseline.yaml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3212,14 +3212,11 @@ components:
32123212
nullable: true
32133213
_Meta:
32143214
type: object
3215+
description: Meta information about the request or response
32153216
properties:
3216-
meta:
3217-
type: object
3218-
description: Meta information about the request or response
3219-
properties:
3220-
serialization:
3221-
description: Serialization metadata
3222-
additionalProperties: true
3217+
serialization:
3218+
description: Serialization metadata
3219+
additionalProperties: true
32233220
_Error:
32243221
type: object
32253222
required:

packages/plugins/openapi/tests/baseline/rpc-3.1.0.baseline.yaml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3276,14 +3276,11 @@ components:
32763276
- type: string
32773277
_Meta:
32783278
type: object
3279+
description: Meta information about the request or response
32793280
properties:
3280-
meta:
3281-
type: object
3282-
description: Meta information about the request or response
3283-
properties:
3284-
serialization:
3285-
description: Serialization metadata
3286-
additionalProperties: true
3281+
serialization:
3282+
description: Serialization metadata
3283+
additionalProperties: true
32873284
_Error:
32883285
type: object
32893286
required:

packages/plugins/openapi/tests/baseline/rpc-type-coverage-3.0.0.baseline.yaml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1861,14 +1861,11 @@ components:
18611861
nullable: true
18621862
_Meta:
18631863
type: object
1864+
description: Meta information about the request or response
18641865
properties:
1865-
meta:
1866-
type: object
1867-
description: Meta information about the request or response
1868-
properties:
1869-
serialization:
1870-
description: Serialization metadata
1871-
additionalProperties: true
1866+
serialization:
1867+
description: Serialization metadata
1868+
additionalProperties: true
18721869
_Error:
18731870
type: object
18741871
required:

packages/plugins/openapi/tests/baseline/rpc-type-coverage-3.1.0.baseline.yaml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1903,14 +1903,11 @@ components:
19031903
format: byte
19041904
_Meta:
19051905
type: object
1906+
description: Meta information about the request or response
19061907
properties:
1907-
meta:
1908-
type: object
1909-
description: Meta information about the request or response
1910-
properties:
1911-
serialization:
1912-
description: Serialization metadata
1913-
additionalProperties: true
1908+
serialization:
1909+
description: Serialization metadata
1910+
additionalProperties: true
19141911
_Error:
19151912
type: object
19161913
required:

0 commit comments

Comments
 (0)