Is there a way to swap unevaluatedProperties to additionalProperties? #9514
Unanswered
Devon-White
asked this question in
Json Schema
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm familiar with the reason TypeSpec decided to use
unevaluatedPropertiesinstead ofadditionalProperties, which is outlined here: #3549However, I wonder if there are cases where a model is inheriting another model's properties inline via
iswhereunevaluatedPropertiesactively hurts the error messaging and IDE validation experience.Refer to the two pictures below. One schema uses
additionalPropertieseverywhere while the other usesunevaluatedProperties.Context: The model requires a
functionproperty to be set. The pictures below show the difference in error messaging when using tools like Monaco editor (VS Code) and CodeMirror:unevaluatedProperties
additionalProperties
It would be nice to have the ability within TypeSpec to control this. Is there any solution today to handle this?
Beta Was this translation helpful? Give feedback.
All reactions