Skip to content

Commit a3338ac

Browse files
committed
test: update snapshots
1 parent 307e020 commit a3338ac

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// This file is auto-generated by @hey-api/openapi-ts
22

3-
function personExample() {
3+
export function personExample() {
44
return {
55
firstName: 'Marry',
66
lastName: 'Jane',
77
age: 30
88
};
99
}
1010

11-
function Example(options) {
11+
export function Example() {
1212
return 'John Doe';
1313
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// This file is auto-generated by @hey-api/openapi-ts
22

3-
function personExample() {
3+
export function personExample() {
44
return {
55
firstName: 'Marry',
66
lastName: 'Jane',
77
age: 30
88
};
99
}
1010

11-
function Example(options) {
11+
export function Example() {
1212
return 'John Doe';
1313
}

‎packages/openapi-ts/src/plugins/@hey-api/examples/plugin.ts‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ function generateSingularSchemaFactory({
281281

282282
const func = $.func(symbol)
283283
.decl()
284+
.export()
284285
.do($.return($.fromValue(schemaExample, { layout: 'pretty' })));
285286

286287
plugin.node(func);
@@ -310,7 +311,8 @@ function generatePluralSchemaFactory({
310311

311312
const func = $.func(symbol)
312313
.decl()
313-
.param('options')
314+
.export()
315+
// .param('options')
314316
.do($.return($.fromValue(schemaExample[firstKey]!, { layout: 'pretty' })));
315317

316318
plugin.node(func);
@@ -341,7 +343,8 @@ function generateOperationFactory({
341343

342344
const func = $.func(symbol)
343345
.decl()
344-
.param('options')
346+
.export()
347+
// .param('options')
345348
.do(
346349
$.return(
347350
$.fromValue(

0 commit comments

Comments
 (0)