fix: GroupOrderArticle Schema

This commit is contained in:
Philipp Rothmann 2022-12-12 16:33:17 +01:00
parent 31a419c689
commit 3765042e2d
1 changed files with 41 additions and 27 deletions

View File

@ -183,7 +183,8 @@ RSpec.configure do |config|
type: :integer type: :integer
}, },
amount: { amount: {
type: :float, type: :number,
format: :float,
description: 'amount credited (negative for a debit transaction)' description: 'amount credited (negative for a debit transaction)'
}, },
financial_transaction_type_id: { financial_transaction_type_id: {
@ -222,7 +223,8 @@ RSpec.configure do |config|
type: :object, type: :object,
properties: { properties: {
amount: { amount: {
type: :float, type: :number,
format: :float,
description: 'amount credited (negative for a debit transaction)' description: 'amount credited (negative for a debit transaction)'
}, },
financial_transaction_type_id: financial_transaction_type_id:
@ -305,6 +307,9 @@ RSpec.configure do |config|
} }
}, },
GroupOrderArticleForCreate: { GroupOrderArticleForCreate: {
allOf: [
{ '$ref': '#/components/schemas/GroupOrderArticleForUpdate' },
{
type: :object, type: :object,
properties: { properties: {
order_article_id: order_article_id:
@ -313,20 +318,27 @@ RSpec.configure do |config|
description: 'id of order article' description: 'id of order article'
} }
} }
}
]
}, },
GroupOrderArticle: { GroupOrderArticle: {
allOf: [
{ '$ref': '#/components/schemas/GroupOrderArticleForCreate' },
{
type: :object, type: :object,
properties: { properties: {
id: { id: {
type: :integer type: :integer
}, },
result: { result: {
type: :float, type: :number,
format: :float,
description: 'number of units the users ordergroup will receive or has received' description: 'number of units the users ordergroup will receive or has received'
}, },
total_price: total_price:
{ {
type: :float, type: :number,
format: :float,
description: 'total price of this group order article' description: 'total price of this group order article'
}, },
order_article_id: order_article_id:
@ -336,6 +348,8 @@ RSpec.configure do |config|
} }
}, },
required: %w[order_article_id] required: %w[order_article_id]
}
]
}, },
Meta: { Meta: {
type: :object, type: :object,