Questions tagged [rswag]
52 questions
0
votes
0 answers
Documentating an API GET request with rswag in ruby on rails 6
i'm working on a team project and we are all new to rswag, we are using JWT token as authentication and mostly basic crud-like controllers.
I'm having a very hard time figuring out rswag, and what should i be documenting and what not, we have…

GuidoMedina
- 117
- 1
- 9
0
votes
0 answers
How to assign global variable inside Rswag 2.3.2 spec tests?
I'm new to RoR, a real newbie. But I got a project that need RoR for the backend development. And in this project for the API documentation is using Rswag. and I hit a wall when tried to authorizing the endpoints using JWT, which I want to create…

Khrisna Gunanasurya
- 725
- 10
- 36
0
votes
1 answer
Swagger nested parameter object
I'd like to make a swagger endpoint thats request body is a product object with 2 integar fields and an options object with 2 more fields, I'm using rswag as a ruby gem
In my spec
parameter in: :body, schema: {
type: :object,
…

Omar Hussein
- 1,057
- 2
- 13
- 31
0
votes
1 answer
RSpec and rswag: How to perform enqueued jobs in test
I have an API project in Rails 5 using rswag for endpoint definition and testing.
One controller action, create, enqueues an ActiveJob with keyword arguments using perform_later(job_title: @job, date: @date)
When I use run_test! in my request spec…

user1022788
- 419
- 8
- 18
0
votes
1 answer
Rswag nested attributes syntax
i have a project in which i have to write nested attribute in rswag
{
"question_bank": {
"question_exams_attributes": {
"0": {
"question_bank_id": "",
"exam_id": "12",
"sub_category_id": "23",
"_destroy":…

cali
- 1
- 1
0
votes
2 answers
How to add component in RSWAG request parameters?
I have some common parameters which are called in almost all API calls so is it possible to create component for those parameters and call them in rswag api request.
Something like schema '$ref' => '#/definitions/parameters'
Thanks!

Deepika
- 826
- 6
- 14
0
votes
1 answer
Swagger with swag gem - response of an array of multiple complex types
Swagger docs say that we can use a complex type object specified as array type as follows:
"type": "array",
"items": {
"$ref": "#/components/schemas/VeryComplexType"
}
But what if you have an array of different complex types (e.g. country,…

belgoros
- 3,590
- 7
- 38
- 76