feat: add optional manufacturer field to brand schema - #185
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new optional manufacturer link to the brand schema so sub-brands/product lines can reference their parent manufacturer brand id, enabling cleaner “group by manufacturer” queries across brands.
Changes:
- Add optional
manufacturerproperty toschemas/brand_schema.jsonreferencing the existing brandidformat. - Populate
manufacturerin multiple sub-branddata/*/brand.jsonentries (e.g., Polymaker lines, PrimaCreator lines, PrintedSolid/Jessie, Spectrum/The Filament). - Fix Eryone’s website URL in
data/eryone/brand.json.
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| schemas/brand_schema.json | Adds optional manufacturer field to brand schema |
| ofd.sh | Introduces a CLI wrapper script for setup + running commands |
| data/the_filament/brand.json | Adds manufacturer: "spectrum" |
| data/smartprint/brand.json | Adds manufacturer field |
| data/professional_lab/brand.json | Adds manufacturer: "smartprint" |
| data/primavalue/brand.json | Adds manufacturer: "primacreator" |
| data/primaselect/brand.json | Adds manufacturer: "primacreator" |
| data/easyprint/brand.json | Adds manufacturer: "primacreator" |
| data/polylite/brand.json | Adds manufacturer: "polymaker" |
| data/polymax/brand.json | Adds manufacturer: "polymaker" |
| data/polyflex/brand.json | Adds manufacturer: "polymaker" |
| data/polymide/brand.json | Adds manufacturer: "polymaker" |
| data/polysonic/brand.json | Adds manufacturer: "polymaker" |
| data/fiberon/brand.json | Adds manufacturer: "polymaker" |
| data/panchroma/brand.json | Adds manufacturer: "polymaker" |
| data/jessie/brand.json | Adds manufacturer: "printedsolid" |
| data/eryone/brand.json | Corrects website to https://eryone3d.com/ |
Comments suppressed due to low confidence (1)
data/panchroma/brand.json:8
- This JSON object is missing its closing
}(and the indentation is inconsistent with the rest of the file). As-is,brand.jsonis invalid JSON and should fail parsing/validation; add the closing brace and keep formatting consistent.
"origin": "CN",
"manufacturer": "polymaker"
|
@jpapiez the schema change will need a bit more consideration internally, if you would please move the bug fixes into its own branches that would be great :D |
Will do. |
Add an optional 'manufacturer' property to brand_schema.json that links sub-brands/product lines back to their parent manufacturer's brand id. Updated 14 brand.json files across 5 manufacturer families: - Polymaker: polylite, polymax, polyflex, polymide, polysonic, panchroma, fiberon - PrimaCreator: primaselect, primavalue, easyprint - PrintedSolid: jessie - Spectrum: the_filament - SmartPrint/Print-Imagine: professional_lab, smartprint
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
dc22896 to
084e2af
Compare
|
Split done per the review feedback:
Regarding the |
In JSON Schema draft-07, $ref replaces sibling keywords, so the type: string on properties using $ref to definitions/id was ignored. Adding type: string directly to the definition ensures validation works correctly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Blocked by #244 |
Summary
Adds an optional
manufacturerproperty tobrand_schema.jsonthat links sub-brands/product lines back to their parent manufacturer's brand id. This enables querying "show me all Polymaker filaments" across product lines like PolyLite, PolyMax, etc. without URL-matching hacks.Problem
Several manufacturers sell filaments under multiple product line brands. Currently these are separate top-level brands with no schema-level link to a parent manufacturer:
Changes
Schema (
schemas/brand_schema.json)Added optional
manufacturerproperty using the existingidpattern — references the parent brand'sid.Data (14
brand.jsonfiles)Added
"manufacturer"field to all sub-brand entries pointing to their parent brand id.Design Decisions
id: Uses the sameidpattern already defined in the schema, keeping it consistent.Validation