Skip to content

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

Merged
ikadix merged 2 commits intomainfrom
fix_body_descriptions
Sep 19, 2024
Merged

fix: only add mutually exclusive description if argument is a lookup argument set#81
ikadix merged 2 commits intomainfrom
fix_body_descriptions

Conversation

@ikadix
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
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