-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Message-body Attributes Description #25
Comments
Vote up for this. Quite necessary. |
+1 |
Same do I. |
👍 as well! |
For the "differentiated between the URI parameters description and Body Parameters" part of the task, please be sure to allow an easy way to say "you can provide these parameters either in the body or the URI; same parameters, same meaning." That's how Rails works (I think, actually, it merges the two parameter sets, but anyway the Rails server-side developer can't really tell how the parameter came in). |
If I understand you right what you are saying is that you basically do not want to differentiate between these two (URI parameters and request body parameters) for requests in certain APIs. To be frank I am struggling to imagine how to capture this at all. Assuming URI + query parameters are superset to request message-body parameters but yet you do not want to mix these or even send two, possibly disjunctive, sets. |
I don't see any point of adding URI params in a POST request and I don't see any way of adding BODY params in a GET request, and since @apiaryio is categorizing the documentation by request method there is not possibility of mixing BODY params with URI params. So I'm with @zdne and I rather to be specific on describing where my back-layer is expecting to find the params. |
Thanks for input. I will post here a syntax proposal within next few days. |
Maybe, I would prefer an option to say "a parameter is a PATH, or QUERY, or BODY, or HEADER, or ... whatever" role or belongsTo ... (needs better naming). |
@fguillen Point taken. |
Message-Body Parameters may be considered as a Model (indeed it is what you did when you POST a resource). |
@zdne Stephane's idea would meet the needs of our developers too if it can be done. |
Indeed! Something such as
Was my initial take on this. However there are following issues to be resolved first:
|
Properties works for me — and I think that takes care of 2. Agree on 4 that there might be cases where you have both URI parameters and model properties, though I don’t think that is the case for any of our APIs currently. Robert On Dec 16, 2013, at 6:12 AM, Z [email protected] wrote:
|
With the relation to #47 this would be the new structure of a payload in 1B:
Refer to Use of Parameters & Attributes in API Blueprint and Related Format Changes in 1B. |
Is it too late to register reservations about calling this thing "Properties"? I'm in the middle of guiding contributors in converting a couple dozen blueprints from legacy format to FORMAT: 1A. This involves a frequent discussion about how to deal with "the information presently proposed to be called Properties." The word is really abstract; even the developers who have Properties to document are confused and put off by it; everyone's afraid the readers won't have a clue. In most of the text here, people called these things "body parameters." If that's the natural designation, maybe it should be the formal one. Any chance of an ID phrase ("+ Body Parameters") instead of just a single word ("+ Properties")? |
Thanks for your input! We have discussed this a lot and here are two main objectives against the word "parameter":
To build a common ground towards the proposed Resource Blueprint and in the spirit of Attribute-value pairs and I would go with Either as |
I prefer |
I'll settle for any of the "body XXX" or "payload xxx" forms. If we have that, I can be neutral on XXX. |
What is the current status? Is it possible to test an endpoint that requires application/x-www-form-urlencoded? If so, is there an example of this? By possible, I mean without putting the url-encoded values in as a string. Update: http://stackoverflow.com/questions/19840554/how-to-format-a-post-request-on-apiary-io That example does indeed have the values url-encoded but happy I can at least do it that way until 1B is out. This whole discussion made me wonder how to tell what blueprint version dredd supports and it was not clear how to find the answer to that question. |
Here is the proposal of Markdown Syntax for discussing body attributes / properties: MSON: Markdown Syntax for Object Notation I have made it as a separate repository as I think it is cool and useful enough to live as a stand-alone syntax even tho its initial implementation will be most likely available only as a part of API Blueprint parser. Note this syntax allows us not only to discuss the attributes of payload / models but to completely avoid writing In addition it opens the door for embedding (reusing) assets within another assets (item and collection) and much more! Please let me know what do you think. I would like to start with the implementation within days! |
👍 |
@zdne Just for info, will it be a matter of hours, days, weeks, … ? As I'm currently writing documentation with attributes and would like to know if I should postpone it to avoid writing the attributes section twice :) |
There should have been probably newsletter for this feature 😄. |
@mishak87 Good point! For now we are definitely going to announce it at https://twitter.com/apiblueprint and here. There will be a blog post at Apiary.io once the it is fully supported – news letter is something we are considering as well. |
Note the initial implementation at Apiary.io will render only top-level attributes. By this I mean Apiary.io rendered documentation. The syntax and JSON and JSON Schema generation will work from the start. |
Will tools like aglio work out of the box or should they be updated to sent from a small handheld device with autocorrection
|
Finally! 👍 |
Unfortunately not. Tools like Aglio needs to be updated to render the attributes. Once updated to the latest parser you will be able to use the syntax but you won't see it rendered until the tool is updated. |
Hi, any updates for Apiary yet? Thanks! |
@thomask We have ran into unexpected issues while deploying on production. We are currently working around the clock to fix these. I will keep this thread updated. Sorry about this. |
No worries of course! Looking forward to the release |
Using the latest format for our own documentation and it works great! Thanks! |
Update: Apiary now supports rendering of JSON and JSON Schema as well as simplified rendering of attributes: You can find some examples to get started here:
Please let us know how you like it! Either on Twitter, here (feel free to open a new issue) or at Gitter. Thank you all for your patience waiting for this – so much needed – feature! Support for rendering of every feature (nested objects, additional sample values, data structures & more ...) is in the making. |
Doesn't seem to work. Attached apib does not render the Attributes info anywhere. Am I being too eager about your "now"? Did you really mean "as of the next build" or something? Jack Repenning |
@jrep it should be really now as in right know – I can't see any attachment – can you please paste in in the body of the email or directly into GitHub? |
This is just a doodle blueprint but it works – http://docs.attributes2.apiary.io |
So happy to see this done. I was waiting for this to start documenting our new API. Now there is nothing holding me back. Starting first thing tomorrow. Just a little nitpick. It feels like the |
@pzurek thanks for your feedback! The So if you se a property that is When it comes to Let me know whether this makes sense. |
On Apr 20, 2015, at 8:08 PM, Z [email protected] wrote:
My bad. Jack Repenning |
@zdne I'm not entirely convinced. I subscribe to the view that there are no "optional" attributes on the object in the response. Something may be null or not but if it's a field on an object it should always be included in the payload. Plus I would like my docs to be as clear as possible at first sight with no additional explanation required. But I think I will simply put read-only annotations in descriptions to get around this. |
I hate to complain because there's some neat stuff here, but I'm super disappointed as it appears the new Attributes do not render in the previous document format? If so, that's a major bummer! Not sure why that would not be implemented. Would it not be pretty much the same tabled way the URI Parameters currently render? Am still stuck manually creating markdown tables for Attributes? Also it would seem that the URI parameters
Am I the only one bummed by this? Is the previous documentation format being deprecated? The new format is a major departure. There's some nice ideas there, but it's nowhere near concise. For us it's far too 'big' and spread-out, and not screen-space-efficient. |
Hey @grojguy, I am sorry that you are disappointed with what we do. Please let me clarify few things. The old rendered documentation is at the end of its life, discontinued and will be completely removed soon. I do not think we will add support for rendering the attributes in it. We would really like to hear any feedback on the new rendered documentation and any reasons why it does not work for you. As for the new documentation – the MSON rendering is not complete there just yet. Please follow the #191 for updates on this. Thanks! |
@kpande Request also allows attributes just as exactly as Response does. |
Hi, any updates on the progress for attributes with nested objects? Thanks! |
Documentation of message-body attributes. Similar to URI parameters.
Also if possible it should be clearly differentiated between the URI parameters description and Body Parameters description. Current state with the
parameters
section of a resource (action) might lead to confusion what parameters are discussed.The text was updated successfully, but these errors were encountered: