-
-
Notifications
You must be signed in to change notification settings - Fork 309
Drop the idea of automatically combining annotations #906
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This seems like a good place to ask this. If we drop "combining annotations", that leaves the rest of the sentence, and I'd like to inquire as to its intent. The text:
Can a short example be provided that shows where you can actually apply multiple schemas to the same instance location? I can think of, for example, "allOf", but since "additionalProperties" (I'm neglecting "unevaluatedProperties" for now) can't peer inside an "allOf", how can multiple schemas even apply? I should be asking, actually: "What is the intent behind 'multiple schemas'" here? |
I'll answer my own question. The phrase, "same schema object" is key in this paragraph from "annotationProperties":
|
@Julian @gregsdennis |
The tests aren't checking output right now because no one had been able to identify a reasonable mechanism for checking it (not sure how much effort has gone into trying, either). As long as the validation results are the same, no change is required. |
We have this idea that some annotations get combined (e.g. if multiple
readOnly
keywords apply to the same location, the overall annotation istrue
if any of them aretrue
).However, our output recommendations don't support that. They just return all of the information needed to implement it (all of the annotation values, where they come from, and to where they are applied).
Since annotations are intended to be processed by the application anyway, we can get the necessary effect for keywords like
readOnly
by directing applications on how they process the results. ForreadOnly
andwriteOnly
, our language actually supports that anyway:Note that this doesn't say anything about implementations combining things, just about the resulting behavior.
This would involve some changes to the Core spec:
In section 7.7.1 Collecting Annotations, we would change:
to something like:
In section 7.5 Applicators, we would drop:
There are probably other spots, but this gets the idea across. The whole "combine annotations" thing was never really thought through all the way in the context of output formats and other things that were added after the initial idea.
The text was updated successfully, but these errors were encountered: