Skip to content
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

Use array items type from validator #904

Merged
merged 2 commits into from
Dec 19, 2023

Conversation

PanosCodes
Copy link
Contributor

@PanosCodes PanosCodes commented Dec 19, 2023

Closes #903

@PanosCodes PanosCodes marked this pull request as draft December 19, 2023 04:40
@PanosCodes PanosCodes force-pushed the swagger-array-items-type branch 2 times, most recently from ad49a98 to 5eb27ec Compare December 19, 2023 05:14
@PanosCodes PanosCodes marked this pull request as ready for review December 19, 2023 05:16
@@ -67,7 +67,7 @@ def for_array_type
'$ref' => reference_name
}
else
items = { type: 'string' }
items = { type: array_items_type(items_type).to_s }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏽

context 'of a Swagger type' do
let(:validator_options) { { of: Integer } }

it { is_expected.to eq({ type: 'integer' }) }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏽

@mathieujobin mathieujobin merged commit ae75445 into Apipie:master Dec 19, 2023
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Discrepancy: params Defined as Array of Integer in Apipie appears as Array of Strings in Swagger File
2 participants