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

fix: only add mutually exclusive description if argument is a lookup argument set #81

Merged
merged 2 commits into from
Sep 19, 2024

Conversation

ikadix
Copy link
Contributor

@ikadix ikadix commented Sep 19, 2024

No description provided.

Comment on lines -83 to +86
@schema[:description] ||=
"All '#{@definition.name}[]' params are mutually exclusive, only one can be provided."
if @definition.type.klass.ancestors.include?(Apia::LookupArgumentSet)
@schema[:description] ||=
"All '#{@definition.name}[]' params are mutually exclusive, only one can be provided."
end
Copy link
Contributor

Choose a reason for hiding this comment

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

change looks good, but can we update the specs to ensure we don't accidentally break this in future?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a post for the plain_text endpoint which uses the regular KeyValue argument set in the body. This doesn't use the mutually exclusive description.
Does that cover what you're looking for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh I also disabled the BlockLength cop in example/base.rb because refactoring that feels like it would make things less readable

@ikadix ikadix requested a review from paulsturgess September 19, 2024 10:53
@ikadix ikadix merged commit 543dba2 into main Sep 19, 2024
7 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.

2 participants