Questions tagged [apipie]
17 questions
3
votes
2 answers
Oops!! Method create.en not found for resource chats
I am using apipie gem for api documentation.
Under my api folder, there is one version**(api/v1)
When I access http://localhost:3000/apipie it shows me the documentation but when clicking on api document url ie POST /api/chats
It redirects to …

Pankaj
- 150
- 1
- 6
3
votes
2 answers
How to create api documentation using apipie outside the controller
I am using apipie for API documentation.
The problem I am facing now is that the large amount of information to be provided for documentation is ruining my code structure in the controller.
How can I write the documentation outside the controller…

Bala Karthik
- 1,353
- 2
- 17
- 26
2
votes
0 answers
Apipie Rails - How to document routes/controllers that are in gems (devise/devise_token_auth/etc.)
I'm creating a an API, that using Devise and devise_token_auth. Those controllers and controller files are in gems, so they're not actually in my project directory. I want to be able to add documentation for those routes (sign_up, sign_in, etc.) so…

Peter R
- 3,185
- 23
- 43
2
votes
1 answer
Combine params.required with apipie param_group
How can I combine Rails' params.require with apiepie's param_group to avoid duplication?

quantumpotato
- 9,637
- 14
- 70
- 146
1
vote
1 answer
apipie: describe the return of an array of strings
Using apipie-rails, I would like to describe the response of an array of strings.
# GET /api/v1/some_strings.json
["Foo", "Bar"]
I was thinking of describing the response like this:
api :GET "/api/v1/some_strings.json"
returns array_of: String,…

fiedl
- 5,667
- 4
- 44
- 57
1
vote
1 answer
Apipie swagger generator with array of hashes produces array of strings
I have an API that includes an array of hashes as a parameter:
param :parties, Array, :required => true, :desc => "A set of parties", of: Hash do
param :role, String, :required => true
param :guid, String, :required => true
param…

patschiboy
- 1,091
- 8
- 21
1
vote
0 answers
extending an apipie-rails validator
I'd like to extend NumberValidator to also validate for min and max values. I'd like to still call the default NumberValidator and have it return its own description (Must be a number) should it fail. Right now, I'm always getting my own…

OwenH
- 58
- 7
1
vote
2 answers
Oops!! Method index.en not found for resource items
I have used https://github.com/Apipie/apipie-rails for API docs.
This is working fine with rails 4 vestion after that I have updated my rails version to this rails 5.2.3 and it stoped working.
# app/controllers/api/v1/items_controller.rb
module Api
…

Pooja Mokariya
- 1,970
- 5
- 21
- 46
1
vote
1 answer
Why are my API Pie parameters not showing up?
I created the documentation for my methods, and the top-level method description shows up along with its verb, but when I click on any of these links it tells me "Oops!! Method create.en not found for resource questions."
Here is an example of my…

Xodarap
- 11,581
- 11
- 56
- 94
1
vote
1 answer
Rails apipie validation for boolean parameters failing
My delete api takes a boolean query params /users?force=true. In my controller, I added the following for apipie documentation
param :force, [true, false], required: false, desc: "query parameter."
When I make the api call, I…

learningtocode
- 755
- 2
- 13
- 27
1
vote
1 answer
How to document RESTful API?
I am new to RoR.
Is there any way to document RESTful api like Django REST Swagger?
Then i found the apipie-rails to document my api.
But when i try to integrate it with Spree, i got the following error:
Unable to autoload constant…

HFX
- 550
- 6
- 24
1
vote
0 answers
How to conditionally require a parameter based on a previous parameter
I am working with apipie for my rails app API and have a parameter that needs to be conditionally required. If a user is hired, they need to have a hired_at date. For other reasons those must be 2 separate columns. I cannot just check for the…

Zack
- 2,377
- 4
- 25
- 51
1
vote
0 answers
Rails 4 Apipie - How to document a parent controller class?
I'm using APIPIE to document an API that I'm implementing.
I have a class called BaseController that implements the methods create, update, destroy, show, etc, in a generic way, so any controller that extends BaseController will not need to…

Aleksandrus
- 1,589
- 2
- 19
- 31
0
votes
0 answers
Boolean parameter validation
I have a parameter defined as such:
param :purchased, [true, false]
This leads to the following error:
Invalid parameter 'purchased' value true: Must be one of: true, false.
I have also tried:
param :purchased, [true, false, 'true', 'false']
but…

migo
- 33
- 5
0
votes
1 answer
why is apipie documentation route not found?
After following the getting started steps of Apipie:
echo "gem 'apipie-rails'" >> Gemfile
bundle install
rails g apipie:install
And documenting a controller like this:
api :GET, '/users/:id'
param :id, :number, desc: 'id of the requested user'
def…

TomasLangebaek
- 51
- 1
- 5