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

Versioning doesn't allow for differing documentation #75

Open
erunion opened this issue May 9, 2017 · 2 comments
Open

Versioning doesn't allow for differing documentation #75

erunion opened this issue May 9, 2017 · 2 comments

Comments

@erunion
Copy link
Owner

erunion commented May 9, 2017

/**
 * @api-data pictures (\App\PictureRepresentation) - The active picture for this video.
 */

/**
 * @api-data pictures (array<object>) - The video's thumbnail images
 * @api-version <3.2
 */

Problem stems from us storing representation data in an identifier-keyed array when parsing it out in the RepresentationParser.

@erunion erunion modified the milestones: Future, v2.0 May 9, 2017
@erunion erunion added enhancement and removed bug labels May 19, 2017
@erunion
Copy link
Owner Author

erunion commented May 24, 2017

Another common example of this is enum values differing between API versions:

* @api-param:public {filter}
*      + Members
*          - `embeddable`
*          - `playable`
*          - `app_only`
*
* @api-version >=3.3.8
* @api-param:public {filter}
*      + Members
*          - `featured`

@erunion erunion modified the milestones: v2.0, v3.0 Nov 19, 2017
@erunion erunion removed this from the v3.0 milestone Feb 1, 2018
@erunion erunion added this to the v5.0: Freddy's Revenge milestone Oct 27, 2018
@erunion erunion changed the title Representation versioning doesn't allow for differing documentation Versioning doesn't allow for differing documentation Nov 10, 2018
@erunion
Copy link
Owner Author

erunion commented Nov 13, 2018

Trying to do the above example with enum reductions isn't going to work. Maybe the best bet is just to force the developer to copy documentation from one version to another?

* @api-data status (enum, required, nullable) - The status code for the availability of the video. This field is deprecated in favor of `upload` and
*      `transcode`.
*      + Members
*          - `available` - The video is available.
*          - `unavailable` - The video is unavailable.
*          - `uploading` - The video is being uploaded.
*          - `transcode_starting` - Transcoding is beginning for the video.
*          - `transcoding` - Transcoding is underway for the video.
*          - `quota_exceeded` - The user's quota is exceeded with this video.
*          - `uploading_error` - There was an error in uploading the video.
*          - `transcoding_error` - There was an error in transcoding the video.
* 
* @api-version >=3.4.1
* @api-data status (enum, required, nullable) - The status code for the availability of the video. This field is deprecated in favor of `upload` and
*      `transcode`.
*      + Members
*          - `available` - The video is available.
*          - `unavailable` - The video is unavailable.
*          - `uploading` - The video is being uploaded.
*          - `transcode_starting` - Transcoding is beginning for the video.
*          - `transcoding` - Transcoding is underway for the video.
*          - `quota_exceeded` - The user's quota is exceeded with this video.
*          - `total_cap_exceeded` - The user has exceeded their total cap with this video.
*          - `uploading_error` - There was an error in uploading the video.
*          - `transcoding_error` - There was an error in transcoding the video.

That feels like a huge burden though.

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

1 participant