Validate documented Model Target model enum fields - #3436
Merged
Conversation
Towards #3193: validate the model fields which the Model Target OpenAPI specification documents as enumerations - automaticColoring, motionHint, optimizeTrackingFor, simplify and trackingMode, plus realisticAppearance for advanced datasets only - following the existing cadDataFormat validation pattern. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Towards #3193.
The spec audit on that issue lists the documented enumerations which the mock does not check:
simplify,automaticColoring,optimizeTrackingFor,realisticAppearance,motionHintandtrackingMode(cadDataFormatis already validated).This change validates those model fields against the values documented in the Model Target OpenAPI specification, following the existing
cadDataFormatpattern: a non-string value is rejected witherror.expected.jsstringand a string outside the enumeration witherror.expected.validenum.realisticAppearanceis documented as a model-level enumeration ("true"/"false"/"auto") forCadModelAdvancedonly, so it is validated for advanced datasets only and standard dataset creation does not validate it.TestErrorResponses.test_invalid_dataset_requestparametrisation, so they will run against real Vuforia once working credentials are available.realisticAppearancecase is inTestMockOnlyErrorswith the same documented reason as the other advanced cases: the available test account lacks the advanced-dataset scope, so real Vuforia returns a 403 before validating the body.docs/source/differences-to-vws.rstis updated to describe the validated fields and the standard/advanced split.🤖 Generated with Claude Code