redocly-cli-cookbook icon indicating copy to clipboard operation
redocly-cli-cookbook copied to clipboard

Add sorting decorators (like old Redoc had)

Open lornajane opened this issue 1 year ago • 5 comments
trafficstars

Adds some of the sorting features that older versions of open source Redoc (v1 and v2) could apply at display time so that they can be used at any stage of the API lifecycle.

lornajane avatar Aug 16 '24 16:08 lornajane

Does this also include a custom rule to specify the order expected by the linter?

thesteve0 avatar Aug 18 '24 20:08 thesteve0

I don't have a rule for the method ordering included, but I think we can add one.

lornajane avatar Aug 19 '24 07:08 lornajane

I agree that it should accept a config for method order (maybe it can have a default for zero config). I can see particular people wanting to go in some specific order though which might not be alphabetical (such as DELETE last).

adamaltman avatar Aug 23 '24 01:08 adamaltman

Yeah for us we want GET, POST, PUT, DELETE

On Thu, Aug 22, 2024 at 6:56 PM Adam Altman @.***> wrote:

I agree that it should accept a config for method order (maybe it can have a default for zero config). I can see particular people wanting to go in some specific order though which might not be alphabetical (such as DELETE last).

— Reply to this email directly, view it on GitHub https://github.com/Redocly/redocly-cli-cookbook/pull/38#issuecomment-2306035708, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKWZQ6264CWOD3P7NAFIALZS2JE3AVCNFSM6AAAAABMUK2YU6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBWGAZTKNZQHA . You are receiving this because you commented.Message ID: @.***>

thesteve0 avatar Aug 23 '24 18:08 thesteve0

Shall we push this one through to completion? Seems powerful.

adamaltman avatar Oct 08 '24 01:10 adamaltman

@adamaltman Definitely! Want to take another look? I added the extra rules we discussed.

@thesteve0 I added a method-sort rule that I hope will do what you need, let me know if you get chance to try it?

lornajane avatar Oct 16 '24 17:10 lornajane