28_introduce_rswag #35

Merged
philipp merged 46 commits from 28_introduce_rswag into develop 2023-01-05 13:45:47 +01:00
4 changed files with 10 additions and 8 deletions
Showing only changes of commit 619fdbe958 - Show all commits

View file

@ -46,7 +46,7 @@ describe 'Order Articles', type: :request do
end
end
describe 'supplier' do
describe 'when ordered by supplier' do
let(:q) { { q: { ordered: 'supplier' } } }
run_test! do |response|
@ -56,7 +56,7 @@ describe 'Order Articles', type: :request do
end
end
describe 'member' do
describe 'when ordered by member' do
let(:q) { { q: { ordered: 'member' } } }
run_test! do |response|

View file

@ -91,12 +91,9 @@ describe 'User', type: :request do
response '200', 'success' do
schema type: :object, properties: {
financial_transaction: {
type: :object,
items: {
'$ref': '#/components/schemas/FinancialTransaction'
}
}
}
let(:id) { ft.id }
run_test! do |response|
data = JSON.parse(response.body)

View file

@ -53,6 +53,7 @@ describe 'User', type: :request do
tags 'User', 'Financial Transaction'
produces 'application/json'
let(:user) { create :user, :ordergroup }
let(:api_scopes) { ['finance:user'] }
FinancialTransactionClass.create(name: 'TestTransaction')
response 200, 'success' do
@ -93,7 +94,6 @@ describe 'User', type: :request do
}
}
let(:api_scopes) { ['finance:user'] }
run_test!
end

View file

@ -79,7 +79,12 @@ module ApiHelper
def self.q_ordered_url_param
parameter name: :q, in: :query, required: false,
description: "'member' show articles ordered by the user's ordergroup, 'all' by all members, and 'supplier' ordered at the supplier",
schema: { '$ref' => '#/components/schemas/q_ordered' }
schema: {
type: :object,
properties: {
ordered: { '$ref' => '#/components/schemas/q_ordered' }
}
}
end
end
end