Skip to content

add ordering paramter to openApiPaginator#564

Closed
MasaKni wants to merge 3 commits intocnizzardini:masterfrom
MasaKni:3.x-dev
Closed

add ordering paramter to openApiPaginator#564
MasaKni wants to merge 3 commits intocnizzardini:masterfrom
MasaKni:3.x-dev

Conversation

@MasaKni
Copy link
Copy Markdown
Contributor

@MasaKni MasaKni commented Feb 5, 2025

adding the possibility to order by array of fields, current behaviour adds sorting in one param
'#/x-swagger-bake/components/parameters/paginatorSort ,

this creates an array of objects with
{ "field": "name", "dir": "asc" }
Screenshot 2025-02-07 at 10 53 29

@cnizzardini
Copy link
Copy Markdown
Owner

@MasaKni can you provide a description for this and also please respond to the many comments I've made in your other PR #563 before I close it out. It's enough of a pain in the ass being a maintainer, so respond to comments when I make them. I have a shit ton of fucking packages I maintain and this is fucking time consuming.

@MasaKni
Copy link
Copy Markdown
Contributor Author

MasaKni commented Feb 7, 2025

@MasaKni can you provide a description for this and also please respond to the many comments I've made in your other PR #563 before I close it out. It's enough of a pain in the ass being a maintainer, so respond to comments when I make them. I have a shit ton of fucking packages I maintain and this is fucking time consuming.

I did resolve them... It just took me time because i am also working on other projects.
I have moved the functionality for ordering here, so we would choose a structure to how we wanna build the array of ordering.

@cnizzardini
Copy link
Copy Markdown
Owner

@MasaKni take a look at that merge conflict. Once that is resolved I'll pull this branch down for testing.

@MasaKni
Copy link
Copy Markdown
Contributor Author

MasaKni commented Feb 10, 2025

@MasaKni take a look at that merge conflict. Once that is resolved I'll pull this branch down for testing.

resolved

@cnizzardini
Copy link
Copy Markdown
Owner

cnizzardini commented Feb 11, 2025

@MasaKni I see this in Swagger when I pull in this branch. This doesn't appear to work. Are there additional instructions to follow? Maybe focus on getting this working in https://editor.swagger.io/ where it also looks like the screenshot below. Won't merge this as-is.

image

@MasaKni
Copy link
Copy Markdown
Contributor Author

MasaKni commented Feb 13, 2025

it does look like this when you don't hit the try it out button

@cnizzardini
Copy link
Copy Markdown
Owner

it does look like this when you don't hit the try it out button

What an ugly UI. I guess thats how they decided to do it... Does this support an array of objects then for sorting or can you provide an example of sorting multiple things?

@MasaKni
Copy link
Copy Markdown
Contributor Author

MasaKni commented Apr 22, 2025

it does look like this when you don't hit the try it out button

What an ugly UI. I guess thats how they decided to do it... Does this support an array of objects then for sorting or can you provide an example of sorting multiple things?

Actually this stopped working because there has been some update in the swagger library recently, not sure which one caused this. It would build the url with the query not encoded and cause a problem because now we can't pass multiple elements in the array as it would only catch the last element.
I substituted it with a string so unless you suggest sth else to fix the swagger url building we can close this

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