fix: remove invalid libraryRelationType: "NONE" from feature builders#19
Open
candera wants to merge 1 commit into
Open
fix: remove invalid libraryRelationType: "NONE" from feature builders#19candera wants to merge 1 commit into
libraryRelationType: "NONE" from feature builders#19candera wants to merge 1 commit into
Conversation
The extrude, revolve, linear/circular pattern, fillet, chamfer, and boolean builders hard-coded `"libraryRelationType": "NONE"` on every parameter they emitted. Onshape's /features endpoint (API v9) rejects "NONE" as an invalid enum value, returning HTTP 400 with a BTWeirdStringValueException. This made create_extrude, create_revolve, create_linear_pattern, create_circular_pattern, create_fillet, create_chamfer, and create_boolean all fail against a real document. Omitting the field lets Onshape default it to "DEFAULT", which is accepted (the sketch builder already omits it and works). Add a regression test that asserts no builder emits libraryRelationType == "NONE". Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #18. Six feature builders hard-coded
"libraryRelationType": "NONE"on every parameter they emit. Onshape's/api/v9/.../featuresendpoint rejects"NONE"as an invalid enum value (HTTP 400,BTWeirdStringValueException), which brokecreate_extrude,create_revolve,create_linear_pattern,create_circular_pattern,create_fillet,create_chamfer, andcreate_booleanagainst a live document.Omitting the field lets Onshape default it to
"DEFAULT", which is accepted — the sketch builder already omits it and works. Verified end-to-end by building a real extruded part after the change.Changes
"libraryRelationType": "NONE"(27 occurrences) fromextrude.py,revolve.py,pattern.py,fillet.py,chamfer.py,boolean.py.tests/builders/test_library_relation_type_regression.pyasserting no builder emitslibraryRelationType == "NONE"(parametrized over all seven builders, including both pattern types).Type of Change
Testing
pytest -v) — 504 passedChecklist
🤖 Generated with Claude Code