-
Notifications
You must be signed in to change notification settings - Fork 365
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
Api Blueprint format #235
Comments
Hi, I am working for support swagger, probably you could use https://apitransformer.com/ for transform the outoput. Related: #216 |
@ceritium great! thank you for the link |
@AlexandrZ, do you know this? https://github.com/calderalabs/rspec_api_blueprint/ |
@ceritium no. Thank you, will check it |
@ceritium btw apitransformer didn't help. I tried to convert from I/O Docs format to Blueprint and got an error. |
@AlexandrZ I mean use the swagger output and transform it to blueprint. |
Echoing my comments from #216, I'll merge a PR that adds support of Api Blueprint. I don't use it so I have no intentions of adding support myself. |
I'm working on this. The caveat here is that BlueprintAPI is not navigable like HTML with index+page with details, therefore my plan is to have just one |
This commit adds API Blueprint (APIB) to this gem. A few highlights: * APIB groups entities, resources, routes, HTTP verbs and requests differently than what the gem currently uses. Because of that I had to override more methods than usual in the `Markup` classes. APIB has the following structure: 1. resource (e.g "Group Orders") 2. route (e.g "Orders Collection [/orders]") 3. HTTP method (e.g "Loads all orders [GET]") 4. Requests. Here, we show all different requests which means that we don't have the repetition of GET for each example. All examples stay under one, unified HTTP method header. * APIB differentiates parameters (values used in the URLs) from attributes (values used in the actual request body). You can use `attributes` in your texts. * APIB has a `route` header, which means we had to add a new RSpec block called `route()` which wraps HTTP methods, like the following: ```ruby route "/orders", "Orders Collection" do get "Returns all orders" do # ... end delete "Deletes all orders" do # ... end end ``` If you don't use `route`, then param in `get(param)` should be an URL. * APIB is not navigable like HTML, so generating an index file makes no sense. Because of that, we are generating just one file, `index.apib`. * We are omitting some APIB features in this version so we can get up and running sooner. Examples are object grouping, arrays objects and a few description points. Unrelated to APIB: * FakeFS was being used _globally_ in test mode, which means that nothing would load file systems, not even a simple `~/.pry_history`, which made debugging impossible. I moved the usage of this gem to the places where it is used. Closes #235.
This commit adds API Blueprint (APIB) to this gem. A few highlights: * APIB groups entities, resources, routes, HTTP verbs and requests differently than what the gem currently uses. Because of that I had to override more methods than usual in the `Markup` classes. APIB has the following structure: 1. resource (e.g "Group Orders") 2. route (e.g "Orders Collection [/orders]") 3. HTTP method (e.g "Loads all orders [GET]") 4. Requests. Here, we show all different requests which means that we don't have the repetition of GET for each example. All examples stay under one, unified HTTP method header. * APIB differentiates parameters (values used in the URLs) from attributes (values used in the actual request body). You can use `attributes` in your texts. * APIB has a `route` header, which means we had to add a new RSpec block called `route()` which wraps HTTP methods, like the following: ```ruby route "/orders", "Orders Collection" do get "Returns all orders" do # ... end delete "Deletes all orders" do # ... end end ``` If you don't use `route`, then param in `get(param)` should be an URL. * APIB is not navigable like HTML, so generating an index file makes no sense. Because of that, we are generating just one file, `index.apib`. * We are omitting some APIB features in this version so we can get up and running sooner. Examples are object grouping, arrays objects and a few description points. Unrelated to APIB: * FakeFS was being used _globally_ in test mode, which means that nothing would load file systems, not even a simple `~/.pry_history`, which made debugging impossible. I moved the usage of this gem to the places where it is used. Closes #235.
This commit adds API Blueprint (APIB) to this gem. A few highlights: * APIB groups entities, resources, routes, HTTP verbs and requests differently than what the gem currently uses. Because of that I had to override more methods than usual in the `Markup` classes. APIB has the following structure: 1. resource (e.g "Group Orders") 2. route (e.g "Orders Collection [/orders]") 3. HTTP method (e.g "Loads all orders [GET]") 4. Requests. Here, we show all different requests which means that we don't have the repetition of GET for each example. All examples stay under one, unified HTTP method header. * APIB differentiates parameters (values used in the URLs) from attributes (values used in the actual request body). You can use `attributes` in your texts. * APIB has a `route` header, which means we had to add a new RSpec block called `route()` which wraps HTTP methods, like the following: ```ruby route "/orders", "Orders Collection" do get "Returns all orders" do # ... end delete "Deletes all orders" do # ... end end ``` If you don't use `route`, then param in `get(param)` should be an URL. * APIB is not navigable like HTML, so generating an index file makes no sense. Because of that, we are generating just one file, `index.apib`. * We are omitting some APIB features in this version so we can get up and running sooner. Examples are object grouping, arrays objects and a few description points. Unrelated to APIB: * FakeFS was being used _globally_ in test mode, which means that nothing would load file systems, not even a simple `~/.pry_history`, which made debugging impossible. I moved the usage of this gem to the places where it is used. Closes #235.
JSON requests should use UTF-8 by default according to http://www.ietf.org/rfc/rfc4627.txt, so we will remove `charset=utf-8` when we find it to avoid redundancy. In the process, I moved code that was only used by APIB into the APIB classes, such as exposing `content_type` to the templates. If I changed the `content-type` for all templates it would break unrelated things. Connects to #235.
This commit adds API Blueprint (APIB) to this gem. A few highlights: * APIB groups entities, resources, routes, HTTP verbs and requests differently than what the gem currently uses. Because of that I had to override more methods than usual in the `Markup` classes. APIB has the following structure: 1. resource (e.g "Group Orders") 2. route (e.g "Orders Collection [/orders]") 3. HTTP method (e.g "Loads all orders [GET]") 4. Requests. Here, we show all different requests which means that we don't have the repetition of GET for each example. All examples stay under one, unified HTTP method header. * APIB differentiates parameters (values used in the URLs) from attributes (values used in the actual request body). You can use `attributes` in your texts. * APIB has a `route` header, which means we had to add a new RSpec block called `route()` which wraps HTTP methods, like the following: ```ruby route "/orders", "Orders Collection" do get "Returns all orders" do # ... end delete "Deletes all orders" do # ... end end ``` If you don't use `route`, then param in `get(param)` should be an URL. * APIB is not navigable like HTML, so generating an index file makes no sense. Because of that, we are generating just one file, `index.apib`. * We are omitting some APIB features in this version so we can get up and running sooner. Examples are object grouping, arrays objects and a few description points. Unrelated to APIB: * FakeFS was being used _globally_ in test mode, which means that nothing would load file systems, not even a simple `~/.pry_history`, which made debugging impossible. I moved the usage of this gem to the places where it is used. Closes #235.
JSON requests should use UTF-8 by default according to http://www.ietf.org/rfc/rfc4627.txt, so we will remove `charset=utf-8` when we find it to avoid redundancy. In the process, I moved code that was only used by APIB into the APIB classes, such as exposing `content_type` to the templates. If I changed the `content-type` for all templates it would break unrelated things. Connects to #235.
Please, add api blueprint output format. The specification can be found here - https://apiblueprint.org/
The text was updated successfully, but these errors were encountered: