-
Notifications
You must be signed in to change notification settings - Fork 15
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
Access column from filters #17
Comments
Can you elaborate on why it's needed? I would have thought the filter name that was needed for the spec would have been the JSON:API filter name? This is referring to the Eloquent model column name, which I would have thought would be an internal implementation detail? |
The filter name is not really the eloquent name. It could be anything. I was using the filter with a name: "modified_since" with a column name of updated_at and operator >=. Which does make sense. The problem is generating examples for the fields like here: |
By examples, do you mean you're creating models for the examples? |
The examples are extracted from real model data and published as part of the resulting spec file. Having real exanples helps a lot in understanding the api. |
Ok, thanks for explaining. Yeah, I'd be happy with the method being made public - your best bet is to do a PR as I'm pretty limited on open source time at the mo. Otherwise I'll see if I can get to it. If you do a PR, if you could make the same change to all filters that have a column method - just so it's consistent. |
Ok, cool, ill see when i can make some time. |
As promised :) |
I'm helping to build a openapi spec generator but it seems it is not possible to get the
column
property of a filter. This makes collecting examples for the specification very hard.Any chance we can make this method public?
This would enable us to generate column examples for filters without doing very weird (and ugly) things.
The text was updated successfully, but these errors were encountered: