Skip to content

Commit

Permalink
feat(api-gen): blob type support (#903)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdanilowicz committed Apr 26, 2024
1 parent f9e1f39 commit 18d8528
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/smart-balloons-look.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@shopware/api-gen": minor
---

Add Blob type support
6 changes: 6 additions & 0 deletions packages/api-gen/src/commands/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@ export async function generate(args: { cwd: string; filename: string }) {
),
};
}
/**
* Blob type is used for binary data
*/
if (schemaObject.format === "binary") {
return "Blob";
}

/**
* We're changing "object" declarations into "GenericRecord" to allow recursive types like `associations`
Expand Down

0 comments on commit 18d8528

Please sign in to comment.