Skip to content
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

Hyper-schema: Add "deprecated" keyword #173

Closed
wants to merge 1 commit into from

Conversation

awwright
Copy link
Member

Language for implementing #74

Also adds meta-schema for "readOnly" that seems to have gone MIA

Copy link
Contributor

@handrews handrews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is ready for Draft 06. There are some subtleties that need to be discussed here and we need some clarity on the difference between resources and fields.

},
"readOnly": {
"type": "boolean"
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should have "default": false

"deprecated": {
"type": "boolean"
},
"readOnly": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should have "default": false

@@ -334,6 +334,16 @@
</section>
</section>

<section title="deprecated">
<t>
If it has a value of boolean true, this keyword indicates that the value of the instance is deprecated, and intended for reverse compatability or internal use only, and may become missing in the future.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"value of the instance is deprecated" is strange phrasing. Usually you deprecate a field, not a field's value, or you deprecate an entire resource. So this could apply to any schema with a "self" link (which is basically what determines that the schema represents a resource), or to a field within an object schema. Or perhaps a position in a tuple schema (when "items" is an array of schemas).

There's something a bit strange there where this is either about a resource or about the context in which the schema appears (the property name or pattern, for instance).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is, isn't it, I'll fix that

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So how does this work?

In a root schema with a "self" link is means that the resource itself is deprecated? But it's still there currently?

In a root schema without a "self" link it means....?

In a property subschema (in any of the property keywords) it means that all matching properties are deprecated but will still be present?

In a schema applying to a single position in an array/tuple ("items" is an array) it means...?

In a schema applying to multiple array positions ("items" as one schema, or "additionalItems") it means...?

In the schema for "schema" or "targetSchema" it means...?

This concept is not ready for a PR. There are far too many cases that need discussing and a coherent view of hypermedia resources that need to be developed before we can just toss this in.

@Relequestual
Copy link
Member

Relequestual commented Dec 1, 2016

OK, so we agree the phrasing needs to be reworked and reviewed. Cool.
(Maybe I'll add those new labels soon... very soon... )

@awwright awwright closed this Dec 11, 2016
@awwright awwright deleted the keyword-deprecated branch December 11, 2016 19:32
@awwright awwright restored the keyword-deprecated branch December 11, 2016 19:33
@awwright awwright reopened this Dec 11, 2016
@Relequestual Relequestual modified the milestones: draft-future, draft-next (draft-6) Jan 13, 2017
@handrews handrews modified the milestones: draft-07 (wright-*-02), draft-future May 17, 2017
@handrews
Copy link
Contributor

@awwright do you plan to re-work this exact PR or can we close this, finish the discussion in the issue, and start with a new one? It's a bit confusing to me to have it open in two places, and there is a lot more context in the issue at this point.

@awwright
Copy link
Member Author

awwright commented Aug 18, 2017 via email

@handrews
Copy link
Contributor

Closing as agreed.

@handrews handrews closed this Aug 20, 2017
@awwright awwright deleted the keyword-deprecated branch February 28, 2018 20:24
@philsturgeon
Copy link
Collaborator

Just for directing people to the correct place, future deprecations conversations will be, for now, on #74.

@awwright awwright restored the keyword-deprecated branch February 27, 2019 05:34
@awwright awwright deleted the keyword-deprecated branch August 17, 2020 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants