-
Notifications
You must be signed in to change notification settings - Fork 4k
Deduplicate path parameters from OpenAPI spec #3264
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
Deduplicate path parameters from OpenAPI spec #3264
Conversation
🦋 Changeset detectedLatest commit: c4b150e The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR deduplicates duplicate OpenAPI path parameters by filtering out duplicates based on their name and location.
- Replace the direct usage of operation parameters with a deduplicated list.
- Introduce a helper function (deduplicateParameters) to encapsulate the deduplication logic.
- Update the changeset file to indicate the deduplication improvement.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
packages/react-openapi/src/OpenAPISpec.tsx | Replaces the parameter list with a deduplicated one using a helper function and adds the deduplication function. |
.changeset/violet-schools-care.md | Adds a changeset entry to document the deduplication change. |
Comments suppressed due to low confidence (1)
packages/react-openapi/src/OpenAPISpec.tsx:121
- Consider adding unit tests to confirm that the deduplication logic works as expected for various scenarios, including edge cases where parameters only differ in case or other properties.
function deduplicateParameters(parameters: OpenAPI.Parameters): OpenAPI.Parameters {
Summary of the deployments: Version 1
Version 2
Test content |
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
c4b150e
to
450f97a
Compare
No description provided.