Skip to content

Honor operation extraction filters in OpenAPI specifications - #296

Merged
Alexander Zaslonov (azaslonov) merged 8 commits into
mainfrom
copilot/bugfix-selective-api-operation-filter
Sep 25, 2026
Merged

Alexander Zaslonov (azaslonov) merged 8 commits into
mainfrom
copilot/bugfix-selective-api-operation-filter

Conversation

Copilot AI commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Operation filters excluded individual artifacts but left the full API specification intact, allowing publishing to recreate excluded operations.

  • Consistent filtering: Apply existing operation matching to YAML/JSON OpenAPI and Swagger specifications, including x-ms-paths. Remove excluded methods and paths with no remaining operations.
  • Preserved behavior: Retain shared definitions and metadata. Leave specifications unchanged when operation filters are omitted; leave GraphQL, WSDL, and WADL handling unchanged.

For example:

apis:
  - api1:
      operations:
        - create-resources

The exported specification now contains only create-resources, matching the operation artifacts.

Copilot AI self-assigned this Sep 25, 2026
Copilot AI balanced review requested due to automatic review settings September 25, 2026 15:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request. Check if the Files changed in this pull request are included in default exclusions.


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

…loses #294)

Co-authored-by: azaslonov <2320302+azaslonov@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 25, 2026 15:55
Copilot AI changed the title [WIP] Fix selective API operation extraction filter for specification.yaml Honor operation extraction filters in OpenAPI specifications Sep 25, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Whole-document parsing and serialization can corrupt untouched large numeric and date-like values.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 High severity

Open (1)

Comment thread src/services/api-extractor.ts Outdated
Co-authored-by: azaslonov <2320302+azaslonov@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 25, 2026 20:11
Copilot AI and others added 2 commits September 25, 2026 20:13
Co-authored-by: azaslonov <2320302+azaslonov@users.noreply.github.com>
Co-authored-by: azaslonov <2320302+azaslonov@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Unsafe fractional or exponent-form numbers can be rounded when filtered specifications are reserialized.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
Resolved since last review (1)

Comment thread src/services/api-extractor.ts Outdated
… edge-case tests

Co-authored-by: azaslonov <2320302+azaslonov@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

JSON and YAML filtering can still alter unrelated high-precision decimal values.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)

Copilot AI review requested due to automatic review settings September 25, 2026 20:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

JSON and YAML floating-point values can still be corrupted during specification reserialization.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 High severity · 1 Medium severity

Open (2)

Comment thread src/services/api-extractor.ts Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: azaslonov <2320302+azaslonov@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

YAML high-precision floating-point metadata can still be silently rounded during filtering.

Review effort: Balanced
Findings: None

Resolved since last review (2)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

YAML floating-point metadata can still be silently rounded during filtering.

Review effort: Balanced
Findings: None

Previously missed (1)

In code that hasn't changed since last review

Medium severity Preserve YAML float precision during filtering

src/​services/​api-extractor.ts:449

YAML floating-point scalars are still parsed through CORE_SCHEMA as JavaScript numbers, so this path remains lossy whenever filtering modifies the document. For example, an unrelated value such as 9223372036854775807.0 or a high-precision decimal is rounded before yaml.dump; the custom type only preserves tokens resolved as YAML integers. Please preserve the raw representation of YAML float/exponent tokens as well (or use a lossless YAML AST) so filtering operations cannot change unrelated schema examples or bounds.

@azaslonov
Alexander Zaslonov (azaslonov) merged commit 82f1ab2 into main Sep 25, 2026
8 checks passed
@azaslonov
Alexander Zaslonov (azaslonov) deleted the copilot/bugfix-selective-api-operation-filter branch September 25, 2026 22:29
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.

[Bug] Selective API operation extraction filter does not filter paths in specification.yaml

5 participants