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

feat: add support for ordering via tags array #842

Merged
merged 3 commits into from
Jan 9, 2024

Conversation

darrenyong
Copy link
Contributor

🚥 Resolves CX-514

🧰 Changes

These changes adds support for ordering pages by the tags array as defined in OAS spec.

Per OAS Spec:
The order of the tags can be used to reflect on their order by the parsing tools.

The tags on this.api.tags comes in in the correct order, however, we create a new array Array.from(allTags) with tags added as we parse the file from top down. With these changes, I sort this array against the correctly ordered oasTags. Since the sorting will put tags that exist only at the endpoint level to the front, I also separate them and tack them on to the end of the sorted tags.

🧬 QA & Testing

Provide as much information as you can on how to test what you've done.

@darrenyong darrenyong requested a review from erunion January 9, 2024 16:58
Copy link
Member

@erunion erunion left a comment

Choose a reason for hiding this comment

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

nice

@erunion erunion merged commit 2ee56fc into main Jan 9, 2024
5 checks passed
@erunion erunion deleted the feat/support-ordered-tags branch January 9, 2024 18:10
@darrenyong darrenyong restored the feat/support-ordered-tags branch March 1, 2024 01:33
@kanadgupta kanadgupta deleted the feat/support-ordered-tags branch April 2, 2024 17:23
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