Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Support deprecated tag when generating output #21

Open
Dashron opened this issue Feb 3, 2017 · 1 comment
Open

Support deprecated tag when generating output #21

Dashron opened this issue Feb 3, 2017 · 1 comment

Comments

@Dashron
Copy link
Contributor

Dashron commented Feb 3, 2017

The goal is to be able to indicate that a field, endpoint, parameter etc. is "the wrong way", and has been replaced with a better way.

eg from the Vimeo API: The upload_link parameter is now HTTPS, which means there is no need for the upload_link_secure parameter because the urls are now identical. We should have the option to exclude upload_link_secure from most docs, and include it in others with a clear warning that upload_link_secure should no longer be used, and will be removed in future versions.

Ideally we would be able to explain what the better way is alongside the deprecation annotation.

@erunion
Copy link
Owner

erunion commented Feb 3, 2017

We originally had an @api-deprecated annotation, but ended up moving that to be a special "decorator" for URI's and parameters only (eg. @api-uri:public:deprecated).

I think the best thing to do is just revive it as a representation-only annotation.

/**
 * @api-label Upload URL (secure).
 * @api-field upload_link_secure
 * @api-type string
 * @api-version <=3.3
 * @api-deprecated Deprecated in favor of `upload_link` resolving to a HTTPS URL.
 */

And also since API Blueprint doesn't support deprecation, we can just shove the @api-deprecated description onto the data label. So in generated Markdown for versions <=3.3, it'll end up as:

- `upload_link_secure` (string) - Upload URL (secure). Deprecated in favor of `upload_link` resolving to a HTTPS URL.

@erunion erunion added this to the v1.5.0 milestone Feb 7, 2017
@erunion erunion modified the milestones: v1.6, v2.0 Mar 14, 2017
@erunion erunion modified the milestones: v2.0, Future Apr 16, 2017
@erunion erunion modified the milestones: Future, v2.0, 3.0 May 10, 2017
@erunion erunion removed this from the v3.0 milestone Feb 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants