Skip to content
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

[FEATURE] Check order of methods in spec #272

Closed
dblock opened this issue Apr 25, 2024 · 4 comments · Fixed by #326
Closed

[FEATURE] Check order of methods in spec #272

dblock opened this issue Apr 25, 2024 · 4 comments · Fixed by #326
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@dblock
Copy link
Member

dblock commented Apr 25, 2024

Is your feature request related to a problem?

Coming from #271 where we reordered a DELETE method.

What solution would you like?

A linter that orders methods (probably GET, POST, PUT, PATCH, DELETE).

What alternatives have you considered?

Alphabetical order.

@dblock dblock added enhancement New feature or request untriaged help wanted Extra attention is needed and removed untriaged labels Apr 25, 2024
@nhtruong
Copy link
Collaborator

This should be applied to entire spec folder right?
We should also alow --fix option in the linter to auto fix issues like this.

@dblock
Copy link
Member Author

dblock commented Apr 25, 2024

@nhtruong Yes.

@nhtruong
Copy link
Collaborator

nhtruong commented Apr 25, 2024

If someone else is picking this up: We already have a helper function that can do in-place object sorting with a custom priority list.

(Added this previously so I can add custom sorting for operation properties for the linter later. The operations are already following a certain order for their properties. We're just not enforcing it yet.)

@dblock
Copy link
Member Author

dblock commented Jun 7, 2024

We should also alow --fix option in the linter to auto fix issues like this.

#327

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants