Skip to content

Commit

Permalink
- Ensure default schema types do not get generated
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidArayan committed Feb 15, 2024
1 parent 7982844 commit 83b4beb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sdk-core/src/generator/generator.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CoreController, ObjectSchema } from "@plattar/api-core";
import { CoreController, ObjectSchema, Util } from "@plattar/api-core";
import { GeneratedProject, PackageJsonVars, Project } from "./generators/project";
import { Schema } from "./generators/schema";
import fs from "fs";
Expand Down Expand Up @@ -27,7 +27,9 @@ export class Generator {
// generate the schema source files
// each schema can generate multiple schema files based on endpoints
collections.forEach((schema: typeof ObjectSchema, endpoints: Array<EndpointMapping>) => {
schemas.push(new Schema().generate(schema, endpoints));
if (schema.type !== Util.DEFAULT_OBJECT_TYPE) {
schemas.push(new Schema().generate(schema, endpoints));
}
});

const outputDir: string = `./${data.output}/${data.package.name}-sdk`;
Expand Down

0 comments on commit 83b4beb

Please sign in to comment.