Skip to content

Commit 28b62c9

Browse files
committed
fix: incorrect path to schema
1 parent 53cb652 commit 28b62c9

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/resources/Schema.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,16 @@ export class Schema {
5858
}
5959

6060
generateSchema() {
61-
const schemaFiles = flatten(globby.sync(this.schemas));
61+
const schemaFiles = flatten(
62+
globby.sync(
63+
this.schemas.map((schema) =>
64+
path.join(this.api.plugin.serverless.config.servicePath, schema),
65+
),
66+
),
67+
);
6268

6369
const schemas = schemaFiles.map((file) => {
64-
return fs.readFileSync(
65-
path.join(this.api.plugin.serverless.config.servicePath, file),
66-
'utf8',
67-
);
70+
return fs.readFileSync(file, 'utf8');
6871
});
6972

7073
this.valdiateSchema(AWS_TYPES + '\n' + schemas.join('\n'));

0 commit comments

Comments
 (0)