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

Support for description dictionaries #6

Closed
erunion opened this issue Jan 12, 2017 · 2 comments
Closed

Support for description dictionaries #6

erunion opened this issue Jan 12, 2017 · 2 comments

Comments

@erunion
Copy link
Owner

erunion commented Jan 12, 2017

Right now, @api-throws has support for a dictionary-like type and subtype system where you can do {User} as your throws description to generate a description of "If the User cannot be found.".

It might be worth investigating at looking to replace that with a configurable dictionary of these types of common return, error, and parameter descriptions that you could easily drop in.

For example:

@api-throws:private {403} \ErrorRepresentation If the user was not found.

Imagine setting up a dictionary in your config like:

<dictionaries>
    <description id="user.not_found">If the user was not found.</description>
</dictionaries>

And then doing:

@api-throws:private {403} \ErrorRepresentation {user.not_found}

We should also retain the current sprintf-like functionality and support something like:

<dictionaries>
    <description id="common.not_found">If the %s was not found.</description>
</dictionaries>
@api-throws:private {403} \ErrorRepresentation {common.not_found:"user"}

Just an idea to consolidate and have consistent documentation error messaging.

@erunion
Copy link
Owner Author

erunion commented Apr 16, 2017

I'm going to close this out as I have no longer think that this is worth the amount of effort it's going to require.

@erunion erunion closed this as completed Apr 16, 2017
@erunion erunion reopened this Nov 16, 2018
@erunion
Copy link
Owner Author

erunion commented Feb 9, 2019

Not worth it right now.

@erunion erunion closed this as completed Feb 9, 2019
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