-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
How to reuse RESPONSE in Apiary #358
Comments
What do you mean by reusing response? If you want to specify just one response and then refer to it in some of the methods then that is not possible, there is no syntax for it. If you want to reuse the content of response there you can use the Data Structures as you already mentioned. |
@w-vi thanks for the answer. I would like to reuse this part:
Can you tell if it's possible to reuse it at least partially? |
Would something like the following example work for you? # A
## A [/a]
### Get A [GET]
+ Response 201 (application/json)
+ Attributes (GenericRes)
## B [/b]
### Get B [GET]
+ Response 201 (application/json)
+ Attributes (GenericRes)
# Data Structures
## GenericRes(object)
+ message (object)
+ id : MESSAGE_ID (string) - Message ID
+ recipient(object)
+ id : USER_ID (string)- User ID
|
Thank you @w-vi , that's exactly what I needed! |
Is there a way how to reuse RESPONSE in Apiary? I think that Data Structures are not the correct way but I can't find anything else...
The text was updated successfully, but these errors were encountered: