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

Adding support for multiple @api-data annotations in a single docblock #79

Merged
merged 1 commit into from
May 12, 2017

Conversation

erunion
Copy link
Owner

@erunion erunion commented May 12, 2017

This adds support for having multiple @api-data annotations within a single docblock. Previously if you wanted to document multiple datapoints, you had to do it as:

/**
 * @api-data imdb (string) - IMDB URL
 */
/**
 * @api-data trailer (string) - Trailer URL
 */
/**
 * @api-data tickets (string, BUY_TICKETS) - Tickets URL
 */

Now you can write:

/**
 * @api-data imdb (string) - IMDB URL
 * @api-data trailer (string) - Trailer URL
 * @api-data tickets (string, BUY_TICKETS) - Tickets URL
 */

As is standard with @api-data annotations, any @api-version annotation that exists within the same docblock is applied to all @api-data annotations alongside it:

// `imdb`, `trailer`, and `tickets` datapoints are now locked to version 3.0.
/**
 * @api-data imdb (string) - IMDB URL
 * @api-data trailer (string) - Trailer URL
 * @api-data tickets (string, BUY_TICKETS) - Tickets URL
 * @api-version 3.0
 */

@erunion erunion merged commit 6f7d9e7 into master May 12, 2017
@erunion erunion deleted the multiple-data-annotations-per-docblock branch May 12, 2017 20:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant