Skip to content

AAP-49223 Fix missing query parameters openapi spec #765

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

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

PabloHiro
Copy link
Contributor

@PabloHiro PabloHiro commented Jul 15, 2025

Description

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Test update
  • Refactoring (no functional changes)
  • Development environment change
  • Configuration change

Self-Review Checklist

  • I have performed a self-review of my code
  • I have added relevant comments to complex code sections
  • I have updated documentation where needed
  • I have considered the security impact of these changes
  • I have considered performance implications
  • I have thought about error handling and edge cases
  • I have tested the changes in my local environment

Additional Context

Assited by AI. Cursor on claude-4-sonnet model.

Screenshots/Logs

Snippet of the swagger view of the API schema:
image

@PabloHiro PabloHiro force-pushed the fix/missing-query-parameters-openapi-spec branch 4 times, most recently from 14424b6 to d45c842 Compare July 16, 2025 10:31
@PabloHiro PabloHiro marked this pull request as ready for review July 16, 2025 10:31
@PabloHiro PabloHiro force-pushed the fix/missing-query-parameters-openapi-spec branch from d45c842 to 3a69d91 Compare July 16, 2025 15:00
Copy link

DVCS PR Check Results:

PR appears valid (JIRA key(s) found)

Copy link

for field in model._meta.get_fields():
if self._is_simple_field(field):
model_fields.append(field.name)
return model_fields[:10] # Limit to avoid overwhelming the schema
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this really an issue? It seems like we should include all the fields.

# Basic exact match parameter
parameters.append(self._create_parameter(field_name, f'Filter by {field_name} (exact match)'))

# Add field-type specific parameters
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the presence of each of these filter types enable/disable the use of it from ATF? Or can they be used anyway (including things like isnull, regex, etc. that aren't included at all)?

I am wondering if it's worth filtering some things like created, modified since those are everywhere and seem less likely to be filtered than the model specific fields. And it would probably substantially reduce the schema size.

parameters = []

# Add the ordering parameters
for param_name in ['order', 'order_by']:
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm thinking order isn't appropriate here, but could be wrong. In gateway at least, the models that do have an order field use it for other purposes (like hierarchical ordering, application/usage order, etc.). order_by on the other hand is for ordering the query results.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ope, nevermind. I see it isn't a field but a param and the order by backend supports both. Ignore!

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.

4 participants