-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
include json file in annotations - Blueprint #654
Comments
Hm, that's an interesting one... It's not possible, but it could be interesting. You want to do this because including a sample response body is too big for this particular response? |
Is it possible to read the file and then return response with read data? |
+1 |
it will be cool to have something like this So we can separate documentation from controller code |
+1 External documentation could be preferred at this point. |
I'm tempted on this idea guys. Will put it into the 1.0.0 milestone and see how I go when I get back from holidays. |
@jasonlewis Hey, did you get anywhere with this feature? I could really use this :) |
I've just implemented this on both here and the Blueprint repository. To use it, you simply provide a string body for either a request or a response, but prefix the string with either Example: /**
* @Response(200, body="json:docs/response/example")
*/ If you use If the contents of the files is valid JSON it will not be re-encoded. When using the command there's a new So when you call the command you would use /**
* @Response(200, body="json:response/example")
*/ Let me know if you'd prefer the |
what happened to this feature i cant use --include-path anymore.
|
@rajathans Nothing happened to it, the option still exists. Are you possibly on a version that was before this was added? |
@hskrasek i'm using |
@rajathans Trying switching to "dev-master" in your composer file. That should resolve the issue |
Hello,
sorry open a issue for this but it really helps, i wanna include a file with a json response in the body. It's possible ?
example:
@response(200, body={"name" : "foo",}) ----> @response(200, body= include(filename))
thx
CV
The text was updated successfully, but these errors were encountered: